From patchwork Tue Aug 2 12:09:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias May X-Patchwork-Id: 12934585 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03BB3C19F2B for ; Tue, 2 Aug 2022 12:13:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236823AbiHBMNG (ORCPT ); Tue, 2 Aug 2022 08:13:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233690AbiHBMM5 (ORCPT ); Tue, 2 Aug 2022 08:12:57 -0400 Received: from mx07-0057a101.pphosted.com (mx07-0057a101.pphosted.com [205.220.184.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DC252871E; Tue, 2 Aug 2022 05:12:56 -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 272AlwVo013562; Tue, 2 Aug 2022 14:09:55 +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=SIiCmJXt9v+lY7Nu2rajGi53+FPokSY1UdV8paIPp1w=; b=QcIpp/EOeZ5NNaVIpOMti3p/BCFb4iG2FDeHECjVDodf7ehwboHV+Z24WO5wybVwdD6T c07bpJSi4fmELH+8oAqtU+8q+qs7EK1LCh0OHR4962N12Jbe5TOgoyhZWHDUUFaCOgpy lOdEYWPxHSsq4sd9e99IyS28V2d2H1Pc4asqdmQApSYz5zURtIxzmIydKTOHYseRuWxv x26tEw202BQ0Xb1/6NZDMxWRDdLm6m3ngLVkkNBBDcli+iEAHmPpWxnwzOfXf048RngV PrOwixH9r9/EYgkR7vIbilCx5/ZQMXJmjqMAxS/ZkaWp+DklaqaAfhemZBC3bGthEz3j yw== Received: from mail.beijerelectronics.com ([195.67.87.131]) by mx07-0057a101.pphosted.com (PPS) with ESMTPS id 3hms0c2wbu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 02 Aug 2022 14:09:55 +0200 Received: from Orpheus.westermo.com (172.29.101.13) 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; Tue, 2 Aug 2022 14:09:53 +0200 From: Matthias May To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Matthias May Subject: [PATCH v2 net 1/4] geneve: do not use RT_TOS for IPv6 flowlabel Date: Tue, 2 Aug 2022 14:09:32 +0200 Message-ID: <20220802120935.1363001-2-matthias.may@westermo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220802120935.1363001-1-matthias.may@westermo.com> References: <20220802120935.1363001-1-matthias.may@westermo.com> MIME-Version: 1.0 X-Originating-IP: [172.29.101.13] X-ClientProxiedBy: wsevst-s0023.westermo.com (192.168.130.120) To EX01GLOBAL.beijerelectronics.com (10.101.10.25) X-Proofpoint-GUID: TXRr773tnxTrfU_syFXSbJceHVQAeTpn X-Proofpoint-ORIG-GUID: TXRr773tnxTrfU_syFXSbJceHVQAeTpn Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org According to Guillaume Nault RT_TOS should never be used for IPv6. Fixes: 3a56f86f1be6a ("geneve: handle ipv6 priority like ipv4 tos") Signed-off-by: Matthias May Reviewed-by: David Ahern --- v1 -> v2: - Fix spacing of "Fixes" tag. - Add missing CCs --- drivers/net/geneve.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 4c380c06f178..e1a4480e6f17 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -877,8 +877,7 @@ static struct dst_entry *geneve_get_v6_dst(struct sk_buff *skb, use_cache = false; } - fl6->flowlabel = ip6_make_flowinfo(RT_TOS(prio), - info->key.label); + fl6->flowlabel = ip6_make_flowinfo(prio, info->key.label); dst_cache = (struct dst_cache *)&info->dst_cache; if (use_cache) { dst = dst_cache_get_ip6(dst_cache, &fl6->saddr); From patchwork Tue Aug 2 12:09:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias May X-Patchwork-Id: 12934583 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95CEDC00140 for ; Tue, 2 Aug 2022 12:12:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236085AbiHBMMz (ORCPT ); Tue, 2 Aug 2022 08:12:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233690AbiHBMMz (ORCPT ); Tue, 2 Aug 2022 08:12:55 -0400 Received: from mx07-0057a101.pphosted.com (mx07-0057a101.pphosted.com [205.220.184.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C740F4D80D; Tue, 2 Aug 2022 05:12:53 -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 2726lw05021700; Tue, 2 Aug 2022 14:09:58 +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=wxvH2rGlHe9grf+ppG57EJkuecYG69EpgZCujpsNrM0=; b=K2aIatVLYn5pRal+0eqIRBU98VNLirjjAJMTKMdiI+idwtymOkcrVSMg2Z/WS6iggqr5 O6f+vcS0aoRJlUw0UYTIEAJaq16e1aYb/T271QyomFp7usQdyJa8eb1QMrwXC/6NvOVw CGrr+Q0OyYtZxjp/z8cSjUYAkdY6md7CQFG3t4RPzvJj+N61RqzPpyaJneyNiaVJ9nCb kdJaqd5i+5LxDvc7lwwfHE3gbHWAF7YmYIo0EZAYTyWo0YWPPLjFyyrkTDLH9PVotJZq Ucin18UAJZnWN7i/dxUSH1Fi48N8Xz8+0xzdR8UrCBZ6nwlA9Nb6jqX1gzUhOP5xExpm 6A== Received: from mail.beijerelectronics.com ([195.67.87.131]) by mx07-0057a101.pphosted.com (PPS) with ESMTPS id 3hms0c2wbv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 02 Aug 2022 14:09:58 +0200 Received: from Orpheus.westermo.com (172.29.101.13) 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; Tue, 2 Aug 2022 14:09:56 +0200 From: Matthias May To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Matthias May Subject: [PATCH v2 net 2/4] vxlan: do not use RT_TOS for IPv6 flowlabel Date: Tue, 2 Aug 2022 14:09:33 +0200 Message-ID: <20220802120935.1363001-3-matthias.may@westermo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220802120935.1363001-1-matthias.may@westermo.com> References: <20220802120935.1363001-1-matthias.may@westermo.com> MIME-Version: 1.0 X-Originating-IP: [172.29.101.13] X-ClientProxiedBy: wsevst-s0023.westermo.com (192.168.130.120) To EX01GLOBAL.beijerelectronics.com (10.101.10.25) X-Proofpoint-GUID: sZJ9aE2wcF4H939_dPzX9i35OYBxkBVJ X-Proofpoint-ORIG-GUID: sZJ9aE2wcF4H939_dPzX9i35OYBxkBVJ Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org According to Guillaume Nault RT_TOS should never be used for IPv6. Fixes: 1400615d64cf ("vxlan: allow setting ipv6 traffic class") Signed-off-by: Matthias May Reviewed-by: David Ahern --- v1 -> v2: - Fix spacing of "Fixes" tag. - Add missing CCs --- drivers/net/vxlan/vxlan_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c index 265d4a0245e7..797585fbb004 100644 --- a/drivers/net/vxlan/vxlan_core.c +++ b/drivers/net/vxlan/vxlan_core.c @@ -2320,7 +2320,7 @@ static struct dst_entry *vxlan6_get_route(struct vxlan_dev *vxlan, fl6.flowi6_oif = oif; fl6.daddr = *daddr; fl6.saddr = *saddr; - fl6.flowlabel = ip6_make_flowinfo(RT_TOS(tos), label); + fl6.flowlabel = ip6_make_flowinfo(tos, label); fl6.flowi6_mark = skb->mark; fl6.flowi6_proto = IPPROTO_UDP; fl6.fl6_dport = dport; From patchwork Tue Aug 2 12:09:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias May X-Patchwork-Id: 12934586 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF86CC19F2B for ; Tue, 2 Aug 2022 12:13:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236913AbiHBMNQ (ORCPT ); Tue, 2 Aug 2022 08:13:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236853AbiHBMNO (ORCPT ); Tue, 2 Aug 2022 08:13:14 -0400 Received: from mx07-0057a101.pphosted.com (mx07-0057a101.pphosted.com [205.220.184.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 710E54F6AD; Tue, 2 Aug 2022 05:13: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 272AB47h006184; Tue, 2 Aug 2022 14:10:01 +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=lQXlqj1NWbH2MVmZ/d/fuFUKt6a6RaeY7WBG4ZTaecA=; b=ia/QEbow+YOcD33sQ7csn6tUXSl96usHyzqhc58nfK4VwJ0rcRuPpjSWpEXD2CX8rIjS ll8A57nTPXusHb7qmqbGhkcYOvy2gAJn+mmevU/fU+9Taoux3q5tEe6Kl/tF2mmYhVX1 OYa+bM5JzZN0Ve5Tzh52Ue8h55sNVxnObOL1gIryQ0YKWgvGVvHqTugJpd2DP6Nj/wm9 gPW27kAmVot0TkfKDeGD/p8ntsVoetlvSy1Vi4nc+7jIB8IxMKc5Q05VKarCpBMIn3Eo x6+dz5ggnNxBMmNld1MHbfcDm/rm6Qq9IT+gIrlNCN6YLlwLxJdV7FJ7l0VyLhtzKoXw 7Q== Received: from mail.beijerelectronics.com ([195.67.87.131]) by mx07-0057a101.pphosted.com (PPS) with ESMTPS id 3hms0c2wbx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 02 Aug 2022 14:10:01 +0200 Received: from Orpheus.westermo.com (172.29.101.13) 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; Tue, 2 Aug 2022 14:09:58 +0200 From: Matthias May To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Matthias May Subject: [PATCH v2 net 3/4] mlx5: do not use RT_TOS for IPv6 flowlabel Date: Tue, 2 Aug 2022 14:09:34 +0200 Message-ID: <20220802120935.1363001-4-matthias.may@westermo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220802120935.1363001-1-matthias.may@westermo.com> References: <20220802120935.1363001-1-matthias.may@westermo.com> MIME-Version: 1.0 X-Originating-IP: [172.29.101.13] X-ClientProxiedBy: wsevst-s0023.westermo.com (192.168.130.120) To EX01GLOBAL.beijerelectronics.com (10.101.10.25) X-Proofpoint-GUID: DiTdWKqntxNfwqcrbR91I3nv8C3kYphB X-Proofpoint-ORIG-GUID: DiTdWKqntxNfwqcrbR91I3nv8C3kYphB Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org According to Guillaume Nault RT_TOS should never be used for IPv6. Fixes: ce99f6b97fcd ("net/mlx5e: Support SRIOV TC encapsulation offloads for IPv6 tunnels") Signed-off-by: Matthias May --- v1 -> v2: - Fix spacing of "Fixes" tag. - Add missing CCs --- 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; From patchwork Tue Aug 2 12:09:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias May X-Patchwork-Id: 12934587 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02F4EC25B07 for ; Tue, 2 Aug 2022 12:13:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236930AbiHBMNS (ORCPT ); Tue, 2 Aug 2022 08:13:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236865AbiHBMNO (ORCPT ); Tue, 2 Aug 2022 08:13:14 -0400 Received: from mx07-0057a101.pphosted.com (mx07-0057a101.pphosted.com [205.220.184.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F35004F648; Tue, 2 Aug 2022 05:13:01 -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 272Bru40021377; Tue, 2 Aug 2022 14:10:04 +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=7Dt46XnYgf28PDkRim97Pp78Rq0luk57iTdbu5nsFDk=; b=5A5ZHa/0fQMLtboujnDa9BvigvhJm8zM/sKzAeRSrKNB/Vh8BF9o+gJvfxedi/5ona09 BE6fPGar3b68cHForqu4ZK0KK9U5MJXrFgTbMXF9Ndr9kCmjdAU5XRVq1k+VzD38TK37 wVtRkrcBN2c1OkEo9ZB/R8wZ1xJK1Rc+E3Dy5GVlcwrqfCCAO2HUkpKKJPtVhbMF/UiZ VLon0gn0MUaJloc9NgvcJi17bz/Tb5BY40K/A+QgvlsJo1ckpOUFl4qxtIhajLpjonCH J/d1746EKf7Eav9sh+YJ4Oayr9U8pd54NjmPZ05An5wZKjV8mFPio+M0qwZL+08WntQB Jw== Received: from mail.beijerelectronics.com ([195.67.87.131]) by mx07-0057a101.pphosted.com (PPS) with ESMTPS id 3hms0c2wby-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 02 Aug 2022 14:10:04 +0200 Received: from Orpheus.westermo.com (172.29.101.13) 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; Tue, 2 Aug 2022 14:10:01 +0200 From: Matthias May To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Matthias May Subject: [PATCH v2 net 4/4] ipv6: do not use RT_TOS for IPv6 flowlabel Date: Tue, 2 Aug 2022 14:09:35 +0200 Message-ID: <20220802120935.1363001-5-matthias.may@westermo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220802120935.1363001-1-matthias.may@westermo.com> References: <20220802120935.1363001-1-matthias.may@westermo.com> MIME-Version: 1.0 X-Originating-IP: [172.29.101.13] X-ClientProxiedBy: wsevst-s0023.westermo.com (192.168.130.120) To EX01GLOBAL.beijerelectronics.com (10.101.10.25) X-Proofpoint-GUID: ZoawDdE9j41KGZHES-cdGopeQksgu0vj X-Proofpoint-ORIG-GUID: ZoawDdE9j41KGZHES-cdGopeQksgu0vj Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org According to Guillaume Nault RT_TOS should never be used for IPv6. Fixes: 571912c69f0e ("net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.") Signed-off-by: Matthias May Reviewed-by: David Ahern --- v1 -> v2: - Fix spacing of "Fixes" tag. - Add missing CCs --- net/ipv6/ip6_output.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 77e3f5970ce4..ec62f472aa1c 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -1311,8 +1311,7 @@ struct dst_entry *ip6_dst_lookup_tunnel(struct sk_buff *skb, fl6.daddr = info->key.u.ipv6.dst; fl6.saddr = info->key.u.ipv6.src; prio = info->key.tos; - fl6.flowlabel = ip6_make_flowinfo(RT_TOS(prio), - info->key.label); + fl6.flowlabel = ip6_make_flowinfo(prio, info->key.label); dst = ipv6_stub->ipv6_dst_lookup_flow(net, sock->sk, &fl6, NULL);