1 # SPDX-License-Identifier: GPL-2.0 1 # SPDX-License-Identifier: GPL-2.0 2 # Makefile for net selftests 2 # Makefile for net selftests 3 3 4 CFLAGS += -Wall -Wl,--no-as-needed -O2 -g 4 CFLAGS += -Wall -Wl,--no-as-needed -O2 -g 5 CFLAGS += -I../../../../usr/include/ $(KHDR_IN 5 CFLAGS += -I../../../../usr/include/ $(KHDR_INCLUDES) 6 # Additional include paths needed by kselftest 6 # Additional include paths needed by kselftest.h 7 CFLAGS += -I../ 7 CFLAGS += -I../ 8 8 9 TEST_PROGS := run_netsocktests run_afpackettes 9 TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh \ 10 rtnetlink.sh xfrm_policy.sh test 10 rtnetlink.sh xfrm_policy.sh test_blackhole_dev.sh 11 TEST_PROGS += fib_tests.sh fib-onlink-tests.sh 11 TEST_PROGS += fib_tests.sh fib-onlink-tests.sh pmtu.sh udpgso.sh ip_defrag.sh 12 TEST_PROGS += udpgso_bench.sh fib_rule_tests.s 12 TEST_PROGS += udpgso_bench.sh fib_rule_tests.sh msg_zerocopy.sh psock_snd.sh 13 TEST_PROGS += udpgro_bench.sh udpgro.sh test_v 13 TEST_PROGS += udpgro_bench.sh udpgro.sh test_vxlan_under_vrf.sh reuseport_addr_any.sh 14 TEST_PROGS += test_vxlan_fdb_changelink.sh so_ 14 TEST_PROGS += test_vxlan_fdb_changelink.sh so_txtime.sh ipv6_flowlabel.sh 15 TEST_PROGS += tcp_fastopen_backup_key.sh fcnal 15 TEST_PROGS += tcp_fastopen_backup_key.sh fcnal-test.sh l2tp.sh traceroute.sh 16 TEST_PROGS += fin_ack_lat.sh fib_nexthop_multi 16 TEST_PROGS += fin_ack_lat.sh fib_nexthop_multiprefix.sh fib_nexthops.sh fib_nexthop_nongw.sh 17 TEST_PROGS += altnames.sh icmp.sh icmp_redirec 17 TEST_PROGS += altnames.sh icmp.sh icmp_redirect.sh ip6_gre_headroom.sh 18 TEST_PROGS += route_localnet.sh 18 TEST_PROGS += route_localnet.sh 19 TEST_PROGS += reuseaddr_ports_exhausted.sh 19 TEST_PROGS += reuseaddr_ports_exhausted.sh 20 TEST_PROGS += txtimestamp.sh 20 TEST_PROGS += txtimestamp.sh 21 TEST_PROGS += vrf-xfrm-tests.sh 21 TEST_PROGS += vrf-xfrm-tests.sh 22 TEST_PROGS += rxtimestamp.sh 22 TEST_PROGS += rxtimestamp.sh 23 TEST_PROGS += drop_monitor_tests.sh 23 TEST_PROGS += drop_monitor_tests.sh 24 TEST_PROGS += vrf_route_leaking.sh 24 TEST_PROGS += vrf_route_leaking.sh 25 TEST_PROGS += bareudp.sh 25 TEST_PROGS += bareudp.sh 26 TEST_PROGS += amt.sh 26 TEST_PROGS += amt.sh 27 TEST_PROGS += unicast_extensions.sh 27 TEST_PROGS += unicast_extensions.sh 28 TEST_PROGS += udpgro_fwd.sh 28 TEST_PROGS += udpgro_fwd.sh 29 TEST_PROGS += udpgro_frglist.sh 29 TEST_PROGS += udpgro_frglist.sh 30 TEST_PROGS += veth.sh 30 TEST_PROGS += veth.sh 31 TEST_PROGS += ioam6.sh 31 TEST_PROGS += ioam6.sh 32 TEST_PROGS += gro.sh 32 TEST_PROGS += gro.sh 33 TEST_PROGS += gre_gso.sh 33 TEST_PROGS += gre_gso.sh 34 TEST_PROGS += cmsg_so_mark.sh 34 TEST_PROGS += cmsg_so_mark.sh 35 TEST_PROGS += cmsg_time.sh cmsg_ipv6.sh 35 TEST_PROGS += cmsg_time.sh cmsg_ipv6.sh 36 TEST_PROGS += netns-name.sh 36 TEST_PROGS += netns-name.sh 37 TEST_PROGS += nl_netdev.py 37 TEST_PROGS += nl_netdev.py 38 TEST_PROGS += srv6_end_dt46_l3vpn_test.sh 38 TEST_PROGS += srv6_end_dt46_l3vpn_test.sh 39 TEST_PROGS += srv6_end_dt4_l3vpn_test.sh 39 TEST_PROGS += srv6_end_dt4_l3vpn_test.sh 40 TEST_PROGS += srv6_end_dt6_l3vpn_test.sh 40 TEST_PROGS += srv6_end_dt6_l3vpn_test.sh 41 TEST_PROGS += srv6_hencap_red_l3vpn_test.sh 41 TEST_PROGS += srv6_hencap_red_l3vpn_test.sh 42 TEST_PROGS += srv6_hl2encap_red_l2vpn_test.sh 42 TEST_PROGS += srv6_hl2encap_red_l2vpn_test.sh 43 TEST_PROGS += srv6_end_next_csid_l3vpn_test.sh 43 TEST_PROGS += srv6_end_next_csid_l3vpn_test.sh 44 TEST_PROGS += srv6_end_x_next_csid_l3vpn_test. 44 TEST_PROGS += srv6_end_x_next_csid_l3vpn_test.sh 45 TEST_PROGS += srv6_end_flavors_test.sh 45 TEST_PROGS += srv6_end_flavors_test.sh 46 TEST_PROGS += srv6_end_dx4_netfilter_test.sh 46 TEST_PROGS += srv6_end_dx4_netfilter_test.sh 47 TEST_PROGS += srv6_end_dx6_netfilter_test.sh 47 TEST_PROGS += srv6_end_dx6_netfilter_test.sh 48 TEST_PROGS += vrf_strict_mode_test.sh 48 TEST_PROGS += vrf_strict_mode_test.sh 49 TEST_PROGS += arp_ndisc_evict_nocarrier.sh 49 TEST_PROGS += arp_ndisc_evict_nocarrier.sh 50 TEST_PROGS += ndisc_unsolicited_na_test.sh 50 TEST_PROGS += ndisc_unsolicited_na_test.sh 51 TEST_PROGS += arp_ndisc_untracked_subnets.sh 51 TEST_PROGS += arp_ndisc_untracked_subnets.sh 52 TEST_PROGS += stress_reuseport_listen.sh 52 TEST_PROGS += stress_reuseport_listen.sh 53 TEST_PROGS += l2_tos_ttl_inherit.sh 53 TEST_PROGS += l2_tos_ttl_inherit.sh 54 TEST_PROGS += bind_bhash.sh 54 TEST_PROGS += bind_bhash.sh 55 TEST_PROGS += ip_local_port_range.sh 55 TEST_PROGS += ip_local_port_range.sh 56 TEST_PROGS += rps_default_mask.sh 56 TEST_PROGS += rps_default_mask.sh 57 TEST_PROGS += big_tcp.sh 57 TEST_PROGS += big_tcp.sh 58 TEST_PROGS += netns-sysctl.sh 58 TEST_PROGS += netns-sysctl.sh 59 TEST_PROGS_EXTENDED := toeplitz_client.sh toep 59 TEST_PROGS_EXTENDED := toeplitz_client.sh toeplitz.sh xfrm_policy_add_speed.sh 60 TEST_GEN_FILES = socket nettest 60 TEST_GEN_FILES = socket nettest 61 TEST_GEN_FILES += psock_fanout psock_tpacket m 61 TEST_GEN_FILES += psock_fanout psock_tpacket msg_zerocopy reuseport_addr_any 62 TEST_GEN_FILES += tcp_mmap tcp_inq psock_snd t 62 TEST_GEN_FILES += tcp_mmap tcp_inq psock_snd txring_overwrite 63 TEST_GEN_FILES += udpgso udpgso_bench_tx udpgs 63 TEST_GEN_FILES += udpgso udpgso_bench_tx udpgso_bench_rx ip_defrag 64 TEST_GEN_FILES += so_txtime ipv6_flowlabel ipv 64 TEST_GEN_FILES += so_txtime ipv6_flowlabel ipv6_flowlabel_mgr so_netns_cookie 65 TEST_GEN_FILES += tcp_fastopen_backup_key 65 TEST_GEN_FILES += tcp_fastopen_backup_key 66 TEST_GEN_FILES += fin_ack_lat 66 TEST_GEN_FILES += fin_ack_lat 67 TEST_GEN_FILES += reuseaddr_ports_exhausted 67 TEST_GEN_FILES += reuseaddr_ports_exhausted 68 TEST_GEN_FILES += hwtstamp_config rxtimestamp 68 TEST_GEN_FILES += hwtstamp_config rxtimestamp timestamping txtimestamp 69 TEST_GEN_FILES += ipsec 69 TEST_GEN_FILES += ipsec 70 TEST_GEN_FILES += ioam6_parser 70 TEST_GEN_FILES += ioam6_parser 71 TEST_GEN_FILES += gro 71 TEST_GEN_FILES += gro 72 TEST_GEN_PROGS = reuseport_bpf reuseport_bpf_c 72 TEST_GEN_PROGS = reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa 73 TEST_GEN_PROGS += reuseport_dualstack reuseadd 73 TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict tls tun tap epoll_busy_poll 74 TEST_GEN_FILES += toeplitz 74 TEST_GEN_FILES += toeplitz 75 TEST_GEN_FILES += cmsg_sender 75 TEST_GEN_FILES += cmsg_sender 76 TEST_GEN_FILES += stress_reuseport_listen 76 TEST_GEN_FILES += stress_reuseport_listen 77 TEST_PROGS += test_vxlan_vnifiltering.sh 77 TEST_PROGS += test_vxlan_vnifiltering.sh 78 TEST_GEN_FILES += io_uring_zerocopy_tx 78 TEST_GEN_FILES += io_uring_zerocopy_tx 79 TEST_PROGS += io_uring_zerocopy_tx.sh 79 TEST_PROGS += io_uring_zerocopy_tx.sh 80 TEST_GEN_FILES += bind_bhash 80 TEST_GEN_FILES += bind_bhash 81 TEST_GEN_PROGS += sk_bind_sendto_listen 81 TEST_GEN_PROGS += sk_bind_sendto_listen 82 TEST_GEN_PROGS += sk_connect_zero_addr 82 TEST_GEN_PROGS += sk_connect_zero_addr 83 TEST_GEN_PROGS += sk_so_peek_off 83 TEST_GEN_PROGS += sk_so_peek_off 84 TEST_PROGS += test_ingress_egress_chaining.sh 84 TEST_PROGS += test_ingress_egress_chaining.sh 85 TEST_GEN_PROGS += so_incoming_cpu 85 TEST_GEN_PROGS += so_incoming_cpu 86 TEST_PROGS += sctp_vrf.sh 86 TEST_PROGS += sctp_vrf.sh 87 TEST_GEN_FILES += sctp_hello 87 TEST_GEN_FILES += sctp_hello 88 TEST_GEN_FILES += ip_local_port_range 88 TEST_GEN_FILES += ip_local_port_range 89 TEST_GEN_PROGS += bind_wildcard 89 TEST_GEN_PROGS += bind_wildcard 90 TEST_GEN_PROGS += bind_timewait 90 TEST_GEN_PROGS += bind_timewait 91 TEST_PROGS += test_vxlan_mdb.sh 91 TEST_PROGS += test_vxlan_mdb.sh 92 TEST_PROGS += test_bridge_neigh_suppress.sh 92 TEST_PROGS += test_bridge_neigh_suppress.sh 93 TEST_PROGS += test_vxlan_nolocalbypass.sh 93 TEST_PROGS += test_vxlan_nolocalbypass.sh 94 TEST_PROGS += test_bridge_backup_port.sh 94 TEST_PROGS += test_bridge_backup_port.sh 95 TEST_PROGS += fdb_flush.sh 95 TEST_PROGS += fdb_flush.sh 96 TEST_PROGS += fq_band_pktlimit.sh 96 TEST_PROGS += fq_band_pktlimit.sh 97 TEST_PROGS += vlan_hw_filter.sh 97 TEST_PROGS += vlan_hw_filter.sh 98 TEST_PROGS += bpf_offload.py 98 TEST_PROGS += bpf_offload.py 99 99 100 # YNL files, must be before "include ..lib.mk" 100 # YNL files, must be before "include ..lib.mk" 101 EXTRA_CLEAN += $(OUTPUT)/libynl.a 101 EXTRA_CLEAN += $(OUTPUT)/libynl.a 102 YNL_GEN_FILES := ncdevmem 102 YNL_GEN_FILES := ncdevmem 103 TEST_GEN_FILES += $(YNL_GEN_FILES) 103 TEST_GEN_FILES += $(YNL_GEN_FILES) 104 104 105 TEST_FILES := settings 105 TEST_FILES := settings 106 TEST_FILES += in_netns.sh lib.sh net_helper.sh 106 TEST_FILES += in_netns.sh lib.sh net_helper.sh setup_loopback.sh setup_veth.sh 107 107 108 TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcar 108 TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c)) 109 109 110 TEST_INCLUDES := forwarding/lib.sh 110 TEST_INCLUDES := forwarding/lib.sh 111 111 112 include ../lib.mk 112 include ../lib.mk 113 113 114 # YNL build 114 # YNL build 115 YNL_GENS := netdev 115 YNL_GENS := netdev 116 include ynl.mk 116 include ynl.mk 117 117 118 $(OUTPUT)/epoll_busy_poll: LDLIBS += -lcap 118 $(OUTPUT)/epoll_busy_poll: LDLIBS += -lcap 119 $(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma 119 $(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma 120 $(OUTPUT)/tcp_mmap: LDLIBS += -lpthread -lcryp 120 $(OUTPUT)/tcp_mmap: LDLIBS += -lpthread -lcrypto 121 $(OUTPUT)/tcp_inq: LDLIBS += -lpthread 121 $(OUTPUT)/tcp_inq: LDLIBS += -lpthread 122 $(OUTPUT)/bind_bhash: LDLIBS += -lpthread 122 $(OUTPUT)/bind_bhash: LDLIBS += -lpthread 123 $(OUTPUT)/io_uring_zerocopy_tx: CFLAGS += -I.. 123 $(OUTPUT)/io_uring_zerocopy_tx: CFLAGS += -I../../../include/ 124 124 125 include bpf.mk 125 include bpf.mk
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.