Improve generic code.

This commit is contained in:
Christian Deacon
2025-02-22 21:31:45 -05:00
parent 2a1dbc6626
commit 1f1c76854b
2 changed files with 15 additions and 16 deletions

View File

@@ -10,7 +10,7 @@ struct
__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
__uint(max_entries, MAX_FILTERS);
__type(key, u32);
__type(value, struct filter);
__type(value, filter_t);
} filters_map SEC(".maps");
struct
@@ -18,7 +18,7 @@ struct
__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
__uint(max_entries, 1);
__type(key, u32);
__type(value, struct stats);
__type(value, stats_t);
} stats_map SEC(".maps");
struct
@@ -26,11 +26,11 @@ struct
__uint(type, BPF_MAP_TYPE_LRU_HASH);
__uint(max_entries, MAX_TRACK_IPS);
#ifdef USE_FLOW_RL
__type(key, struct flow);
__type(key, flow_t);
#else
__type(key, u32);
#endif
__type(value, struct ip_stats);
__type(value, ip_stats_t);
} ip_stats_map SEC(".maps");
struct
@@ -46,11 +46,11 @@ struct
__uint(type, BPF_MAP_TYPE_LRU_HASH);
__uint(max_entries, MAX_TRACK_IPS);
#ifdef USE_FLOW_RL
__type(key, struct flow6);
__type(key, flow6_t);
#else
__type(key, u128);
#endif
__type(value, struct ip_stats);
__type(value, ip_stats_t);
} ip6_stats_map SEC(".maps");
struct