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# Additional include paths needed by kselftest.h 7CFLAGS += -I../ 8 9TEST_PROGS := \ 10 altnames.sh \ 11 amt.sh \ 12 arp_ndisc_evict_nocarrier.sh \ 13 arp_ndisc_untracked_subnets.sh \ 14 bareudp.sh \ 15 big_tcp.sh \ 16 bind_bhash.sh \ 17 bpf_offload.py \ 18 bridge_vlan_dump.sh \ 19 broadcast_ether_dst.sh \ 20 broadcast_pmtu.sh \ 21 busy_poll_test.sh \ 22 cmsg_ip.sh \ 23 cmsg_so_mark.sh \ 24 cmsg_so_priority.sh \ 25 cmsg_time.sh \ 26 double_udp_encap.sh \ 27 drop_monitor_tests.sh \ 28 fcnal-ipv4.sh \ 29 fcnal-ipv6.sh \ 30 fcnal-other.sh \ 31 fdb_flush.sh \ 32 fdb_notify.sh \ 33 fib-onlink-tests.sh \ 34 fib_nexthop_multiprefix.sh \ 35 fib_nexthop_nongw.sh \ 36 fib_nexthops.sh \ 37 fib_rule_tests.sh \ 38 fib_tests.sh \ 39 fin_ack_lat.sh \ 40 fq_band_pktlimit.sh \ 41 gre_gso.sh \ 42 gre_ipv6_lladdr.sh \ 43 icmp.sh \ 44 icmp_redirect.sh \ 45 io_uring_zerocopy_tx.sh \ 46 ioam6.sh \ 47 ip6_gre_headroom.sh \ 48 ip6_tunnel.sh \ 49 ip_defrag.sh \ 50 ip_local_port_range.sh \ 51 ipv6_flowlabel.sh \ 52 ipv6_force_forwarding.sh \ 53 ipv6_route_update_soft_lockup.sh \ 54 ipvtap_test.sh \ 55 l2_tos_ttl_inherit.sh \ 56 l2tp.sh \ 57 link_netns.py \ 58 lwt_dst_cache_ref_loop.sh \ 59 macvlan_mcast_shared_mac.sh \ 60 msg_zerocopy.sh \ 61 nat6to4.sh \ 62 ndisc_unsolicited_na_test.sh \ 63 netdev-l2addr.sh \ 64 netdevice.sh \ 65 netns-name.sh \ 66 netns-sysctl.sh \ 67 nl_netdev.py \ 68 pmtu.sh \ 69 psock_snd.sh \ 70 reuseaddr_ports_exhausted.sh \ 71 reuseport_addr_any.sh \ 72 route_hint.sh \ 73 route_localnet.sh \ 74 rps_default_mask.sh \ 75 rtnetlink.py \ 76 rtnetlink.sh \ 77 rtnetlink_notification.sh \ 78 run_afpackettests \ 79 run_netsocktests \ 80 rxtimestamp.sh \ 81 sctp_vrf.sh \ 82 skf_net_off.sh \ 83 so_txtime.sh \ 84 srv6_end_dt46_l3vpn_test.sh \ 85 srv6_end_dt4_l3vpn_test.sh \ 86 srv6_end_dt6_l3vpn_test.sh \ 87 srv6_end_dx4_netfilter_test.sh \ 88 srv6_end_dx6_netfilter_test.sh \ 89 srv6_end_flavors_test.sh \ 90 srv6_end_next_csid_l3vpn_test.sh \ 91 srv6_end_x_next_csid_l3vpn_test.sh \ 92 srv6_hencap_red_l3vpn_test.sh \ 93 srv6_hl2encap_red_l2vpn_test.sh \ 94 stress_reuseport_listen.sh \ 95 tcp_fastopen_backup_key.sh \ 96 test_bpf.sh \ 97 test_bridge_backup_port.sh \ 98 test_bridge_neigh_suppress.sh \ 99 test_ingress_egress_chaining.sh \ 100 test_neigh.sh \ 101 test_so_rcv.sh \ 102 test_vxlan_fdb_changelink.sh \ 103 test_vxlan_mdb.sh \ 104 test_vxlan_nh.sh \ 105 test_vxlan_nolocalbypass.sh \ 106 test_vxlan_under_vrf.sh \ 107 test_vxlan_vnifiltering.sh \ 108 tfo_passive.sh \ 109 traceroute.sh \ 110 txtimestamp.sh \ 111 udpgro.sh \ 112 udpgro_bench.sh \ 113 udpgro_frglist.sh \ 114 udpgro_fwd.sh \ 115 udpgso.sh \ 116 udpgso_bench.sh \ 117 unicast_extensions.sh \ 118 veth.sh \ 119 vlan_bridge_binding.sh \ 120 vlan_hw_filter.sh \ 121 vrf-xfrm-tests.sh \ 122 vrf_route_leaking.sh \ 123 vrf_strict_mode_test.sh \ 124 xfrm_policy.sh \ 125 xfrm_state.sh \ 126# end of TEST_PROGS 127 128TEST_PROGS_EXTENDED := \ 129 xfrm_policy_add_speed.sh \ 130# end of TEST_PROGS_EXTENDED 131 132TEST_GEN_FILES := \ 133 bind_bhash \ 134 cmsg_sender \ 135 fin_ack_lat \ 136 hwtstamp_config \ 137 io_uring_zerocopy_tx \ 138 ioam6_parser \ 139 ip_defrag \ 140 ip_local_port_range \ 141 ipsec \ 142 ipv6_flowlabel \ 143 ipv6_flowlabel_mgr \ 144 msg_zerocopy \ 145 nettest \ 146 psock_fanout \ 147 psock_snd \ 148 psock_tpacket \ 149 reuseaddr_ports_exhausted \ 150 reuseport_addr_any \ 151 rxtimestamp \ 152 sctp_hello \ 153 skf_net_off \ 154 so_netns_cookie \ 155 so_rcv_listener \ 156 so_txtime \ 157 socket \ 158 stress_reuseport_listen \ 159 tcp_fastopen_backup_key \ 160 tcp_inq \ 161 tcp_mmap \ 162 tfo \ 163 timestamping \ 164 txring_overwrite \ 165 txtimestamp \ 166 udpgso \ 167 udpgso_bench_rx \ 168 udpgso_bench_tx \ 169# end of TEST_GEN_FILES 170 171TEST_GEN_PROGS := \ 172 bind_timewait \ 173 bind_wildcard \ 174 epoll_busy_poll \ 175 icmp_rfc4884 \ 176 ipv6_fragmentation \ 177 proc_net_pktgen \ 178 reuseaddr_conflict \ 179 reuseport_bpf \ 180 reuseport_bpf_cpu \ 181 reuseport_bpf_numa \ 182 reuseport_dualstack \ 183 sk_bind_sendto_listen \ 184 sk_connect_zero_addr \ 185 sk_so_peek_off \ 186 so_incoming_cpu \ 187 tap \ 188 tcp_port_share \ 189 tls \ 190# end of TEST_GEN_PROGS 191 192TEST_FILES := \ 193 fcnal-test.sh \ 194 in_netns.sh \ 195 lib.sh \ 196 settings \ 197# end of TEST_FILES 198 199# YNL files, must be before "include ..lib.mk" 200YNL_GEN_FILES := busy_poller 201YNL_GEN_PROGS := \ 202 netlink-dumps \ 203 tun \ 204# end of YNL_GEN_PROGS 205 206TEST_GEN_FILES += $(YNL_GEN_FILES) 207TEST_GEN_PROGS += $(YNL_GEN_PROGS) 208 209TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c)) 210 211TEST_INCLUDES := forwarding/lib.sh 212 213include ../lib.mk 214 215# YNL build 216YNL_GENS := \ 217 netdev \ 218 rt-addr \ 219 rt-link \ 220 rt-neigh \ 221 rt-route \ 222# end of YNL_GENS 223 224include ynl.mk 225 226$(OUTPUT)/epoll_busy_poll: LDLIBS += -lcap 227$(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma 228$(OUTPUT)/tcp_mmap: LDLIBS += -lpthread -lcrypto 229$(OUTPUT)/tcp_inq: LDLIBS += -lpthread 230$(OUTPUT)/bind_bhash: LDLIBS += -lpthread 231$(OUTPUT)/io_uring_zerocopy_tx: CFLAGS += -I../../../include/ 232 233include bpf.mk 234