Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2311029pxa; Mon, 3 Aug 2020 12:50:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/N+mP4M16fRvlbBeJaHijAI2wlJqND8BTa7ttwcf6oeci18wohga7UE+LOmp7TPx6BfUL X-Received: by 2002:a17:906:4dc8:: with SMTP id f8mr15495329ejw.257.1596484255320; Mon, 03 Aug 2020 12:50:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596484255; cv=none; d=google.com; s=arc-20160816; b=utjTBYbSZa2jCK/6Fb39bzKC1HYcm9o3XE0cyQv5QXsO5PpWX/2/5hnTC+eZwiq1bj Yk8SUPNugsaRc0GrzKT6TZJGTbmlNUkp4rpr5usKXp94Mx57onABnmV5MtAXuTF4PymH eDE72b7LNY07q+8pLTct8SpO90PclEI9vBBsY15n/uam5w8Db3nxlGcpmBNHg/dv9zwY jmFqjw8OG6JuFqRrZZyGQQlwM5MfiUr+cwCf9yCgYqfiemctrx1ic6kWfBCrslZDeAT2 FGEZTYHKE9+0iBP4TGQVCBPrCoxV4kL5grBIPyWnkAQF/HhaqTw/P6s+FDsFXopcFZHp 6B2w== 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; bh=uv1PMEy8GesSdgTG5rBH9qCmMBWOIGrZBOkmEO91VvA=; b=Hf4Xp+cEyisqXGVQVkM6/4p2efeNh1w786Xn1u7Kz2dJrIHIREVrUa5vKqq7z8AajX 7+dFVFk4EBfblQHisL52llHKltrTa0U87pkp8DphOtNSCQ8NldB9FBkyX83roHnfOUII lzMgFIbAJR8kWxa0QjutgKuqNLWoWVEgMOUnU7ArLmC3VqcW6IA8Sm9gc7mUkApabdVb gSVnjvaEYnZzoM/JsLutst+erxJzoUnTufOFgfEzAqrRhjx2jSC/dydCS0M7Z4rQSvJx Zntq1/NxDrr2a9wvoqlQzKysv/1qHtXB66OgcVf4axg6w2hCptwFkT8ir0lTBV+1Dw2Z KIjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Yp26KhrM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb21si11050378edb.31.2020.08.03.12.50.32; Mon, 03 Aug 2020 12:50:55 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Yp26KhrM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728480AbgHCTsU (ORCPT + 99 others); Mon, 3 Aug 2020 15:48:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:59870 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728041AbgHCTsU (ORCPT ); Mon, 3 Aug 2020 15:48:20 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BA34E20672; Mon, 3 Aug 2020 19:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596484100; bh=TYwSKctwtfyWMcxzfWbRO0/nzXNAk2+dqsadKDSMcW0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Yp26KhrMpYKeBxjbGyLe6bxIrhY2mIFOVxeMNzcpCeGSh+hnHpNtZI/BNhZZTFdge eVBljEhZZQyXRVxdX1i2bYn1aTuR/qTfp/VFi1YZY1tevAv9LaTEGqvs1hzTmdS+rj lAL3J/JWoPR79AUpWvyMTD5IhHhp9vPrYj4SLoE0= Date: Mon, 3 Aug 2020 12:48:17 -0700 From: Jakub Kicinski To: Ahmed Abdelsalam Cc: davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, andrea.mayer@uniroma2.it Subject: Re: [net-next v2] seg6: using DSCP of inner IPv4 packets Message-ID: <20200803124817.5068e06d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20200803181417.1320-1-ahabdels@gmail.com> References: <20200803181417.1320-1-ahabdels@gmail.com> 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 Mon, 3 Aug 2020 18:14:17 +0000 Ahmed Abdelsalam wrote: > 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 Please make sure it builds cleanly with W=1 C=1: net/ipv6/seg6_iptunnel.c:131:21: warning: incorrect type in assignment (different base types) net/ipv6/seg6_iptunnel.c:131:21: expected restricted __be32 [usertype] tos net/ipv6/seg6_iptunnel.c:131:21: got unsigned char net/ipv6/seg6_iptunnel.c:133:21: warning: incorrect type in assignment (different base types) net/ipv6/seg6_iptunnel.c:133:21: expected restricted __be32 [usertype] tos net/ipv6/seg6_iptunnel.c:133:21: got unsigned char [usertype] tos net/ipv6/seg6_iptunnel.c:144:27: warning: incorrect type in argument 2 (different base types) net/ipv6/seg6_iptunnel.c:144:27: expected unsigned int tclass net/ipv6/seg6_iptunnel.c:144:27: got restricted __be32 [usertype] tos