From a798beb47c8e40f03261ee869a00578d2c44c824 Mon Sep 17 00:00:00 2001 From: Yuanhan Liu Date: Sat, 1 Apr 2017 15:22:57 +0800 Subject: [PATCH] vhost: rename header file Rename "rte_virtio_net.h" to "rte_vhost.h", to not let it be virtio net specific. Signed-off-by: Yuanhan Liu Reviewed-by: Maxime Coquelin --- doc/api/doxy-api-index.md | 2 +- doc/guides/rel_notes/deprecation.rst | 9 --------- doc/guides/rel_notes/release_17_05.rst | 3 +++ drivers/net/vhost/rte_eth_vhost.c | 2 +- drivers/net/vhost/rte_eth_vhost.h | 2 +- examples/tep_termination/main.c | 2 +- examples/tep_termination/vxlan_setup.c | 2 +- examples/vhost/main.c | 2 +- lib/librte_vhost/Makefile | 2 +- lib/librte_vhost/{rte_virtio_net.h => rte_vhost.h} | 10 +++++----- lib/librte_vhost/vhost.c | 2 +- lib/librte_vhost/vhost.h | 2 +- lib/librte_vhost/vhost_user.h | 2 +- lib/librte_vhost/virtio_net.c | 2 +- 14 files changed, 19 insertions(+), 25 deletions(-) rename lib/librte_vhost/{rte_virtio_net.h => rte_vhost.h} (98%) diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md index eb39f69cde..83f45d4471 100644 --- a/doc/api/doxy-api-index.md +++ b/doc/api/doxy-api-index.md @@ -47,7 +47,7 @@ There are many libraries, so their headers may be grouped by topics: - **device specific**: [bond] (@ref rte_eth_bond.h), - [vhost] (@ref rte_virtio_net.h), + [vhost] (@ref rte_vhost.h), [KNI] (@ref rte_kni.h), [ixgbe] (@ref rte_pmd_ixgbe.h), [i40e] (@ref rte_pmd_i40e.h) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index d6544ed0ab..9708b3941c 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -95,15 +95,6 @@ Deprecation Notices Target release for removal of the legacy API will be defined once most PMDs have switched to rte_flow. -* vhost: API/ABI changes are planned for 17.05, for making DPDK vhost library - generic enough so that applications can build different vhost-user drivers - (instead of vhost-user net only) on top of that. - Specifically, ``virtio_net_device_ops`` will be renamed to ``vhost_device_ops``. - Correspondingly, some API's parameter need be changed. Few more functions also - need be reworked to let it be device aware. For example, different virtio device - has different feature set, meaning functions like ``rte_vhost_feature_disable`` - need be changed. Last, file rte_virtio_net.h will be renamed to rte_vhost.h. - * ABI changes are planned for 17.05 in the ``rte_cryptodev_ops`` structure. A pointer to a rte_cryptodev_config structure will be added to the function prototype ``cryptodev_configure_t``, as a new parameter. diff --git a/doc/guides/rel_notes/release_17_05.rst b/doc/guides/rel_notes/release_17_05.rst index 0373def657..7c54770793 100644 --- a/doc/guides/rel_notes/release_17_05.rst +++ b/doc/guides/rel_notes/release_17_05.rst @@ -319,6 +319,9 @@ API Changes ``rte_vhost_driver_start`` should be used, and no need to create a thread to call it. + * The vhost public header file ``rte_virtio_net.h`` is renamed to + ``rte_vhost.h`` + ABI Changes ----------- diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 65c5ef2021..41ce5fc588 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include "rte_eth_vhost.h" diff --git a/drivers/net/vhost/rte_eth_vhost.h b/drivers/net/vhost/rte_eth_vhost.h index ea4bce41d0..39ca771971 100644 --- a/drivers/net/vhost/rte_eth_vhost.h +++ b/drivers/net/vhost/rte_eth_vhost.h @@ -41,7 +41,7 @@ extern "C" { #include #include -#include +#include /* * Event description. diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index 24c62cd612..cd6e3f1cfa 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include "main.h" #include "vxlan.h" diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c index 8f1f15bb7d..87de74d7c3 100644 --- a/examples/tep_termination/vxlan_setup.c +++ b/examples/tep_termination/vxlan_setup.c @@ -49,7 +49,7 @@ #include #include "main.h" -#include "rte_virtio_net.h" +#include "rte_vhost.h" #include "vxlan.h" #include "vxlan_setup.h" diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 64b3eea148..08b82f60c6 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile index 1262dccc80..4a116fe319 100644 --- a/lib/librte_vhost/Makefile +++ b/lib/librte_vhost/Makefile @@ -51,6 +51,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c socket.c vhost.c vhost_user.c \ virtio_net.c # install includes -SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_virtio_net.h +SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_vhost.h include $(RTE_SDK)/mk/rte.lib.mk diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_vhost.h similarity index 98% rename from lib/librte_vhost/rte_virtio_net.h rename to lib/librte_vhost/rte_vhost.h index fd9cbb0c59..d482a72cdc 100644 --- a/lib/librte_vhost/rte_virtio_net.h +++ b/lib/librte_vhost/rte_vhost.h @@ -1,7 +1,7 @@ /*- * BSD LICENSE * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * Copyright(c) 2010-2017 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _VIRTIO_NET_H_ -#define _VIRTIO_NET_H_ +#ifndef _RTE_VHOST_H_ +#define _RTE_VHOST_H_ /** * @file - * Interface to vhost net + * Interface to vhost-user */ #include @@ -424,4 +424,4 @@ int rte_vhost_get_mem_table(int vid, struct rte_vhost_memory **mem); int rte_vhost_get_vhost_vring(int vid, uint16_t vring_idx, struct rte_vhost_vring *vring); -#endif /* _VIRTIO_NET_H_ */ +#endif /* _RTE_VHOST_H_ */ diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index 59de2ea2ad..0b19d2eb8a 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include "vhost.h" diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index a199ee6934..ddd8a9c436 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h @@ -46,7 +46,7 @@ #include #include -#include "rte_virtio_net.h" +#include "rte_vhost.h" /* Used to indicate that the device is running on a data core */ #define VIRTIO_DEV_RUNNING 1 diff --git a/lib/librte_vhost/vhost_user.h b/lib/librte_vhost/vhost_user.h index 838dec8840..2ba22dbb09 100644 --- a/lib/librte_vhost/vhost_user.h +++ b/lib/librte_vhost/vhost_user.h @@ -37,7 +37,7 @@ #include #include -#include "rte_virtio_net.h" +#include "rte_vhost.h" /* refer to hw/virtio/vhost-user.c */ diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index fc336d99d4..d6b7c7a22c 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include -- 2.20.1