From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: netdev@vger.kernel.org
Cc: Maxim Galaganov <max@internet.ru>,
davem@davemloft.net, kuba@kernel.org,
matthieu.baerts@tessares.net, mptcp@lists.linux.dev,
Paolo Abeni <pabeni@redhat.com>,
Mat Martineau <mathew.j.martineau@linux.intel.com>
Subject: [PATCH net-next 08/10] tcp: expose __tcp_sock_set_cork and __tcp_sock_set_nodelay
Date: Fri, 3 Dec 2021 14:35:39 -0800 [thread overview]
Message-ID: <20211203223541.69364-9-mathew.j.martineau@linux.intel.com> (raw)
In-Reply-To: <20211203223541.69364-1-mathew.j.martineau@linux.intel.com>
From: Maxim Galaganov <max@internet.ru>
Expose __tcp_sock_set_cork() and __tcp_sock_set_nodelay() for use in
MPTCP setsockopt code -- namely for syncing MPTCP socket options with
subflows inside sync_socket_options() while already holding the subflow
socket lock.
Acked-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Maxim Galaganov <max@internet.ru>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
---
include/linux/tcp.h | 2 ++
net/ipv4/tcp.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 48d8a363319e..78b91bb92f0d 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -512,11 +512,13 @@ static inline u16 tcp_mss_clamp(const struct tcp_sock *tp, u16 mss)
int tcp_skb_shift(struct sk_buff *to, struct sk_buff *from, int pcount,
int shiftlen);
+void __tcp_sock_set_cork(struct sock *sk, bool on);
void tcp_sock_set_cork(struct sock *sk, bool on);
int tcp_sock_set_keepcnt(struct sock *sk, int val);
int tcp_sock_set_keepidle_locked(struct sock *sk, int val);
int tcp_sock_set_keepidle(struct sock *sk, int val);
int tcp_sock_set_keepintvl(struct sock *sk, int val);
+void __tcp_sock_set_nodelay(struct sock *sk, bool on);
void tcp_sock_set_nodelay(struct sock *sk);
void tcp_sock_set_quickack(struct sock *sk, int val);
int tcp_sock_set_syncnt(struct sock *sk, int val);
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 6ab82e1a1d41..20054618c87e 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3207,7 +3207,7 @@ static void tcp_enable_tx_delay(void)
* TCP_CORK can be set together with TCP_NODELAY and it is stronger than
* TCP_NODELAY.
*/
-static void __tcp_sock_set_cork(struct sock *sk, bool on)
+void __tcp_sock_set_cork(struct sock *sk, bool on)
{
struct tcp_sock *tp = tcp_sk(sk);
@@ -3235,7 +3235,7 @@ EXPORT_SYMBOL(tcp_sock_set_cork);
* However, when TCP_NODELAY is set we make an explicit push, which overrides
* even TCP_CORK for currently queued segments.
*/
-static void __tcp_sock_set_nodelay(struct sock *sk, bool on)
+void __tcp_sock_set_nodelay(struct sock *sk, bool on)
{
if (on) {
tcp_sk(sk)->nonagle |= TCP_NAGLE_OFF|TCP_NAGLE_PUSH;
--
2.34.1
next prev parent reply other threads:[~2021-12-03 22:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 22:35 [PATCH net-next 00/10] mptcp: New features for MPTCP sockets and netlink PM Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 01/10] mptcp: add TCP_INQ cmsg support Mat Martineau
2021-12-07 1:14 ` Jakub Kicinski
2021-12-03 22:35 ` [PATCH net-next 02/10] selftests: mptcp: add TCP_INQ support Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 03/10] mptcp: add SIOCINQ, OUTQ and OUTQNSD ioctls Mat Martineau
2021-12-07 1:16 ` Jakub Kicinski
2021-12-07 10:21 ` Florian Westphal
2021-12-07 10:30 ` Paolo Abeni
2021-12-03 22:35 ` [PATCH net-next 04/10] selftests: mptcp: add inq test case Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 05/10] mptcp: allow changing the "backup" bit by endpoint id Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 06/10] mptcp: getsockopt: add support for IP_TOS Mat Martineau
2021-12-07 1:25 ` Jakub Kicinski
2021-12-03 22:35 ` [PATCH net-next 07/10] selftests: mptcp: check IP_TOS in/out are the same Mat Martineau
2021-12-03 22:35 ` Mat Martineau [this message]
2021-12-03 22:35 ` [PATCH net-next 09/10] mptcp: expose mptcp_check_and_set_pending Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 10/10] mptcp: support TCP_CORK and TCP_NODELAY Mat Martineau
2021-12-07 1:30 ` Jakub Kicinski
2021-12-07 10:19 ` Florian Westphal
2021-12-07 10:37 ` Paolo Abeni
2021-12-07 20:40 ` [PATCH net-next 00/10] mptcp: New features for MPTCP sockets and netlink PM patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211203223541.69364-9-mathew.j.martineau@linux.intel.com \
--to=mathew.j.martineau@linux.intel.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=matthieu.baerts@tessares.net \
--cc=max@internet.ru \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox