From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 3/3] vhost: update comments
Date: Wed, 2 Nov 2016 11:15:01 +0800 [thread overview]
Message-ID: <1478056501-9321-4-git-send-email-yuanhan.liu@linux.intel.com> (raw)
In-Reply-To: <1478056501-9321-1-git-send-email-yuanhan.liu@linux.intel.com>
vhost-cuse is removed, update corresponding comments that are still
referencing it.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
examples/tep_termination/main.c | 7 ++-----
examples/vhost/main.c | 4 +---
examples/vhost_xen/main.c | 3 +--
lib/librte_vhost/rte_virtio_net.h | 5 ++---
lib/librte_vhost/vhost.c | 9 ++++-----
lib/librte_vhost/vhost.h | 4 +++-
6 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c
index 622f248..1d6d463 100644
--- a/examples/tep_termination/main.c
+++ b/examples/tep_termination/main.c
@@ -1151,8 +1151,7 @@ print_stats(void)
}
/**
- * Main function, does initialisation and calls the per-lcore functions. The CUSE
- * device is also registered here to handle the IOCTLs.
+ * Main function, does initialisation and calls the per-lcore functions.
*/
int
main(int argc, char *argv[])
@@ -1253,14 +1252,12 @@ main(int argc, char *argv[])
}
rte_vhost_feature_disable(1ULL << VIRTIO_NET_F_MRG_RXBUF);
- /* Register CUSE device to handle IOCTLs. */
ret = rte_vhost_driver_register((char *)&dev_basename, 0);
if (ret != 0)
- rte_exit(EXIT_FAILURE, "CUSE device setup failure.\n");
+ rte_exit(EXIT_FAILURE, "failed to register vhost driver.\n");
rte_vhost_driver_callback_register(&virtio_net_device_ops);
- /* Start CUSE session. */
rte_vhost_driver_session_start();
return 0;
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 91000e8..0709859 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1409,8 +1409,7 @@ create_mbuf_pool(uint16_t nr_port, uint32_t nr_switch_core, uint32_t mbuf_size,
}
/*
- * Main function, does initialisation and calls the per-lcore functions. The CUSE
- * device is also registered here to handle the IOCTLs.
+ * Main function, does initialisation and calls the per-lcore functions.
*/
int
main(int argc, char *argv[])
@@ -1531,7 +1530,6 @@ main(int argc, char *argv[])
rte_vhost_driver_callback_register(&virtio_net_device_ops);
- /* Start CUSE session. */
rte_vhost_driver_session_start();
return 0;
diff --git a/examples/vhost_xen/main.c b/examples/vhost_xen/main.c
index 2e40357..f4dbaa4 100644
--- a/examples/vhost_xen/main.c
+++ b/examples/vhost_xen/main.c
@@ -1407,8 +1407,7 @@ print_stats(void)
int init_virtio_net(struct virtio_net_device_ops const * const ops);
/*
- * Main function, does initialisation and calls the per-lcore functions. The CUSE
- * device is also registered here to handle the IOCTLs.
+ * Main function, does initialisation and calls the per-lcore functions.
*/
int
main(int argc, char *argv[])
diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h
index c53ff64..926039c 100644
--- a/lib/librte_vhost/rte_virtio_net.h
+++ b/lib/librte_vhost/rte_virtio_net.h
@@ -123,9 +123,8 @@ int rte_vhost_get_numa_node(int vid);
uint32_t rte_vhost_get_queue_num(int vid);
/**
- * Get the virtio net device's ifname. For vhost-cuse, ifname is the
- * path of the char device. For vhost-user, ifname is the vhost-user
- * socket file path.
+ * Get the virtio net device's ifname, which is the vhost-user socket
+ * file path.
*
* @param vid
* virtio-net device ID
diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index d8116ff..31825b8 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -227,9 +227,8 @@ reset_device(struct virtio_net *dev)
}
/*
- * Function is called from the CUSE open function. The device structure is
- * initialised and a new entry is added to the device configuration linked
- * list.
+ * Invoked when there is a new vhost-user connection established (when
+ * there is a new virtio device being attached).
*/
int
vhost_new_device(void)
@@ -261,8 +260,8 @@ vhost_new_device(void)
}
/*
- * Function is called from the CUSE release function. This function will
- * cleanup the device and remove it from device configuration linked list.
+ * Invoked when there is the vhost-user connection is broken (when
+ * the virtio device is being detached).
*/
void
vhost_destroy_device(int vid)
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index acec772..22564f1 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -284,7 +284,9 @@ void vhost_set_ifname(int, const char *if_name, unsigned int if_len);
void vhost_enable_dequeue_zero_copy(int vid);
/*
- * Backend-specific cleanup. Defined by vhost-cuse and vhost-user.
+ * Backend-specific cleanup.
+ *
+ * TODO: fix it; we have one backend now
*/
void vhost_backend_cleanup(struct virtio_net *dev);
--
1.9.0
next prev parent reply other threads:[~2016-11-02 3:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-02 3:14 [dpdk-dev] [PATCH 0/3] vhost: comments and doc update due to vhost-cuse removal Yuanhan Liu
2016-11-02 3:14 ` [dpdk-dev] [PATCH 1/3] doc: update vhost programming guide Yuanhan Liu
2016-11-04 13:22 ` Mcnamara, John
2016-11-02 3:15 ` [dpdk-dev] [PATCH 2/3] doc: update the vhost sample guide Yuanhan Liu
2016-11-04 13:38 ` Mcnamara, John
2016-11-02 3:15 ` Yuanhan Liu [this message]
2016-11-04 13:28 ` [dpdk-dev] [PATCH 3/3] vhost: update comments Mcnamara, John
2016-11-04 14:15 ` Yuanhan Liu
2016-11-07 15:00 ` [dpdk-dev] [PATCH 0/3] vhost: comments and doc update due to vhost-cuse removal Thomas Monjalon
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=1478056501-9321-4-git-send-email-yuanhan.liu@linux.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=dev@dpdk.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).