Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

xdp10.p4: counter support #27

Closed
williamtu opened this issue Feb 11, 2017 · 2 comments
Closed

xdp10.p4: counter support #27

williamtu opened this issue Feb 11, 2017 · 2 comments

Comments

@williamtu
Copy link
Contributor

add xdp10.p4, compile and there are missing definitions for

clang \
	-D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \
	-Wno-compare-distinct-pointer-types \
	-Wno-gnu-variable-sized-type-not-at-end \
	-Wno-tautological-compare \
	-O2 -emit-llvm -g -c xdp10.c -o -| llc -march=bpf -filetype=obj -o xdp10.o
xdp10.c:173:21: error: use of undeclared identifier 'counters_value'
                    counters_value *value;
                    ^
xdp10.c:173:37: error: use of undeclared identifier 'value'
                    counters_value *value;

adding the following in xdp10.h solves the problem

typedef u32 counters_value;
typedef u32 counters_key;
@mihaibudiu
Copy link
Contributor

This issue should be solved.

@williamtu
Copy link
Contributor Author

looks good, thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants