projects
/
flowspec-xdp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Less effecient, but much, much less naive rate-limiter
[flowspec-xdp]
/
xdp.c
diff --git
a/xdp.c
b/xdp.c
index d9aa0766f75efdec39aecb191c4a176d2ce1d862..8003b89e0066b4311fd8eb482a922718914166e4 100644
(file)
--- a/
xdp.c
+++ b/
xdp.c
@@
-165,8
+165,8
@@
struct bpf_map_def SEC("maps") drop_cnt_map = {
#ifdef RATE_CNT
struct ratelimit {
struct bpf_spin_lock lock;
-
uint64_t bucket_sec
s;
-
uint64_t bucket_count
;
+
int64_t sent_byte
s;
+
int64_t sent_time
;
};
struct {
__uint(type, BPF_MAP_TYPE_ARRAY);