lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACGkMEuCL2HEAQaTtuT2i2NHgW9Tbswg1OCA0jHswt_nrw2CdA@mail.gmail.com>
Date: Mon, 28 Jul 2025 11:23:24 +0800
From: Jason Wang <jasowang@...hat.com>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: mst@...hat.com, xuanzhuo@...ux.alibaba.com, eperezma@...hat.com, 
	virtualization@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V4 19/19] virtio_ring: add in order support

On Sat, Jul 26, 2025 at 4:57 AM Thorsten Blum <thorsten.blum@...ux.dev> wrote:
>
> Hi Jason,
>
> On 23. Jul 2025, at 23:40, Jason Wang wrote:
> >
> > This patch implements in order support for both split virtqueue and
> > packed virtqueue. Perfomance could be gained for the device where the
> > memory access could be expensive (e.g vhost-net or a real PCI device):
> >
> > Benchmark with KVM guest:
> >
> > Vhost-net on the host: (pktgen + XDP_DROP):
> >
> >         in_order=off | in_order=on | +%
> >    TX:  5.20Mpps     | 6.20Mpps    | +19%
> >    RX:  3.47Mpps     | 3.61Mpps    | + 4%
> >
> > Vhost-user(testpmd) on the host: (pktgen/XDP_DROP):
> >
> > For split virtqueue:
> >
> >         in_order=off | in_order=on | +%
> >    TX:  5.60Mpps     | 5.60Mpps    | +0.0%
> >    RX:  9.16Mpps     | 9.61Mpps    | +4.9%
> >
> > For packed virtqueue:
> >
> >         in_order=off | in_order=on | +%
> >    TX:  5.60Mpps     | 5.70Mpps    | +1.7%
> >    RX:  10.6Mpps     | 10.8Mpps    | +1.8%
> >
> > Benchmark also shows no performance impact for in_order=off for queue
> > size with 256 and 1024.
> >
> > Signed-off-by: Jason Wang <jasowang@...hat.com>
> > ---
>
> This is in linux-next now, but I get the following compilation error:
>
> drivers/virtio/virtio_ring.c:2113:40: error: variable 'id' is uninitialized when used here [-Werror,-Wuninitialized]
>  2113 |                 BAD_RING(vq, "id %u out of range\n", id);
>       |                                                      ^~
> drivers/virtio/virtio_ring.c:60:32: note: expanded from macro 'BAD_RING'
>    60 |                         "%s:"fmt, (_vq)->vq.name, ##args);      \
>       |                                                     ^~~~
> ./include/linux/dev_printk.h:154:65: note: expanded from macro 'dev_err'
>   154 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
>       |                                                                        ^~~~~~~~~~~
> ./include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
>   110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
>       |                                     ^~~~~~~~~~~
> drivers/virtio/virtio_ring.c:2077:19: note: initialize the variable 'id' to silence this warning
>  2077 |         u16 last_used, id, last_used_idx;
>       |                          ^
>       |                           = 0
> 1 error generated.
>
> Thanks,
> Thorsten

I've posted a fix here:

https://lore.kernel.org/virtualization/20250725091129-mutt-send-email-mst@kernel.org/T/#t

Thanks

>
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ