From: Felix Fietkau Date: Wed, 26 Jan 2022 14:02:17 +0000 (+0100) Subject: bpf: declare tcp_ports/udp_ports without typedef X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=580d2ccf89f3431efefaec5d2dd58522f6e6d2e3;p=project%2Fqosify.git bpf: declare tcp_ports/udp_ports without typedef Improve compatibility with different versions of LLVM Signed-off-by: Felix Fietkau --- diff --git a/qosify-bpf.c b/qosify-bpf.c index a0635ec..0bddddf 100644 --- a/qosify-bpf.c +++ b/qosify-bpf.c @@ -44,13 +44,21 @@ struct { __uint(max_entries, 1); } config SEC(".maps"); -typedef struct { +struct { __uint(type, BPF_MAP_TYPE_ARRAY); __uint(pinning, 1); __type(key, __u32); __type(value, __u8); __uint(max_entries, 1 << 16); -} port_array_t; +} tcp_ports SEC(".maps"); + +struct { + __uint(type, BPF_MAP_TYPE_ARRAY); + __uint(pinning, 1); + __type(key, __u32); + __type(value, __u8); + __uint(max_entries, 1 << 16); +} udp_ports SEC(".maps"); struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); @@ -60,9 +68,6 @@ struct { __uint(max_entries, QOSIFY_FLOW_BUCKETS); } flow_map SEC(".maps"); -port_array_t tcp_ports SEC(".maps"); -port_array_t udp_ports SEC(".maps"); - struct { __uint(type, BPF_MAP_TYPE_HASH); __uint(pinning, 1);