From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 898677EBB for ; Wed, 8 Oct 2014 20:49:52 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 08 Oct 2014 11:57:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,679,1406617200"; d="scan'208";a="615348560" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 08 Oct 2014 11:57:09 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id s98Iv7uE023404; Thu, 9 Oct 2014 02:57:07 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s98Iv563004476; Thu, 9 Oct 2014 02:57:07 +0800 Received: (from hxie5@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id s98Iv5bL004472; Thu, 9 Oct 2014 02:57:05 +0800 From: Huawei Xie To: dev@dpdk.org Date: Thu, 9 Oct 2014 02:54:49 +0800 Message-Id: <1412794499-4332-16-git-send-email-huawei.xie@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1412794499-4332-1-git-send-email-huawei.xie@intel.com> References: <1412794499-4332-1-git-send-email-huawei.xie@intel.com> Subject: [dpdk-dev] [PATCH v6 15/25] lib/librte_vhost: rte_vhost_driver_register and rte_vhost_session_start API 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, 08 Oct 2014 18:49:53 -0000 rename register_cuse_device as rte_vhost_driver_register API. rename start_session_loop as rte_vhost_driver_session_start API. Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 5 +++++ lib/librte_vhost/vhost-net-cdev.c | 4 ++-- lib/librte_vhost/vhost-net-cdev.h | 2 -- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h index 1f2b351..3ca1d63 100644 --- a/lib/librte_vhost/rte_virtio_net.h +++ b/lib/librte_vhost/rte_virtio_net.h @@ -123,4 +123,9 @@ int init_virtio_net(struct virtio_net_device_ops const * const); int deinit_virtio_net(void); +/* Register vhost driver. dev_name could be different for multiple instance support. */ +int rte_vhost_driver_register(const char *dev_name); + +/* Start vhost driver session blocking loop. */ +int rte_vhost_driver_session_start(void); #endif /* _VIRTIO_NET_H_ */ diff --git a/lib/librte_vhost/vhost-net-cdev.c b/lib/librte_vhost/vhost-net-cdev.c index 4eeb676..d9d24bc 100644 --- a/lib/librte_vhost/vhost-net-cdev.c +++ b/lib/librte_vhost/vhost-net-cdev.c @@ -302,7 +302,7 @@ static const struct cuse_lowlevel_ops vhost_net_ops = { * also passed when the device is registered in main.c. */ int -register_cuse_device(const char *base_name) +rte_vhost_driver_register(const char *dev_name) { struct cuse_info cuse_info; char device_name[PATH_MAX] = ""; @@ -353,7 +353,7 @@ register_cuse_device(const char *base_name) * The CUSE session is launched allowing the application to receive open, release and ioctl calls. */ int -start_cuse_session_loop(void) +rte_vhost_driver_session_start(void) { fuse_session_loop(session); diff --git a/lib/librte_vhost/vhost-net-cdev.h b/lib/librte_vhost/vhost-net-cdev.h index 0db8f0a..fa67caf 100644 --- a/lib/librte_vhost/vhost-net-cdev.h +++ b/lib/librte_vhost/vhost-net-cdev.h @@ -77,8 +77,6 @@ struct vhost_net_device_ops { int (* reset_owner) (struct vhost_device_ctx); }; -int register_cuse_device(const char *base_name, int index, struct vhost_net_device_ops const * const); -int start_cuse_session_loop(void); struct vhost_net_device_ops const *get_virtio_net_callbacks(void); #endif /* _VHOST_NET_CDEV_H_ */ -- 1.8.1.4