]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Selftests build error in sockmap_basic.c
authorJohn Fastabend <john.fastabend@gmail.com>
Mon, 10 Feb 2020 05:44:37 +0000 (21:44 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 10 Feb 2020 22:31:34 +0000 (14:31 -0800)
commit7b6382ad17412dd22ab1fa59d23eee89d2dd5307
tree39099947299f0470ebd3956272876fcf0db022c2
parenta990b51d311b582db8fef164a11361af8fb94ee0
bpf: Selftests build error in sockmap_basic.c

Fix following build error. We could push a tcp.h header into one of the
include paths, but I think its easy enough to simply pull in the three
defines we need here. If we end up using more of tcp.h at some point
we can pull it in later.

/home/john/git/bpf/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c: In function ‘connected_socket_v4’:
/home/john/git/bpf/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c:20:11: error: ‘TCP_REPAIR_ON’ undeclared (first use in this function)
  repair = TCP_REPAIR_ON;
           ^
/home/john/git/bpf/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c:20:11: note: each undeclared identifier is reported only once for each function it appears in
/home/john/git/bpf/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c:29:11: error: ‘TCP_REPAIR_OFF_NO_WP’ undeclared (first use in this function)
  repair = TCP_REPAIR_OFF_NO_WP;

Then with fix,

$ ./test_progs -n 44
#44/1 sockmap create_update_free:OK
#44/2 sockhash create_update_free:OK
#44 sockmap_basic:OK

Fixes: 0c9595b540ac3 ("selftests/bpf: Test freeing sockmap/sockhash with a socket in it")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Link: https://lore.kernel.org/bpf/158131347731.21414.12120493483848386652.stgit@john-Precision-5820-Tower
tools/testing/selftests/bpf/prog_tests/sockmap_basic.c