]> git.proxmox.com Git - mirror_ovs.git/commitdiff
compat: Do not include headers when not compiling
authorGreg Rose <gvrose8192@gmail.com>
Wed, 7 Feb 2018 15:30:02 +0000 (07:30 -0800)
committerPravin B Shelar <pshelar@ovn.org>
Mon, 12 Feb 2018 08:15:13 +0000 (00:15 -0800)
If the entire file is not going to be compiled because OVS is using
upstream tunnel support then also don't bother pulling in the headers.

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
datapath/linux/compat/ip_gre.c
datapath/linux/compat/ip_output.c

index 94fdaa91235fbc48fbcf224089b9ed6025ccb42e..4e325914d8be37e820a5f8ea645dec190b690804 100644 (file)
@@ -12,6 +12,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#ifndef USE_UPSTREAM_TUNNEL
 #include <linux/capability.h>
 #include <linux/module.h>
 #include <linux/types.h>
@@ -52,7 +53,6 @@
 #include <net/gre.h>
 #include <net/dst_metadata.h>
 
-#ifndef USE_UPSTREAM_TUNNEL
 #if IS_ENABLED(CONFIG_IPV6)
 #include <net/ipv6.h>
 #include <net/ip6_fib.h>
index edca34020b0ab452af14eccd1b9be00a8f6f7fc2..e2f869f9a8c944bde80ba102fce17438b28d41ac 100644 (file)
@@ -45,6 +45,7 @@
  *             Hirokazu Takahashi:     sendfile() on UDP works now.
  */
 
+#ifndef HAVE_CORRECT_MRU_HANDLING
 #include <asm/uaccess.h>
 #include <linux/module.h>
 #include <linux/types.h>
@@ -82,7 +83,6 @@
 #include <linux/netlink.h>
 #include <linux/tcp.h>
 
-#ifndef HAVE_CORRECT_MRU_HANDLING
 static inline void rpl_ip_options_fragment(struct sk_buff *skb)
 {
        unsigned char *optptr = skb_network_header(skb) + sizeof(struct iphdr);