All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mattia Meleleo" <mattia.meleleo@coralogix.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf v2 1/2] bpf, sockmap: Account for receive queue in FIONREAD without a verdict program
Date: Wed, 08 Jul 2026 13:56:29 +0000	[thread overview]
Message-ID: <20260708135629.9F84F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260708-fionread-no-verdict-v2-1-29dd293621c7@coralogix.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The function sk_psock_msg_inq() is now dead code and should be removed.
--

--- Patch [1]: [PATCH bpf v2 1/2] bpf, sockmap: Account for receive queue in FIONREAD without a verdict program ---
commit c5a219566b06af42fd341fd941447a9a448fa4f0
Author: Mattia Meleleo <mattia.meleleo@coralogix.com>

bpf, sockmap: Account for receive queue in FIONREAD without a verdict program

This commit fixes SIOCINQ reporting for tcp_bpf_ioctl() when no verdict
program is attached. It accounts for bytes remaining in the sk_receive_queue
by adding tcp_inq() to the reported value.

> diff --git a/net/ipv4/tcp_bpf.c b/net/ipv4/tcp_bpf.c
> index cc0bd73f36b6d..8e905b50deadb 100644
> --- a/net/ipv4/tcp_bpf.c
> +++ b/net/ipv4/tcp_bpf.c
> @@ -344,7 +345,21 @@ static int tcp_bpf_ioctl(struct sock *sk, int cmd, int *karg)
>  		return -EINVAL;
>  
>  	slow = lock_sock_fast(sk);
> -	*karg = sk_psock_msg_inq(sk);

[Severity: Low]
Does replacing this call to sk_psock_msg_inq() leave the function as
dead code?

Looking at include/linux/skmsg.h, it appears this patch removes the only
caller of sk_psock_msg_inq() in the tree. Should the function definition 
be removed alongside this change to clean up the unused code?

> +	psock = sk_psock_get(sk);
> +	if (unlikely(!psock)) {
[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260708-fionread-no-verdict-v2-0-29dd293621c7@coralogix.com?part=1

  reply	other threads:[~2026-07-08 13:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 13:40 [PATCH bpf v2 0/2] bpf, sockmap: Fix FIONREAD for sockets without a verdict program Mattia Meleleo
2026-07-08 13:40 ` Mattia Meleleo via B4 Relay
2026-07-08 13:40 ` [PATCH bpf v2 1/2] bpf, sockmap: Account for receive queue in FIONREAD " Mattia Meleleo
2026-07-08 13:40   ` Mattia Meleleo via B4 Relay
2026-07-08 13:56   ` sashiko-bot [this message]
2026-07-08 16:17     ` Emil Tsalapatis
2026-07-08 13:40 ` [PATCH bpf v2 2/2] selftests/bpf: Test FIONREAD on a sockmap socket " Mattia Meleleo
2026-07-08 13:40   ` Mattia Meleleo via B4 Relay
2026-07-08 13:51   ` sashiko-bot

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=20260708135629.9F84F1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=mattia.meleleo@coralogix.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.