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 144237EDC for ; Wed, 8 Oct 2014 20:50:10 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 08 Oct 2014 11:47:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="397239667" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 08 Oct 2014 11:50:25 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id s98IvCdZ023407; Thu, 9 Oct 2014 02:57:12 +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 s98Iv90N004483; Thu, 9 Oct 2014 02:57:11 +0800 Received: (from hxie5@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id s98Iv9OL004479; Thu, 9 Oct 2014 02:57:09 +0800 From: Huawei Xie To: dev@dpdk.org Date: Thu, 9 Oct 2014 02:54:50 +0800 Message-Id: <1412794499-4332-17-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 16/25] lib/librte_vhost: rename init_virtio_net to rte_vhost_callback_register 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:50:11 -0000 rename init_virtio_net as rte_vhost_callback_register API. rte_vhost_callback_register register the callbacks called when a vhost device is created and ready to be added to data processing core or is de-actived by guest. Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 4 ++-- lib/librte_vhost/virtio-net.c | 11 +---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h index 3ca1d63..2766133 100644 --- a/lib/librte_vhost/rte_virtio_net.h +++ b/lib/librte_vhost/rte_virtio_net.h @@ -119,13 +119,13 @@ struct virtio_net_device_ops { void (* destroy_device) (volatile struct virtio_net *); /* Remove device. */ }; -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); +/* Register callbacks. */ +int rte_vhost_driver_callback_register(struct virtio_net_device_ops const * const); /* Start vhost driver session blocking loop. */ int rte_vhost_driver_session_start(void); #endif /* _VIRTIO_NET_H_ */ diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index ee37a40..14e657b 100644 --- a/lib/librte_vhost/virtio-net.c +++ b/lib/librte_vhost/virtio-net.c @@ -964,18 +964,9 @@ get_virtio_net_callbacks(void) * Register ops so that we can add/remove device to data core. */ int -init_virtio_net(struct virtio_net_device_ops const * const ops) +rte_vhost_driver_callback_register(struct virtio_net_device_ops const * const ops) { notify_ops = ops; return 0; } - -/* - * Currently not used as we Ctrl+c to exit application. - */ -int -deinit_virtio_net(void) -{ - return 0; -} -- 1.8.1.4