Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1081316yba; Thu, 4 Apr 2019 04:00:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqybL4Rmb95QvSwKIdEzPkFJazu6xO3weDOONpbqNlzLreah+8yrE74jvk5HMXRak41mD+Xs X-Received: by 2002:a17:902:a512:: with SMTP id s18mr5594525plq.185.1554375610695; Thu, 04 Apr 2019 04:00:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554375610; cv=none; d=google.com; s=arc-20160816; b=sl7YX7KbBSwzMbd9uukElWWaynSCsonhHP8RYm4RKjObjd7JpX2dwksfHE1W96eQkY YXZnXkxeK4BbZZCeA+yGT6kn7R9KvZlhWTafDXOYX7MfB4fiRlTWqsPqXX5JhiPAZTVh AFdWEsw4kVgEJXFeEz3r9KfymKdyDGTZyyoD0LZG2ebY3oEfcu2prKl2dMJbOspaoAw0 6VDyNJPwLYof3qQBH1ZdhT6BiBsLUbtS1b45qQb0eliPOryO7UXv5/nXRYuUqphLypsC wMfQScB0ivoj2FWe9sn+7UmTZPrpmW0D7s0NNujZrTJx+8QCeswaLAyYsa4Rox2nvoxu +zgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=fmHvubQw5Jq7XHKC3J9sWxMAP4WbEgsCE3ykgTu7W/o=; b=BIQX4PrDDTiad3GBlgMDo5mLkMhutx5h1JsdLTIO0McfWjmPyTbdLw1lDhmZvM183e ObqhEuhUbv6W8SPwHhrFzrF6D+kGN3B52DvgSk/4Ggu4qx8G4rIXgUVMaf7QFenByKSc qAmYR+PCz7xhu3XnIyCfgWAoNlzkkwrS5kXIbXOKQnlObwsnJ9i0s2EM94KXo8HtpXBX OFzefr7vu6oBMvPIFLcjGeUnuE473uMNZWB3WhcdxyD9bBGs+/5KySGcHbUI1CXsQkCW DS9oX2+7fMnAhZ+EWJPy7gfw+Y8GmAAVsUozTU0jia0pHMS2EKhXY2KG7C1WYGinieN3 S1jA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si16489431pgk.326.2019.04.04.03.59.55; Thu, 04 Apr 2019 04:00:10 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729816AbfDDK66 (ORCPT + 99 others); Thu, 4 Apr 2019 06:58:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56924 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729585AbfDDK6y (ORCPT ); Thu, 4 Apr 2019 06:58:54 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A752FC06586D; Thu, 4 Apr 2019 10:58:54 +0000 (UTC) Received: from steredhat.redhat.com (ovpn-117-25.ams2.redhat.com [10.36.117.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5AF601001DC9; Thu, 4 Apr 2019 10:58:52 +0000 (UTC) From: Stefano Garzarella To: netdev@vger.kernel.org Cc: Jason Wang , "Michael S. Tsirkin" , Stefan Hajnoczi , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, "David S. Miller" Subject: [PATCH RFC 3/4] vsock/virtio: change the maximum packet size allowed Date: Thu, 4 Apr 2019 12:58:37 +0200 Message-Id: <20190404105838.101559-4-sgarzare@redhat.com> In-Reply-To: <20190404105838.101559-1-sgarzare@redhat.com> References: <20190404105838.101559-1-sgarzare@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 04 Apr 2019 10:58:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since now we are able to split packets, we can avoid limiting their sizes to VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE. Instead, we can use VIRTIO_VSOCK_MAX_PKT_BUF_SIZE as the max packet size. Signed-off-by: Stefano Garzarella --- net/vmw_vsock/virtio_transport_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index f32301d823f5..822e5d07a4ec 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -167,8 +167,8 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk, vvs = vsk->trans; /* we can send less than pkt_len bytes */ - if (pkt_len > VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE) - pkt_len = VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE; + if (pkt_len > VIRTIO_VSOCK_MAX_PKT_BUF_SIZE) + pkt_len = VIRTIO_VSOCK_MAX_PKT_BUF_SIZE; /* virtio_transport_get_credit might return less than pkt_len credit */ pkt_len = virtio_transport_get_credit(vvs, pkt_len); -- 2.20.1