Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1791799imi; Sat, 23 Jul 2022 18:24:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u3xUIiQijgcpqBb7SWKuvMI81u1GwPXp6A0NjQUD1KA5Q94UeSfnKYD19NL1VG4y9cwAsw X-Received: by 2002:a17:906:dc95:b0:72f:ab47:1692 with SMTP id cs21-20020a170906dc9500b0072fab471692mr4874373ejc.319.1658625863033; Sat, 23 Jul 2022 18:24:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658625863; cv=none; d=google.com; s=arc-20160816; b=yTCzbKxwiBl2rZeWL9Z82r/9zkXDug2A+EZbg3ujk3td1//JD8lSr3cZsdnOfCBTjo Kwrdh5oW04alLS/nX7HdhhyOMSVAE2GeamtqGozCpZV4xWSnHpeaqEk7j5m33Ekr+YkK iv7HE0Sv5hKCyFZDIqHFobs44sXV2I3gI3L892dRA75xnrFQ3Gy0Ek304EehljGVjC1z Lbfzvdnj8ac2j/IPGEz/xLyDhIPRksbm8iQs4v28BgykfL3WJSQ4scRNaxkvcaF6c4Z7 kTPUpyOdsexbXgYr9sPMMfCvHrdzL9RN/y6ZdX+1Tdf0kV4VuD/TJVj3Ju7cqiOh3HSt BmSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Dr9mIdFoxA+uJnGlPkvj4VSnpdpSXDs2SgCUQNfNjKE=; b=hZc6+IJrKRHinJLDJiC7p1BEuVnKbPIsosoFzntaTQn+K6078jMqx7K4hKu+V0DQH8 yCrrMJyR6smkSLd5b1wmUPBBS0CAp2ktD8aOAHuedT6uP4NY5nhxAocijwiu1EjcjFLm NEU5LWXvaCJ3ZvNDfArQOlOYbUy30VTqFElpCd9KevGLm/1+2qLKIPE2G1ueTvXmhPxE izFV2dumZkLZanG+tJVtM4nmnf5sE5T/7+il729l3csahZ60vk0P7gP/TB6jV+K+1rDh usBFd5rnpDoLC0lrExS3SZSt2Flrs7xmp0f7P/Yvp28LNvyn58nemcH4eJYv46gfiZ6f SGvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@westermo.com header.s=12052020 header.b="nBl/TcZx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=westermo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020a056402510e00b0043bbc9402b5si10756849edd.604.2022.07.23.18.23.58; Sat, 23 Jul 2022 18:24:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@westermo.com header.s=12052020 header.b="nBl/TcZx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=westermo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232172AbiGXAmZ (ORCPT + 99 others); Sat, 23 Jul 2022 20:42:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbiGXAmY (ORCPT ); Sat, 23 Jul 2022 20:42:24 -0400 X-Greylist: delayed 228 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 23 Jul 2022 17:42:23 PDT Received: from mx07-0057a101.pphosted.com (mx07-0057a101.pphosted.com [205.220.184.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4239217064 for ; Sat, 23 Jul 2022 17:42:23 -0700 (PDT) Received: from pps.filterd (m0214197.ppops.net [127.0.0.1]) by mx07-0057a101.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26O0ODUt029320; Sun, 24 Jul 2022 02:38:04 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=westermo.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=12052020; bh=Dr9mIdFoxA+uJnGlPkvj4VSnpdpSXDs2SgCUQNfNjKE=; b=nBl/TcZxeWvchbrTOCqezCv0aEfVn95IgnPj2u+WqkGWAzZegCWNW0XGe/4gODDNUg66 Se7jDnanEM8GjWDar9Z3Slyp+1XPbrnY1VegjX99+TAYKHrZcWe7+5PuiPZ0F/6C/ULF JE8QX5jfEjVSmPOGh+Nt9Ba2obc356JDnasrcQQGM4Ly/dNavsnS6aWf2DvddyP/mgTX 86uDxWoHW6C+Wc5ZUG12CKzpMOEaEuASxrw8eWlmzTdsVuJHqfh/sxDonruehUcYWf5Y qfNzIii2ZX31PUX6FRD8CnLYccUeD20g8HFv980Rus9HH1y3P6LhYUXSxzDtxkqIkh3d Xw== Received: from mail.beijerelectronics.com ([195.67.87.131]) by mx07-0057a101.pphosted.com (PPS) with ESMTPS id 3hg5bbgrky-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 24 Jul 2022 02:38:04 +0200 Received: from Orpheus.nch.westermo.com (172.29.100.2) by EX01GLOBAL.beijerelectronics.com (10.101.10.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.2375.17; Sun, 24 Jul 2022 02:38:00 +0200 From: Matthias May To: CC: , , , , , , , , , Matthias May Subject: [PATCH 0/2 net-next] geneve: fix TOS inheriting Date: Sun, 24 Jul 2022 02:37:39 +0200 Message-ID: <20220724003741.57816-1-matthias.may@westermo.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.29.100.2] X-ClientProxiedBy: wsevst-s0023.westermo.com (192.168.130.120) To EX01GLOBAL.beijerelectronics.com (10.101.10.25) X-Proofpoint-GUID: L-hfHzRnloXqbZLBCKDLL-DFgxcspLTq X-Proofpoint-ORIG-GUID: L-hfHzRnloXqbZLBCKDLL-DFgxcspLTq X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently when the TOS of an encapsulated frame is inherited, the 6 DSCP bits are cut down to 3 original TOS bits. Compare to other L2 tunneling protocols (gretap, vxlan) this is unexpected. IPv4 and IPv6 have both this behaviour but for different reasons. For IPv4 the bits are lost in the routing table lookup. The patch copies the full tos out before the lookup and uses the copy. For IPv6 the RT_TOS macro cuts off the 3 bits. I'm not really familiar with the IPv6 code, but to me it seems as if this part of the code only uses the TOS for the flowlabel. Is there any reason why the flowlabel should be restricted to these 3 bits? The patch simply removes the usage of this macro, but i don't know if there was a specific intention behind that. I can't find any immediate breakage, but then again my IPv6 testing is fairly limited. Matthias May (2): geneve: fix TOS inheriting for ipv4 geneve: fix TOS inheriting for ipv6 drivers/net/geneve.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) -- 2.35.1