linux_dsm_epyc7002/tools/testing/selftests/bpf/progs
Wang YanQing 5de35e3ae9 selftests/bpf: fix compile errors due to unsync linux/in6.h and netinet/in.h
I meet below compile errors:
"
In file included from test_tcpnotify_kern.c:12:
/usr/include/netinet/in.h:101:5: error: expected identifier
    IPPROTO_HOPOPTS = 0,   /* IPv6 Hop-by-Hop options.  */
    ^
/usr/include/linux/in6.h:131:26: note: expanded from macro 'IPPROTO_HOPOPTS'
                                ^
In file included from test_tcpnotify_kern.c:12:
/usr/include/netinet/in.h:103:5: error: expected identifier
    IPPROTO_ROUTING = 43,  /* IPv6 routing header.  */
    ^
/usr/include/linux/in6.h:132:26: note: expanded from macro 'IPPROTO_ROUTING'
                                ^
In file included from test_tcpnotify_kern.c:12:
/usr/include/netinet/in.h:105:5: error: expected identifier
    IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header.  */
    ^
/usr/include/linux/in6.h:133:26: note: expanded from macro 'IPPROTO_FRAGMENT'
"
The same compile errors are reported for test_tcpbpf_kern.c too.

My environment:
lsb_release -a:
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:        16.04
Codename:       xenial

dpkg -l | grep libc-dev:
ii  libc-dev-bin              2.23-0ubuntu11           amd64        GNU C Library: Development binaries
ii  linux-libc-dev:amd64      4.4.0-145.171            amd64        Linux Kernel Headers for development.

The reason is linux/in6.h and netinet/in.h aren't synchronous about how to
handle the same definitions, IPPROTO_HOPOPTS, etc.

This patch fixes the compile errors by moving <netinet/in.h> to before the
<linux/*.h>.

Signed-off-by: Wang YanQing <udknight@gmail.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2019-04-18 16:08:40 -07:00
..
bpf_flow.c net/flow_dissector: pass flow_keys->n_proto to BPF programs 2019-04-03 16:49:48 +02:00
connect4_prog.c
connect6_prog.c
dev_cgroup.c
get_cgroup_id_kern.c
netcnt_prog.c
sample_map_ret0.c
sample_ret0.c
sendmsg4_prog.c
sendmsg6_prog.c
socket_cookie_prog.c
sockmap_parse_prog.c
sockmap_tcp_msg_prog.c
sockmap_verdict_prog.c
test_adjust_tail.c
test_btf_haskv.c
test_btf_nokv.c
test_get_stack_rawtp.c
test_global_data.c bpf, selftest: test global data/bss/rodata sections 2019-04-09 17:05:47 -07:00
test_jhash.h selftests/bpf: add few verifier scale tests 2019-04-04 01:27:38 +02:00
test_l4lb_noinline.c
test_l4lb.c
test_lirc_mode2_kern.c
test_lwt_ip_encap.c
test_lwt_seg6local.c
test_map_in_map.c tools/bpf: selftests: add map lookup to test_map_in_map bpf prog 2019-02-27 17:03:13 -08:00
test_map_lock.c
test_obj_id.c
test_pkt_access.c
test_pkt_md_access.c
test_queue_map.c
test_select_reuseport_kern.c
test_sk_lookup_kern.c
test_skb_cgroup_id_kern.c
test_skb_ctx.c selftests: bpf: add selftest for __sk_buff context in BPF_PROG_TEST_RUN 2019-04-11 10:21:41 +02:00
test_sock_fields_kern.c bpf: Add an example for bpf_get_listener_sock 2019-03-13 12:04:35 -07:00
test_sockhash_kern.c
test_sockmap_kern.c
test_spin_lock.c
test_stack_map.c
test_stacktrace_build_id.c
test_stacktrace_map.c
test_sysctl_prog.c selftests/bpf: C based test for sysctl and strtoX 2019-04-12 13:54:59 -07:00
test_tc_edt.c selftests: bpf: tc-bpf flow shaping with EDT 2019-03-22 18:16:44 -07:00
test_tc_tunnel.c selftests/bpf: bring back (void *) cast to set_ipv4_csum in test_tc_tunnel 2019-04-16 09:51:48 +02:00
test_tcp_check_syncookie_kern.c selftests/bpf: add tests for bpf_tcp_check_syncookie and bpf_skc_lookup_tcp 2019-03-21 18:59:11 -07:00
test_tcp_estats.c
test_tcpbpf_kern.c selftests/bpf: fix compile errors due to unsync linux/in6.h and netinet/in.h 2019-04-18 16:08:40 -07:00
test_tcpnotify_kern.c selftests/bpf: fix compile errors due to unsync linux/in6.h and netinet/in.h 2019-04-18 16:08:40 -07:00
test_tracepoint.c
test_tunnel_kern.c
test_verif_scale1.c selftests/bpf: add few verifier scale tests 2019-04-04 01:27:38 +02:00
test_verif_scale2.c selftests/bpf: add few verifier scale tests 2019-04-04 01:27:38 +02:00
test_verif_scale3.c selftests/bpf: add few verifier scale tests 2019-04-04 01:27:38 +02:00
test_xdp_meta.c
test_xdp_noinline.c
test_xdp_redirect.c
test_xdp_vlan.c
test_xdp.c
xdp_dummy.c