From: Matthieu Baerts <matttbe@kernel.org>
To: Kuniyuki Iwashima <kuniyu@amazon.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Mat Martineau <martineau@kernel.org>,
Wenjia Zhang <wenjia@linux.ibm.com>,
Jan Karcher <jaka@linux.ibm.com>
Cc: Kuniyuki Iwashima <kuni1840@gmail.com>,
netdev@vger.kernel.org, mptcp@lists.linux.dev,
linux-s390@vger.kernel.org
Subject: Re: [PATCH v1 net-next] net: Deprecate SO_DEBUG and reclaim SOCK_DBG bit.
Date: Wed, 14 Feb 2024 10:32:58 +0100 [thread overview]
Message-ID: <60d7072d-392e-489b-8889-404f3c753620@kernel.org> (raw)
In-Reply-To: <20240213223135.85957-1-kuniyu@amazon.com>
Hi Kuniyuki,
On 13/02/2024 23:31, Kuniyuki Iwashima wrote:
> Recently, commit 8e5443d2b866 ("net: remove SOCK_DEBUG leftovers")
> removed the last users of SOCK_DEBUG(), and commit b1dffcf0da22 ("net:
> remove SOCK_DEBUG macro") removed the macro.
>
> Now is the time to deprecate the oldest socket option.
Thank you for looking at this!
My review here below is only about the modifications related to MPTCP.
(...)
> diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c
> index da37e4541a5d..f6d90eef3d7c 100644
> --- a/net/mptcp/sockopt.c
> +++ b/net/mptcp/sockopt.c
> @@ -81,7 +81,7 @@ static void mptcp_sol_socket_sync_intval(struct mptcp_sock *msk, int optname, in
>
> switch (optname) {
> case SO_DEBUG:
> - sock_valbool_flag(ssk, SOCK_DBG, !!val);
> + /* deprecated. */
If it is now a NOOP, maybe better to:
- remove SO_DEBUG from mptcp_sol_socket_sync_intval() and
mptcp_setsockopt_sol_socket_int()
- move it just above the "return 0" in mptcp_setsockopt_sol_socket()
with the "deprecated" (or "removed") comment
By doing that, we avoid a lock, plus going through the list of subflows
for nothing.
WDYT?
> break;
> case SO_KEEPALIVE:
> if (ssk->sk_prot->keepalive)
> @@ -1458,8 +1458,6 @@ static void sync_socket_options(struct mptcp_sock *msk, struct sock *ssk)
> sk_dst_reset(ssk);
> }
>
> - sock_valbool_flag(ssk, SOCK_DBG, sock_flag(sk, SOCK_DBG));
> -
> if (inet_csk(sk)->icsk_ca_ops != inet_csk(ssk)->icsk_ca_ops)
> tcp_set_congestion_control(ssk, msk->ca_name, false, true);
> __tcp_sock_set_cork(ssk, !!msk->cork);
The rest looks good to me.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2024-02-14 9:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-13 22:31 [PATCH v1 net-next] net: Deprecate SO_DEBUG and reclaim SOCK_DBG bit Kuniyuki Iwashima
2024-02-14 8:14 ` Gerd Bayer
2024-02-14 19:29 ` Kuniyuki Iwashima
2024-02-14 9:32 ` Matthieu Baerts [this message]
2024-02-14 19:35 ` Kuniyuki Iwashima
2024-02-15 19:57 ` Neal Cardwell
2024-02-15 20:16 ` Kuniyuki Iwashima
2024-02-16 0:04 ` Neal Cardwell
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=60d7072d-392e-489b-8889-404f3c753620@kernel.org \
--to=matttbe@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jaka@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=kuniyu@amazon.com \
--cc=linux-s390@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wenjia@linux.ibm.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