projects
/
flowspec-xdp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check in siphash
[flowspec-xdp]
/
xdp.c
diff --git
a/xdp.c
b/xdp.c
index 87544ba80c16578cb548db9491fb5bc655dde178..1344acd1aac2558494ad47b58b0ed89caca74f07 100644
(file)
--- a/
xdp.c
+++ b/
xdp.c
@@
-7,7
+7,7
@@
#include <linux/icmpv6.h>
#include <arpa/inet.h>
#include <linux/icmpv6.h>
#include <arpa/inet.h>
-#
define NULL (void*)0
+#
include "siphash.h"
/* IP flags. */
#define IP_CE 0x8000 /* Flag: "Congestion" */
/* IP flags. */
#define IP_CE 0x8000 /* Flag: "Congestion" */
@@
-175,10
+175,7
@@
struct {
#ifdef RATE_CNT
struct ratelimit {
struct bpf_spin_lock lock;
#ifdef RATE_CNT
struct ratelimit {
struct bpf_spin_lock lock;
- union {
- int64_t sent_bytes;
- int64_t sent_packets;
- } rate;
+ int64_t sent_rate;
int64_t sent_time;
};
struct {
int64_t sent_time;
};
struct {
@@
-194,10
+191,7
@@
struct {
// map_check_btf as of Linux 5.10).
// This isn't exactly accurate, but at least its faster.
struct percpu_ratelimit {
// map_check_btf as of Linux 5.10).
// This isn't exactly accurate, but at least its faster.
struct percpu_ratelimit {
- union {
- int64_t sent_bytes;
- int64_t sent_packets;
- } rate;
+ int64_t sent_rate;
int64_t sent_time;
};
int64_t sent_time;
};