| .. | .. |
|---|
| 16 | 16 | #include <linux/if_vlan.h> |
|---|
| 17 | 17 | #include <linux/ip.h> |
|---|
| 18 | 18 | #include <linux/ipv6.h> |
|---|
| 19 | | -#include "bpf_helpers.h" |
|---|
| 19 | +#include <bpf/bpf_helpers.h> |
|---|
| 20 | 20 | #include "xdp_tx_iptunnel_common.h" |
|---|
| 21 | 21 | |
|---|
| 22 | | -struct bpf_map_def SEC("maps") rxcnt = { |
|---|
| 23 | | - .type = BPF_MAP_TYPE_PERCPU_ARRAY, |
|---|
| 24 | | - .key_size = sizeof(__u32), |
|---|
| 25 | | - .value_size = sizeof(__u64), |
|---|
| 26 | | - .max_entries = 256, |
|---|
| 27 | | -}; |
|---|
| 22 | +struct { |
|---|
| 23 | + __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY); |
|---|
| 24 | + __type(key, __u32); |
|---|
| 25 | + __type(value, __u64); |
|---|
| 26 | + __uint(max_entries, 256); |
|---|
| 27 | +} rxcnt SEC(".maps"); |
|---|
| 28 | 28 | |
|---|
| 29 | | -struct bpf_map_def SEC("maps") vip2tnl = { |
|---|
| 30 | | - .type = BPF_MAP_TYPE_HASH, |
|---|
| 31 | | - .key_size = sizeof(struct vip), |
|---|
| 32 | | - .value_size = sizeof(struct iptnl_info), |
|---|
| 33 | | - .max_entries = MAX_IPTNL_ENTRIES, |
|---|
| 34 | | -}; |
|---|
| 29 | +struct { |
|---|
| 30 | + __uint(type, BPF_MAP_TYPE_HASH); |
|---|
| 31 | + __type(key, struct vip); |
|---|
| 32 | + __type(value, struct iptnl_info); |
|---|
| 33 | + __uint(max_entries, MAX_IPTNL_ENTRIES); |
|---|
| 34 | +} vip2tnl SEC(".maps"); |
|---|
| 35 | 35 | |
|---|
| 36 | 36 | static __always_inline void count_tx(u32 protocol) |
|---|
| 37 | 37 | { |
|---|