FAILED: patch "[PATCH] virtio_net: ensure netdev_tx_reset_queue is called on bind" failed to apply to 6.12-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 76a771ec4c9adfd75fe53c8505cf656a075d7101
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025051251-shawl-unmarked-03e8@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 76a771ec4c9adfd75fe53c8505cf656a075d7101 Mon Sep 17 00:00:00 2001
From: Koichiro Den <[email protected]>
Date: Fri, 6 Dec 2024 10:10:47 +0900
Subject: [PATCH] virtio_net: ensure netdev_tx_reset_queue is called on bind
xsk for tx
virtnet_sq_bind_xsk_pool() flushes tx skbs and then resets tx queue, so DQL counters need to be reset when flushing has actually occurred, Add virtnet_sq_free_unused_buf_done() as a callback for virtqueue_resize() to handle this.
drivers/net/virtio_net.c +2 -1
@@ -5740,7 +5740,8 @@ static int virtnet_sq_bind_xsk_pool(struct virtnet_info *vi,virtnet_tx_pause (vi, sq); - err =virtqueue_reset (sq->vq, virtnet_sq_free_unused_buf,NULL ); + err =virtqueue_reset (sq->vq, virtnet_sq_free_unused_buf, + virtnet_sq_free_unused_buf_done);if (err) {netdev_err (vi->dev,"reset tx fail: tx queue index: %d err: %d\n" , qindex, err); pool =NULL ;
Quoted 8 lines · On Mon, May 12, 2025 at 12:51:51PM GMT, [email protected] wrote:
The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.To reproduce the conflict and resubmit, you may use the following commands:
Quoted 9 lines
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkoutFETCH_HEAD
git cherry-pick -x76a771ec4c9adfd75fe53c8505cf656a075d7101
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025051251-shawl-unmarked-03e8@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..Possible dependencies:
We need the following prerequisite commit for this FAILED one:8d2da07c813a ("virtio_ring: add a func argument 'recycle_done' to virtqueue_reset()") Both the prerequisite and the fix can be cleanly applied.
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD
git cherry-pick -x 8d2da07c813ad333c20eb803e15f8c4541f25350
git cherry-pick -x 76a771ec4c9adfd75fe53c8505cf656a075d7101
Just a note, I'm no longer at Canonical, so please reply to this new email address when needed. Apologies for the delayed response.
Thanks,
Koichiro Den
Quoted 40 lines
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
76a771ec4c9adfd75fe53c8505cf656a075d7101Mon Sep 17 00:00:00 2001From: Koichiro Den <[email protected]>
Date: Fri, 6 Dec 2024 10:10:47 +0900
Subject: [PATCH]virtio_net: ensurenetdev_tx_reset_queueis called on bind
xsk for tx
virtnet_sq_bind_xsk_pool()flushes tx skbs and then resets tx queue, so DQL counters need to be reset when flushing has actually occurred, Addvirtnet_sq_free_unused_buf_done()as a callback forvirtqueue_resize()to handle this.Fixes 21a4e3ce6dc7 ("virtio_net: xsk: bind/unbind xsk for tx")Signed-off-by Koichiro Den <[email protected]>Acked-by Jason Wang <[email protected]>Reviewed-by Xuan Zhuo <[email protected]>Signed-off-by Paolo Abeni <[email protected]>drivers/net/virtio_net.c +2
-1@@ -5740,7 +5740,8 @@ static int virtnet_sq_bind_xsk_pool(struct virtnet_info *vi,virtnet_tx_pause (vi, sq); - err =virtqueue_reset (sq->vq, virtnet_sq_free_unused_buf,NULL ); + err =virtqueue_reset (sq->vq, virtnet_sq_free_unused_buf, + virtnet_sq_free_unused_buf_done);if (err) {netdev_err (vi->dev,"reset tx fail: tx queue index: %d err: %d\n" , qindex, err); pool =NULL ;