[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191011085158.wiiv4av5fgipm4k7@steredhat>
Date: Fri, 11 Oct 2019 10:51:58 +0200
From: Stefano Garzarella <sgarzare@...hat.com>
To: Stefan Hajnoczi <stefanha@...hat.com>
Cc: Stefan Hajnoczi <stefanha@...il.com>, netdev@...r.kernel.org,
Sasha Levin <sashal@...nel.org>, linux-hyperv@...r.kernel.org,
Stephen Hemminger <sthemmin@...rosoft.com>,
kvm@...r.kernel.org, "Michael S. Tsirkin" <mst@...hat.com>,
Dexuan Cui <decui@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
linux-kernel@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
"David S. Miller" <davem@...emloft.net>,
Jorgen Hansen <jhansen@...are.com>
Subject: Re: [RFC PATCH 07/13] vsock: handle buffer_size sockopts in the core
On Fri, Oct 11, 2019 at 09:27:14AM +0100, Stefan Hajnoczi wrote:
> On Thu, Oct 10, 2019 at 11:32:54AM +0200, Stefano Garzarella wrote:
> > On Wed, Oct 09, 2019 at 01:30:26PM +0100, Stefan Hajnoczi wrote:
> > > On Fri, Sep 27, 2019 at 01:26:57PM +0200, Stefano Garzarella wrote:
> > > Another issue is that this patch drops the VIRTIO_VSOCK_MAX_BUF_SIZE
> > > limit that used to be enforced by virtio_transport_set_buffer_size().
> > > Now the limit is only applied at socket init time. If the buffer size
> > > is changed later then VIRTIO_VSOCK_MAX_BUF_SIZE can be exceeded. If
> > > that doesn't matter, why even bother with VIRTIO_VSOCK_MAX_BUF_SIZE
> > > here?
> > >
> >
> > The .notify_buffer_size() should avoid this issue, since it allows the
> > transport to limit the buffer size requested after the initialization.
> >
> > But again the min set by the user can not be respected and in the
> > previous implementation we forced it to VIRTIO_VSOCK_MAX_BUF_SIZE.
> >
> > Now we don't limit the min, but we guarantee only that vsk->buffer_size
> > is lower than VIRTIO_VSOCK_MAX_BUF_SIZE.
> >
> > Can that be an acceptable compromise?
>
> I think so.
>
> Setting buffer sizes was never tested or used much by userspace
> applications that I'm aware of. We should probably include tests for
> changing buffer sizes in the test suite.
Good idea! We should add a test to check if min/max are respected,
playing a bit with these sockopt.
I'll do it in the test series!
Thanks,
Stefano
Powered by blists - more mailing lists