[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191011082714.GF12360@stefanha-x1.localdomain>
Date: Fri, 11 Oct 2019 09:27:14 +0100
From: Stefan Hajnoczi <stefanha@...hat.com>
To: Stefano Garzarella <sgarzare@...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 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.
Stefan
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists