Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

virtio_ring: use vring_virtqueue for enable_cb_delayed variants

Those variants are used internally so let's switch to use
vring_virtqueue as parameter to be consistent with other internal
virtqueue helpers.

Acked-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251230064649.55597-10-jasowang@redhat.com>

authored by

Jason Wang and committed by
Michael S. Tsirkin
62fa22cd 74847cb5

+7 -9
+7 -9
drivers/virtio/virtio_ring.c
··· 921 921 return last_used_idx; 922 922 } 923 923 924 - static bool virtqueue_enable_cb_delayed_split(struct virtqueue *_vq) 924 + static bool virtqueue_enable_cb_delayed_split(struct vring_virtqueue *vq) 925 925 { 926 - struct vring_virtqueue *vq = to_vvq(_vq); 927 926 u16 bufs; 928 927 929 928 START_USE(vq); ··· 936 937 vq->split.avail_flags_shadow &= ~VRING_AVAIL_F_NO_INTERRUPT; 937 938 if (!vq->event) 938 939 vq->split.vring.avail->flags = 939 - cpu_to_virtio16(_vq->vdev, 940 + cpu_to_virtio16(vq->vq.vdev, 940 941 vq->split.avail_flags_shadow); 941 942 } 942 943 /* TODO: tune this threshold */ ··· 944 945 945 946 virtio_store_mb(vq->weak_barriers, 946 947 &vring_used_event(&vq->split.vring), 947 - cpu_to_virtio16(_vq->vdev, vq->last_used_idx + bufs)); 948 + cpu_to_virtio16(vq->vq.vdev, vq->last_used_idx + bufs)); 948 949 949 - if (unlikely((u16)(virtio16_to_cpu(_vq->vdev, vq->split.vring.used->idx) 950 + if (unlikely((u16)(virtio16_to_cpu(vq->vq.vdev, vq->split.vring.used->idx) 950 951 - vq->last_used_idx) > bufs)) { 951 952 END_USE(vq); 952 953 return false; ··· 1835 1836 return vq->last_used_idx; 1836 1837 } 1837 1838 1838 - static bool virtqueue_enable_cb_delayed_packed(struct virtqueue *_vq) 1839 + static bool virtqueue_enable_cb_delayed_packed(struct vring_virtqueue *vq) 1839 1840 { 1840 - struct vring_virtqueue *vq = to_vvq(_vq); 1841 1841 u16 used_idx, wrap_counter, last_used_idx; 1842 1842 u16 bufs; 1843 1843 ··· 2632 2634 if (vq->event_triggered) 2633 2635 data_race(vq->event_triggered = false); 2634 2636 2635 - return vq->packed_ring ? virtqueue_enable_cb_delayed_packed(_vq) : 2636 - virtqueue_enable_cb_delayed_split(_vq); 2637 + return vq->packed_ring ? virtqueue_enable_cb_delayed_packed(vq) : 2638 + virtqueue_enable_cb_delayed_split(vq); 2637 2639 } 2638 2640 EXPORT_SYMBOL_GPL(virtqueue_enable_cb_delayed); 2639 2641