Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp763819ybi; Wed, 17 Jul 2019 04:33:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvor3TBLJ+2Qy7hI+QzaMnJy4AiN7Gk1T+5zBrR+xNhGtEybO3YWbjdK3jS8lLU4oAAhvd X-Received: by 2002:a17:90a:3aed:: with SMTP id b100mr43794904pjc.63.1563363180709; Wed, 17 Jul 2019 04:33:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563363180; cv=none; d=google.com; s=arc-20160816; b=nM4GA5ux8LUnNYIMgOMnipG6LtOsQ/+iPWXDdxKfckXf8NSescoYWP5y0LbZ818vG2 ik2PRTZ4AXF6zWhCXhMG6mOp5UCTUcAaO/fLuwSY+14wTZjprikl133ZV3RWSBTsL5ps trv3PNRsfXC/xYTYeMbPOgCw9lpI3/j/sq7YtCbETNytY6oLW4CxC5Ksh8nJudp9PyKa WSe5ZWk3uZBqYrw9RuheJ/0FoeLswH33dp/50Jkv1LepR4dSPwzyLnQUnkJ+CtAEc91Y //SE9xgwYZ7MI7w3nB3/WapzpWH6mBZGaA7nZZuKXvObHrfE8dTgR0QkLcQTVI4b69mF qlOQ== 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=HvBydHRvrej0SvH4svu64cC1tFs+E25MqpVA5XrHM+s=; b=g4SFKOrIK1IFO9DylSmAU7DmsK2GcIBZnrhNpS+ERjg4+jNXGtO5G4yCtmfpDQN9Z7 vWAogNsPiHA29e5fcBgnVGu1RLmvKJhSl1BxLBjzlSpD21RWMx0LOSpllhULOTzWbm3X LTL/06+skGPnaRZzHi6HWnBevf1t1wNJkL2kfY0VnuaTDtR1RttN3jNbiITwHGX9NN5b x2OUWRynxAw0KUGDyHJpnfh5v4ZUSy2IBMwNwsYWPWWEGgiykKd8me6eK20rjLHUlamK hHQhBntafgAsDTx12zbFaGe39Z23kHg4GPsHx3keN4+KwSkYLgyWL0ZeCpaSBR0Fa+wO w7Rw== 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 f17si22737932pgv.338.2019.07.17.04.32.44; Wed, 17 Jul 2019 04:33:00 -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 S1731982AbfGQLbD (ORCPT + 99 others); Wed, 17 Jul 2019 07:31:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52654 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731609AbfGQLa4 (ORCPT ); Wed, 17 Jul 2019 07:30:56 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B716C3082B3F; Wed, 17 Jul 2019 11:30:56 +0000 (UTC) Received: from steredhat.redhat.com (ovpn-116-100.ams2.redhat.com [10.36.116.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A42EB5C28C; Wed, 17 Jul 2019 11:30:54 +0000 (UTC) From: Stefano Garzarella To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Stefan Hajnoczi , "David S. Miller" , virtualization@lists.linux-foundation.org, Jason Wang , kvm@vger.kernel.org, "Michael S. Tsirkin" Subject: [PATCH v4 5/5] vsock/virtio: change the maximum packet size allowed Date: Wed, 17 Jul 2019 13:30:30 +0200 Message-Id: <20190717113030.163499-6-sgarzare@redhat.com> In-Reply-To: <20190717113030.163499-1-sgarzare@redhat.com> References: <20190717113030.163499-1-sgarzare@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 17 Jul 2019 11:30:56 +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 56fab3f03d0e..94cc0fa3e848 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -181,8 +181,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