public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <matttbe@kernel.org>
Cc: <davem@davemloft.net>, <edumazet@google.com>,
	<jaka@linux.ibm.com>, <kuba@kernel.org>, <kuni1840@gmail.com>,
	<kuniyu@amazon.com>, <linux-s390@vger.kernel.org>,
	<martineau@kernel.org>, <mptcp@lists.linux.dev>,
	<netdev@vger.kernel.org>, <pabeni@redhat.com>,
	<wenjia@linux.ibm.com>
Subject: Re: [PATCH v1 net-next] net: Deprecate SO_DEBUG and reclaim SOCK_DBG bit.
Date: Wed, 14 Feb 2024 11:35:30 -0800	[thread overview]
Message-ID: <20240214193530.1813-1-kuniyu@amazon.com> (raw)
In-Reply-To: <60d7072d-392e-489b-8889-404f3c753620@kernel.org>

From: Matthieu Baerts <matttbe@kernel.org>
Date: Wed, 14 Feb 2024 10:32:58 +0100
> 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?

Sounds good!

And I can apply the similar change to the general setsockopt()
not to take lock_sock().


> 
> >  			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.

Thanks!

  reply	other threads:[~2024-02-14 19:35 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
2024-02-14 19:35   ` Kuniyuki Iwashima [this message]
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=20240214193530.1813-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jaka@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=kuni1840@gmail.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=martineau@kernel.org \
    --cc=matttbe@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