From: "Emil Tsalapatis" <emil@etsalapatis.com>
To: <sashiko-reviews@lists.linux.dev>,
"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 12:17:13 -0400 [thread overview]
Message-ID: <DJTBPJU8BMID.2CWWRIAJM58OY@etsalapatis.com> (raw)
In-Reply-To: <20260708135629.9F84F1F000E9@smtp.kernel.org>
On Wed Jul 8, 2026 at 9:56 AM EDT, sashiko-bot wrote:
> 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?
This is a nice suggestion, if we can remove the function let's do so.
>
>> + psock = sk_psock_get(sk);
>> + if (unlikely(!psock)) {
> [ ... ]
next prev parent reply other threads:[~2026-07-08 16:17 UTC|newest]
Thread overview: 6+ 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 via B4 Relay
2026-07-08 13:40 ` [PATCH bpf v2 1/2] bpf, sockmap: Account for receive queue in FIONREAD " Mattia Meleleo via B4 Relay
2026-07-08 13:56 ` sashiko-bot
2026-07-08 16:17 ` Emil Tsalapatis [this message]
2026-07-08 13:40 ` [PATCH bpf v2 2/2] selftests/bpf: Test FIONREAD on a sockmap socket " 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=DJTBPJU8BMID.2CWWRIAJM58OY@etsalapatis.com \
--to=emil@etsalapatis.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox