xref: /linux/tools/testing/selftests/drivers/net/hw/Makefile (revision c36461825469a9ceee2346a2e89286c522525da7)
1# SPDX-License-Identifier: GPL-2.0+ OR MIT
2
3# Check if io_uring supports zero-copy receive
4HAS_IOURING_ZCRX := $(shell \
5	echo -e '#include <liburing.h>\n' \
6	     'void *func = (void *)io_uring_register_ifq;\n' \
7	     'int main() {return 0;}' | \
8	$(CC) -luring -x c - -o /dev/null 2>&1 && echo y)
9
10ifeq ($(HAS_IOURING_ZCRX),y)
11COND_GEN_FILES += iou-zcrx
12else
13$(warning excluding iouring tests, liburing not installed or too old)
14endif
15
16TEST_GEN_FILES := \
17	$(COND_GEN_FILES) \
18# end of TEST_GEN_FILES
19
20TEST_PROGS = \
21	csum.py \
22	devlink_rate_cross_esw.py \
23	devlink_rate_tc_bw.py \
24	devmem.py \
25	ethtool.sh \
26	ethtool_extended_state.sh \
27	ethtool_mm.sh \
28	ethtool_rmon.sh \
29	ethtool_std_stats.sh \
30	gro_hw.py \
31	hw_stats_l3.sh \
32	hw_stats_l3_gre.sh \
33	iou-zcrx.py \
34	ipsec_vxlan.py \
35	irq.py \
36	loopback.sh \
37	nic_timestamp.py \
38	nk_devmem.py \
39	nk_netns.py \
40	nk_qlease.py \
41	ntuple.py \
42	pp_alloc_fail.py \
43	rss_api.py \
44	rss_ctx.py \
45	rss_drv.py \
46	rss_flow_label.py \
47	rss_input_xfrm.py \
48	toeplitz.py \
49	tso.py \
50	userns_devmem.py \
51	uso.py \
52	xdp_metadata.py \
53	xsk_reconfig.py \
54	#
55
56TEST_PROGS_EXTENDED := \
57	devlink_port_split.py \
58# end of TEST_PROGS_EXTENDED
59
60TEST_FILES := \
61	devmem_lib.py \
62	ethtool_lib.sh \
63	#
64
65TEST_INCLUDES := \
66	$(wildcard lib/py/*.py ../lib/py/*.py) \
67	../../../net/lib.sh \
68	../../../net/forwarding/ipip_lib.sh \
69	../../../net/forwarding/lib.sh \
70	../../../net/forwarding/tc_common.sh \
71	#
72
73# YNL files, must be before "include ..lib.mk"
74YNL_GEN_FILES := \
75	ncdevmem \
76	toeplitz \
77# end of YNL_GEN_FILES
78TEST_GEN_FILES += $(YNL_GEN_FILES)
79TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c))
80
81include ../../../lib.mk
82
83# YNL build
84YNL_GENS := \
85	ethtool \
86	netdev \
87# end of YNL_GENS
88
89include ../../../net/ynl.mk
90
91include ../../../net/bpf.mk
92
93ifeq ($(HAS_IOURING_ZCRX),y)
94$(OUTPUT)/iou-zcrx: LDLIBS += -luring
95endif
96