Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 02:46:04PM -0700, Andres Freund wrote: > Hi, > > On 2022-08-15 17:39:08 -0400, Michael S. Tsirkin wrote: > > On Mon, Aug 15, 2022 at 02:28:39PM -0700, Andres Freund wrote: > > > On 2022-08-15 17:04:10 -0400, Michael S. Tsirkin wrote: > > > > So virtio has a queue_size regis

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Andres Freund
Hi, On 2022-08-15 17:39:08 -0400, Michael S. Tsirkin wrote: > On Mon, Aug 15, 2022 at 02:28:39PM -0700, Andres Freund wrote: > > On 2022-08-15 17:04:10 -0400, Michael S. Tsirkin wrote: > > > So virtio has a queue_size register. When read, it will give you > > > originally the maximum queue size. N

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 02:28:39PM -0700, Andres Freund wrote: > Hi, > > On 2022-08-15 17:04:10 -0400, Michael S. Tsirkin wrote: > > So virtio has a queue_size register. When read, it will give you > > originally the maximum queue size. Normally we just read it and > > use it as queue size. > > >

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Andres Freund
Hi, On 2022-08-15 17:04:10 -0400, Michael S. Tsirkin wrote: > So virtio has a queue_size register. When read, it will give you > originally the maximum queue size. Normally we just read it and > use it as queue size. > > However, when queue memory allocation fails, and unconditionally with a > ne

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 01:50:53PM -0700, Guenter Roeck wrote: > On Mon, Aug 15, 2022 at 04:42:51PM -0400, Michael S. Tsirkin wrote: > > On Mon, Aug 15, 2022 at 01:34:26PM -0700, Guenter Roeck wrote: > > > On Mon, Aug 15, 2022 at 05:16:50AM -0400, Michael S. Tsirkin wrote: > > > > This reverts comm

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Guenter Roeck
On Mon, Aug 15, 2022 at 04:42:51PM -0400, Michael S. Tsirkin wrote: > On Mon, Aug 15, 2022 at 01:34:26PM -0700, Guenter Roeck wrote: > > On Mon, Aug 15, 2022 at 05:16:50AM -0400, Michael S. Tsirkin wrote: > > > This reverts commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7. > > > > > > This has been

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 01:34:26PM -0700, Guenter Roeck wrote: > On Mon, Aug 15, 2022 at 05:16:50AM -0400, Michael S. Tsirkin wrote: > > This reverts commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7. > > > > This has been reported to trip up guests on GCP (Google Cloud). Why is > > not yet clear -

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Guenter Roeck
On Mon, Aug 15, 2022 at 05:16:50AM -0400, Michael S. Tsirkin wrote: > This reverts commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7. > > This has been reported to trip up guests on GCP (Google Cloud). Why is > not yet clear - to be debugged, but the patch itself has several other > issues: > > -

[PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7. This has been reported to trip up guests on GCP (Google Cloud). Why is not yet clear - to be debugged, but the patch itself has several other issues: - It treats unknown speed as < 10G - It leaves userspace no way to find out the ring