summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoichiro Den <koichiro.den@canonical.com>2024-12-06 10:10:43 +0900
committerPaolo Abeni <pabeni@redhat.com>2024-12-10 11:22:21 +0100
commit4571dc7272b22cf35c7a5a1b14d3b036a2fefdc5 (patch)
treee84eaa7cf3c3143292a942262ff4310d614b676b
parent3ddccbefebdbe0c4c72a248676e4d39ac66a8e26 (diff)
downloadlwn-4571dc7272b22cf35c7a5a1b14d3b036a2fefdc5.tar.gz
lwn-4571dc7272b22cf35c7a5a1b14d3b036a2fefdc5.zip
virtio_net: replace vq2rxq with vq2txq where appropriate
While not harmful, using vq2rxq where it's always sq appears odd. Replace it with the more appropriate vq2txq for clarity and correctness. Fixes: 89f86675cb03 ("virtio_net: xsk: tx: support xmit xsk buffer") Signed-off-by: Koichiro Den <koichiro.den@canonical.com> Acked-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r--drivers/net/virtio_net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 6e0925f7f182..fc89c5e1a207 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -6213,7 +6213,7 @@ static void virtnet_sq_free_unused_buf(struct virtqueue *vq, void *buf)
{
struct virtnet_info *vi = vq->vdev->priv;
struct send_queue *sq;
- int i = vq2rxq(vq);
+ int i = vq2txq(vq);
sq = &vi->sq[i];