[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210704081021.89441-1-arseny.krasnov@kaspersky.com>
Date: Sun, 4 Jul 2021 11:10:18 +0300
From: Arseny Krasnov <arseny.krasnov@...persky.com>
To: Stefan Hajnoczi <stefanha@...hat.com>,
Stefano Garzarella <sgarzare@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Arseny Krasnov <arseny.krasnov@...persky.com>,
Jorgen Hansen <jhansen@...are.com>,
Andra Paraschiv <andraprs@...zon.com>,
Norbert Slusarek <nslusarek@....net>,
Colin Ian King <colin.king@...onical.com>
CC: <kvm@...r.kernel.org>, <virtualization@...ts.linux-foundation.org>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<oxffffaa@...il.com>
Subject: [RFC PATCH v2 3/6] virtio/vsock: remove 'msg_count' based logic
'msg_count' is obsolete, because 'rx_bytes' used instead.
Signed-off-by: Arseny Krasnov <arseny.krasnov@...persky.com>
---
include/linux/virtio_vsock.h | 1 -
net/vmw_vsock/virtio_transport_common.c | 4 ----
2 files changed, 5 deletions(-)
diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h
index 8d34f3d73bbb..7360ab7ea0af 100644
--- a/include/linux/virtio_vsock.h
+++ b/include/linux/virtio_vsock.h
@@ -36,7 +36,6 @@ struct virtio_vsock_sock {
u32 rx_bytes;
u32 buf_alloc;
struct list_head rx_queue;
- u32 msg_count;
};
struct virtio_vsock_pkt {
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
index 37d4ed526750..ce67cf449ef8 100644
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -449,7 +449,6 @@ static int virtio_transport_seqpacket_do_dequeue(struct vsock_sock *vsk,
if (le32_to_cpu(pkt->hdr.flags) & VIRTIO_VSOCK_SEQ_EOR) {
*msg_ready = true;
- vvs->msg_count--;
}
virtio_transport_dec_rx_pkt(vvs, pkt);
@@ -1006,9 +1005,6 @@ virtio_transport_recv_enqueue(struct vsock_sock *vsk,
goto out;
}
- if (le32_to_cpu(pkt->hdr.flags) & VIRTIO_VSOCK_SEQ_EOR)
- vvs->msg_count++;
-
/* Try to copy small packets into the buffer of last packet queued,
* to avoid wasting memory queueing the entire buffer with a small
* payload.
--
2.25.1
Powered by blists - more mailing lists