]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vhost-net: flush batched before enabling notifications
authorJason Wang <jasowang@redhat.com>
Wed, 17 Sep 2025 06:30:45 +0000 (14:30 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 19 Sep 2025 08:15:26 +0000 (04:15 -0400)
commite430451613c7a27beeadd00d707bcf7ceec6328e
treecab83dc6f972207ae909a4ad714709d1eb9d966c
parent4174152771bf0d014d58f7d7e148bb0c8830fe53
vhost-net: flush batched before enabling notifications

Commit 8c2e6b26ffe2 ("vhost/net: Defer TX queue re-enable until after
sendmsg") tries to defer the notification enabling by moving the logic
out of the loop after the vhost_tx_batch() when nothing new is spotted.
This caused unexpected side effects as the new logic is reused for
several other error conditions.

A previous patch reverted 8c2e6b26ffe2. Now, bring the performance
back up by flushing batched buffers before enabling notifications.

Reported-by: Jon Kohler <jon@nutanix.com>
Cc: stable@vger.kernel.org
Fixes: 8c2e6b26ffe2 ("vhost/net: Defer TX queue re-enable until after sendmsg")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20250917063045.2042-3-jasowang@redhat.com>
drivers/vhost/net.c