1# SPDX-License-Identifier: GPL-2.0
2# Makefile for net selftests
3
4CFLAGS =  -Wall -Wl,--no-as-needed -O2 -g
5CFLAGS += -I../../../../usr/include/ $(KHDR_INCLUDES)
6
7TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh \
8	      rtnetlink.sh xfrm_policy.sh test_blackhole_dev.sh
9TEST_PROGS += fib_tests.sh fib-onlink-tests.sh pmtu.sh udpgso.sh ip_defrag.sh
10TEST_PROGS += udpgso_bench.sh fib_rule_tests.sh msg_zerocopy.sh psock_snd.sh
11TEST_PROGS += udpgro_bench.sh udpgro.sh test_vxlan_under_vrf.sh reuseport_addr_any.sh
12TEST_PROGS += test_vxlan_fdb_changelink.sh so_txtime.sh ipv6_flowlabel.sh
13TEST_PROGS += tcp_fastopen_backup_key.sh fcnal-test.sh l2tp.sh traceroute.sh
14TEST_PROGS += fin_ack_lat.sh fib_nexthop_multiprefix.sh fib_nexthops.sh fib_nexthop_nongw.sh
15TEST_PROGS += altnames.sh icmp.sh icmp_redirect.sh ip6_gre_headroom.sh
16TEST_PROGS += route_localnet.sh
17TEST_PROGS += reuseaddr_ports_exhausted.sh
18TEST_PROGS += txtimestamp.sh
19TEST_PROGS += vrf-xfrm-tests.sh
20TEST_PROGS += rxtimestamp.sh
21TEST_PROGS += devlink_port_split.py
22TEST_PROGS += drop_monitor_tests.sh
23TEST_PROGS += vrf_route_leaking.sh
24TEST_PROGS += bareudp.sh
25TEST_PROGS += amt.sh
26TEST_PROGS += unicast_extensions.sh
27TEST_PROGS += udpgro_fwd.sh
28TEST_PROGS += udpgro_frglist.sh
29TEST_PROGS += veth.sh
30TEST_PROGS += ioam6.sh
31TEST_PROGS += gro.sh
32TEST_PROGS += gre_gso.sh
33TEST_PROGS += cmsg_so_mark.sh
34TEST_PROGS += cmsg_time.sh cmsg_ipv6.sh
35TEST_PROGS += srv6_end_dt46_l3vpn_test.sh
36TEST_PROGS += srv6_end_dt4_l3vpn_test.sh
37TEST_PROGS += srv6_end_dt6_l3vpn_test.sh
38TEST_PROGS += srv6_hencap_red_l3vpn_test.sh
39TEST_PROGS += srv6_hl2encap_red_l2vpn_test.sh
40TEST_PROGS += srv6_end_next_csid_l3vpn_test.sh
41TEST_PROGS += vrf_strict_mode_test.sh
42TEST_PROGS += arp_ndisc_evict_nocarrier.sh
43TEST_PROGS += ndisc_unsolicited_na_test.sh
44TEST_PROGS += arp_ndisc_untracked_subnets.sh
45TEST_PROGS += stress_reuseport_listen.sh
46TEST_PROGS += l2_tos_ttl_inherit.sh
47TEST_PROGS += bind_bhash.sh
48TEST_PROGS_EXTENDED := in_netns.sh setup_loopback.sh setup_veth.sh
49TEST_PROGS_EXTENDED += toeplitz_client.sh toeplitz.sh
50TEST_GEN_FILES =  socket nettest
51TEST_GEN_FILES += psock_fanout psock_tpacket msg_zerocopy reuseport_addr_any
52TEST_GEN_FILES += tcp_mmap tcp_inq psock_snd txring_overwrite
53TEST_GEN_FILES += udpgso udpgso_bench_tx udpgso_bench_rx ip_defrag
54TEST_GEN_FILES += so_txtime ipv6_flowlabel ipv6_flowlabel_mgr so_netns_cookie
55TEST_GEN_FILES += tcp_fastopen_backup_key
56TEST_GEN_FILES += fin_ack_lat
57TEST_GEN_FILES += reuseaddr_ports_exhausted
58TEST_GEN_FILES += hwtstamp_config rxtimestamp timestamping txtimestamp
59TEST_GEN_FILES += ipsec
60TEST_GEN_FILES += ioam6_parser
61TEST_GEN_FILES += gro
62TEST_GEN_PROGS = reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa
63TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict tls tun tap
64TEST_GEN_FILES += toeplitz
65TEST_GEN_FILES += cmsg_sender
66TEST_GEN_FILES += stress_reuseport_listen
67TEST_PROGS += test_vxlan_vnifiltering.sh
68TEST_GEN_FILES += io_uring_zerocopy_tx
69TEST_PROGS += io_uring_zerocopy_tx.sh
70TEST_GEN_FILES += bind_bhash
71TEST_GEN_PROGS += sk_bind_sendto_listen
72TEST_GEN_PROGS += sk_connect_zero_addr
73
74TEST_FILES := settings
75
76include ../lib.mk
77
78include bpf/Makefile
79
80$(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma
81$(OUTPUT)/tcp_mmap: LDLIBS += -lpthread
82$(OUTPUT)/tcp_inq: LDLIBS += -lpthread
83$(OUTPUT)/bind_bhash: LDLIBS += -lpthread
84