Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-11-02 Thread Eugenio Perez Martin
On Tue, Nov 2, 2021 at 8:04 AM Jason Wang wrote: > > On Tue, Nov 2, 2021 at 2:59 PM Eugenio Perez Martin > wrote: > > > > On Tue, Nov 2, 2021 at 5:09 AM Jason Wang wrote: > > > > > > On Mon, Nov 1, 2021 at 4:59 PM Eugenio Perez Martin > > > wrote: > > > > > > > > On Mon, Nov 1, 2021 at 4:34 A

Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-11-02 Thread Jason Wang
On Tue, Nov 2, 2021 at 2:59 PM Eugenio Perez Martin wrote: > > On Tue, Nov 2, 2021 at 5:09 AM Jason Wang wrote: > > > > On Mon, Nov 1, 2021 at 4:59 PM Eugenio Perez Martin > > wrote: > > > > > > On Mon, Nov 1, 2021 at 4:34 AM Jason Wang wrote: > > > > > > > > On Fri, Oct 29, 2021 at 10:16 PM E

Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-11-02 Thread Eugenio Perez Martin
On Tue, Nov 2, 2021 at 5:09 AM Jason Wang wrote: > > On Mon, Nov 1, 2021 at 4:59 PM Eugenio Perez Martin > wrote: > > > > On Mon, Nov 1, 2021 at 4:34 AM Jason Wang wrote: > > > > > > On Fri, Oct 29, 2021 at 10:16 PM Eugenio Pérez > > > wrote: > > > > > > > > The -1 assumes that all devices wi

Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-11-01 Thread Eugenio Perez Martin
On Mon, Nov 1, 2021 at 9:48 PM Michael S. Tsirkin wrote: > > On Mon, Nov 01, 2021 at 04:42:01PM +0100, Eugenio Perez Martin wrote: > > On Mon, Nov 1, 2021 at 9:58 AM Eugenio Perez Martin > > wrote: > > > > > > On Mon, Nov 1, 2021 at 4:34 AM Jason Wang wrote: > > > > > > > > On Fri, Oct 29, 2021

Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-11-01 Thread Jason Wang
On Mon, Nov 1, 2021 at 4:59 PM Eugenio Perez Martin wrote: > > On Mon, Nov 1, 2021 at 4:34 AM Jason Wang wrote: > > > > On Fri, Oct 29, 2021 at 10:16 PM Eugenio Pérez wrote: > > > > > > The -1 assumes that all devices with no cvq have an spare vq allocated > > > for them, but with no offer of VI

Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-11-01 Thread Michael S. Tsirkin
On Mon, Nov 01, 2021 at 04:42:01PM +0100, Eugenio Perez Martin wrote: > On Mon, Nov 1, 2021 at 9:58 AM Eugenio Perez Martin > wrote: > > > > On Mon, Nov 1, 2021 at 4:34 AM Jason Wang wrote: > > > > > > On Fri, Oct 29, 2021 at 10:16 PM Eugenio Pérez > > > wrote: > > > > > > > > The -1 assumes t

Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-11-01 Thread Eugenio Perez Martin
On Mon, Nov 1, 2021 at 9:58 AM Eugenio Perez Martin wrote: > > On Mon, Nov 1, 2021 at 4:34 AM Jason Wang wrote: > > > > On Fri, Oct 29, 2021 at 10:16 PM Eugenio Pérez wrote: > > > > > > The -1 assumes that all devices with no cvq have an spare vq allocated > > > for them, but with no offer of VI

Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-11-01 Thread Michael S. Tsirkin
On Mon, Nov 01, 2021 at 10:03:19AM +0100, Eugenio Perez Martin wrote: > On Sun, Oct 31, 2021 at 10:47 PM Michael S. Tsirkin wrote: > > > > On Fri, Oct 29, 2021 at 04:16:08PM +0200, Eugenio Pérez wrote: > > > The -1 assumes that all devices with no cvq have an spare vq allocated > > > for them, but

Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-11-01 Thread Eugenio Perez Martin
On Sun, Oct 31, 2021 at 10:47 PM Michael S. Tsirkin wrote: > > On Fri, Oct 29, 2021 at 04:16:08PM +0200, Eugenio Pérez wrote: > > The -1 assumes that all devices with no cvq have an spare vq allocated > > for them, but with no offer of VIRTIO_NET_F_CTRL_VQ. This may not be the > > case, and the de

Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-11-01 Thread Eugenio Perez Martin
On Mon, Nov 1, 2021 at 4:34 AM Jason Wang wrote: > > On Fri, Oct 29, 2021 at 10:16 PM Eugenio Pérez wrote: > > > > The -1 assumes that all devices with no cvq have an spare vq allocated > > for them, but with no offer of VIRTIO_NET_F_CTRL_VQ. This may not be the > > case, and the device may have

Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-10-31 Thread Jason Wang
On Fri, Oct 29, 2021 at 10:16 PM Eugenio Pérez wrote: > > The -1 assumes that all devices with no cvq have an spare vq allocated > for them, but with no offer of VIRTIO_NET_F_CTRL_VQ. This may not be the > case, and the device may have a pair number of queues. > > To fix this, just resort to the l

Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-10-31 Thread Michael S. Tsirkin
On Fri, Oct 29, 2021 at 04:16:08PM +0200, Eugenio Pérez wrote: > The -1 assumes that all devices with no cvq have an spare vq allocated > for them, but with no offer of VIRTIO_NET_F_CTRL_VQ. This may not be the > case, and the device may have a pair number of queues. > > To fix this, just resort t

[PATCH] vhost: Fix last queue index of devices with no cvq

2021-10-29 Thread Eugenio Pérez
The -1 assumes that all devices with no cvq have an spare vq allocated for them, but with no offer of VIRTIO_NET_F_CTRL_VQ. This may not be the case, and the device may have a pair number of queues. To fix this, just resort to the lower even number of queues. Fixes: 049eb15b5fc9 ("vhost: record t