summaryrefslogtreecommitdiffstats
path: root/samples/bpf/sockex3_user.c
diff options
context:
space:
mode:
authorPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>2018-09-20 09:52:03 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2018-09-21 22:51:16 +0200
commit32c009798385ce21080beaa87a9b95faad3acd1e (patch)
tree83b008305d7956948841b8acee1655a156a308b3 /samples/bpf/sockex3_user.c
parentflow_dissector: fix build failure without CONFIG_NET (diff)
downloadlinux-32c009798385ce21080beaa87a9b95faad3acd1e.tar.xz
linux-32c009798385ce21080beaa87a9b95faad3acd1e.zip
samples/bpf: fix compilation failure
following commit: commit d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") added struct bpf_flow_keys which conflicts with the struct with same name in sockex2_kern.c and sockex3_kern.c similar to commit: commit 534e0e52bc23 ("samples/bpf: fix a compilation failure") we tried the rename it "flow_keys" but it also conflicted with struct having same name in include/net/flow_dissector.h. Hence renaming the struct to "flow_key_record". Also, this commit doesn't fix the compilation error completely because the similar struct is present in sockex3_kern.c. Hence renaming it in both files sockex3_user.c and sockex3_kern.c Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'samples/bpf/sockex3_user.c')
-rw-r--r--samples/bpf/sockex3_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/bpf/sockex3_user.c b/samples/bpf/sockex3_user.c
index 22f74d0e1493..9d02e0404719 100644
--- a/samples/bpf/sockex3_user.c
+++ b/samples/bpf/sockex3_user.c
@@ -13,7 +13,7 @@
#define PARSE_IP_PROG_FD (prog_fd[0])
#define PROG_ARRAY_FD (map_fd[0])
-struct flow_keys {
+struct flow_key_record {
__be32 src;
__be32 dst;
union {
@@ -64,7 +64,7 @@ int main(int argc, char **argv)
(void) f;
for (i = 0; i < 5; i++) {
- struct flow_keys key = {}, next_key;
+ struct flow_key_record key = {}, next_key;
struct pair value;
sleep(1);