diff options
| author | Meizu OpenSource <patchwork@meizu.com> | 2016-08-15 10:19:42 +0800 |
|---|---|---|
| committer | Meizu OpenSource <patchwork@meizu.com> | 2016-08-15 10:19:42 +0800 |
| commit | d2e1446d81725c351dc73a03b397ce043fb18452 (patch) | |
| tree | 4dbc616b7f92aea39cd697a9084205ddb805e344 /include/linux/if_tunnel.h | |
first commit
Diffstat (limited to 'include/linux/if_tunnel.h')
| -rw-r--r-- | include/linux/if_tunnel.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h new file mode 100644 index 000000000..f4e56ecd0 --- /dev/null +++ b/include/linux/if_tunnel.h @@ -0,0 +1,25 @@ +#ifndef _IF_TUNNEL_H_ +#define _IF_TUNNEL_H_ + +#include <linux/ip.h> +#include <linux/in6.h> +#include <uapi/linux/if_tunnel.h> +#include <linux/u64_stats_sync.h> + +/* + * Locking : hash tables are protected by RCU and RTNL + */ + +#define for_each_ip_tunnel_rcu(pos, start) \ + for (pos = rcu_dereference(start); pos; pos = rcu_dereference(pos->next)) + +/* often modified stats are per cpu, other are shared (netdev->stats) */ +struct pcpu_tstats { + u64 rx_packets; + u64 rx_bytes; + u64 tx_packets; + u64 tx_bytes; + struct u64_stats_sync syncp; +}; + +#endif /* _IF_TUNNEL_H_ */ |
