Message ID | 20250509211820.36880-15-chia-yu.chang@nokia-bell-labs.com |
---|---|
State | Superseded |
Headers | show
Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2057.outbound.protection.outlook.com [40.107.249.57]) (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 CEA8625FA13; Fri, 9 May 2025 21:19:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.57 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746825549; cv=fail; b=sh947iPiZ+hnV8+q1Pfefz1oZez2GBGhtfxC3bc7q12blSKmilwuRsBczLYFgkxwl8swWLg/Fledh7UI5BqQA176SwonujubFu7OG6cxpUtPgY8NMjRSHt+jzjSNOm6gKl2lK38VSkHFL+G7B41/g0a8sI7PJUeb0VkB7gqj/vo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746825549; c=relaxed/simple; bh=nrbWXbZVFwrcTvisblQ7HOjMBOXKQrrdo4lniH/1V4c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=HsR/2RYWlUEbqU6HxX+0BLvvi3+BJokz/8iijjApBNiWoGJTiDslwTJAodXh0mU0pkriX+aCThtI3kEZREyIxiqkmIU0B46jCkYjvwNWVCSHiWdxrcGTbZswdLpBzJPZogn4CCU1qKxsLHbKnsOHEv83drLNMTI8Qh9bRBdcDJI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nokia-bell-labs.com; spf=fail smtp.mailfrom=nokia-bell-labs.com; dkim=pass (2048-bit key) header.d=nokia-bell-labs.com header.i=@nokia-bell-labs.com header.b=k/mvQhIl; arc=fail smtp.client-ip=40.107.249.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nokia-bell-labs.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nokia-bell-labs.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nokia-bell-labs.com header.i=@nokia-bell-labs.com header.b="k/mvQhIl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BhJnbqCM/oPsZrL1Co+xFt/xGFfXV+PEHUamXEfdXmEMIvIheZ5YkMFtGiV0FBCO3XMjMtbRLuISVPFLyhv+nrTFYGBDdOpqtU9Q5MrPFJJ1UK6VylPQ72a69uALR7p0lsWqaBCXrGxV1VRoCc/Cjv5kILfEQy27vLY4zta+ivVrwmRAMymhjGKOC8D7vOIq5KLRH/4pcRvKZsKK5jo/+Og3xVLNIr9EFR6XgiSPIPxmbNQBq0PMO3Nz+CnAfro0o1bg7mzbo+OQEqUIcpp1jyV9PPv5J1k1w5vVWNFBLIRg5sL/O0oRmCA10b1hAMmAW2MeY7fo7G7ucjBTFdjDnw== 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=jY3CRV1KAoh3/RTE0T+7WZlY5VKa/rsJk+kz4smBDGo=; b=lcH7EprW3j4tByp/MeNwo2P29BN9wabW/42+20nCo0S+IHC0X+gGDjojAH1HgVi94k0JdTvASUJsVeXJow6BcCr8IETbmP0IcHua6r7+wYwwmP+39Vy6+2UBV/450kM7EM5cnavAxkl0zOmMIq77uTzNuSM2RW7FTpe4cLEq95NjwJjXrGUSneZq4fvxKIlLklnmaqQ2pFPEnwo0yC981FIBvzp15CF3Cf2jhfwBox32MC3hQjIqMJ2q6/EBOVNHfExzDW45W7Zn/xp8nOPQPBwsAg1MJVFkpsETl+Kzho5T9QuOoACh3FBQAVQCtFWwGYnqZ1ZQOfW1/v6Q5y5FPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 131.228.2.240) smtp.rcpttodomain=amazon.com smtp.mailfrom=nokia-bell-labs.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nokia-bell-labs.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia-bell-labs.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jY3CRV1KAoh3/RTE0T+7WZlY5VKa/rsJk+kz4smBDGo=; b=k/mvQhIlrw/wSK5mT8n6IodAlsCfYkHHwwg3cFSZiwoIdyt0gDgdYajrtVllNIu5RLwGRU24Vr1Px19KNEyk+ZKagHclKphfF1IwHTAiKSVZyMmlp2fJn7KheaF7T03Q64l8aOE2gAfuWfpshFVv0F+KPCQPUOHQAvSViGpXouQ3Gm0vgCa1xicF8ryCUCmfSGoZsWCWTdeflP6wfDfIJ8SiyAh5TOkqPUBxIUoHng01pv9Q7h7Qj0dMQKFcgtQXjCU/LeYtwgFTbMwosIbDrrd6s3rjQYxurRQBwy3vmzcO8ag05jkIeutswkKZ5Chlj0AU0khpr9UzeRSu3Xu2Fw== Received: from DB8P191CA0028.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::38) by AS8PR07MB8168.eurprd07.prod.outlook.com (2603:10a6:20b:377::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8722.25; Fri, 9 May 2025 21:19:03 +0000 Received: from DU2PEPF00028CFD.eurprd03.prod.outlook.com (2603:10a6:10:130:cafe::c8) by DB8P191CA0028.outlook.office365.com (2603:10a6:10:130::38) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8722.24 via Frontend Transport; Fri, 9 May 2025 21:19:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 131.228.2.240) smtp.mailfrom=nokia-bell-labs.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nokia-bell-labs.com; Received-SPF: Pass (protection.outlook.com: domain of nokia-bell-labs.com designates 131.228.2.240 as permitted sender) receiver=protection.outlook.com; client-ip=131.228.2.240; helo=fihe3nok0735.emea.nsn-net.net; pr=C Received: from fihe3nok0735.emea.nsn-net.net (131.228.2.240) by DU2PEPF00028CFD.mail.protection.outlook.com (10.167.242.181) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8722.18 via Frontend Transport; Fri, 9 May 2025 21:19:02 +0000 Received: from sarah.nbl.nsn-rdnet.net (sarah.nbl.nsn-rdnet.net [10.0.73.150]) by fihe3nok0735.emea.nsn-net.net (Postfix) with ESMTP id 6EFBF200C8; Sat, 10 May 2025 00:19:01 +0300 (EEST) From: chia-yu.chang@nokia-bell-labs.com To: horms@kernel.org, dsahern@kernel.org, kuniyu@amazon.com, bpf@vger.kernel.org, netdev@vger.kernel.org, dave.taht@gmail.com, pabeni@redhat.com, jhs@mojatatu.com, kuba@kernel.org, stephen@networkplumber.org, xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net, edumazet@google.com, andrew+netdev@lunn.ch, donald.hunter@gmail.com, ast@fiberby.net, liuhangbin@gmail.com, shuah@kernel.org, linux-kselftest@vger.kernel.org, ij@kernel.org, ncardwell@google.com, koen.de_schepper@nokia-bell-labs.com, g.white@cablelabs.com, ingemar.s.johansson@ericsson.com, mirja.kuehlewind@ericsson.com, cheshire@apple.com, rs.ietf@gmx.at, Jason_Livingood@comcast.com, vidhi_goel@apple.com Cc: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com> Subject: [PATCH v6 net-next 14/15] tcp: accecn: try to fit AccECN option with SACK Date: Fri, 9 May 2025 23:18:19 +0200 Message-Id: <20250509211820.36880-15-chia-yu.chang@nokia-bell-labs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509211820.36880-1-chia-yu.chang@nokia-bell-labs.com> References: <20250509211820.36880-1-chia-yu.chang@nokia-bell-labs.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: <linux-kselftest.vger.kernel.org> List-Subscribe: <mailto:linux-kselftest+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kselftest+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028CFD:EE_|AS8PR07MB8168:EE_ X-MS-Office365-Filtering-Correlation-Id: a431a0e5-3302-4f1a-d9c9-08dd8f3f1f6c X-LD-Processed: 5d471751-9675-428d-917b-70f44f9630b0,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|1800799024|7416014|36860700013|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?15GeiXxL/54xYxoIUMHd46KYqftOMMU?= =?utf-8?q?l1+pfMK5FJKvxmd9qnJ60sNCU14mFPkQQlPzSgzZ0eS519kWNmyYrn7mJbH4KYroT?= =?utf-8?q?TSKU0wo1k/Bw/M1HqhKq2Vf3tGn7zCYf4dv5k1hbasSQVjNU7XDTXtnNJ3nohtPN+?= =?utf-8?q?SG8zhT8lksLsBHPOvNCA6CdL2V/7ShrdSaXeM5NcI0myPHXOTSpMsqay54uRczCns?= =?utf-8?q?rAzdwu5tW47WXYgXgknXCxtohwSxSxvtyoIXf5XwTh6h/W9qQKnzNlmXpFBmYRuPn?= =?utf-8?q?MHbrpERr9rID4C7pBttSklqbwPc3AiMALLHnvJNgeIYyCdR4XVC3lMbFhmfpJHNOz?= =?utf-8?q?my4QLrrwdQVKSwN+P2R0oVqsdWro0bBvkeoQfVa1UNl9dHYQ74JMzplUMU8ya7Led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?q?CxVqZV513KcJW44eXW0Gf0mM4TVTeJNdtFW+bXF3AH/Lo4GiWNWyu++63kzZXPBE/?= =?utf-8?q?DsUvByD+WbbmG1ZjqamtJLXbB+GSOKb4g4So+jhBR7Yo2l4pSYFCVWUIT2e1dB20Q?= =?utf-8?q?6UEkAO1IHWiVGMDUSv5bC00gsWk5lSVHK+3S4O7lbSuSxDoOxrCZvCf/7CtX6UVIW?= =?utf-8?q?uhFcY/a43YUU8uG+PN1ZIaZOXzvao8mw=3D=3D?= X-Forefront-Antispam-Report: CIP:131.228.2.240;CTRY:FI;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:fihe3nok0735.emea.nsn-net.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(376014)(1800799024)(7416014)(36860700013)(921020);DIR:OUT;SFP:1101; X-OriginatorOrg: nokia-bell-labs.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2025 21:19:02.8959 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a431a0e5-3302-4f1a-d9c9-08dd8f3f1f6c X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0;Ip=[131.228.2.240];Helo=[fihe3nok0735.emea.nsn-net.net] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028CFD.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB8168 |
Series |
AccECN protocol patch series
|
expand
|
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index af619233a6f3..a53eae6892b5 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -981,8 +981,21 @@ static int tcp_options_fit_accecn(struct tcp_out_options *opts, int required, opts->num_accecn_fields--; size -= TCPOLEN_ACCECN_PERFIELD; } - if (opts->num_accecn_fields < required) + if (opts->num_accecn_fields < required) { + if (opts->num_sack_blocks > 2) { + /* Try to fit the option by removing one SACK block */ + opts->num_sack_blocks--; + size = tcp_options_fit_accecn(opts, required, + remaining + + TCPOLEN_SACK_PERBLOCK, + max_combine_saving); + if (opts->options & OPTION_ACCECN) + return size - TCPOLEN_SACK_PERBLOCK; + + opts->num_sack_blocks++; + } return 0; + } opts->options |= OPTION_ACCECN; return size;