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