From: sashiko-bot@kernel.org
To: "Congjie Zhou" <zcjie0802@qq.com>
Cc: virtualization@lists.linux.dev,
"Michael S. Tsirkin" <mst@redhat.com>,
"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH net v2 2/2] virtio_net: mask callbacks before releasing NAPI ownership
Date: Sun, 15 Nov 2026 07:21:18 +0000 [thread overview]
Message-ID: <sashiko-outbox-215254@kernel.org> (raw)
In-Reply-To: <tencent_E27D0F1CA04EE58A5873E5A4EBBDCDF8C80A@qq.com>
> virtqueue_napi_complete() prepares callbacks before calling
> napi_complete_done(), then disables them if completion returns false.
> On the hard IRQ deferral path, completion can release NAPI ownership
> and arm the watchdog before returning false.
>
> A successor poll can rearm callbacks and complete before the old caller
> executes virtqueue_disable_cb(). The stale mask then disables
> notifications again. If the one-shot watchdog has already run, no NAPI
> owner or timer remains to consume later used entries, causing a
> persistent RX stall.
>
> Use napi_complete_done_with_irq_mask() to disable callbacks before
> completion can hand NAPI to a successor, and remove the stale mask after
> a false return. Keep virtqueue_enable_cb_prepare() before completion:
> moving it after ownership release would reintroduce the RX virtqueue
> race fixed by commit cbdadbbf0c79 ("virtio_net: fix race in RX VQ
> processing").
>
> Fixes: 6f8b12d661d0 ("net: napi: add hard irqs deferral feature")
> Signed-off-by: Congjie Zhou <zcjie0802@qq.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_2A5F8EBA9EC78CA99CD080386A68EE90B506@qq.com?part=2
prev parent reply other threads:[~2026-11-15 7:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 13:36 [BUG] virtio_net: RX stall caused by masking callbacks after NAPI ownership release Congjie Zhou
2026-11-11 13:50 ` [PATCH net 1/2] net: napi: add completion with an ordered IRQ mask callback Congjie Zhou
2026-11-11 13:56 ` netdev-bot+sinfo
2026-11-11 15:08 ` zcj
2026-11-12 13:52 ` sashiko-bot
2026-11-11 13:50 ` [PATCH net 2/2] virtio_net: mask callbacks before releasing NAPI ownership Congjie Zhou
2026-11-12 13:52 ` sashiko-bot
2026-11-13 10:38 ` zcj
2026-11-15 7:12 ` [PATCH net v2 1/2] net: napi: add completion with an ordered IRQ mask callback Congjie Zhou
2026-11-15 7:21 ` sashiko-bot
2026-11-15 7:12 ` [PATCH net v2 2/2] virtio_net: mask callbacks before releasing NAPI ownership Congjie Zhou
2026-11-15 7:21 ` sashiko-bot [this message]
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=sashiko-outbox-215254@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=mst@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
--cc=zcjie0802@qq.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