blob: f4e56ecd0b1ab49b0e09594e16fe996165168d11 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _IF_TUNNEL_H_
2#define _IF_TUNNEL_H_
3
Herbert Xuc19e6542008-10-09 11:59:55 -07004#include <linux/ip.h>
Brian Haley125a77e2009-10-07 13:57:10 -07005#include <linux/in6.h>
David Howells607ca462012-10-13 10:46:48 +01006#include <uapi/linux/if_tunnel.h>
Amerigo Wangaa0010f2012-11-11 21:52:33 +00007#include <linux/u64_stats_sync.h>
8
Amerigo Wange086cad2012-11-11 21:52:34 +00009/*
10 * Locking : hash tables are protected by RCU and RTNL
11 */
12
13#define for_each_ip_tunnel_rcu(pos, start) \
14 for (pos = rcu_dereference(start); pos; pos = rcu_dereference(pos->next))
15
Amerigo Wangaa0010f2012-11-11 21:52:33 +000016/* often modified stats are per cpu, other are shared (netdev->stats) */
17struct pcpu_tstats {
18 u64 rx_packets;
19 u64 rx_bytes;
20 u64 tx_packets;
21 u64 tx_bytes;
22 struct u64_stats_sync syncp;
23};
Masahide NAKAMURA6fd8bb82007-01-23 22:17:23 -080024
Linus Torvalds1da177e2005-04-16 15:20:36 -070025#endif /* _IF_TUNNEL_H_ */