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

selftests: xsk: Preface options with opt

Preface all options with opt_ and make them booleans.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210825093722.10219-17-magnus.karlsson@gmail.com

authored by

Magnus Karlsson and committed by
Alexei Starovoitov
33a6bef8 279bdf6b

+5 -5
+3 -3
tools/testing/selftests/bpf/xdpxceiver.c
··· 395 395 interface_index++; 396 396 break; 397 397 case 'D': 398 - debug_pkt_dump = 1; 398 + opt_pkt_dump = true; 399 399 break; 400 400 case 'v': 401 - opt_verbose = 1; 401 + opt_verbose = true; 402 402 break; 403 403 default: 404 404 usage(basename(argv[0])); ··· 517 517 if (iphdr->version == IP_PKT_VER && iphdr->tos == IP_PKT_TOS) { 518 518 u32 seqnum = ntohl(*((u32 *)(data + PKT_HDR_SIZE))); 519 519 520 - if (debug_pkt_dump && test_type != TEST_TYPE_STATS) 520 + if (opt_pkt_dump && test_type != TEST_TYPE_STATS) 521 521 pkt_dump(data, PKT_SIZE); 522 522 523 523 if (pkt->len != desc->len) {
+2 -2
tools/testing/selftests/bpf/xdpxceiver.h
··· 69 69 }; 70 70 71 71 static int configured_mode; 72 - static u8 debug_pkt_dump; 72 + static bool opt_pkt_dump; 73 73 static u32 num_frames = DEFAULT_PKT_CNT / 4; 74 74 static bool second_step; 75 75 static int test_type; 76 76 77 - static u8 opt_verbose; 77 + static bool opt_verbose; 78 78 79 79 static u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; 80 80 static u32 xdp_bind_flags = XDP_USE_NEED_WAKEUP | XDP_COPY;