Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp2074010rwb; Fri, 5 Aug 2022 12:44:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR4IPQEpTVJV7dacPZVFvmfMI6ZbEe6sXOVbiqVSsrX2ww+jTVrzIPcan7/C59TpNTao5ZfF X-Received: by 2002:a17:906:8a78:b0:730:7a4f:fb36 with SMTP id hy24-20020a1709068a7800b007307a4ffb36mr6051155ejc.624.1659728683519; Fri, 05 Aug 2022 12:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659728683; cv=none; d=google.com; s=arc-20160816; b=aY805lQcC/8RAEBdoH9ku9CManNj7esJuQGJPyXKDslhjFFn+tLOvIY7H1R2Vdrexx R2FUvfHjrOmIZzVnIEsR8+ed+Oym+hyBtZJzH2cSP+S1luwVGqLHXfLpIAo+nVJm0suw XWL0Vp9n+nPK7csBN7d7M87OZCQm26jz///1gsAwudj/xSIOB5mCwkL2Ez/gzQ2O5VVO BjO2gKQhYi9N5LRS36ex5Eir5HRUE3uKJTqYJTVErqpGx4uaxJ6RLRegHprKx4ekexuT aHjJs2tY3eDGp17bTtChEy2+C8LccHuyFvyTzTlThRnmmWhP2bugwu1T9smYl2vCeMGn gUYQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qUVyOM8ZbJXuR7I4XxQ00/jzZhstTj0MGA/CSTUhe14=; b=u76eb8yz6wQIE7ruW6H0/7pF4A1ataHpEi7B6/RpqQ4E5tYre2o8+2Betspmr3UZcz VRlI6RtgkQWwdND0m3/bf7dZp3icLKB/yVwzh6r9pJOipn/DPATbj3ghu7muzzsCbnck 3AWqOrLr81v8u5cIlOz1rD3OAuhxOHncuZoSYqNzBW6lpEwkEoWVPbAuU34lnlvfH7qt XzKJ37D+uI0I3YDJ2ix+obYwRa/SYgsX+FJ80v+hVAlVBpKI4ld/dmKfWF/kB9vSfo7i rXJ7FGaPzCdnQ6lkI4cSLoofPiTOvUXV/Iah0KUQ9sZ8I7D+RodmvalxceZZ/xPuzH36 Jp4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@westermo.com header.s=12052020 header.b=upI0D1oM; 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 c12-20020a170906170c00b0072b6ef5fff3si3717273eje.605.2022.08.05.12.44.18; Fri, 05 Aug 2022 12:44:43 -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=upI0D1oM; 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 S241415AbiHETYN (ORCPT + 99 others); Fri, 5 Aug 2022 15:24:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241310AbiHETYD (ORCPT ); Fri, 5 Aug 2022 15:24:03 -0400 Received: from mx07-0057a101.pphosted.com (mx07-0057a101.pphosted.com [205.220.184.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 332046717E; Fri, 5 Aug 2022 12:24:00 -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 275JBPjX015217; Fri, 5 Aug 2022 21:20:18 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=westermo.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=12052020; bh=qUVyOM8ZbJXuR7I4XxQ00/jzZhstTj0MGA/CSTUhe14=; b=upI0D1oMNdFTOjDaOZ1WQunJvSdcne9R+uvN3JW48aTCIJsSRTW4Juga2Iu8DB1+NCbX RrJ5ugp4ENG/6kbSa9mrbtrf3cD9O+1168//t12IJNlztERmjgzgSxAglsgpz+d73+Za Iyn62Tjqc7WyyLs8mC5uXkGedvGgAQExvnH6mXVAopSJsFSkVg8d7O3Gm3fXQKZi0RyC oeROANXeRQDH1lyf4FlA+SDayZyGkLJtomDyufrkpWbqIjo/gNxBKytlURixN+MIwVuK g+1KORFaOkO2tx8xvoFUXMJAJQDNlSDBbnR45QlS7i+YrWd7GVs1Nn6kfCNlswEosiXo 3w== Received: from mail.beijerelectronics.com ([195.67.87.131]) by mx07-0057a101.pphosted.com (PPS) with ESMTPS id 3hr3tdsntp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 05 Aug 2022 21:20:18 +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; Fri, 5 Aug 2022 21:20:15 +0200 From: Matthias May To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Matthias May Subject: [PATCH v3 net 3/4] mlx5: do not use RT_TOS for IPv6 flowlabel Date: Fri, 5 Aug 2022 21:19:05 +0200 Message-ID: <20220805191906.9323-4-matthias.may@westermo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220805191906.9323-1-matthias.may@westermo.com> References: <20220805191906.9323-1-matthias.may@westermo.com> 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: C9xbPar2GVj89GpUD_VoSA0oODIXM_hl X-Proofpoint-ORIG-GUID: C9xbPar2GVj89GpUD_VoSA0oODIXM_hl 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,T_SCC_BODY_TEXT_LINE autolearn=ham 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 According to Guillaume Nault RT_TOS should never be used for IPv6. Quote: RT_TOS() is an old macro used to interprete IPv4 TOS as described in the obsolete RFC 1349. It's conceptually wrong to use it even in IPv4 code, although, given the current state of the code, most of the existing calls have no consequence. But using RT_TOS() in IPv6 code is always a bug: IPv6 never had a "TOS" field to be interpreted the RFC 1349 way. There's no historical compatibility to worry about. Fixes: ce99f6b97fcd ("net/mlx5e: Support SRIOV TC encapsulation offloads for IPv6 tunnels") Acked-by: Guillaume Nault Signed-off-by: Matthias May --- v1 -> v2: - Fix spacing of "Fixes" tag. - Add missing CCs v2 -> v3: - Add the info from the cover to the actual patch message (Guillaume Nault) --- drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c index d87bbb0be7c8..e6f64d890fb3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c @@ -506,7 +506,7 @@ int mlx5e_tc_tun_create_header_ipv6(struct mlx5e_priv *priv, int err; attr.ttl = tun_key->ttl; - attr.fl.fl6.flowlabel = ip6_make_flowinfo(RT_TOS(tun_key->tos), tun_key->label); + attr.fl.fl6.flowlabel = ip6_make_flowinfo(tun_key->tos, tun_key->label); attr.fl.fl6.daddr = tun_key->u.ipv6.dst; attr.fl.fl6.saddr = tun_key->u.ipv6.src; @@ -620,7 +620,7 @@ int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv, attr.ttl = tun_key->ttl; - attr.fl.fl6.flowlabel = ip6_make_flowinfo(RT_TOS(tun_key->tos), tun_key->label); + attr.fl.fl6.flowlabel = ip6_make_flowinfo(tun_key->tos, tun_key->label); attr.fl.fl6.daddr = tun_key->u.ipv6.dst; attr.fl.fl6.saddr = tun_key->u.ipv6.src; -- 2.35.1