From da7411005300285533bd0583309154530a111e8e Mon Sep 17 00:00:00 2001 From: Huawei Xie Date: Thu, 9 Oct 2014 02:54:54 +0800 Subject: [PATCH] vhost: clean includes Signed-off-by: Huawei Xie Acked-by: Changchun Ouyang --- lib/librte_vhost/rte_virtio_net.h | 9 +++++++++ lib/librte_vhost/vhost-net-cdev.c | 2 +- lib/librte_vhost/vhost-net-cdev.h | 11 ++++++----- lib/librte_vhost/vhost_rxtx.c | 26 ++++++-------------------- lib/librte_vhost/virtio-net.c | 3 +-- 5 files changed, 23 insertions(+), 28 deletions(-) diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h index 0606143f64..adf35e4f9f 100644 --- a/lib/librte_vhost/rte_virtio_net.h +++ b/lib/librte_vhost/rte_virtio_net.h @@ -34,6 +34,15 @@ #ifndef _VIRTIO_NET_H_ #define _VIRTIO_NET_H_ +#include +#include +#include +#include + +#include +#include +#include + /* Used to indicate that the device is running on a data core */ #define VIRTIO_DEV_RUNNING 1 diff --git a/lib/librte_vhost/vhost-net-cdev.c b/lib/librte_vhost/vhost-net-cdev.c index d9d24bc4e6..4dbd295dbf 100644 --- a/lib/librte_vhost/vhost-net-cdev.c +++ b/lib/librte_vhost/vhost-net-cdev.c @@ -42,8 +42,8 @@ #include #include #include +#include -#include "main.h" #include "vhost-net-cdev.h" #define FUSE_OPT_DUMMY "\0\0" diff --git a/lib/librte_vhost/vhost-net-cdev.h b/lib/librte_vhost/vhost-net-cdev.h index 6885bbf682..047ecf9e38 100644 --- a/lib/librte_vhost/vhost-net-cdev.h +++ b/lib/librte_vhost/vhost-net-cdev.h @@ -33,13 +33,14 @@ #ifndef _VHOST_NET_CDEV_H_ #define _VHOST_NET_CDEV_H_ - +#include +#include +#include +#include #include -struct vhost_memory; -struct vhost_vring_state; -struct vhost_vring_addr; -struct vhost_vring_file; +#include + /* Macros for printing using RTE_LOG */ #define RTE_LOGTYPE_VHOST_CONFIG RTE_LOGTYPE_USER1 #define RTE_LOGTYPE_VHOST_DATA RTE_LOGTYPE_USER1 diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c index b13965bd78..1c8c3ca1e8 100644 --- a/lib/librte_vhost/vhost_rxtx.c +++ b/lib/librte_vhost/vhost_rxtx.c @@ -31,27 +31,13 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "main.h" -#include "virtio-net.h" +#include + +#include +#include +#include + #include "vhost-net-cdev.h" #define MAX_PKT_BURST 32 /* Max burst size for RX/TX */ diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index 127270ccfd..203be4b4d6 100644 --- a/lib/librte_vhost/virtio-net.c +++ b/lib/librte_vhost/virtio-net.c @@ -47,9 +47,8 @@ #include #include #include +#include -#include "main.h" -#include "virtio-net.h" #include "vhost-net-cdev.h" #include "eventfd_link/eventfd_link.h" -- 2.20.1