*value += 1; \
}
+#ifdef RATE_CNT
+struct ratelimit {
+ struct bpf_spin_lock lock;
+ int64_t sent_bytes;
+ int64_t sent_time;
+};
+struct {
+ __uint(type, BPF_MAP_TYPE_ARRAY);
+ __uint(max_entries, RATE_CNT);
+ __u32 *key;
+ struct ratelimit *value;
+} rate_map SEC(".maps");
+#endif
+
SEC("xdp_drop")
#endif
int xdp_drop_prog(struct xdp_md *ctx)