| 1 | #ifndef _IF_TUNNEL_H_ |
| 2 | #define _IF_TUNNEL_H_ |
| 3 | |
| 4 | #include <linux/ip.h> |
| 5 | #include <linux/in6.h> |
| 6 | #include <uapi/linux/if_tunnel.h> |
| 7 | #include <linux/u64_stats_sync.h> |
| 8 | |
| 9 | /* |
| 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 | |
| 16 | /* often modified stats are per cpu, other are shared (netdev->stats) */ |
| 17 | struct 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 | }; |
| 24 | |
| 25 | #endif /* _IF_TUNNEL_H_ */ |