diff mbox

[ovs-dev,1/3] netdev-vport: remove unneeded headers

Message ID 1464862729-31563-1-git-send-email-cascardo@redhat.com
State Accepted
Headers show

Commit Message

Thadeu Lima de Souza Cascardo June 2, 2016, 10:18 a.m. UTC
Throughout the years, changes in netdev vport have removed the need for some of
the headers, like shash, hmap, and many others. With the recent split of
push/pop code, less headers are needed in each of the two modules.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
---
 lib/netdev-native-tnl.c    | 27 ++++++---------------------
 lib/netdev-native-tnl.h    |  6 ++++++
 lib/netdev-vport-private.h |  2 ++
 lib/netdev-vport.c         | 17 ++++-------------
 4 files changed, 18 insertions(+), 34 deletions(-)

Comments

Jesse Gross June 2, 2016, 7:49 p.m. UTC | #1
On Thu, Jun 2, 2016 at 3:18 AM, Thadeu Lima de Souza Cascardo
<cascardo@redhat.com> wrote:
> Throughout the years, changes in netdev vport have removed the need for some of
> the headers, like shash, hmap, and many others. With the recent split of
> push/pop code, less headers are needed in each of the two modules.
>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>

I applied this patch to master.
diff mbox

Patch

diff --git a/lib/netdev-native-tnl.c b/lib/netdev-native-tnl.c
index e144679..215bf42 100644
--- a/lib/netdev-native-tnl.c
+++ b/lib/netdev-native-tnl.c
@@ -16,11 +16,14 @@ 
 
 #include <config.h>
 
+#include "netdev-native-tnl.h"
+
 #include <errno.h>
 #include <fcntl.h>
 #include <sys/socket.h>
 #include <net/if.h>
 #include <netinet/in.h>
+#include <netinet/ip.h>
 #include <netinet/ip6.h>
 #include <sys/ioctl.h>
 
@@ -28,36 +31,18 @@ 
 #include <stdlib.h>
 #include <sys/time.h>
 
-#include "openvswitch/list.h"
 #include "byte-order.h"
 #include "csum.h"
-#include "daemon.h"
-#include "dirs.h"
-#include "dpif.h"
 #include "dp-packet.h"
-#include "entropy.h"
-#include "flow.h"
-#include "hash.h"
-#include "hmap.h"
-#include "id-pool.h"
-#include "netdev-provider.h"
+#include "netdev.h"
 #include "netdev-vport.h"
 #include "netdev-vport-private.h"
 #include "odp-netlink.h"
-#include "dp-packet.h"
-#include "ovs-router.h"
 #include "packets.h"
-#include "poll-loop.h"
-#include "random.h"
-#include "route-table.h"
-#include "shash.h"
-#include "socket-util.h"
-#include "timeval.h"
-#include "netdev-native-tnl.h"
-#include "openvswitch/vlog.h"
+#include "seq.h"
 #include "unaligned.h"
 #include "unixctl.h"
-#include "util.h"
+#include "openvswitch/vlog.h"
 
 VLOG_DEFINE_THIS_MODULE(native_tnl);
 static struct vlog_rate_limit err_rl = VLOG_RATE_LIMIT_INIT(60, 5);
diff --git a/lib/netdev-native-tnl.h b/lib/netdev-native-tnl.h
index ed81857..a912ce9 100644
--- a/lib/netdev-native-tnl.h
+++ b/lib/netdev-native-tnl.h
@@ -20,8 +20,14 @@ 
 #include <stdbool.h>
 #include <stddef.h>
 #include "compiler.h"
+#include "dp-packet.h"
+#include "packets.h"
 #include "unixctl.h"
 
+struct netdev;
+struct ovs_action_push_tnl;
+struct netdev_tnl_build_header_params;
+
 int
 netdev_gre_build_header(const struct netdev *netdev,
                         struct ovs_action_push_tnl *data,
diff --git a/lib/netdev-vport-private.h b/lib/netdev-vport-private.h
index 8061841..d89a28c 100644
--- a/lib/netdev-vport-private.h
+++ b/lib/netdev-vport-private.h
@@ -20,6 +20,8 @@ 
 #include <stdbool.h>
 #include <stddef.h>
 #include "compiler.h"
+#include "netdev.h"
+#include "netdev-provider.h"
 #include "ovs-thread.h"
 
 struct netdev_vport {
diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
index 40ca02c..6016fd8 100644
--- a/lib/netdev-vport.c
+++ b/lib/netdev-vport.c
@@ -27,31 +27,22 @@ 
 #include <sys/ioctl.h>
 
 #include "byte-order.h"
-#include "csum.h"
 #include "daemon.h"
 #include "dirs.h"
 #include "dpif.h"
-#include "dp-packet.h"
-#include "openvswitch/dynamic-string.h"
-#include "flow.h"
-#include "hash.h"
-#include "hmap.h"
-#include "openvswitch/list.h"
+#include "netdev.h"
+#include "netdev-native-tnl.h"
 #include "netdev-provider.h"
 #include "netdev-vport-private.h"
-#include "odp-netlink.h"
-#include "dp-packet.h"
 #include "ovs-router.h"
 #include "packets.h"
 #include "poll-loop.h"
 #include "route-table.h"
-#include "shash.h"
+#include "smap.h"
 #include "socket-util.h"
-#include "netdev-native-tnl.h"
-#include "openvswitch/vlog.h"
 #include "unaligned.h"
 #include "unixctl.h"
-#include "util.h"
+#include "openvswitch/vlog.h"
 
 VLOG_DEFINE_THIS_MODULE(netdev_vport);