kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: kvm@vger.kernel.org
Cc: netdev@vger.kernel.org, Asias He <asias@redhat.com>,
	virtualization@lists.linux-foundation.org,
	Stefan Hajnoczi <stefanha@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: [RFC 2/6] Add dgram_skb to vsock_sock
Date: Wed, 27 May 2015 18:05:56 +0100	[thread overview]
Message-ID: <1432746360-14940-3-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1432746360-14940-1-git-send-email-stefanha@redhat.com>

From: Asias He <asias@redhat.com>

This list will be used to match received packets when multiple packets
are used because datagram size is larger than the receive buffer size.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 include/net/af_vsock.h   | 1 +
 net/vmw_vsock/af_vsock.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h
index d52b984..bc9055c 100644
--- a/include/net/af_vsock.h
+++ b/include/net/af_vsock.h
@@ -58,6 +58,7 @@ struct vsock_sock {
 	 */
 	struct list_head pending_links;
 	struct list_head accept_queue;
+	struct list_head dgram_skb;
 	bool rejected;
 	struct delayed_work dwork;
 	u32 peer_shutdown;
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index ae3ce3d..0b3c498 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -684,6 +684,7 @@ struct sock *__vsock_create(struct net *net,
 	vsk->listener = NULL;
 	INIT_LIST_HEAD(&vsk->pending_links);
 	INIT_LIST_HEAD(&vsk->accept_queue);
+	INIT_LIST_HEAD(&vsk->dgram_skb); /* TODO free list entries on shutdown and limit list size or timeout somehow? */
 	vsk->rejected = false;
 	vsk->sent_request = false;
 	vsk->ignore_connecting_rst = false;
-- 
2.4.1

  parent reply	other threads:[~2015-05-27 17:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 17:05 [RFC 0/6] Add virtio transport for AF_VSOCK Stefan Hajnoczi
2015-05-27 17:05 ` [RFC 1/6] VSOCK: Introduce vsock_find_unbound_socket and vsock_bind_dgram_generic Stefan Hajnoczi
2015-05-27 17:05 ` Stefan Hajnoczi [this message]
2015-05-27 17:05 ` [RFC 3/6] VSOCK: Introduce virtio-vsock-common.ko Stefan Hajnoczi
2015-05-27 17:05 ` [RFC 4/6] VSOCK: Introduce virtio-vsock.ko Stefan Hajnoczi
2015-05-27 17:05 ` [RFC 5/6] VSOCK: Introduce vhost-vsock.ko Stefan Hajnoczi
2015-05-27 17:06 ` [RFC 6/6] VSOCK: Add Makefile and Kconfig Stefan Hajnoczi

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=1432746360-14940-3-git-send-email-stefanha@redhat.com \
    --to=stefanha@redhat.com \
    --cc=asias@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).