diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2023-02-12 23:26:32 +0100 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2023-02-13 11:21:23 +0100 |
commit | 71f91f08f45c1167743d55b2168a4d45c11c8eae (patch) | |
tree | f8dc5838497976f31cff85d740b9023e3f7d252d /src/xdp/common/xdp_stats_kern.h | |
parent | 7bacde871bb9c94d302251a54886ce2aac6f329e (diff) | |
download | vyos-1x-71f91f08f45c1167743d55b2168a4d45c11c8eae.tar.gz vyos-1x-71f91f08f45c1167743d55b2168a4d45c11c8eae.zip |
debian: T5003: Update XDP for latest libbpf
Diffstat (limited to 'src/xdp/common/xdp_stats_kern.h')
-rw-r--r-- | src/xdp/common/xdp_stats_kern.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/xdp/common/xdp_stats_kern.h b/src/xdp/common/xdp_stats_kern.h index 4e08551a0..c061a149d 100644 --- a/src/xdp/common/xdp_stats_kern.h +++ b/src/xdp/common/xdp_stats_kern.h @@ -13,12 +13,12 @@ #endif /* Keeps stats per (enum) xdp_action */ -struct bpf_map_def SEC("maps") xdp_stats_map = { - .type = BPF_MAP_TYPE_PERCPU_ARRAY, - .key_size = sizeof(__u32), - .value_size = sizeof(struct datarec), - .max_entries = XDP_ACTION_MAX, -}; +struct { + __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY); + __type(key, __u32); + __type(value, struct datarec); + __uint(max_entries, XDP_ACTION_MAX); +} xdp_stats_map SEC(".maps"); static __always_inline __u32 xdp_stats_record_action(struct xdp_md *ctx, __u32 action) |