From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 3FDA637AA for ; Fri, 3 Mar 2017 10:53:03 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 03 Mar 2017 01:53:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,236,1484035200"; d="scan'208";a="1137400954" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by fmsmga002.fm.intel.com with ESMTP; 03 Mar 2017 01:53:01 -0800 From: Yuanhan Liu To: dev@dpdk.org Cc: Maxime Coquelin , Harris James R , Liu Changpeng , Yuanhan Liu Date: Fri, 3 Mar 2017 17:51:19 +0800 Message-Id: <1488534682-3494-15-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1488534682-3494-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1488534682-3494-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-dev] [PATCH 14/17] vhost: rename device ops struct X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Mar 2017 09:53:03 -0000 rename "virtio_net_device_ops" to "vhost_device_ops", to not let it be virtio-net specific. Signed-off-by: Yuanhan Liu --- drivers/net/vhost/rte_eth_vhost.c | 2 +- examples/tep_termination/main.c | 4 ++-- examples/vhost/main.c | 4 ++-- lib/librte_vhost/Makefile | 2 +- lib/librte_vhost/rte_virtio_net.h | 4 ++-- lib/librte_vhost/socket.c | 6 +++--- lib/librte_vhost/vhost.h | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 450d167..df1e386 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -669,7 +669,7 @@ struct vhost_xstats_name_off { return 0; } -static struct virtio_net_device_ops vhost_ops = { +static struct vhost_device_ops vhost_ops = { .new_device = new_device, .destroy_device = destroy_device, .vring_state_changed = vring_state_changed, diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index 03c0fbe..fa1c7a4 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -1081,7 +1081,7 @@ static inline void __attribute__((always_inline)) * These callback allow devices to be added to the data core when configuration * has been fully complete. */ -static const struct virtio_net_device_ops virtio_net_device_ops = { +static const struct vhost_device_ops vhost_device_ops = { .new_device = new_device, .destroy_device = destroy_device, }; @@ -1259,7 +1259,7 @@ static inline void __attribute__((always_inline)) 1ULL << VIRTIO_NET_F_MRG_RXBUF); rte_vhost_driver_callback_register(dev_basename, - &virtio_net_device_ops); + &vhost_device_ops); rte_vhost_driver_session_start(); diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 867efc6..080c60b 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1270,7 +1270,7 @@ static inline void __attribute__((always_inline)) * These callback allow devices to be added to the data core when configuration * has been fully complete. */ -static const struct virtio_net_device_ops virtio_net_device_ops = +static const struct vhost_device_ops vhost_device_ops = { .new_device = new_device, .destroy_device = destroy_device, @@ -1540,7 +1540,7 @@ static inline void __attribute__((always_inline)) } rte_vhost_driver_callback_register(file, - &virtio_net_device_ops); + &vhost_device_ops); } rte_vhost_driver_session_start(); diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile index 415ffc6..5cf4e93 100644 --- a/lib/librte_vhost/Makefile +++ b/lib/librte_vhost/Makefile @@ -36,7 +36,7 @@ LIB = librte_vhost.a EXPORT_MAP := rte_vhost_version.map -LIBABIVER := 3 +LIBABIVER := 4 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -D_FILE_OFFSET_BITS=64 CFLAGS += -I vhost_user diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h index e19ebad..5cde87d 100644 --- a/lib/librte_vhost/rte_virtio_net.h +++ b/lib/librte_vhost/rte_virtio_net.h @@ -87,7 +87,7 @@ struct rte_vhost_vring { /** * Device and vring operations. */ -struct virtio_net_device_ops { +struct vhost_device_ops { int (*new_device)(int vid); /**< Add device. */ void (*destroy_device)(int vid); /**< Remove device. */ @@ -139,7 +139,7 @@ static inline uint64_t __attribute__((always_inline)) /* Register callbacks. */ int rte_vhost_driver_callback_register(const char *path, - struct virtio_net_device_ops const * const); + struct vhost_device_ops const * const); /* Start vhost driver session blocking loop. */ int rte_vhost_driver_session_start(void); diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index 550af64..c97559d 100644 --- a/lib/librte_vhost/socket.c +++ b/lib/librte_vhost/socket.c @@ -74,7 +74,7 @@ struct vhost_user_socket { uint64_t supported_features; uint64_t features; - struct virtio_net_device_ops const *notify_ops; + struct vhost_device_ops const *notify_ops; }; struct vhost_user_connection { @@ -725,7 +725,7 @@ struct vhost_user_reconnect_list { */ int rte_vhost_driver_callback_register(const char *path, - struct virtio_net_device_ops const * const ops) + struct vhost_device_ops const * const ops) { struct vhost_user_socket *vsocket; @@ -738,7 +738,7 @@ struct vhost_user_reconnect_list { return vsocket ? 0 : -1; } -struct virtio_net_device_ops const * +struct vhost_device_ops const * vhost_driver_callback_get(const char *path) { struct vhost_user_socket *vsocket; diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index 5bc0ebe..fc9e431 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h @@ -183,7 +183,7 @@ struct virtio_net { uint64_t log_addr; struct ether_addr mac; - struct virtio_net_device_ops const *notify_ops; + struct vhost_device_ops const *notify_ops; uint32_t nr_guest_pages; uint32_t max_guest_pages; @@ -257,7 +257,7 @@ static inline phys_addr_t __attribute__((always_inline)) void vhost_set_ifname(int, const char *if_name, unsigned int if_len); void vhost_enable_dequeue_zero_copy(int vid); -struct virtio_net_device_ops const *vhost_driver_callback_get(const char *path); +struct vhost_device_ops const *vhost_driver_callback_get(const char *path); /* * Backend-specific cleanup. -- 1.9.0