From: "Michael S. Tsirkin" <mst@redhat.com>
To: Koichiro Den <koichiro.den@canonical.com>
Cc: virtualization@lists.linux.dev, jasowang@redhat.com,
xuanzhuo@linux.alibaba.com, eperezma@redhat.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, jiri@resnulli.us,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH net-next v3 3/7] virtio_net: introduce virtnet_sq_free_unused_buf_done()
Date: Thu, 5 Dec 2024 05:40:33 -0500 [thread overview]
Message-ID: <20241205054009-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20241204050724.307544-4-koichiro.den@canonical.com>
On Wed, Dec 04, 2024 at 02:07:20PM +0900, Koichiro Den wrote:
> This will be used in the following commits, to ensure DQL reset occurs
> iff. all unused buffers are actually recycled.
>
> Cc: <stable@vger.kernel.org> # v6.11+
> Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
to avoid adding an unused function, squash with a patch that uses it.
> ---
> drivers/net/virtio_net.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 1b7a85e75e14..b3cbbd8052e4 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -503,6 +503,7 @@ struct virtio_net_common_hdr {
> static struct virtio_net_common_hdr xsk_hdr;
>
> static void virtnet_sq_free_unused_buf(struct virtqueue *vq, void *buf);
> +static void virtnet_sq_free_unused_buf_done(struct virtqueue *vq);
> static int virtnet_xdp_handler(struct bpf_prog *xdp_prog, struct xdp_buff *xdp,
> struct net_device *dev,
> unsigned int *xdp_xmit,
> @@ -6233,6 +6234,14 @@ static void virtnet_sq_free_unused_buf(struct virtqueue *vq, void *buf)
> }
> }
>
> +static void virtnet_sq_free_unused_buf_done(struct virtqueue *vq)
> +{
> + struct virtnet_info *vi = vq->vdev->priv;
> + int i = vq2txq(vq);
> +
> + netdev_tx_reset_queue(netdev_get_tx_queue(vi->dev, i));
> +}
> +
> static void free_unused_bufs(struct virtnet_info *vi)
> {
> void *buf;
> --
> 2.43.0
next prev parent reply other threads:[~2024-12-05 10:40 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 5:07 [PATCH net-next v3 0/7] virtio_net: correct netdev_tx_reset_queue() invocation points Koichiro Den
2024-12-04 5:07 ` [PATCH net-next v3 1/7] virtio_net: correct netdev_tx_reset_queue() invocation point Koichiro Den
2024-12-05 7:30 ` Jason Wang
2024-12-05 10:33 ` Michael S. Tsirkin
2024-12-05 12:43 ` Koichiro Den
2024-12-05 13:16 ` Koichiro Den
2024-12-05 15:14 ` Michael S. Tsirkin
2024-12-05 15:17 ` Michael S. Tsirkin
2024-12-06 0:27 ` Koichiro Den
2024-12-04 5:07 ` [PATCH net-next v3 2/7] virtio_net: replace vq2rxq with vq2txq where appropriate Koichiro Den
2024-12-04 5:09 ` kernel test robot
2024-12-05 7:30 ` Jason Wang
2024-12-05 10:34 ` Michael S. Tsirkin
2024-12-04 5:07 ` [PATCH net-next v3 3/7] virtio_net: introduce virtnet_sq_free_unused_buf_done() Koichiro Den
2024-12-05 7:31 ` Jason Wang
2024-12-05 10:40 ` Michael S. Tsirkin [this message]
2024-12-05 12:53 ` Koichiro Den
2024-12-04 5:07 ` [PATCH net-next v3 4/7] virtio_ring: add a func argument 'recycle_done' to virtqueue_resize() Koichiro Den
2024-12-05 7:31 ` Jason Wang
2024-12-04 5:07 ` [PATCH net-next v3 5/7] virtio_net: ensure netdev_tx_reset_queue is called on tx ring resize Koichiro Den
2024-12-05 7:32 ` Jason Wang
2024-12-04 5:07 ` [PATCH net-next v3 6/7] virtio_ring: add a func argument 'recycle_done' to virtqueue_reset() Koichiro Den
2024-12-05 7:32 ` Jason Wang
2024-12-04 5:07 ` [PATCH net-next v3 7/7] virtio_net: ensure netdev_tx_reset_queue is called on bind xsk for tx Koichiro Den
2024-12-05 7:33 ` Jason Wang
2024-12-05 10:41 ` [PATCH net-next v3 0/7] virtio_net: correct netdev_tx_reset_queue() invocation points Michael S. Tsirkin
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=20241205054009-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=jiri@resnulli.us \
--cc=koichiro.den@canonical.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.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 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.