From patchwork Tue Oct 15 10:29:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Chia-Yu Chang (Nokia)" X-Patchwork-Id: 13836106 X-Patchwork-Delegate: kuba@kernel.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2082.outbound.protection.outlook.com [40.107.20.82]) (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 2EA431F9400 for ; Tue, 15 Oct 2024 10:30:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728988244; cv=fail; b=pCfsDbnqJiej9RoVjaCd8hk2c4Szp776tyNnoFffYPXDxhAUGmmp6Zna4t+zQN2bqxqddHDhjSBQXnVAx6fZ2qIrs7YnbOwJSMVL/dwC47Y0p6qcHwEjrKNSdHEuEdEZhmFomTVlLab7IszkH+J4Ryy/ieXnbTS4ZKa5oHsYDk0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728988244; c=relaxed/simple; bh=4T4GdhUGoEUokZ3OIxzB+EWrizYn5VJAiiF0JPCBDxA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=COEhUAmUEIfL0kskp6NjxkT1qiq03l+iN9/8L3X+jyMVN9AvzBxxuBBtZvVyxWHEPSrOTnkPk/m6pjGJ4xiVau4V4ZHlwAH9nS5t6y3CWDiuPvwSVk70YHnM9EOpt4zMssxot7JGVFsRjnNlgwpGZUS/XQFZn40XeOgy6l7ETak= 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=MWh67FpT; arc=fail smtp.client-ip=40.107.20.82 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="MWh67FpT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BULrhGf5dZT12smCjf33cE7mT5C5bhbDFqVT4aN/boziyxbdUC4/rLFbgPzpkviqDr7j6fuRE0QgGG8u7+o+Y3E+AlFXODpTwvlbRyOiurTk8jeC7ZybrgZi/e6dZR6/edyGx8FluOqqVAUa/4gAhX/lti6L+44+8KrMwELFpsBWUv5foOmN9gsNktEPN7Em6m7lWwHXdVJW/su3hGj7IxN8tnLqYcQbhDTTInu0qT+3LsiOxUZEkZzDGWkKGPbhoPHFvt9hZmx8n3E3vbCBGP33A03H2eMhN3+vyOYMv4fJjiXwSxUKFMuTjgnQdIb5xNRMfyVyMLwb69nLflhV2A== 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=1zrYTIT0yK/vPyDCJOaOT2DYRh8LoTEQCWCtfNVV+UE=; b=VL5J+gl27wyCumiGjVzwkfIl5NCxgLwMS02deyyX8yQfEx1T/Hyc72IAXyuFzXedi/792sI4GF7oRHjHnYXn8fcb6ZxWLxLDAqpwLs7Ktu0spHnKGjkfRISfMqTYwVEmhtQTCh4R5bFm4JuQhRPdSaP2/ySnw5UVDNmx6NU36/+ThtG4fUFS6oCE6PW4kJXFeY/ly8k39faOssN7SttF2dDbYF4wqJPYTKj1rR05y4Vnjmc9LvdSxmQhPnWP8u5tfTI+40wcPDW6isj+kkeyGsqHyybk7clsMhXGCMbWm40rNsUsU3fG9tWA+8bXgeUUgpyxAufvsDZ4RXqNNzf/eQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 131.228.6.101) smtp.rcpttodomain=nokia-bell-labs.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=1zrYTIT0yK/vPyDCJOaOT2DYRh8LoTEQCWCtfNVV+UE=; b=MWh67FpTp3CCpVpviAcmWc4qVSQRYeGMSye22wlWY62OqXGTV3RMUakoUgBhfwm/G5AMfZvlmVkP0EU3QrMcMdI7oDMvygmpzoHbrGaIAHBpww4mLpLv8COJ5XTJxM46hV6psxttrKx64X7uXoBpPMT4htkNA+TNNHWqO7BwQiyNTBLOPKzZ0Ub+HCFjRnrZgaq63+zsjXFZE6909L2x4DFj0PaBIaJU+sX3//tkFmtU0bUHj7L+G6sWTRmVQiakkbwgzzANrUEjDgX0XeNPi1SBVADm7Bq3/CgztbaIpeh2EkRdo5rpvzdMAxe+arMuvMmfECt1vcVKo3eLPb1nmw== Received: from DB7PR02CA0036.eurprd02.prod.outlook.com (2603:10a6:10:52::49) by AM8PR07MB7346.eurprd07.prod.outlook.com (2603:10a6:20b:24d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Tue, 15 Oct 2024 10:30:38 +0000 Received: from DU2PEPF00028D09.eurprd03.prod.outlook.com (2603:10a6:10:52:cafe::9b) by DB7PR02CA0036.outlook.office365.com (2603:10a6:10:52::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Tue, 15 Oct 2024 10:30:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 131.228.6.101) 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.6.101 as permitted sender) receiver=protection.outlook.com; client-ip=131.228.6.101; helo=fr712usmtp1.zeu.alcatel-lucent.com; pr=C Received: from fr712usmtp1.zeu.alcatel-lucent.com (131.228.6.101) by DU2PEPF00028D09.mail.protection.outlook.com (10.167.242.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Tue, 15 Oct 2024 10:30:36 +0000 Received: from sarah.nbl.nsn-rdnet.net (sarah.nbl.nsn-rdnet.net [10.0.73.150]) by fr712usmtp1.zeu.alcatel-lucent.com (GMO) with ESMTP id 49FATtnk029578; Tue, 15 Oct 2024 10:30:35 GMT From: chia-yu.chang@nokia-bell-labs.com To: netdev@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 Subject: [PATCH net-next 42/44] tcp: Add tso_segs() CC callback for TCP Prague Date: Tue, 15 Oct 2024 12:29:38 +0200 Message-Id: <20241015102940.26157-43-chia-yu.chang@nokia-bell-labs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241015102940.26157-1-chia-yu.chang@nokia-bell-labs.com> References: <20241015102940.26157-1-chia-yu.chang@nokia-bell-labs.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D09:EE_|AM8PR07MB7346:EE_ X-MS-Office365-Filtering-Correlation-Id: 43c54c00-bbb9-4f4c-67b5-08dced046887 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|1800799024|376014|82310400026|36860700013|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?8baLhmIrGmXmM0lgvJ7gqjHaEeDnb72?= =?utf-8?q?jAJFCchG6KbVx4nwR145+/tFtQiNIbuB56e6IO676w1JgFOUA2nXR4efOqQuNBmE9?= =?utf-8?q?hNpxlJUZ8hKAFqgerFAKChigk/3rkqOWRKj9/I4mXiclQBmE9lt6jICTiwoXigUtI?= =?utf-8?q?mPtCFKR5Z+yxVL5ui7yVdZY3IpEx4RiZnggdhtBwIVHLooNqi3s1+aH9IZNzewoR9?= =?utf-8?q?Umi1nVAGsLTrJ1rgTJVfOqVBc9RPne2jZK40Pe2SiuwuRKvpF5XS2AfbyAk919cpL?= =?utf-8?q?2M4kR4HRlxS+madWf/rT9j+9qkp995Yz0sxR+IceDuJV29wOQmQ7t7KQMB9Uza4jy?= =?utf-8?q?HLiO+e+bY8R8lOgnk5OrOldY98WL2CjmgUAaj+p9a0eY4HBicaVTv2iq2eiTMOGrF?= =?utf-8?q?LDC+76uBQLbZYKdo6eQwJ7hYPzSn5SufNdApnMbqNTD5sTGtIEbvMb5TgvaWOlkXQ?= =?utf-8?q?7FDA2tM8Owf/PrJ9lWk+c3LnEXDlvIoOlYr9M2XGynp4gG97MkyEKrLNfQv6l1acy?= =?utf-8?q?HyYj+nheyiiosWlyj2UBU/0LW/6AGQ0IW6C8xwW6huaH0uR7g0OedgbcddU5Ozc2D?= =?utf-8?q?/QtBRFG++Jiw7ylJpFYGzvsBTJskmbJc8HrRDQ5UlUf2bCD1Tm34cndzbkDXoWioz?= =?utf-8?q?DljOhsVkLmW8W9pYGTR5wOwUSRSuCPZXGxI1006Vg5nU9Q+vzjir3zTI64I63AL9f?= =?utf-8?q?QpJ2pXZWx1IjT5Y2L3Ap7lqPs0kAXsQBBi77GG857Yu9DemypE/aci0wJ4d9iViGD?= =?utf-8?q?LzW3fDIK+5K3qqR34CxZWWs7U4uzHhslUf3xZwo+vi25jbqM3G2HDUhKkp5lCEY6L?= =?utf-8?q?SPCVWnvnm4va+YxftjGzaTj5Aezs/r1BH9XZl++5ngljg9Fcm45m09R29J3ogFwW9?= =?utf-8?q?CVw6XzmwO2pQ+KnvB567tXbWynFXDeGY4BpMxFvmWubdaozsbNSR9KRYMZSPUWULT?= =?utf-8?q?BUu7RlgdZoiu2cc0d1iQr4M59/XAvAYOlFnlTnihGvehCeaipKu2F8YlFkGgKZH4K?= =?utf-8?q?I+cJfz71rH+31/pwtVqNT1MJErwoVIRfgyzqeMK4kXfgEthceGjaA6pq2DE04pAoQ?= =?utf-8?q?G7cdyOzipo/K3hErExtdxAVlGeAjGIXNNYAZfw5QHLXwWlfHXyvtnFduaw870J9Dw?= =?utf-8?q?tnJ96T8GIRwBHu+hV5hhvyJFU7gRLBvbrPuYBbCHGcdkduDyjQfJ1SDD+065wwZfU?= =?utf-8?q?/AhgHeX7F9lOom9uL3Bq+IKgy+bZdRD165HhazPx8rxrJvBhmGjLQN2IsJFo537H5?= =?utf-8?q?yRBHhjgLrmVaBMRxDe7T368DmfRAtRg6rJToYJpPPt3KCKhMhyxE7T5bf1JMtsvrR?= =?utf-8?q?p6ohhwsCVYA6?= X-Forefront-Antispam-Report: CIP:131.228.6.101;CTRY:FI;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:fr712usmtp1.zeu.alcatel-lucent.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(7416014)(1800799024)(376014)(82310400026)(36860700013)(921020);DIR:OUT;SFP:1101; X-OriginatorOrg: nokia-bell-labs.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2024 10:30:36.7405 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 43c54c00-bbb9-4f4c-67b5-08dced046887 X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0;Ip=[131.228.6.101];Helo=[fr712usmtp1.zeu.alcatel-lucent.com] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D09.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR07MB7346 X-Patchwork-Delegate: kuba@kernel.org From: Chia-Yu Chang This patch adds tso_segs() CC callbak for CC algorithm to provides explicit tso segment number of each data burst and overrides tcp_tso_autosize(). No functional change. Signed-off-by: Ilpo Järvinen Signed-off-by: Chia-Yu Chang --- include/net/tcp.h | 3 +++ net/ipv4/tcp_output.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index ffb3971105b1..ce7230c1ba5f 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1322,6 +1322,9 @@ struct tcp_congestion_ops { /* override sysctl_tcp_min_tso_segs */ u32 (*min_tso_segs)(struct sock *sk); + /* override tcp_tso_autosize */ + u32 (*tso_segs)(struct sock *sk, u32 mss_now); + /* call when packets are delivered to update cwnd and pacing rate, * after all the ca_state processing. (optional) */ diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 4e00ebf6bd42..0f0e79b42941 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2275,7 +2275,9 @@ static u32 tcp_tso_segs(struct sock *sk, unsigned int mss_now) ca_ops->min_tso_segs(sk) : READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_min_tso_segs); - tso_segs = tcp_tso_autosize(sk, mss_now, min_tso); + tso_segs = ca_ops->tso_segs ? + ca_ops->tso_segs(sk, mss_now) : + tcp_tso_autosize(sk, mss_now, min_tso); return min_t(u32, tso_segs, sk->sk_gso_max_segs); }