Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests, xsk: Rename AF_XDP testing app

Recently, xsk part of libbpf was moved to selftests/bpf directory and
lives on its own because there is an AF_XDP testing application that
needs it called xdpxceiver. That name makes it a bit hard to indicate
who maintains it as there are other XDP samples in there, whereas this
one is strictly about AF_XDP.

Do s/xdpxceiver/xskxceiver so that it will be easier to figure out who
maintains it. A follow-up patch will correct MAINTAINERS file.

Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220707111613.49031-2-maciej.fijalkowski@intel.com

authored by

Maciej Fijalkowski and committed by
Daniel Borkmann
018a8e75 fb8ddf24

+13 -13
+1 -1
tools/testing/selftests/bpf/.gitignore
··· 41 41 /bench 42 42 *.ko 43 43 *.tmp 44 - xdpxceiver 44 + xskxceiver 45 45 xdp_redirect_multi 46 46 xdp_synproxy
+2 -2
tools/testing/selftests/bpf/Makefile
··· 82 82 TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \ 83 83 flow_dissector_load test_flow_dissector test_tcp_check_syncookie_user \ 84 84 test_lirc_mode2_user xdping test_cpp runqslower bench bpf_testmod.ko \ 85 - xdpxceiver xdp_redirect_multi xdp_synproxy 85 + xskxceiver xdp_redirect_multi xdp_synproxy 86 86 87 87 TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read 88 88 ··· 231 231 $(OUTPUT)/test_maps: $(TESTING_HELPERS) 232 232 $(OUTPUT)/test_verifier: $(TESTING_HELPERS) $(CAP_HELPERS) 233 233 $(OUTPUT)/xsk.o: $(BPFOBJ) 234 - $(OUTPUT)/xdpxceiver: $(OUTPUT)/xsk.o 234 + $(OUTPUT)/xskxceiver: $(OUTPUT)/xsk.o 235 235 236 236 BPFTOOL ?= $(DEFAULT_BPFTOOL) 237 237 $(DEFAULT_BPFTOOL): $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile) \
+3 -3
tools/testing/selftests/bpf/test_xsk.sh
··· 47 47 # conflict with any existing interface 48 48 # * tests the veth and xsk layers of the topology 49 49 # 50 - # See the source xdpxceiver.c for information on each test 50 + # See the source xskxceiver.c for information on each test 51 51 # 52 52 # Kernel configuration: 53 53 # --------------------- ··· 160 160 161 161 TEST_NAME="XSK_SELFTESTS_SOFTIRQ" 162 162 163 - execxdpxceiver 163 + exec_xskxceiver 164 164 165 165 cleanup_exit ${VETH0} ${VETH1} ${NS1} 166 166 TEST_NAME="XSK_SELFTESTS_BUSY_POLL" 167 167 busy_poll=1 168 168 169 169 setup_vethPairs 170 - execxdpxceiver 170 + exec_xskxceiver 171 171 172 172 ## END TESTS 173 173
+2 -2
tools/testing/selftests/bpf/xdpxceiver.c tools/testing/selftests/bpf/xskxceiver.c
··· 98 98 #include <unistd.h> 99 99 #include <stdatomic.h> 100 100 #include "xsk.h" 101 - #include "xdpxceiver.h" 101 + #include "xskxceiver.h" 102 102 #include "../kselftest.h" 103 103 104 104 /* AF_XDP APIs were moved into libxdp and marked as deprecated in libbpf. 105 - * Until xdpxceiver is either moved or re-writed into libxdp, suppress 105 + * Until xskxceiver is either moved or re-writed into libxdp, suppress 106 106 * deprecation warnings in this file 107 107 */ 108 108 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+3 -3
tools/testing/selftests/bpf/xdpxceiver.h tools/testing/selftests/bpf/xskxceiver.h
··· 2 2 * Copyright(c) 2020 Intel Corporation. 3 3 */ 4 4 5 - #ifndef XDPXCEIVER_H_ 6 - #define XDPXCEIVER_H_ 5 + #ifndef XSKXCEIVER_H_ 6 + #define XSKXCEIVER_H_ 7 7 8 8 #ifndef SOL_XDP 9 9 #define SOL_XDP 283 ··· 169 169 170 170 int pkts_in_flight; 171 171 172 - #endif /* XDPXCEIVER_H */ 172 + #endif /* XSKXCEIVER_H_ */
+2 -2
tools/testing/selftests/bpf/xsk_prereqs.sh
··· 8 8 ksft_xpass=3 9 9 ksft_skip=4 10 10 11 - XSKOBJ=xdpxceiver 11 + XSKOBJ=xskxceiver 12 12 13 13 validate_root_exec() 14 14 { ··· 77 77 [ ! $(type -P ip) ] && { echo "'ip' not found. Skipping tests."; test_exit $ksft_skip; } 78 78 } 79 79 80 - execxdpxceiver() 80 + exec_xskxceiver() 81 81 { 82 82 if [[ $busy_poll -eq 1 ]]; then 83 83 ARGS+="-b "