From: Huawei Xie <huawei.xie@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v6 20/25] lib/librte_vhost: header file cleanups
Date: Thu, 9 Oct 2014 02:54:54 +0800 [thread overview]
Message-ID: <1412794499-4332-21-git-send-email-huawei.xie@intel.com> (raw)
In-Reply-To: <1412794499-4332-1-git-send-email-huawei.xie@intel.com>
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(-)
diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h
index de2ced6..13d75fe 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 <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
diff --git a/lib/librte_vhost/vhost-net-cdev.c b/lib/librte_vhost/vhost-net-cdev.c
index d9d24bc..4dbd295 100644
--- a/lib/librte_vhost/vhost-net-cdev.c
+++ b/lib/librte_vhost/vhost-net-cdev.c
@@ -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"
diff --git a/lib/librte_vhost/vhost-net-cdev.h b/lib/librte_vhost/vhost-net-cdev.h
index 6885bbf..047ecf9 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 <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
diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c
index fb85fb7..6269ceb 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 <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
diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c
index 127270c..203be4b 100644
--- a/lib/librte_vhost/virtio-net.c
+++ b/lib/librte_vhost/virtio-net.c
@@ -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"
--
1.8.1.4
next prev parent reply other threads:[~2014-10-08 18:50 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 18:54 [dpdk-dev] [PATCH v6 00/25] user space vhost library Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 01/25] lib/librte_vhost: move src files from examples/vhost to lib/librte_vhost Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 02/25] lib/librte_vhost: rename main.c to vhost_rxtx.c and virtio-net.h to rte_virtio_net.h Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 03/25] lib/librte_vhost: clean unused codes in vhost_rxtx.c Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 04/25] lib/librte_vhost: remove mac learning, VMDQ, mac/vlan and other switching related logic Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 05/25] lib/librte_vhost: remove zero copy memory region generation logic Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 06/25] lib/librte_vhost: remove retry logic Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 07/25] lib/librte_vhost: patch virtio_dev_merge_tx to return packets to upper layer Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 08/25] lib/librte_vhost: calculate mbuf size Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 09/25] lib/librte_vhost: add queue_id parameter to vhost rx/tx functions Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 10/25] lib/librte_vhost: define PACKET_BURST Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 11/25] lib/librte_vhost: rte_vhost_en/dequeue_burst API Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 12/25] lib/librte_vhost: move virtio_net_config_ll structure to virtio_net.c Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 13/25] lib/librte_vhost: remove index parameter Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 14/25] lib/librte_vhost: call get_virtio_net_callbacks to get internal ops in register_cuse_device Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 15/25] lib/librte_vhost: rte_vhost_driver_register and rte_vhost_session_start API Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 16/25] lib/librte_vhost: rename init_virtio_net to rte_vhost_callback_register Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 17/25] lib/librte_vhost: vhost APIs Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 18/25] lib/librte_vhost: add debug print Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 19/25] lib/librte_vhost: VHOST SUPPORTED FEATURES Huawei Xie
2014-10-08 18:54 ` Huawei Xie [this message]
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 21/25] lib/librte_vhost: static variable fixes Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 22/25] lib/librte_vhost: add priv context field to virtio_net structure Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 23/25] lib/librte_vhost: coding style fixes Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 24/25] lib/librte_vhost: add TODO/FIXME for identified issues Huawei Xie
2014-10-08 18:54 ` [dpdk-dev] [PATCH v6 25/25] lib/librte_vhost: add vhost support in Makefile Huawei Xie
2014-10-09 18:36 ` [dpdk-dev] [PATCH v6 00/25] user space vhost library Xie, Huawei
2014-10-11 8:31 ` Ouyang, Changchun
2014-10-13 19:51 ` Thomas Monjalon
2014-10-13 20:53 ` Xie, Huawei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1412794499-4332-21-git-send-email-huawei.xie@intel.com \
--to=huawei.xie@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).