aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/geneve.h
diff options
context:
space:
mode:
authorAndy Zhou <azhou@nicira.com>2014-10-06 18:15:14 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-07 00:10:49 -0400
commit7c5df8fa1921450d2210db9928f43cf4f414982c (patch)
treec07aad48037b63739a302aaf27604f780809440b /include/net/geneve.h
parent0a5d1c55faa5414858857875496f6f6a9926fa51 (diff)
openvswitch: fix a compilation error when CONFIG_INET is not setW!
Fix a openvswitch compilation error when CONFIG_INET is not set: ===================================================== In file included from include/net/geneve.h:4:0, from net/openvswitch/flow_netlink.c:45: include/net/udp_tunnel.h: In function 'udp_tunnel_handle_offloads': >> include/net/udp_tunnel.h:100:2: error: implicit declaration of function 'iptunnel_handle_offloads' [-Werror=implicit-function-declaration] >> return iptunnel_handle_offloads(skb, udp_csum, type); >> ^ >> >> include/net/udp_tunnel.h:100:2: warning: return makes pointer from integer without a cast >> >> cc1: some warnings being treated as errors ===================================================== Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Andy Zhou <azhou@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/geneve.h')
-rw-r--r--include/net/geneve.h36
1 files changed, 21 insertions, 15 deletions
diff --git a/include/net/geneve.h b/include/net/geneve.h
index ce98865318bf..112132cf8e2e 100644
--- a/include/net/geneve.h
+++ b/include/net/geneve.h
@@ -1,22 +1,10 @@
1#ifndef __NET_GENEVE_H 1#ifndef __NET_GENEVE_H
2#define __NET_GENEVE_H 1 2#define __NET_GENEVE_H 1
3 3
4#ifdef CONFIG_INET
4#include <net/udp_tunnel.h> 5#include <net/udp_tunnel.h>
6#endif
5 7
6struct geneve_sock;
7
8typedef void (geneve_rcv_t)(struct geneve_sock *gs, struct sk_buff *skb);
9
10struct geneve_sock {
11 struct hlist_node hlist;
12 geneve_rcv_t *rcv;
13 void *rcv_data;
14 struct work_struct del_work;
15 struct socket *sock;
16 struct rcu_head rcu;
17 atomic_t refcnt;
18 struct udp_offload udp_offloads;
19};
20 8
21/* Geneve Header: 9/* Geneve Header:
22 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 10 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -74,6 +62,22 @@ struct genevehdr {
74 struct geneve_opt options[]; 62 struct geneve_opt options[];
75}; 63};
76 64
65#ifdef CONFIG_INET
66struct geneve_sock;
67
68typedef void (geneve_rcv_t)(struct geneve_sock *gs, struct sk_buff *skb);
69
70struct geneve_sock {
71 struct hlist_node hlist;
72 geneve_rcv_t *rcv;
73 void *rcv_data;
74 struct work_struct del_work;
75 struct socket *sock;
76 struct rcu_head rcu;
77 atomic_t refcnt;
78 struct udp_offload udp_offloads;
79};
80
77#define GENEVE_VER 0 81#define GENEVE_VER 0
78#define GENEVE_BASE_HLEN (sizeof(struct udphdr) + sizeof(struct genevehdr)) 82#define GENEVE_BASE_HLEN (sizeof(struct udphdr) + sizeof(struct genevehdr))
79 83
@@ -88,4 +92,6 @@ int geneve_xmit_skb(struct geneve_sock *gs, struct rtable *rt,
88 __u8 ttl, __be16 df, __be16 src_port, __be16 dst_port, 92 __u8 ttl, __be16 df, __be16 src_port, __be16 dst_port,
89 __be16 tun_flags, u8 vni[3], u8 opt_len, u8 *opt, 93 __be16 tun_flags, u8 vni[3], u8 opt_len, u8 *opt,
90 bool xnet); 94 bool xnet);
91#endif 95#endif /*ifdef CONFIG_INET */
96
97#endif /*ifdef__NET_GENEVE_H */