Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andy Zhou and committed by
David S. Miller
7c5df8fa 0a5d1c55

+36 -30
-1
drivers/net/Kconfig
··· 147 147 config VXLAN 148 148 tristate "Virtual eXtensible Local Area Network (VXLAN)" 149 149 depends on INET 150 - select NET_IP_TUNNEL 151 150 select NET_UDP_TUNNEL 152 151 ---help--- 153 152 This allows one to create vxlan virtual interfaces that provide
+21 -15
include/net/geneve.h
··· 1 1 #ifndef __NET_GENEVE_H 2 2 #define __NET_GENEVE_H 1 3 3 4 + #ifdef CONFIG_INET 4 5 #include <net/udp_tunnel.h> 6 + #endif 5 7 6 - struct geneve_sock; 7 - 8 - typedef void (geneve_rcv_t)(struct geneve_sock *gs, struct sk_buff *skb); 9 - 10 - struct 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 9 /* Geneve Header: 22 10 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ··· 62 74 struct geneve_opt options[]; 63 75 }; 64 76 77 + #ifdef CONFIG_INET 78 + struct geneve_sock; 79 + 80 + typedef void (geneve_rcv_t)(struct geneve_sock *gs, struct sk_buff *skb); 81 + 82 + struct geneve_sock { 83 + struct hlist_node hlist; 84 + geneve_rcv_t *rcv; 85 + void *rcv_data; 86 + struct work_struct del_work; 87 + struct socket *sock; 88 + struct rcu_head rcu; 89 + atomic_t refcnt; 90 + struct udp_offload udp_offloads; 91 + }; 92 + 65 93 #define GENEVE_VER 0 66 94 #define GENEVE_BASE_HLEN (sizeof(struct udphdr) + sizeof(struct genevehdr)) 67 95 ··· 92 88 __u8 ttl, __be16 df, __be16 src_port, __be16 dst_port, 93 89 __be16 tun_flags, u8 vni[3], u8 opt_len, u8 *opt, 94 90 bool xnet); 95 - #endif 91 + #endif /*ifdef CONFIG_INET */ 92 + 93 + #endif /*ifdef__NET_GENEVE_H */
+15 -14
net/ipv4/Kconfig
··· 309 309 310 310 config NET_UDP_TUNNEL 311 311 tristate 312 + select NET_IP_TUNNEL 312 313 default n 313 314 314 315 config NET_FOU ··· 321 320 over UDP include tunnels (IPIP, GRE, SIT). By encapsulating in UDP 322 321 network mechanisms and optimizations for UDP (such as ECMP 323 322 and RSS) can be leveraged to provide better service. 323 + 324 + config GENEVE 325 + tristate "Generic Network Virtualization Encapsulation (Geneve)" 326 + depends on INET 327 + select NET_UDP_TUNNEL 328 + ---help--- 329 + This allows one to create Geneve virtual interfaces that provide 330 + Layer 2 Networks over Layer 3 Networks. Geneve is often used 331 + to tunnel virtual network infrastructure in virtualized environments. 332 + For more information see: 333 + http://tools.ietf.org/html/draft-gross-geneve-01 334 + 335 + To compile this driver as a module, choose M here: the module 336 + 324 337 325 338 config INET_AH 326 339 tristate "IP: AH transformation" ··· 467 452 scalability. Under small congestion windows, binary search 468 453 increase provides TCP friendliness. 469 454 See http://www.csc.ncsu.edu/faculty/rhee/export/bitcp/ 470 - 471 - config GENEVE 472 - tristate "Generic Network Virtualization Encapsulation (Geneve)" 473 - depends on INET 474 - select NET_IP_TUNNEL 475 - select NET_UDP_TUNNEL 476 - ---help--- 477 - This allows one to create Geneve virtual interfaces that provide 478 - Layer 2 Networks over Layer 3 Networks. Geneve is often used 479 - to tunnel virtual network infrastructure in virtualized environments. 480 - For more information see: 481 - http://tools.ietf.org/html/draft-gross-geneve-01 482 - 483 - To compile this driver as a module, choose M here: the module 484 455 485 456 config TCP_CONG_CUBIC 486 457 tristate "CUBIC TCP"