From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: <chenyuan_fl@163.com>, <netdev@vger.kernel.org>, <bpf@vger.kernel.org>
Cc: <john.fastabend@gmail.com>, <jakub@cloudflare.com>,
<jiayuan.chen@linux.dev>, <daniel@iogearbox.net>,
<cong.wang@bytedance.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH bpf-next 1/2] bpf, sockmap: Fix udp_bpf_recvmsg() spinning on backlog-only ingress
Date: Wed, 30 Sep 2026 09:01:59 +0000 [thread overview]
Message-ID: <DLSJ22P7T6BZ.FCF3J1JWCOET@gmail.com> (raw)
In-Reply-To: <20260929083447.558818-2-chenyuan_fl@163.com>
On Tue, Sep 29, 2026 at 04:34 PM chenyuan_fl@163.com <chenyuan_fl@163.com> wrote:
> @@ -91,7 +91,7 @@ static int udp_bpf_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
> timeo = sock_rcvtimeo(sk, flags & MSG_DONTWAIT);
> data = udp_msg_wait_data(sk, psock, timeo);
> if (data) {
> - if (psock_has_data(psock))
> + if (!sk_psock_queue_empty(psock))
> goto msg_bytes_ready;
>
> release_sock(sk);
sashiko is right. This replaces a spin with a hang.
pw-bot: cr
next prev parent reply other threads:[~2026-09-30 9:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 8:34 [PATCH bpf-next 0/2] bpf, sockmap: Fix udp_bpf_recvmsg() spinning on backlog-only ingress chenyuan_fl
2026-09-29 8:34 ` [PATCH bpf-next 1/2] " chenyuan_fl
2026-09-29 8:49 ` sashiko-bot
2026-09-30 9:01 ` Alexei Starovoitov [this message]
2026-09-29 8:34 ` [PATCH bpf-next 2/2] selftests/bpf: Add a test for udp_bpf_recvmsg() with a stuck backlog chenyuan_fl
2026-09-29 8:43 ` sashiko-bot
2026-09-29 9:26 ` bot+bpf-ci
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=DLSJ22P7T6BZ.FCF3J1JWCOET@gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=chenyuan_fl@163.com \
--cc=cong.wang@bytedance.com \
--cc=daniel@iogearbox.net \
--cc=jakub@cloudflare.com \
--cc=jiayuan.chen@linux.dev \
--cc=john.fastabend@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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.