[dpdk-dev,v6,20/25] lib/librte_vhost: header file cleanups
Commit Message
header file cleanups
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
---
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(-)
@@ -34,6 +34,15 @@
#ifndef _VIRTIO_NET_H_
#define _VIRTIO_NET_H_
+#include <stdint.h>
+#include <linux/virtio_ring.h>
+#include <linux/virtio_net.h>
+#include <sys/eventfd.h>
+
+#include <rte_memory.h>
+#include <rte_mempool.h>
+#include <rte_mbuf.h>
+
/* Used to indicate that the device is running on a data core */
#define VIRTIO_DEV_RUNNING 1
@@ -42,8 +42,8 @@
#include <rte_ethdev.h>
#include <rte_log.h>
#include <rte_string_fns.h>
+#include <rte_virtio_net.h>
-#include "main.h"
#include "vhost-net-cdev.h"
#define FUSE_OPT_DUMMY "\0\0"
@@ -33,13 +33,14 @@
#ifndef _VHOST_NET_CDEV_H_
#define _VHOST_NET_CDEV_H_
-
+#include <stdint.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
#include <linux/vhost.h>
-struct vhost_memory;
-struct vhost_vring_state;
-struct vhost_vring_addr;
-struct vhost_vring_file;
+#include <rte_log.h>
+
/* Macros for printing using RTE_LOG */
#define RTE_LOGTYPE_VHOST_CONFIG RTE_LOGTYPE_USER1
#define RTE_LOGTYPE_VHOST_DATA RTE_LOGTYPE_USER1
@@ -31,27 +31,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <arpa/inet.h>
-#include <getopt.h>
-#include <linux/if_ether.h>
-#include <linux/if_vlan.h>
-#include <linux/virtio_net.h>
-#include <linux/virtio_ring.h>
-#include <signal.h>
#include <stdint.h>
-#include <sys/eventfd.h>
-#include <sys/param.h>
-#include <unistd.h>
-
-#include <rte_atomic.h>
-#include <rte_cycles.h>
-#include <rte_ethdev.h>
-#include <rte_log.h>
-#include <rte_string_fns.h>
-#include <rte_malloc.h>
-
-#include "main.h"
-#include "virtio-net.h"
+#include <linux/virtio_net.h>
+
+#include <rte_mbuf.h>
+#include <rte_memcpy.h>
+#include <rte_virtio_net.h>
+
#include "vhost-net-cdev.h"
#define MAX_PKT_BURST 32
@@ -47,9 +47,8 @@
#include <rte_log.h>
#include <rte_string_fns.h>
#include <rte_memory.h>
+#include <rte_virtio_net.h>
-#include "main.h"
-#include "virtio-net.h"
#include "vhost-net-cdev.h"
#include "eventfd_link/eventfd_link.h"