Makefile 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. # SPDX-License-Identifier: GPL-2.0
  2. # Makefile for net selftests
  3. CFLAGS += -Wall -Wl,--no-as-needed -O2 -g
  4. CFLAGS += -I../../../../usr/include/ $(KHDR_INCLUDES)
  5. # Additional include paths needed by kselftest.h
  6. CFLAGS += -I../
  7. TEST_PROGS := \
  8. altnames.sh \
  9. amt.sh \
  10. arp_ndisc_evict_nocarrier.sh \
  11. arp_ndisc_untracked_subnets.sh \
  12. bareudp.sh \
  13. big_tcp.sh \
  14. bind_bhash.sh \
  15. bpf_offload.py \
  16. bridge_vlan_dump.sh \
  17. broadcast_ether_dst.sh \
  18. broadcast_pmtu.sh \
  19. busy_poll_test.sh \
  20. cmsg_ip.sh \
  21. cmsg_so_mark.sh \
  22. cmsg_so_priority.sh \
  23. cmsg_time.sh \
  24. double_udp_encap.sh \
  25. drop_monitor_tests.sh \
  26. fcnal-ipv4.sh \
  27. fcnal-ipv6.sh \
  28. fcnal-other.sh \
  29. fdb_flush.sh \
  30. fdb_notify.sh \
  31. fib-onlink-tests.sh \
  32. fib_nexthop_multiprefix.sh \
  33. fib_nexthop_nongw.sh \
  34. fib_nexthops.sh \
  35. fib_rule_tests.sh \
  36. fib_tests.sh \
  37. fin_ack_lat.sh \
  38. fq_band_pktlimit.sh \
  39. gre_gso.sh \
  40. gre_ipv6_lladdr.sh \
  41. icmp.sh \
  42. icmp_redirect.sh \
  43. io_uring_zerocopy_tx.sh \
  44. ioam6.sh \
  45. ip6_gre_headroom.sh \
  46. ip_defrag.sh \
  47. ip_local_port_range.sh \
  48. ipv6_flowlabel.sh \
  49. ipv6_force_forwarding.sh \
  50. ipv6_route_update_soft_lockup.sh \
  51. ipvtap_test.sh \
  52. l2_tos_ttl_inherit.sh \
  53. l2tp.sh \
  54. link_netns.py \
  55. lwt_dst_cache_ref_loop.sh \
  56. msg_zerocopy.sh \
  57. nat6to4.sh \
  58. ndisc_unsolicited_na_test.sh \
  59. netdev-l2addr.sh \
  60. netdevice.sh \
  61. netns-name.sh \
  62. netns-sysctl.sh \
  63. nl_netdev.py \
  64. pmtu.sh \
  65. psock_snd.sh \
  66. reuseaddr_ports_exhausted.sh \
  67. reuseport_addr_any.sh \
  68. route_hint.sh \
  69. route_localnet.sh \
  70. rps_default_mask.sh \
  71. rtnetlink.py \
  72. rtnetlink.sh \
  73. rtnetlink_notification.sh \
  74. run_afpackettests \
  75. run_netsocktests \
  76. rxtimestamp.sh \
  77. sctp_vrf.sh \
  78. skf_net_off.sh \
  79. so_txtime.sh \
  80. srv6_end_dt46_l3vpn_test.sh \
  81. srv6_end_dt4_l3vpn_test.sh \
  82. srv6_end_dt6_l3vpn_test.sh \
  83. srv6_end_dx4_netfilter_test.sh \
  84. srv6_end_dx6_netfilter_test.sh \
  85. srv6_end_flavors_test.sh \
  86. srv6_end_next_csid_l3vpn_test.sh \
  87. srv6_end_x_next_csid_l3vpn_test.sh \
  88. srv6_hencap_red_l3vpn_test.sh \
  89. srv6_hl2encap_red_l2vpn_test.sh \
  90. srv6_iptunnel_cache.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. TEST_PROGS_EXTENDED := \
  124. xfrm_policy_add_speed.sh \
  125. # end of TEST_PROGS_EXTENDED
  126. TEST_GEN_FILES := \
  127. bind_bhash \
  128. cmsg_sender \
  129. fin_ack_lat \
  130. hwtstamp_config \
  131. io_uring_zerocopy_tx \
  132. ioam6_parser \
  133. ip_defrag \
  134. ip_local_port_range \
  135. ipsec \
  136. ipv6_flowlabel \
  137. ipv6_flowlabel_mgr \
  138. msg_zerocopy \
  139. nettest \
  140. psock_fanout \
  141. psock_snd \
  142. psock_tpacket \
  143. reuseaddr_ports_exhausted \
  144. reuseport_addr_any \
  145. rxtimestamp \
  146. sctp_hello \
  147. skf_net_off \
  148. so_netns_cookie \
  149. so_rcv_listener \
  150. so_txtime \
  151. socket \
  152. stress_reuseport_listen \
  153. tcp_fastopen_backup_key \
  154. tcp_inq \
  155. tcp_mmap \
  156. tfo \
  157. timestamping \
  158. txring_overwrite \
  159. txtimestamp \
  160. udpgso \
  161. udpgso_bench_rx \
  162. udpgso_bench_tx \
  163. # end of TEST_GEN_FILES
  164. TEST_GEN_PROGS := \
  165. bind_timewait \
  166. bind_wildcard \
  167. epoll_busy_poll \
  168. icmp_rfc4884 \
  169. ipv6_fragmentation \
  170. proc_net_pktgen \
  171. reuseaddr_conflict \
  172. reuseport_bpf \
  173. reuseport_bpf_cpu \
  174. reuseport_bpf_numa \
  175. reuseport_dualstack \
  176. sk_bind_sendto_listen \
  177. sk_connect_zero_addr \
  178. sk_so_peek_off \
  179. so_incoming_cpu \
  180. tap \
  181. tcp_port_share \
  182. tls \
  183. # end of TEST_GEN_PROGS
  184. TEST_FILES := \
  185. fcnal-test.sh \
  186. in_netns.sh \
  187. lib.sh \
  188. settings \
  189. # end of TEST_FILES
  190. # YNL files, must be before "include ..lib.mk"
  191. YNL_GEN_FILES := busy_poller
  192. YNL_GEN_PROGS := \
  193. netlink-dumps \
  194. tun \
  195. # end of YNL_GEN_PROGS
  196. TEST_GEN_FILES += $(YNL_GEN_FILES)
  197. TEST_GEN_PROGS += $(YNL_GEN_PROGS)
  198. TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c))
  199. TEST_INCLUDES := forwarding/lib.sh
  200. include ../lib.mk
  201. # YNL build
  202. YNL_GENS := \
  203. netdev \
  204. rt-addr \
  205. rt-link \
  206. rt-neigh \
  207. rt-route \
  208. # end of YNL_GENS
  209. include ynl.mk
  210. $(OUTPUT)/epoll_busy_poll: LDLIBS += -lcap
  211. $(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma
  212. $(OUTPUT)/tcp_mmap: LDLIBS += -lpthread -lcrypto
  213. $(OUTPUT)/tcp_inq: LDLIBS += -lpthread
  214. $(OUTPUT)/bind_bhash: LDLIBS += -lpthread
  215. $(OUTPUT)/io_uring_zerocopy_tx: CFLAGS += -I../../../include/
  216. include bpf.mk