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