Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1935761ybg; Sun, 27 Oct 2019 07:45:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1huNcKa/M1d6kOpsfYvhMIpWPV/5kuRhypSWXnH0aX0tOuoHLlNpE2DoQ0zHdziV2VPj7 X-Received: by 2002:a17:906:1f09:: with SMTP id w9mr3269231ejj.35.1572187509982; Sun, 27 Oct 2019 07:45:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572187509; cv=none; d=google.com; s=arc-20160816; b=KAT20p69xOrCczrnOkuCFGZg0ocRYib8fef2M6MdDlA+jQQDtCalnEnWYVAoO1aVuz 9psVhB/td9kGvmEwvLBAsumcPqcSmWO7zfcl4cUSAT/MZJGX+BywIgoC6wvCCZuPCts7 kQl2oqQg5+IgZH2ADX9pyYOFxmKu1FkKUFcCILRJv2FYRpIEElAS3CoJvDjMFKSURzwZ +/LDo1JEmc2XH+NdRoosiYPL0yc0CnFvPGHsl+sd8pCAkkXmdepB05Uz3ArNwu6kwjwK umZnv+8Xdsm7RYSwh22FglXLkbek5mpm7rGo9ClZrjPny/5ekxPwSlSYGgSLWNoLt8uO V4zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=K1drSj56NAMifp0a52nujMXEWxvKYc9KCSSsaeobpyU=; b=TZYAgTlNrVGqA1CpcokP26q3BWtE46hUnN6A/We+wDvaUGlRuc4Z2f6ZYzUOlnqD/2 I3Gzx/rLlf+DoS/6YvJYh9FEr2CZwK7LrnZlgm63Ujqj4mb5uffC2seaM3Gbr7lOQWgt 8oW4Nhc1jaxZR4VDSIQBbx4XjgdxnksciI9j1u95SS/fEWdl41b3A7sztKhaIEEqRWTI SjMxrySVlW7mvMLrhd+Ckf0lWn64AXdW3qHQiMDRBWPpT7byMTRa4PMUPrwljqWJrtIh jgcpNoEr3nr6W8ryqVlyu6mkm9hrZmiTr4sjJ03CC1xY3sX1eGUqirTKQP8zLNm7GlGT I3kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TyzHBKD+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oq14si4735928ejb.76.2019.10.27.07.44.46; Sun, 27 Oct 2019 07:45:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TyzHBKD+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727124AbfJ0Onh (ORCPT + 99 others); Sun, 27 Oct 2019 10:43:37 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55447 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727069AbfJ0One (ORCPT ); Sun, 27 Oct 2019 10:43:34 -0400 Received: by mail-wm1-f68.google.com with SMTP id g24so6812078wmh.5; Sun, 27 Oct 2019 07:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=K1drSj56NAMifp0a52nujMXEWxvKYc9KCSSsaeobpyU=; b=TyzHBKD+Hyl4HO0A4bnaZYaumW+Bj/xP+SRf/Gyzp9LM2IPa0nApKEzMny34zY2nni /jZhVQQMkOA6w1fkLsXyCvZ4wSYOTFxaO3AjVsJGJvJkcsO/lzGVgGeQngK/RNc7Egri vcK+0EhYd7ZlM1z6inTn6NOxMFHs+Pb3pOBZ6vhw7YSe4PqKmG/frwtLNLcEq6k2+aE9 jxtFwZ4mg+SL5Ee4EKdIpMQC0OuOLgcrxmGnPBP4d4E92oNWKVi+Puh4M0wCaNJr6lHn 0Rh0AMSpRQsCmYGBDT4pEtOzApgtfEeCQGkf3x3kQqyZwQ73BtMFIzymjJc/+v70cVZO NIcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=K1drSj56NAMifp0a52nujMXEWxvKYc9KCSSsaeobpyU=; b=Y0q8T62VnWU6VKDda6nMPZIIMZZprfgE2JdbFTKovIWUZtEigA7EpJqBesrcS7I3rW hUF+rFzdWlRV4RGfHio5XjKyRnNIRNK5HlXqGqq6LmnrHqMj+BSvYaLgsSPhAwSsWxS6 LT9B0A7lNg2yzrMnkaz8MRnNw8KnMuu3oC/9USg+85pa5nZrYpXFzl82vGYPPvAhiKuq mfW3Ou/hb2vphMxV9txqVUgs0F4UbgpBWundDrzRUELXL0p/Tz21MNFOlFt1RiVZoxQk eHO0XqjygBOV80lGveY05afKC7XCZ4P8Ejdf6DNVJ5e4BESiJ+cpZY+hOzBd3EcnVdWU r8kA== X-Gm-Message-State: APjAAAXwp4YhG/9Ax3NTvDFWbXVyLZ0fPIwhToU5rINVblJ0Y/Okap2M qn25m32MRTQTqIjND8vs73E= X-Received: by 2002:a1c:5f82:: with SMTP id t124mr12409011wmb.114.1572187411930; Sun, 27 Oct 2019 07:43:31 -0700 (PDT) Received: from localhost (94.222.26.109.rev.sfr.net. [109.26.222.94]) by smtp.gmail.com with ESMTPSA id h124sm1133697wmf.30.2019.10.27.07.43.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2019 07:43:31 -0700 (PDT) Date: Sun, 27 Oct 2019 09:08:23 +0100 From: Stefan Hajnoczi To: Stefano Garzarella Cc: netdev@vger.kernel.org, Sasha Levin , linux-hyperv@vger.kernel.org, Stephen Hemminger , Arnd Bergmann , kvm@vger.kernel.org, "Michael S. Tsirkin" , Greg Kroah-Hartman , Dexuan Cui , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Haiyang Zhang , Stefan Hajnoczi , "David S. Miller" , Jorgen Hansen Subject: Re: [PATCH net-next 07/14] vsock: handle buffer_size sockopts in the core Message-ID: <20191027080823.GB4472@stefanha-x1.localdomain> References: <20191023095554.11340-1-sgarzare@redhat.com> <20191023095554.11340-8-sgarzare@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rS8CxjVDS/+yyDmU" Content-Disposition: inline In-Reply-To: <20191023095554.11340-8-sgarzare@redhat.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --rS8CxjVDS/+yyDmU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 23, 2019 at 11:55:47AM +0200, Stefano Garzarella wrote: > virtio_transport and vmci_transport handle the buffer_size > sockopts in a very similar way. >=20 > In order to support multiple transports, this patch moves this > handling in the core to allow the user to change the options > also if the socket is not yet assigned to any transport. >=20 > This patch also adds the '.notify_buffer_size' callback in the > 'struct virtio_transport' in order to inform the transport, > when the buffer_size is changed by the user. It is also useful > to limit the 'buffer_size' requested (e.g. virtio transports). >=20 > Acked-by: Dexuan Cui > Signed-off-by: Stefano Garzarella > --- > RFC -> v1: > - changed .notify_buffer_size return to void (Stefan) > - documented that .notify_buffer_size is called with sk_lock held (Stefan) > --- > drivers/vhost/vsock.c | 7 +- > include/linux/virtio_vsock.h | 15 +---- > include/net/af_vsock.h | 15 ++--- > net/vmw_vsock/af_vsock.c | 43 ++++++++++--- > net/vmw_vsock/hyperv_transport.c | 36 ----------- > net/vmw_vsock/virtio_transport.c | 8 +-- > net/vmw_vsock/virtio_transport_common.c | 79 ++++------------------- > net/vmw_vsock/vmci_transport.c | 86 +++---------------------- > net/vmw_vsock/vmci_transport.h | 3 - > 9 files changed, 65 insertions(+), 227 deletions(-) Reviewed-by: Stefan Hajnoczi --rS8CxjVDS/+yyDmU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAl21UHcACgkQnKSrs4Gr c8jf5wf6ArMyUiMMsXentQxUSlbUpCtIRf1HllqzAAYdsb4/GngX/TcZHaVU4JYg vnMxPnYs9IatdJgEmJ2oV7Xemt2KdT67eqeqpeUuvOXzwCFTqx7gmCq0GYXPobTW 5Km+oVwrDxfzrUNVK5ZmeFhOSQuB09zbY1JhuwXTiX+nXOVOBP91Mt3i5wijc6a1 M6W2KtgysSkW1K4tf+8/c12QdNlB5bwL6HX2Tgop6bE+yTFpxmykopRkXonrLSQ7 2Ba02wkFAOakw0f9AlF0xBCJfY8OvHUNPYRvnh5g9OJc9DjvZPl2p2PLTpMv7DLm XF8KeD/VWkSjA8RIYlUYmzUdVvshGA== =oEzi -----END PGP SIGNATURE----- --rS8CxjVDS/+yyDmU--