xref: /linux/tools/testing/selftests/drivers/net/hw/Makefile (revision dfecb0c5af3b07ebfa84be63a7a21bfc9e29a872)
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_port_split.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	irq.py \
35	loopback.sh \
36	nic_timestamp.py \
37	nk_netns.py \
38	pp_alloc_fail.py \
39	rss_api.py \
40	rss_ctx.py \
41	rss_drv.py \
42	rss_flow_label.py \
43	rss_input_xfrm.py \
44	toeplitz.py \
45	tso.py \
46	xdp_metadata.py \
47	xsk_reconfig.py \
48	#
49
50TEST_FILES := \
51	ethtool_lib.sh \
52	#
53
54TEST_INCLUDES := \
55	$(wildcard lib/py/*.py ../lib/py/*.py) \
56	../../../net/lib.sh \
57	../../../net/forwarding/ipip_lib.sh \
58	../../../net/forwarding/lib.sh \
59	../../../net/forwarding/tc_common.sh \
60	#
61
62# YNL files, must be before "include ..lib.mk"
63YNL_GEN_FILES := \
64	ncdevmem \
65	toeplitz \
66# end of YNL_GEN_FILES
67TEST_GEN_FILES += $(YNL_GEN_FILES)
68TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c))
69
70include ../../../lib.mk
71
72# YNL build
73YNL_GENS := \
74	ethtool \
75	netdev \
76# end of YNL_GENS
77
78include ../../../net/ynl.mk
79
80include ../../../net/bpf.mk
81
82ifeq ($(HAS_IOURING_ZCRX),y)
83$(OUTPUT)/iou-zcrx: LDLIBS += -luring
84endif
85