All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arseny Krasnov <arseny.krasnov@kaspersky.com>
To: Stefan Hajnoczi <stefanha@redhat.com>,
	Stefano Garzarella <sgarzare@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Arseny Krasnov <arseny.krasnov@kaspersky.com>,
	Jorgen Hansen <jhansen@vmware.com>,
	Colin Ian King <colin.king@canonical.com>,
	Norbert Slusarek <nslusarek@gmx.net>,
	Andra Paraschiv <andraprs@amazon.com>
Cc: <kvm@vger.kernel.org>,
	<virtualization@lists.linux-foundation.org>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<oxffffaa@gmail.com>
Subject: [RFC PATCH v2 5/6] virtio/vsock: remove record size limit for SEQPACKET
Date: Sun, 4 Jul 2021 11:10:52 +0300	[thread overview]
Message-ID: <20210704081055.89685-1-arseny.krasnov@kaspersky.com> (raw)
In-Reply-To: <20210704080820.88746-1-arseny.krasnov@kaspersky.com>

Remove record size limit which was 'peer_buf_alloc' value.
New approach doesn't need this, because data is copied to
user's buffer in stream manner(we don't wait until whole
record is received).

Signed-off-by: Arseny Krasnov <arseny.krasnov@kaspersky.com>
---
 net/vmw_vsock/virtio_transport_common.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
index 52765754edcd..5cfdf701a8af 100644
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -507,17 +507,6 @@ virtio_transport_seqpacket_enqueue(struct vsock_sock *vsk,
 				   struct msghdr *msg,
 				   size_t len)
 {
-	struct virtio_vsock_sock *vvs = vsk->trans;
-
-	spin_lock_bh(&vvs->tx_lock);
-
-	if (len > vvs->peer_buf_alloc) {
-		spin_unlock_bh(&vvs->tx_lock);
-		return -EMSGSIZE;
-	}
-
-	spin_unlock_bh(&vvs->tx_lock);
-
 	return virtio_transport_stream_enqueue(vsk, msg, len);
 }
 EXPORT_SYMBOL_GPL(virtio_transport_seqpacket_enqueue);
-- 
2.25.1


  parent reply	other threads:[~2021-07-04  8:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04  8:08 [RFC PATCH v2 0/6] Improve SOCK_SEQPACKET receive logic Arseny Krasnov
2021-07-04  8:09 ` [RFC PATCH v2 1/6] af_vsock/virtio/vsock: change seqpacket " Arseny Krasnov
2021-07-04  8:10 ` [RFC PATCH v2 2/6] af_vsock/virtio/vsock: remove 'seqpacket_has_data' callback Arseny Krasnov
2021-07-04  8:10 ` [RFC PATCH v2 3/6] virtio/vsock: remove 'msg_count' based logic Arseny Krasnov
2021-07-04  8:10 ` [RFC PATCH v2 4/6] af_vsock/virtio/vsock: add 'seqpacket_drop()' callback Arseny Krasnov
2021-07-04  8:10 ` Arseny Krasnov [this message]
2021-07-04  8:11 ` [RFC PATCH v2 6/6] vsock_test: SEQPACKET read to broken buffer Arseny Krasnov
2021-07-04  8:13 ` [RFC PATCH v2 0/6] Improve SOCK_SEQPACKET receive logic Arseny Krasnov
2021-07-04  8:30 ` Michael S. Tsirkin
2021-07-04  8:30   ` Michael S. Tsirkin
2021-07-04  9:23   ` Arseny Krasnov
2021-07-04  9:54     ` Michael S. Tsirkin
2021-07-04  9:54       ` Michael S. Tsirkin
2021-07-05 10:48       ` [MASSMAIL KLMS]Re: " Arseny Krasnov
2021-07-05 15:23         ` Stefano Garzarella
2021-07-05 15:23           ` Stefano Garzarella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210704081055.89685-1-arseny.krasnov@kaspersky.com \
    --to=arseny.krasnov@kaspersky.com \
    --cc=andraprs@amazon.com \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=jasowang@redhat.com \
    --cc=jhansen@vmware.com \
    --cc=kuba@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nslusarek@gmx.net \
    --cc=oxffffaa@gmail.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.