From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E526F326D for ; Wed, 2 Nov 2016 04:14:20 +0100 (CET) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP; 01 Nov 2016 20:14:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,582,1473145200"; d="scan'208";a="26420237" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by fmsmga005.fm.intel.com with ESMTP; 01 Nov 2016 20:14:19 -0700 From: Yuanhan Liu To: dev@dpdk.org Date: Wed, 2 Nov 2016 11:15:01 +0800 Message-Id: <1478056501-9321-4-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1478056501-9321-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1478056501-9321-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-dev] [PATCH 3/3] vhost: update comments X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2016 03:14:21 -0000 vhost-cuse is removed, update corresponding comments that are still referencing it. Signed-off-by: Yuanhan Liu --- 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