Michael S. Tsirkin
2022-Mar-14 11:18 UTC
[PATCH v8 01/16] virtio: add helper virtqueue_get_vring_max_size()
On Mon, Mar 14, 2022 at 10:50:08AM +0100, Cornelia Huck wrote:> On Mon, Mar 14 2022, Xuan Zhuo <xuanzhuo at linux.alibaba.com> wrote: > > > Record the maximum queue num supported by the device. > > > > virtio-net can display the maximum (supported by hardware) ring size in > > ethtool -g eth0. > > > > When the subsequent patch implements vring reset, it can judge whether > > the ring size passed by the driver is legal based on this. > > > > Signed-off-by: Xuan Zhuo <xuanzhuo at linux.alibaba.com> > > Acked-by: Jason Wang <jasowang at redhat.com> > > --- > > drivers/virtio/virtio_mmio.c | 2 ++ > > drivers/virtio/virtio_pci_legacy.c | 2 ++ > > drivers/virtio/virtio_pci_modern.c | 2 ++ > > drivers/virtio/virtio_ring.c | 14 ++++++++++++++ > > include/linux/virtio.h | 2 ++ > > 5 files changed, 22 insertions(+) > > Don't you also need to init this for ccw (even though we won't do ring > reset there), just for completeness? (Any other transports?)rpmsg?
Xuan Zhuo
2022-Mar-14 11:21 UTC
[PATCH v8 01/16] virtio: add helper virtqueue_get_vring_max_size()
On Mon, 14 Mar 2022 07:18:27 -0400, "Michael S. Tsirkin" <mst at redhat.com> wrote:> On Mon, Mar 14, 2022 at 10:50:08AM +0100, Cornelia Huck wrote: > > On Mon, Mar 14 2022, Xuan Zhuo <xuanzhuo at linux.alibaba.com> wrote: > > > > > Record the maximum queue num supported by the device. > > > > > > virtio-net can display the maximum (supported by hardware) ring size in > > > ethtool -g eth0. > > > > > > When the subsequent patch implements vring reset, it can judge whether > > > the ring size passed by the driver is legal based on this. > > > > > > Signed-off-by: Xuan Zhuo <xuanzhuo at linux.alibaba.com> > > > Acked-by: Jason Wang <jasowang at redhat.com> > > > --- > > > drivers/virtio/virtio_mmio.c | 2 ++ > > > drivers/virtio/virtio_pci_legacy.c | 2 ++ > > > drivers/virtio/virtio_pci_modern.c | 2 ++ > > > drivers/virtio/virtio_ring.c | 14 ++++++++++++++ > > > include/linux/virtio.h | 2 ++ > > > 5 files changed, 22 insertions(+) > > > > Don't you also need to init this for ccw (even though we won't do ring > > reset there), just for completeness? (Any other transports?) > > rpmsg?There should be these. arch/um/drivers/virtio_uml.c | 1 + drivers/platform/mellanox/mlxbf-tmfifo.c | 2 ++ drivers/remoteproc/remoteproc_virtio.c | 2 ++ drivers/s390/virtio/virtio_ccw.c | 3 +++ drivers/virtio/virtio_mmio.c | 2 ++ drivers/virtio/virtio_pci_legacy.c | 2 ++ drivers/virtio/virtio_pci_modern.c | 2 ++ drivers/virtio/virtio_vdpa.c | 2 ++ It will be included in the next version. Thanks.