From patchwork Tue Sep 3 13:53:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13788729 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2068.outbound.protection.outlook.com [40.107.236.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F5014778C for ; Tue, 3 Sep 2024 13:54:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725371666; cv=fail; b=IoQTbWTK51QAPP5Y9ahbrG9O00ACovGIACkbApr7XzzQmXJvrp9Ix5A9shEdSF/252L9XQfsubOjecVkJznYbUR2xYUTri6hQs2ZQKRY2XOp7PlH53stFRuLknPY3ZFiF6GZIKwwR9kZbL5TqIjNeU9Y/gJx1rpYl1rTEyAfLgY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725371666; c=relaxed/simple; bh=RbvgjutYh+ZdlQCU8nro1WhJh3p0J310sXjDAOGOm78=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=M4cOPm7B1PrnvfcWSnKEp+D0Hucm0j2XGXzOtx0EwWLESfXBjEJeOt1EWrX5fSRU+Bcdb8fnSWPuaacXHKZ0LuJhN1Wc1c2WEU5XXASsrEyosfNAQovl0uJPJZCdK5CgqD0LDTARy0xwCARA7V6nzQTowbVu3fo+qMYn3ZJas3c= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=ntdurU7J; arc=fail smtp.client-ip=40.107.236.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="ntdurU7J" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qqi/4QaOpqHOw2HKBZLUUrG4gHAvOtS0FtaLPHT3J6e7nNW8+1mEOGiihEbzmCQCKNvr92Ww8r305iBfH7RLXXiu3dgaW34fdjYCqNXKK5UQOnIgj2yt9mhulBJpDSjK3uddjvNLI2wvSCmUwLWdVhWCxPE231COFVgcLXWDbVCHY5Kk4IhU/WYGqhSSayTYsxAPqsvzT0fdyzq0d6GfEp3IYSACrXzBioNPHvNirL69wPmwEkYwhKviyApoFt7DVdd6ednCluxN9E1AHB1nxRoUfDMr6AIQImK3+KFgO4Bce7T0zFSXjEFN21D0QmWRKIiuup8yEvQ5wwa5GgPTpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1EkoiU4jZm7x7Gxu311FrQRmI0Nt51P4Bp8bPsbrof8=; b=Q09MnkrPxHi0BIVZkpb7EuvW+o3sMma5PPGU7xYN8nY8UeLj3SMGDKjJhbgAqiW6XGUkmJxjx2tqLS4tjf7Q8veCdLS0YDDDxb1hrPRVyraFZNW+UBUNQLa+/cu7nKsxHS+Cng9gNrCZa62vkAAZ5I8xpy2XPVQ85xWx80KasG1TJmaGCD1LrKnBNdRyVxVuTB3Sgv/WsLcRjhzeHYBvYUUKK2oJ7Aob+k57rYtHqWBGDPbXc+voY7R0lLwVNceSpgLyklYPHQhyN/ROIXGJxuKYQsq0SM1jDsXI4WGn3WZby6C9vq4kDQABnQRGq3buZMyE+gLuE0w5v2jLxeev0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1EkoiU4jZm7x7Gxu311FrQRmI0Nt51P4Bp8bPsbrof8=; b=ntdurU7Jq6TYRgMmpwpayROTE/7Rk4v4GDKHBJPqhyoisWPiHHf2TEPl8C/KX5jxiroFL3FQ9tO0oyoxLaGVnBkwasSg1MbruvJubg6VJ/2btpYoC77k4MOn0O4EVs9r8XPCrsqHgFMp5mvmyxqy/aGKWq5XfuM0dWjDmYHrqmjdW3g51SjKlYHIwDZtPeTR2qwBWynsr67rZRCJMXzQgR8eWNGCjhgla/yeIFUWBUIJJv/9CeVfX2w+Uh3v6Qc7dt/fXE89t3i8Vcj/T3F+IHeZyQXP+kkyQasPLmLTyNk4hPWyiH2AJvxN31QXP2JAC+gF11S6r59Yuci9TA0kTg== Received: from CH2PR17CA0009.namprd17.prod.outlook.com (2603:10b6:610:53::19) by MW4PR12MB6921.namprd12.prod.outlook.com (2603:10b6:303:208::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Tue, 3 Sep 2024 13:54:20 +0000 Received: from CH3PEPF0000000D.namprd04.prod.outlook.com (2603:10b6:610:53:cafe::e6) by CH2PR17CA0009.outlook.office365.com (2603:10b6:610:53::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27 via Frontend Transport; Tue, 3 Sep 2024 13:54:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CH3PEPF0000000D.mail.protection.outlook.com (10.167.244.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Tue, 3 Sep 2024 13:54:20 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 3 Sep 2024 06:54:09 -0700 Received: from shredder.lan (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 3 Sep 2024 06:54:04 -0700 From: Ido Schimmel To: CC: , , , , , , Ido Schimmel Subject: [PATCH net-next 1/4] ipv4: Unmask upper DSCP bits in __ip_queue_xmit() Date: Tue, 3 Sep 2024 16:53:24 +0300 Message-ID: <20240903135327.2810535-2-idosch@nvidia.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240903135327.2810535-1-idosch@nvidia.com> References: <20240903135327.2810535-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PEPF0000000D:EE_|MW4PR12MB6921:EE_ X-MS-Office365-Filtering-Correlation-Id: be0bde55-2098-496d-9b5b-08dccc1fe8e1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: l8h+nv1V4qkbqWpJXE9WiTxC3cMXgRuVUNZmuVd+DCTMksz9UV0FpeyTaHe+cyiUONDEBki8DIgkWyEXAUYZAaTzSGboGU9ONP4EjxT304oX0iSwF9TxbTjDsSEaRgWhrssmp6Qxxz0G7HK/UngD3wmKMEnsJlzRQ/HR1dsIRQNZXKVa1A3tk+ngUA5V98UOEgJxN1RQ+9Zq9+AVoz92rUd9ryES2L1iFuMjphmkReg8XduV+VmnhRPghDJ6T08Se0SF4VACMjFeEqHwA+qxvHfaVqGyOSvzBoXcvdat91YtTljKTg2od28Q6tIYs0jgkZCTxAhHVjJj/atq8gfAtAKaW61r0FQm9+b/34rKW/Avdbo3Vy/JcM3JuGQeYNiCiCczelajLDYLs4Tdl1KFr54xucqyvwmskTaLGo1MJ6zsyOqVldRjir4rtcXbADGjLSmxgCnF9NrHg3A2paK5Tm35rOwlvzkLbvcfZdgR9YNy0nQWEiPqvOdnvsPvRxumlgznmil1f6rEXe4JbLT2T1nwxAfQzr/DtzcPPhRbBJ2RncBb09t54CTJGW2k5JvfRfHqFDzHl1Tmnxxi4X+MBxx8PzQ+JW/rXq7qsSh9pw3WLhhAYtWUP7443S1ZhEF/i/BOqZAZxN6BGGAYoTjB7hbFzEaSW6OUa4u/IrxlbtCtpHCZlPQSZf+yOtBbWbgfFT9NRd0uSq7jIB99P9hRnyKntmqBO7TjsGS3LgASHBwOiL/h9gKv6FN5SQi77GziSlxVCI6ruuvsw26x0/zKXigos/o03rgTPJjBMr/riIyLBHV2reZiK3zzBIL3+yuD5eSytL5poqa7Jv6XDRQEh0/CwfUOa9AnQX+IIC0ymJEUrsbhAJTuIl/vju2bexT6WcHjiwG/i6uTK0J14dhWqO7FU8c8FJu0RtjaGWtXFjFrsR8vXz7iqS8BtfsNc991EUEfHAqPWiRhSAoWzYaCroCrJJzlws3HLpr9kFEjZCfJVucFEezTf4EBJyvIdKU4q7rLB5HIetJF+aXEJBAv4ePbeDcf8bJXtAuthCybt3WvUL6ulhtbvjGgtU9UhCWctJSDFrQ7JT4U+TpqU44tFQH0ntA7cod+QxZ/rxJ8v7BiBnTs55In9WvnykX0OFMlF7fmsRpsvNmzznxzTkdhAkrwx75UhaMCwKcs1NXqVDRQ6Ww4pIdwTaV3zQQnHWXUQXMT55OLdLm0Rv44N3aVI6gUGgP2WzEmpDOBq7yglT2lpHImSFZ5WNhS5yiMxNFk7dVvcMUM2QiMYs1j3g08d6BXNm/W2ReiXG9q6Ss1Ka4Hh3btXIzd34by0Kkeo80SGVqtXRGLsDyOzSfvriErNprIx/SUxa6W6twVQVa/NkGXenQFAQZQWuZLm8TJFWqo7MOjYGkxzcXs0HPcYxANa2IOaPNYnxwDqYBNcx5rUkg7ELLx7E3mlWKoy6A2Hf2h X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(1800799024)(36860700013)(82310400026)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 13:54:20.1513 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: be0bde55-2098-496d-9b5b-08dccc1fe8e1 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH3PEPF0000000D.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6921 X-Patchwork-Delegate: kuba@kernel.org The function is passed the full DS field in its 'tos' argument by its two callers. It then masks the upper DSCP bits using RT_TOS() when passing it to ip_route_output_ports(). Unmask the upper DSCP bits when passing 'tos' to ip_route_output_ports() so that in the future it could perform the FIB lookup according to the full DSCP value. Signed-off-by: Ido Schimmel Reviewed-by: Guillaume Nault --- net/ipv4/ip_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index eea443b7f65e..49811c9281d4 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -494,7 +494,7 @@ int __ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl, inet->inet_dport, inet->inet_sport, sk->sk_protocol, - RT_TOS(tos), + tos & INET_DSCP_MASK, sk->sk_bound_dev_if); if (IS_ERR(rt)) goto no_route; From patchwork Tue Sep 3 13:53:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13788730 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2077.outbound.protection.outlook.com [40.107.93.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC12A4AEE9 for ; Tue, 3 Sep 2024 13:54:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725371670; cv=fail; b=BrPqbQaxwkrdjvUMGtX2mfoCT6NI8vULQkYgxaMKAGng8+4o00tTY6mUTibjwA7hqgCmDEQh5GvrdnT9YyIvqj4ZnmjSaQ60nyDNrJTSNMN0xBOhj0hrxnq8Kfba3m83ADIri3/IrXWj0fyaVzDeCHAGt8vVUUqgJibO0ilEpzA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725371670; c=relaxed/simple; bh=DShXp46buMG1OneYB6FtWdCtW+zXzH+r4/puauKrmmc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=s+Dcbtbng5KExpg0FPJE/e8eg4jShtMa4jiw6zX/fRHCVjWpOG1s/uZtW96NrXiFb9VJ1d/W1IbD38RcLKgW9ucIrROKONyIvF99cSjmUt5krpTnU2I+emHAly3X3ANGy1U3z1n7v1ov3SCwdSHwEVKT+ROOoG+4xz3hoRvxuTo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=ds/w20E0; arc=fail smtp.client-ip=40.107.93.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="ds/w20E0" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WMiyTtYWLPSLB4mmdPZna0IdtcmQ45wxMqSWXJTWWIy3t01sn2HRkQy9grCSpFAG2mv5DdqPrbywRz+74Hm9n70tALjC/2kp8v2v2JGaNSyj36h5wtGYZUWGFOquc59q2mUgBVrb3I1pFcjpdi19FPWS+uelyR+6SqXwLoSDdoqIY2kklZ2329fgv15mSlkcUBnHu/fJkSFGG/nAYcTQ6Tk4yv6vivCYmyeCHX0D/8RiV1J4GpQU7FHdFPKMWlJHLM8Q0S/sjaS5TQJWkwFUvZYyJeKv+LKypTLiV7ngD3Z2Y+OoL/7/UsvnSpS9Ou9M6t6N/dzLY2kCfLC7yPpx9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Q4ohU7uuF2glEAAF/DUU/IvJ+ZcLEyn1aFPpFSfDppA=; b=Hv7D35x0loKPhKGpN7xZ9xaw5KF+qtDUq3sgcHw5sko34rpbAjtlOvf8k5w9xVF7GDugVXJK0EFf/nSXiy5VrE+suZ1zQ5bzm9HYwM9+JkPai+4moodsqJeF3OHiFsmRVa9VQUNjYakKvwPMPbauUB5I9hk4XfZqfO2Z3eIDK5Sb77UxPnikrzws/BECWmCzAcQH2jTqbsj4YQdQFk5hmW7s9QJKH4NTaCl356q+ALwVYGThdm0bxFx59X1+j8sMcgK7DNoA5LJ9jaejRNdpWLlQzd95PvurM+ZCY5VQz7aoxOVVn8mpfupsAmqgljT7tVZSqtR6UhkCvcSvvoujQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q4ohU7uuF2glEAAF/DUU/IvJ+ZcLEyn1aFPpFSfDppA=; b=ds/w20E0xNA2Y6cMv6cNeaeNaVkNCDlKf0lDAYuT6AuZp71uv5Ne1qTww1cSCw4LFE4Kz2o8CUtvsr0QlZyTGMNCPMAuNh2Ty5O5260kL9d26eA/eGa6dRfF+nNCeYbvSYW2O5e59XDoD+eYBF4+l8pMN4ZVZnrZLN4/s+8Ky/eRCZJyvcH2Z7D9fgEhSxwpLOu7gYgs/mIdxM8uJeWthc1jVB/ShxINV6SDo03Sm/LtqH4yB9esHwXmXq93R/H+5+LBJ9rQdiecTXqeMD3gW+raGs1CmJte+UaiqAgog21/FZfLiSwOqT995eCWTZkSHRuyTB8vk73K80nPKPMddQ== Received: from CH5PR05CA0004.namprd05.prod.outlook.com (2603:10b6:610:1f0::9) by LV3PR12MB9440.namprd12.prod.outlook.com (2603:10b6:408:215::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Tue, 3 Sep 2024 13:54:24 +0000 Received: from CH3PEPF0000000A.namprd04.prod.outlook.com (2603:10b6:610:1f0:cafe::a8) by CH5PR05CA0004.outlook.office365.com (2603:10b6:610:1f0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.14 via Frontend Transport; Tue, 3 Sep 2024 13:54:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CH3PEPF0000000A.mail.protection.outlook.com (10.167.244.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Tue, 3 Sep 2024 13:54:24 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 3 Sep 2024 06:54:13 -0700 Received: from shredder.lan (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 3 Sep 2024 06:54:09 -0700 From: Ido Schimmel To: CC: , , , , , , Ido Schimmel Subject: [PATCH net-next 2/4] ipv4: ipmr: Unmask upper DSCP bits in ipmr_queue_xmit() Date: Tue, 3 Sep 2024 16:53:25 +0300 Message-ID: <20240903135327.2810535-3-idosch@nvidia.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240903135327.2810535-1-idosch@nvidia.com> References: <20240903135327.2810535-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PEPF0000000A:EE_|LV3PR12MB9440:EE_ X-MS-Office365-Filtering-Correlation-Id: 5a3dee39-8724-46d0-3a07-08dccc1feb3f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|376014|36860700013; X-Microsoft-Antispam-Message-Info: A7P3d6u1d5/zbNMrbvmdgydDC9PO192xU9EbCgY4uDMHHF1T2hpueXJkbaIsOI2ZHVEVhJnId7CNYAktLoBgwmvWyqeoZXKaNl0OjE0exvVTDtcUbn5QhHbSq+XMYwYhm1cbPa4AcWOwJp0qL6t37hwoFK+NAyZgBKMGWmae0WpJ9du38oBQc18MT+gnb8FmIcgmyboZRmuhxJJxzkFvVZXZZJ0ha/Futeh/U1hH/3+01KDL48mrWfye2NqP2G8+7KUVodv3NraJFBHe+0kYeeieq6yej+MyHU+RwFRLTyabQ0hhbtvGd4ScAs57UHRbVd91uQLbwLirY5qbv7dgWy+QgypdZHxXcnQMBbnCzvZshCo+Ax/2qUUy61YbH6sgzv6HZk+ESEwTe/Apppno+jdEC21ck4vIEDXih/k2C6YJROD2XzK24yGgFmBAvKwXQN3zsLZf9vm1Q4CXWRup6wb+fZm8Ou7C4WcENGEiLquaQEiFwTkFtd45rV/e2RL6NRB1ZVjfE6qsUKL01b3KuBshEDu4jgRSD/ekPQopUrB9yLrkryeh8Yg0anDJ6KAByc/SLXQVp1biVjZi8jdY1GRJAucfkLhVGkoKpD2yQfsexnRsO6cuON/2NfuhdUVtMUYmWQdrgtgKjbXEccfPh3xRlx80PonBXrOIwkONG6pazZ8xMeUFL4ZvTO9OXDqkivkFZ4n5U89nqh6jl9f2mktks0un+5eWfBamVA5sInd2RcrhHtlMxk8ZU63VImRllnKU5KWux6qEkxYZuKIueZFTVmRwmD7vczamLOKjuSe8a2PsMqQDXU0YT694U6SNJLsXlGiW5jQ28un31FPugZIXyHf05Zlpe6a3eOl6RvkxnlzNyJqpggHoihxASiANQwph0VWevEBw30axYS1lQARKt6svAVx3AdmWcqSLBwQZuQlpoQpVw2LxcAHlaoJg8w72tjDBKHH7E9dTpks7XYRXfYgHY9fHxo+4+a/1K2ibzJ54wI6iGnXnOaRB268C1uIDIwy7Ew5a7E311V9DWUeafTrq05UZ2CMa9RDC2mGgnFZvMTVQGsK/4DdZoB6pSj8xBzx0anScCBBaZTIv3jZeIILOJ517jdsVbYlDaSjvAQyzPp1grTvdmpLFylYX61dylzVfwVcxOBpnw8kjKoHKlx7eFX3uSBDaMDe8QZV18BtnWwjhxn8pu4QvpaeUeZWPc5dv6Sk7tJbWrf85MTFKzQE7yR8k0aeYvhxnBZU0QnIi6qoKf+ME9pyXrJwtcaPFgcoqxcxA3SBy9WJ5OYor+MYmaMwJ4ReP1+r2M93V0tNFigjh3qrgJ1M/0CmAxx1pwmc+uqrCsuhWLHnZUWIY0X+euKIMPxdSuWqehb8k6f74KZ8y6+5hR3wrr3XWatWBU+AL2qdnTxY/3A06kCREu5CebzTwUEopOmZz7RSODWzIP3WCUK6cte7uIUUk X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(376014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 13:54:24.1047 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5a3dee39-8724-46d0-3a07-08dccc1feb3f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH3PEPF0000000A.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR12MB9440 X-Patchwork-Delegate: kuba@kernel.org Unmask the upper DSCP bits when calling ip_route_output_ports() so that in the future it could perform the FIB lookup according to the full DSCP value. Signed-off-by: Ido Schimmel Reviewed-by: Guillaume Nault --- net/ipv4/ipmr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index f1a43199551b..089864c6a35e 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -1869,7 +1869,7 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt, vif->remote, vif->local, 0, 0, IPPROTO_IPIP, - RT_TOS(iph->tos), vif->link); + iph->tos & INET_DSCP_MASK, vif->link); if (IS_ERR(rt)) goto out_free; encap = sizeof(struct iphdr); @@ -1877,7 +1877,7 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt, rt = ip_route_output_ports(net, &fl4, NULL, iph->daddr, 0, 0, 0, IPPROTO_IPIP, - RT_TOS(iph->tos), vif->link); + iph->tos & INET_DSCP_MASK, vif->link); if (IS_ERR(rt)) goto out_free; } From patchwork Tue Sep 3 13:53:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13788731 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2084.outbound.protection.outlook.com [40.107.92.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5AABD4AEE9 for ; Tue, 3 Sep 2024 13:54:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.84 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725371676; cv=fail; b=ChZzYLYYFDYfaszEmifftk3zX5JlNVJjND4NqdAI+4wW9z1KIPXci7NYsZtNUJbfH+yQLvyETTGP0Z8Z+Twh8uXZI4uvxtYsPac0+48KGeYf1xICzPlPOk9/PvsMUC5K1u0JdfyagM8fdMRJZ7P0NdrbqnEz8hMwnWUuhpOIIbk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725371676; c=relaxed/simple; bh=zeVDw167jHDxBK+f+SdqP/pqibi4B1FA/bGiMTKZYIs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=StAyK+8N2gwQ1YOdMqkR5TgKoG7QG9EJYSKRKDX9j2B2jvRPJxZv6NBIg710bDrB1xn4A4HwBp7xdcl0TWPk9QEi8c613WVquD99qhFVRH+1y3rGxTjsUWBoTGhqvopQp47cOKSVxSMqG7fYE5XlEOO5hfNMCZc4lRvnUDN684E= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=tQx5/cLe; arc=fail smtp.client-ip=40.107.92.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="tQx5/cLe" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YHM9n61X8pDgvvSIphziK8zPYUgUPUGeByu5NRZL4CfDCBD35fPpiq0/OeURbAk/K44fTcR//1ikufkG+onFNYTMrxdOUO3RK91G7KkqkcwUBOXrJJLdx3jGm8trWyxuqcU/3Ezz65hgYG4u1I3Vl3Mp2a57iADtQnbRC4i+Q1L+Bc1ZyyrEVqfalS+5qwI3KZZjACNA068xzJ5KfH6I0HhsXb0gJzHW70ZUPs2bLYjS517A26GoPPyECmuq4LQnIDv0fsC54armtVVMdMRbfpNtDVeEO5j4lNuiSPyC32bxcS9SouTv1t39hudgyKrbcclfUCPcay0NNsOCzGFmjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2MP4wW4Inim7GH89ZTQg/X2a8EFxFOyKhb9HkbnXz8Y=; b=olwv436cdWcB7Ob7WatmZLk5QmoYVr5w4YZMrO4srfP2GIj4RcOoyS8FyP03xLsoIhSCpmyp9sj0MEkZkZugPDS98aVBaCpyE27VMzDvpa07iX5/RXAbgUWqfVs11/A+BN+UCHz/RYfi32RwdXh8dikfAAnxsfgyS0rRDblKaZKD9g5Z09D1pqxJ6/mHta7qy0KpHk/rrJ6t31x7PBYN4CftOh4w/Gckee3GGS+N+3PMvDfvtghKRH59MycsJb1yBZBwmi8QdzILlWQGzXw+wR5369bTkersxzNehaBpqlWBg+KuNnUC73g2luYEd5nPqR0ZNGjcsPJzhSKDFRLkSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2MP4wW4Inim7GH89ZTQg/X2a8EFxFOyKhb9HkbnXz8Y=; b=tQx5/cLekI/WS6iCwWh75VE5Jm7NfG81EEdnAPAV0cE/nOEgRiVo85dACDX0U/4ywihO+tm2wb1MYJfpq8lkN7uZzFcDQzJPtLGNKoJeGmD6iyH6wVh9YhH5iZWzl9aPzGunrReyqgoDXsOAyfylSvX6RH+xvLQUthkMhJPv3Z7NNpBacMrEZ/kqq385UVm8Lt0uV8Xn2U65jGqYX1ow/kZw71ijBUWp0ZW+eJsFEn4UBU7WAKlClBuJhQIx/mLoZ1BSSRXGomA1vZPCkh+RkVMo1IIx7qIZv6STxvbnmlkKIPLbjVNo394KjCW6aL6xEPIYEIUJzr8Eig+sabhQTQ== Received: from CH5PR05CA0003.namprd05.prod.outlook.com (2603:10b6:610:1f0::16) by CH0PR12MB8486.namprd12.prod.outlook.com (2603:10b6:610:18a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Tue, 3 Sep 2024 13:54:28 +0000 Received: from CH3PEPF0000000A.namprd04.prod.outlook.com (2603:10b6:610:1f0:cafe::d8) by CH5PR05CA0003.outlook.office365.com (2603:10b6:610:1f0::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.14 via Frontend Transport; Tue, 3 Sep 2024 13:54:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CH3PEPF0000000A.mail.protection.outlook.com (10.167.244.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Tue, 3 Sep 2024 13:54:28 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 3 Sep 2024 06:54:18 -0700 Received: from shredder.lan (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 3 Sep 2024 06:54:13 -0700 From: Ido Schimmel To: CC: , , , , , , Ido Schimmel Subject: [PATCH net-next 3/4] ip6_tunnel: Unmask upper DSCP bits in ip4ip6_err() Date: Tue, 3 Sep 2024 16:53:26 +0300 Message-ID: <20240903135327.2810535-4-idosch@nvidia.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240903135327.2810535-1-idosch@nvidia.com> References: <20240903135327.2810535-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PEPF0000000A:EE_|CH0PR12MB8486:EE_ X-MS-Office365-Filtering-Correlation-Id: 3c44bca8-1efa-4017-1ba5-08dccc1fede9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info: b2rt6oiz8Ym/Rb45qAB6UwrNbm9rlSkHeX6JHXPwFKR5MD1awpJUp2kvr0Lr2iETpkfDTYTcY/m0dsZ+9TBFSqqfJB1fOaxZqU4AYvZ01aP6RZMzwhxO+1/s1wYrga3w6NgOIZGd9IKm/pHESQR1kfiI4hvmVUfpQx5r2DIhHiRp01GBn94xvlbiQVttMayDtXpTZjv8MHKnBFTWqck1vLXbk6laZR+w+ZbAPUp7kmqmiLAaMh7kFKPZ/hfx0H7Ww+ahOpmRGOG/d5oBcJEnL4ttIOaj0JJjyDRKGwo6hWST+ZoKKLP8o7KVIrTn3XvumG/t4e0gZANUCeNHhY5daSkQ6IDb8xj6ENiwIaEO+EOlrmfUslpDtHHtZdP6IkhhDwNcRKtl2rCJ9NULt4Hl/g/uU+OvVyFaBz42ahvlJRIxfVQEeWTQ5ouVVQkcNpVM4nVveOttBGFR1EvCuCmX+yFnbvldNwkVh6OCXyJ6vpGyKh2KqCwxJAFBYXn+sM5lxpCyZNuSmnKu0H5HuWixn9Wyre0wDByBB/MslgRUq1FmGKb4Z9b72HqQdP1s5BHPgH7mj+1SpjxcGV4uIv9WGkDVL/lU0sGwpTdOuQiceHj2K4/vam5WnIqD7Tnwix86PwPWEy6QaoudwG6wLn2Vhip5FGGToI2RpAPNB0HCN8W2jtJPV9ndT1zIuJk8hk4PH15X9irNXpF6Rtq6FLeAPBt54mIHJEz24OjLnEf5XE6X3d6bv5ZGFn58TVc5SAl7L+LdEMilB4z5dAWgqlaL4dPYUUJI6iz9rYYiKFaKneaif05H4tvSU77aKlp0RZf0PQVG0J68fCn9H6AZVEwHrOGbpZMSAqrr4u7eqRWZz2/5y/06qK4u2QvNHi8Wfeyu9fZSlG3p2VGqCCekFfpNfYpH2Z8bfyv2Mxctcqstupr6Bwckj3hAleLKuCxjir+HPw3gKLbT8mCeWDODh8lmtsQz28FKs1uiDeS7aL4DONHE8ZRT5vRNTM9uFqX7gTif+5pKdexNR6ddqRQW90ajGY8ukuJEUtPQmoPbEvyrXAAxZawZ9gTfo1Q09IG5C+mYrm8cFfGuQuAtpgnvGCNKbDgO0NU1gobSGfCsy8iNrmIUqDRDHiV2nj8NZyQBSO5JjgsQc5kgZZLI126ReWmVymqkEkZo3qTyYUW7poVSUPf6k+bI7oyF7KRNrizUq3sIXBMrxt4+b0KNgiKlAoUgo+zZUWHgLhrOP82aH3c8Pdx2XLoKdU37pUWXLRUY+vfyN0HUU3qiJEKMKEyvTWAZRp3gN8JKdScwmPPeQRAtc4CKGqNzItxL0Wse8s1TJDHKEnp+pmFq0OHO+EY+I5vPZqC/1hPlD4sIxmlzlkILAXyZ9Fr6PTqYLdcfOMMKTj6ju6jZHOqOTMBxuqDD48YAfJjd18dnUr3vHfg9DFOJ27XESwR0/kQg949rMm4dzoxs X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(36860700013)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 13:54:28.5734 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3c44bca8-1efa-4017-1ba5-08dccc1fede9 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH3PEPF0000000A.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB8486 X-Patchwork-Delegate: kuba@kernel.org Unmask the upper DSCP bits when calling ip_route_output_ports() so that in the future it could perform the FIB lookup according to the full DSCP value. Signed-off-by: Ido Schimmel Reviewed-by: Guillaume Nault --- net/ipv6/ip6_tunnel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index ec51ab5063e8..b60e13c42bca 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -53,6 +53,7 @@ #include #include #include +#include MODULE_AUTHOR("Ville Nuorvala"); MODULE_DESCRIPTION("IPv6 tunneling device"); @@ -608,7 +609,8 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, /* Try to guess incoming interface */ rt = ip_route_output_ports(dev_net(skb->dev), &fl4, NULL, eiph->saddr, - 0, 0, 0, IPPROTO_IPIP, RT_TOS(eiph->tos), 0); + 0, 0, 0, IPPROTO_IPIP, + eiph->tos & INET_DSCP_MASK, 0); if (IS_ERR(rt)) goto out; @@ -619,7 +621,8 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, if (rt->rt_flags & RTCF_LOCAL) { rt = ip_route_output_ports(dev_net(skb->dev), &fl4, NULL, eiph->daddr, eiph->saddr, 0, 0, - IPPROTO_IPIP, RT_TOS(eiph->tos), 0); + IPPROTO_IPIP, + eiph->tos & INET_DSCP_MASK, 0); if (IS_ERR(rt) || rt->dst.dev->type != ARPHRD_TUNNEL6) { if (!IS_ERR(rt)) ip_rt_put(rt); From patchwork Tue Sep 3 13:53:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13788732 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2089.outbound.protection.outlook.com [40.107.220.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2AA71CFA9 for ; Tue, 3 Sep 2024 13:54:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.89 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725371683; cv=fail; b=eLhTwoWg3S30R+lgNeiH5nxslG/EQ3QGj0g/QhnmZooHY1bPwkC2d+bzpZA/VblsnjthvsVichDaqpePGMVpaFTM/tjWZH1L5AefNbHbrvSfTiqP9XdN2Tuto+LVRJWNhHFoGDshXf7u4oEaGB+wxz3P2Iw20Ge9iyoG7rnRRGU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725371683; c=relaxed/simple; bh=GYc8IKPZvtcLyVOmuC46VFadGESXTi0hCphx35Rxep0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nxibrs+PZato0eqLIxF44iNblWqClZGLvoI1I47c1jL78CA+lc446Fj1WbRtJDxj9SqtuBfNfsxv5gXWOGGb5rR065wJYTdQaeWJoghmfWGq+zgDdW6rsU5SQmrFCOz37uhLgIM5/Bf7MT05mdkOgVPyQ8v3vfppISOnGEAJSXM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=cSrk0Hqb; arc=fail smtp.client-ip=40.107.220.89 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="cSrk0Hqb" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nZnfYNyZZOyyBqnrOZmdoNGO2Gf+7gEINHNjXwBeYlitZ3OF+iPlCu1H4Xp6l1zWf2i65WSDDmtHAJ0JeDMHAeF+W6t1gFwMlkkQh3iaCByB2lb7AbGcHKnexCo0A7/LEFMvgQZMQVu6OPaauZ/I6r4NQFg6aQMlgBcdhr/xhzAwIqdo4FqjzUlVFOgPAFgcRFYiA1qVfhZ9sHsKYWNMN5vOwVyK6yhaR3AjLo9/dOyFpW6B2uzrDz2S23ZeSJMr2uAtl3tgBHRgSZTyGCJNMzuzOs11NCBA9ZnBXyHyMOx+dhLmCVc/AL236YP1Y3NQsguOPHmfmn+M33kD3viISA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TOfAtJT8nKV47tMWOg4d0zdjRTb8hlR2IndH9yc3HcM=; b=ckwYoCMT7LNFWUPvw+4z5lyLKzE80KtL6lMRZ+zFZYtUExtunp8OJX6NygdLWXYz9EvXGOlXSXv01MxYvtrG19Ij2qRx58wTpo9CbM5Y+0AZhrqsGHfHLT3sY3MbGjNnly/iPOdEIPg+kpLLvOy02JvIMxCc+pfOLUeXKI7Yd084xVchL+wjLlX6s836VOa2a+qSdVZKPZl84BRx+JWHtcrxG81hHR8FH9xEFIuvajOpTvuCXRIYZHNmCvsKSVxPO5ZKNeeck82x4LxRXJzYVhyvysD/cL59TF7Px4vqfib0o6lo/iYRRQpQqRecSRYt+xkoGCA3mZnHak+ibCdttQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TOfAtJT8nKV47tMWOg4d0zdjRTb8hlR2IndH9yc3HcM=; b=cSrk0HqbuPiBTT5gp9xze04+Cmln2bXBg/Jcbk4gBI+qJ4UKgYzxnu7f1Dph5nocColjrDB/j6BJ5BFM9ZdVsQVjtZick3MCGj4xjQkp5pbxqys6nppClxN8s7I925O3w7E2t124Klyz+Xr3aLpWzXWacaxQdkYiTKZF4r6DNudQ7OM6OMh4qyGR4gAHbUnrbOTpQjGDrZJEILivgiWYBqauvwTKuIFIeuRRi5FzshDGfoEPScG03vhz0lZghs2VypWwj+0C7fUfczb0g62eM9CLsOSSWDe5SBSxui2+siRVpwiCiIFFcnKJfRDgoAcD5JCgi6QmeIVo9mS5FvJHFg== Received: from PH7PR10CA0012.namprd10.prod.outlook.com (2603:10b6:510:23d::26) by PH7PR12MB5975.namprd12.prod.outlook.com (2603:10b6:510:1da::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Tue, 3 Sep 2024 13:54:38 +0000 Received: from CY4PEPF0000FCBE.namprd03.prod.outlook.com (2603:10b6:510:23d:cafe::1b) by PH7PR10CA0012.outlook.office365.com (2603:10b6:510:23d::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.14 via Frontend Transport; Tue, 3 Sep 2024 13:54:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000FCBE.mail.protection.outlook.com (10.167.242.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Tue, 3 Sep 2024 13:54:37 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 3 Sep 2024 06:54:22 -0700 Received: from shredder.lan (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 3 Sep 2024 06:54:18 -0700 From: Ido Schimmel To: CC: , , , , , , Ido Schimmel Subject: [PATCH net-next 4/4] ipv6: sit: Unmask upper DSCP bits in ipip6_tunnel_bind_dev() Date: Tue, 3 Sep 2024 16:53:27 +0300 Message-ID: <20240903135327.2810535-5-idosch@nvidia.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240903135327.2810535-1-idosch@nvidia.com> References: <20240903135327.2810535-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCBE:EE_|PH7PR12MB5975:EE_ X-MS-Office365-Filtering-Correlation-Id: ad43c263-35d5-4693-f0ed-08dccc1ff363 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: Q19mqk/pXkcY0kxeQts+FaeblYfRAOQJuoKY20Knf2Mf2HN2uHo14RqTBXsMNkF95QCKRfZQ879EqlmaEpiBirN2U/ldy407p0uraGyfJOMULvgqhGiR+7sm6ztd/4wChWHMMpNdl6SnmJ0vzw8w+C9XqO0VH8NXVw3n0QbpoOFq3EVOrh55srNq4wotgO8RO01QZ9a34zDC4wKmBVPuALl2kXe0dhcVPDCPt5gSnNz+RnKTh379FQDaw4jmq8KIZX1DYfKYqtuHutSJ0aew5u5mUsLJg5jpu1udKQJqYF2uNYnIpa+ujqTkeVkLD6oI9UCw6chrkyYvby+RCNJt5l7zzuIkuAZg9i7x2UL4FoDqcY783/7n5mnQNSwETC3+YVBKxkObHvGnxMq0Y2Hw3E8sitaoe25YxRGPdBnZ5Nd7n6D6Jz1hUyFiOgdKTtPLO/yid3jrD0NN2gz6pVhHdR0aNHZ+96sv9xLnDPCZCYL2byQhAZpWtrkgi7oYM5HOEd6GQo91/Bi/giKwyPVtgmbC90XQS+H46571SZp808+BN0dO6vDI4g/+Dn64i578HR4MrAwUlZ5TOuARi9C41ADT6uB4XqLaViHtUUVGZq+uyPmBFT97CNhwR2t59apkxd/pdcEH99EC2OYNvmOhcZt0PiV5B6vsJxJTWpiEIIJEf7rz7GfcE9ukwUzjjxpa5yzthRG+jKhloDwGwZhuovEH9zacR5xfoOoOEZKiGqyfE8crFGrVg8Qzfwt4TLsJyd6AbYOIDyYz/xWs0zp+Kn1Uuo1P5jXC+rHQczl4U3WSVDa7MfnMK1y+U6gVhcJePcSiS5qKJKvCp9fy4fJDRqze5qhu0N/DEMBduIB3IyB9VIkcE4Vrt+cNB/Ukm8XBDK3upfWCas4rBCangu6l61aiZ9KjctFRAnO/oIgrIR5KCGaaKDwVnhrrxCveUP6OYfvPz8dgAWN44TO3i5APGaPs7OaJWNciAUn44Xq3LR8p7P7cy40JcagCOCfy6USBqXpfEg86/1TwS99QjN517br07gea4/SUpRRIS+R8et2bB/zWyAB/ZNgS/sCch1ADF4gkqkEo2Aq0S7hvxtc59xpmmJsUjhjnzPiB84gCjoa+U/VQ3vsjG4ig3AAEphFgNScnztYF07HufilaEs9bBgjWozlFw4+1tAwqj5Pa10YAyUGZlUOngFSS7brPnQ563xCmHaiHrJRnxQYIn5jZTv1CFi20JNZWH1AoSKdVUoPSSiGEQ6o5+hyZnxJ6mytYfIj2uWyWUG/b11S6ZTgUlqMAtKeSQe40zxjkXxQ8NKq42my6fvY2OijzDT3QXSp4IFqOfLRjZUp1jpAnS84pv0hQMIhqbh48gfra5CQwCX8Fdkre9uvArwfehD4AGGPvgO2e+12oE4l3amoou6gy6DCGZSWda2ye6Xpljf5UuuadAyiY2uBppfja/40j2VTp X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230040)(376014)(82310400026)(1800799024)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 13:54:37.7670 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad43c263-35d5-4693-f0ed-08dccc1ff363 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCBE.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5975 X-Patchwork-Delegate: kuba@kernel.org Unmask the upper DSCP bits when calling ip_route_output_ports() so that in the future it could perform the FIB lookup according to the full DSCP value. Signed-off-by: Ido Schimmel Reviewed-by: Guillaume Nault --- net/ipv6/sit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 16b90a24c9ba..39bd8951bfca 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -1112,7 +1112,7 @@ static void ipip6_tunnel_bind_dev(struct net_device *dev) iph->daddr, iph->saddr, 0, 0, IPPROTO_IPV6, - RT_TOS(iph->tos), + iph->tos & INET_DSCP_MASK, tunnel->parms.link); if (!IS_ERR(rt)) {