diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-12-18 17:13:13 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-12-19 21:56:19 +0100 |
commit | b5c80d310527223b93e4133ac2f4c8c063c70a98 (patch) | |
tree | 48ae9e2752b4b94c07f767a019c99a8c2460c014 /src/xdp/common/xdp_stats_kern_user.h | |
parent | 22308b05dfbcd8da0230bbd8ba3bbc2a55da7786 (diff) | |
download | vyos-1x-b5c80d310527223b93e4133ac2f4c8c063c70a98.tar.gz vyos-1x-b5c80d310527223b93e4133ac2f4c8c063c70a98.zip |
xdp: T2666: switch to example code provided by xdp-tutorial
Diffstat (limited to 'src/xdp/common/xdp_stats_kern_user.h')
-rw-r--r-- | src/xdp/common/xdp_stats_kern_user.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/xdp/common/xdp_stats_kern_user.h b/src/xdp/common/xdp_stats_kern_user.h new file mode 100644 index 000000000..d7b8d05e6 --- /dev/null +++ b/src/xdp/common/xdp_stats_kern_user.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +/* Used by BPF-prog kernel side BPF-progs and userspace programs, + * for sharing xdp_stats common struct and DEFINEs. + */ +#ifndef __XDP_STATS_KERN_USER_H +#define __XDP_STATS_KERN_USER_H + +/* This is the data record stored in the map */ +struct datarec { + __u64 rx_packets; + __u64 rx_bytes; +}; + +#ifndef XDP_ACTION_MAX +#define XDP_ACTION_MAX (XDP_REDIRECT + 1) +#endif + +#endif /* __XDP_STATS_KERN_USER_H */ |