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 nl_nlctrl.py \ 69 pmtu.sh \ 70 psock_snd.sh \ 71 reuseaddr_ports_exhausted.sh \ 72 reuseport_addr_any.sh \ 73 route_hint.sh \ 74 route_localnet.sh \ 75 rps_default_mask.sh \ 76 rtnetlink.py \ 77 rtnetlink.sh \ 78 rtnetlink_notification.sh \ 79 run_afpackettests \ 80 run_netsocktests \ 81 rxtimestamp.sh \ 82 sctp_vrf.sh \ 83 skf_net_off.sh \ 84 so_txtime.sh \ 85 srv6_end_dt46_l3vpn_test.sh \ 86 srv6_end_dt4_l3vpn_test.sh \ 87 srv6_end_dt6_l3vpn_test.sh \ 88 srv6_end_dx4_netfilter_test.sh \ 89 srv6_end_dx6_netfilter_test.sh \ 90 srv6_end_flavors_test.sh \ 91 srv6_end_next_csid_l3vpn_test.sh \ 92 srv6_end_x_next_csid_l3vpn_test.sh \ 93 srv6_hencap_red_l3vpn_test.sh \ 94 srv6_hl2encap_red_l2vpn_test.sh \ 95 stress_reuseport_listen.sh \ 96 tcp_fastopen_backup_key.sh \ 97 test_bpf.sh \ 98 test_bridge_backup_port.sh \ 99 test_bridge_neigh_suppress.sh \ 100 test_ingress_egress_chaining.sh \ 101 test_neigh.sh \ 102 test_so_rcv.sh \ 103 test_vxlan_fdb_changelink.sh \ 104 test_vxlan_mdb.sh \ 105 test_vxlan_nh.sh \ 106 test_vxlan_nolocalbypass.sh \ 107 test_vxlan_under_vrf.sh \ 108 test_vxlan_vnifiltering.sh \ 109 tfo_passive.sh \ 110 traceroute.sh \ 111 txtimestamp.sh \ 112 udpgro.sh \ 113 udpgro_bench.sh \ 114 udpgro_frglist.sh \ 115 udpgro_fwd.sh \ 116 udpgso.sh \ 117 udpgso_bench.sh \ 118 unicast_extensions.sh \ 119 veth.sh \ 120 vlan_bridge_binding.sh \ 121 vlan_hw_filter.sh \ 122 vrf-xfrm-tests.sh \ 123 vrf_route_leaking.sh \ 124 vrf_strict_mode_test.sh \ 125 xfrm_policy.sh \ 126 xfrm_state.sh \ 127# end of TEST_PROGS 128 129TEST_PROGS_EXTENDED := \ 130 xfrm_policy_add_speed.sh \ 131# end of TEST_PROGS_EXTENDED 132 133TEST_GEN_FILES := \ 134 bind_bhash \ 135 cmsg_sender \ 136 fin_ack_lat \ 137 hwtstamp_config \ 138 io_uring_zerocopy_tx \ 139 ioam6_parser \ 140 ip_defrag \ 141 ip_local_port_range \ 142 ipsec \ 143 ipv6_flowlabel \ 144 ipv6_flowlabel_mgr \ 145 msg_zerocopy \ 146 nettest \ 147 psock_fanout \ 148 psock_snd \ 149 psock_tpacket \ 150 reuseaddr_ports_exhausted \ 151 reuseport_addr_any \ 152 rxtimestamp \ 153 sctp_hello \ 154 skf_net_off \ 155 so_netns_cookie \ 156 so_rcv_listener \ 157 so_txtime \ 158 socket \ 159 stress_reuseport_listen \ 160 tcp_fastopen_backup_key \ 161 tcp_inq \ 162 tcp_mmap \ 163 tfo \ 164 timestamping \ 165 txring_overwrite \ 166 txtimestamp \ 167 udpgso \ 168 udpgso_bench_rx \ 169 udpgso_bench_tx \ 170# end of TEST_GEN_FILES 171 172TEST_GEN_PROGS := \ 173 bind_timewait \ 174 bind_wildcard \ 175 epoll_busy_poll \ 176 icmp_rfc4884 \ 177 ipv6_fragmentation \ 178 proc_net_pktgen \ 179 reuseaddr_conflict \ 180 reuseport_bpf \ 181 reuseport_bpf_cpu \ 182 reuseport_bpf_numa \ 183 reuseport_dualstack \ 184 sk_bind_sendto_listen \ 185 sk_connect_zero_addr \ 186 sk_so_peek_off \ 187 so_incoming_cpu \ 188 tap \ 189 tcp_port_share \ 190 tls \ 191# end of TEST_GEN_PROGS 192 193TEST_FILES := \ 194 fcnal-test.sh \ 195 in_netns.sh \ 196 lib.sh \ 197 settings \ 198# end of TEST_FILES 199 200# YNL files, must be before "include ..lib.mk" 201YNL_GEN_FILES := busy_poller 202YNL_GEN_PROGS := \ 203 netlink-dumps \ 204 tun \ 205# end of YNL_GEN_PROGS 206 207TEST_GEN_FILES += $(YNL_GEN_FILES) 208TEST_GEN_PROGS += $(YNL_GEN_PROGS) 209 210TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c)) 211 212TEST_INCLUDES := forwarding/lib.sh 213 214include ../lib.mk 215 216# YNL build 217YNL_GENS := \ 218 netdev \ 219 rt-addr \ 220 rt-link \ 221 rt-neigh \ 222 rt-route \ 223# end of YNL_GENS 224 225include ynl.mk 226 227$(OUTPUT)/epoll_busy_poll: LDLIBS += -lcap 228$(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma 229$(OUTPUT)/tcp_mmap: LDLIBS += -lpthread -lcrypto 230$(OUTPUT)/tcp_inq: LDLIBS += -lpthread 231$(OUTPUT)/bind_bhash: LDLIBS += -lpthread 232$(OUTPUT)/io_uring_zerocopy_tx: CFLAGS += -I../../../include/ 233 234include bpf.mk 235