From nobody Tue Jun 23 05:08:59 2026 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 71106C433EF for ; Thu, 10 Mar 2022 13:49:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242549AbiCJNuj (ORCPT ); Thu, 10 Mar 2022 08:50:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231136AbiCJNuh (ORCPT ); Thu, 10 Mar 2022 08:50:37 -0500 Received: from smtp.tom.com (smtprz02.163.net [106.3.154.235]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E67BA14EF72 for ; Thu, 10 Mar 2022 05:49:34 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by vip-app02.163.net (Postfix) with ESMTP id 94707440120 for ; Thu, 10 Mar 2022 21:49:33 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tom.com; s=mail; t=1646920173; bh=ScMuHjAXfamD9Fmid4TX5rIBXmPUVWR9zJbXFToXGJQ=; h=From:To:Cc:Subject:Date:From; b=JjgfVvPK42GEWmWbNAjIcLQWQSRcQbhoy76MOZZZFI6XZpaP9JyG893N5ONF1Fmqm Hyl0JHWmgEi3WurpPMZNz0WA9u6LEBL3rLvFOtF0KgUatpgtzMbdb8Al95ZlBJpt3O 46vj7TWKAtP9lnOeiZPhvUCrfiOw9OD/WSzlSjBo= Received: from localhost (HELO smtp.tom.com) ([127.0.0.1]) by localhost (TOM SMTP Server) with SMTP ID 943561245 for ; Thu, 10 Mar 2022 21:49:33 +0800 (CST) X-Virus-Scanned: Debian amavisd-new at mxtest.tom.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tom.com; s=mail; t=1646920173; bh=ScMuHjAXfamD9Fmid4TX5rIBXmPUVWR9zJbXFToXGJQ=; h=From:To:Cc:Subject:Date:From; b=JjgfVvPK42GEWmWbNAjIcLQWQSRcQbhoy76MOZZZFI6XZpaP9JyG893N5ONF1Fmqm Hyl0JHWmgEi3WurpPMZNz0WA9u6LEBL3rLvFOtF0KgUatpgtzMbdb8Al95ZlBJpt3O 46vj7TWKAtP9lnOeiZPhvUCrfiOw9OD/WSzlSjBo= Received: from localhost.localdomain (unknown [101.93.196.13]) by antispamvip.163.net (Postfix) with ESMTPA id C02B615414BB; Thu, 10 Mar 2022 21:49:28 +0800 (CST) From: Mingbao Sun To: Eric Dumazet , "David S . Miller" , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Christoph Hellwig , sunmingbao@tom.com, tyler.sun@dell.com, ping.gan@dell.com, yanxiu.cai@dell.com, libin.zhang@dell.com, ao.sun@dell.com Subject: [PATCH] tcp: export symbol tcp_set_congestion_control Date: Thu, 10 Mar 2022 21:48:30 +0800 Message-Id: <20220310134830.130818-1-sunmingbao@tom.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mingbao Sun congestion-control could have a noticeable impaction on the performance of TCP-based communications. This is of course true to NVMe/TCP in the kernel. Different congestion-controls (e.g., cubic, dctcp) are suitable for different scenarios. Proper adoption of congestion control would benefit the performance. On the contrary, the performance could be destroyed. So to gain excellent performance against different network environments, NVMe/TCP tends to support specifying the congestion-control. This means NVMe/TCP (a kernel user) needs to set the congestion-control of its TCP sockets. Since the kernel API 'kernel_setsockopt' was removed, and since the function =E2=80=98tcp_set_congestion_control=E2=80=99 is just the real unde= rlying guy handling this job, so it makes sense to get it exported. Signed-off-by: Mingbao Sun --- net/ipv4/tcp_cong.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index db5831e6c136..5d77f3e7278e 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c @@ -383,6 +383,7 @@ int tcp_set_congestion_control(struct sock *sk, const c= har *name, bool load, rcu_read_unlock(); return err; } +EXPORT_SYMBOL_GPL(tcp_set_congestion_control); =20 /* Slow start is used when congestion window is no greater than the slow s= tart * threshold. We base on RFC2581 and also handle stretch ACKs properly. --=20 2.26.2