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