Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: edumazet@google.com
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, ncardwell@google.com, kuniyu@google.com,
	willemb@google.com, netdev@vger.kernel.org,
	eric.dumazet@gmail.com
Subject: Re: [PATCH net-next 2/9] net: add sk_set_nospace() and sk_clear_nospace()
Date: Thu, 24 Sep 2026 00:27:40 +0000	[thread overview]
Message-ID: <179020966002.2160803.11537948312109210054@kernel.org> (raw)
In-Reply-To: <20260922122721.3568295-3-edumazet@google.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] Changelog overstatement at this commit only: the commit message
  of "net: add sk_set_nospace() and sk_clear_nospace()" claims it…

--

net: add sk_set_nospace() and sk_clear_nospace()

This adds two helpers in net/core/sock.c that fold the sk->sk_socket
dereference and its NULL check into a single place, and converts the
SOCK_NOSPACE setters and clearers in core, tcp, kcm, mptcp, smc and tls
over to them.  It is described as a preparation patch for a later one
that gives TCP a private mirror of the bit.

> Add sk_set_nospace() and sk_clear_nospace() helpers and convert all
> the setters and clearers to them, so that "git grep _bit(SOCK_NOSPACE"
> only reports the two helpers and the remaining test_bit() sites.

[Severity: Low]
Is this description accurate for this patch on its own?  At this commit
the grep still reports twelve open-coded sites outside the two helpers:

  drivers/block/drbd/drbd_worker.c  set_bit(SOCK_NOSPACE, &sk->sk_socket->flags)
  drivers/nvme/host/tcp.c           clear_bit(SOCK_NOSPACE, &sk->sk_socket->flags)
  drivers/nvme/target/tcp.c         clear_bit(SOCK_NOSPACE, &sk->sk_socket->flags)
  fs/dlm/lowcomms.c                 clear_bit(SOCK_NOSPACE, &con->sock->flags)
  fs/dlm/lowcomms.c                 set_bit(SOCK_NOSPACE, &con->sock->sk->sk_socket->flags)
  net/ceph/messenger.c              clear_bit(SOCK_NOSPACE, &sk->sk_socket->flags)
  net/rds/tcp_send.c                set_bit(SOCK_NOSPACE, &tc->t_sock->sk->sk_socket->flags)
  net/rds/tcp_send.c                set_bit(SOCK_NOSPACE, &sk->sk_socket->flags)
  net/sunrpc/svcsock.c              set_bit(SOCK_NOSPACE, &svsk->sk_sock->flags)
  net/sunrpc/svcsock.c              clear_bit(SOCK_NOSPACE, &svsk->sk_sock->flags)
  net/sunrpc/xprtsock.c             set_bit(SOCK_NOSPACE, &sk->sk_socket->flags)
  net/sunrpc/xprtsock.c             clear_bit(SOCK_NOSPACE, &sk->sk_socket->flags)

The remaining sites are all converted by later patches in the series
("sunrpc: use sk_set_nospace() and sk_clear_nospace()", "rds: use
sk_set_nospace()", "dlm: use sk_set_nospace() and sk_clear_nospace()",
"drbd: use sk_set_nospace()", "nvme-tcp: use sk_clear_nospace()" and
"libceph: use sk_clear_nospace()"), and all six land before "tcp: add
tp->tcp_nospace", so the single choke point the mirror depends on is in
place by the time the mirror exists and no intermediate tree state is
broken.

Could the changelog say that the conversion is completed by the following
patches rather than by this one?

> Callers that had no NULL check are all called from user context with a
> socket attached, so folding the check into the helpers only makes them
> more robust.

The same "some with a NULL check, some without" wording in the first
paragraph reads as a description of the state after this patch, when
drbd_worker.c and net/ceph/messenger.c still carry their own checks.

<br>

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260922122721.3568295-1-edumazet%40google.com

  parent reply	other threads:[~2026-09-24  0:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 12:27 [PATCH net-next 0/9] tcp: avoid struct socket cache line miss in tcp_check_space() Eric Dumazet
2026-09-22 12:27 ` [PATCH net-next 1/9] dlm: fix send buffer backpressure handling Eric Dumazet
2026-09-22 13:13   ` Alexander Aring
2026-09-23 21:46   ` Kuniyuki Iwashima
2026-09-24  0:27   ` netdev-bot+sashiko
2026-09-24  0:37     ` Eric Dumazet
2026-09-22 12:27 ` [PATCH net-next 2/9] net: add sk_set_nospace() and sk_clear_nospace() Eric Dumazet
2026-09-23 21:54   ` Kuniyuki Iwashima
2026-09-24  0:27   ` netdev-bot+sashiko [this message]
2026-09-22 12:27 ` [PATCH net-next 3/9] sunrpc: use " Eric Dumazet
2026-09-23 21:54   ` Kuniyuki Iwashima
2026-09-22 12:27 ` [PATCH net-next 4/9] rds: use sk_set_nospace() Eric Dumazet
2026-09-23 21:55   ` Kuniyuki Iwashima
2026-09-22 12:27 ` [PATCH net-next 5/9] dlm: use sk_set_nospace() and sk_clear_nospace() Eric Dumazet
2026-09-23 21:55   ` Kuniyuki Iwashima
2026-09-22 12:27 ` [PATCH net-next 6/9] drbd: use sk_set_nospace() Eric Dumazet
2026-09-23 21:55   ` Kuniyuki Iwashima
2026-09-22 12:27 ` [PATCH net-next 7/9] nvme-tcp: use sk_clear_nospace() Eric Dumazet
2026-09-23 21:56   ` Kuniyuki Iwashima
2026-09-22 12:27 ` [PATCH net-next 8/9] libceph: " Eric Dumazet
2026-09-23 21:56   ` Kuniyuki Iwashima
2026-09-22 12:27 ` [PATCH net-next 9/9] tcp: add tp->tcp_nospace Eric Dumazet
2026-09-23 22:01   ` Kuniyuki Iwashima
2026-09-24  0:27   ` netdev-bot+sashiko
2026-09-24 13:01     ` Eric Dumazet

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=179020966002.2160803.11537948312109210054@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.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