All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vhost-net: comment use of invalid fd when setting vhost backend
@ 2009-12-22 18:18 Chris Wright
  2009-12-22 19:37 ` Michael S. Tsirkin
  2009-12-22 19:37 ` Michael S. Tsirkin
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wright @ 2009-12-22 18:18 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: rusty, kvm, virtualization

This looks like an error case, but it's just a special case to shutdown
the backend.  Clarify with a comment.

Signed-off-by: Chris Wright <chrisw@redhat.com>
---
 drivers/vhost/net.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 22d5fef..cc92086 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -465,6 +465,7 @@ static struct socket *get_tun_socket(int fd)
 static struct socket *get_socket(int fd)
 {
 	struct socket *sock;
+	/* special case to disable backend */
 	if (fd == -1)
 		return NULL;
 	sock = get_raw_socket(fd);

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] vhost-net: comment use of invalid fd when setting vhost backend
@ 2009-12-22 18:18 Chris Wright
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wright @ 2009-12-22 18:18 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: kvm, virtualization

This looks like an error case, but it's just a special case to shutdown
the backend.  Clarify with a comment.

Signed-off-by: Chris Wright <chrisw@redhat.com>
---
 drivers/vhost/net.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 22d5fef..cc92086 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -465,6 +465,7 @@ static struct socket *get_tun_socket(int fd)
 static struct socket *get_socket(int fd)
 {
 	struct socket *sock;
+	/* special case to disable backend */
 	if (fd == -1)
 		return NULL;
 	sock = get_raw_socket(fd);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-12-22 19:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-22 18:18 [PATCH] vhost-net: comment use of invalid fd when setting vhost backend Chris Wright
2009-12-22 19:37 ` Michael S. Tsirkin
2009-12-22 19:37 ` Michael S. Tsirkin
  -- strict thread matches above, loose matches on Subject: below --
2009-12-22 18:18 Chris Wright

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.