Commit 86a98057 authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller

vxlan/geneve: Include udp_tunnel.h in vxlan/geneve.h and fixup includes

This patch makes it so that we add udp_tunnel.h to vxlan.h and geneve.h
header files.  This is useful as I plan to move the generic handlers for
the port offloads into the udp_tunnel header file and leave the vxlan and
geneve headers to be a bit more protocol specific.

I also went through and cleaned out a number of redundant includes that
where in the .h and .c files for these drivers.
Signed-off-by: default avatarAlexander Duyck <aduyck@mirantis.com>
Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9f6ed032
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/hash.h> #include <linux/hash.h>
#include <net/dst_metadata.h> #include <net/dst_metadata.h>
......
...@@ -11,32 +11,18 @@ ...@@ -11,32 +11,18 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/types.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/skbuff.h>
#include <linux/rculist.h>
#include <linux/netdevice.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/udp.h> #include <linux/udp.h>
#include <linux/igmp.h> #include <linux/igmp.h>
#include <linux/etherdevice.h>
#include <linux/if_ether.h> #include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <linux/hash.h>
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <net/arp.h> #include <net/arp.h>
#include <net/ndisc.h> #include <net/ndisc.h>
#include <net/ip.h> #include <net/ip.h>
#include <net/ip_tunnels.h>
#include <net/icmp.h> #include <net/icmp.h>
#include <net/udp.h>
#include <net/udp_tunnel.h>
#include <net/rtnetlink.h> #include <net/rtnetlink.h>
#include <net/route.h>
#include <net/dsfield.h>
#include <net/inet_ecn.h> #include <net/inet_ecn.h>
#include <net/net_namespace.h> #include <net/net_namespace.h>
#include <net/netns/generic.h> #include <net/netns/generic.h>
...@@ -44,12 +30,9 @@ ...@@ -44,12 +30,9 @@
#include <net/protocol.h> #include <net/protocol.h>
#if IS_ENABLED(CONFIG_IPV6) #if IS_ENABLED(CONFIG_IPV6)
#include <net/ipv6.h>
#include <net/addrconf.h>
#include <net/ip6_tunnel.h> #include <net/ip6_tunnel.h>
#include <net/ip6_checksum.h> #include <net/ip6_checksum.h>
#endif #endif
#include <net/dst_metadata.h>
#define VXLAN_VERSION "0.1" #define VXLAN_VERSION "0.1"
......
#ifndef __NET_GENEVE_H #ifndef __NET_GENEVE_H
#define __NET_GENEVE_H 1 #define __NET_GENEVE_H 1
#ifdef CONFIG_INET
#include <net/udp_tunnel.h> #include <net/udp_tunnel.h>
#endif
/* Geneve Header: /* Geneve Header:
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
......
...@@ -105,12 +105,14 @@ struct metadata_dst *udp_tun_rx_dst(struct sk_buff *skb, unsigned short family, ...@@ -105,12 +105,14 @@ struct metadata_dst *udp_tun_rx_dst(struct sk_buff *skb, unsigned short family,
__be16 flags, __be64 tunnel_id, __be16 flags, __be64 tunnel_id,
int md_size); int md_size);
#ifdef CONFIG_INET
static inline int udp_tunnel_handle_offloads(struct sk_buff *skb, bool udp_csum) static inline int udp_tunnel_handle_offloads(struct sk_buff *skb, bool udp_csum)
{ {
int type = udp_csum ? SKB_GSO_UDP_TUNNEL_CSUM : SKB_GSO_UDP_TUNNEL; int type = udp_csum ? SKB_GSO_UDP_TUNNEL_CSUM : SKB_GSO_UDP_TUNNEL;
return iptunnel_handle_offloads(skb, type); return iptunnel_handle_offloads(skb, type);
} }
#endif
static inline void udp_tunnel_encap_enable(struct socket *sock) static inline void udp_tunnel_encap_enable(struct socket *sock)
{ {
......
#ifndef __NET_VXLAN_H #ifndef __NET_VXLAN_H
#define __NET_VXLAN_H 1 #define __NET_VXLAN_H 1
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/if_vlan.h> #include <linux/if_vlan.h>
#include <linux/skbuff.h> #include <net/udp_tunnel.h>
#include <linux/netdevice.h>
#include <linux/udp.h>
#include <net/dst_metadata.h> #include <net/dst_metadata.h>
/* VXLAN protocol (RFC 7348) header: /* VXLAN protocol (RFC 7348) header:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment