WARNING: externs should be avoided in .c files #52: FILE: tools/testing/selftests/bpf/bench.c:287: +extern struct argp bench_trait_argp; WARNING: externs should be avoided in .c files #68: FILE: tools/testing/selftests/bpf/bench.c:557: +extern const struct bench bench_xdp_trait_get; WARNING: externs should be avoided in .c files #69: FILE: tools/testing/selftests/bpf/bench.c:558: +extern const struct bench bench_xdp_trait_set; WARNING: externs should be avoided in .c files #70: FILE: tools/testing/selftests/bpf/bench.c:559: +extern const struct bench bench_xdp_trait_move; WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #85: new file mode 100644 WARNING: line length of 88 exceeds 80 columns #122: FILE: tools/testing/selftests/bpf/benchs/bench_xdp_traits.c:33: + if (args.trait_len != 0 && args.trait_len != 4 && args.trait_len != 8) { WARNING: line length of 83 exceeds 80 columns #142: FILE: tools/testing/selftests/bpf/benchs/bench_xdp_traits.c:53: + fprintf(stderr, "bpf trait benchmark doesn't support consumer!\n"); CHECK: Alignment should match open parenthesis #198: FILE: tools/testing/selftests/bpf/benchs/bench_xdp_traits.c:109: + LIBBPF_OPTS(bpf_test_run_opts, opts, + .data_in = in, WARNING: line length of 83 exceeds 80 columns #210: FILE: tools/testing/selftests/bpf/benchs/bench_xdp_traits.c:121: + fprintf(stderr, "prog didn't return 0: %d\n", opts.retval); WARNING: Macros with flow control statements should be avoided #280: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:25: +#define BENCH_GET(val, size) do { \ + ret = bpf_xdp_trait_set(xdp, 32, val, size, 0); \ + if (ret != 0) \ + return ret; \ + for (i = 0; i < ITERATIONS; i++) \ + ret = bpf_xdp_trait_get(xdp, 32, val, size); \ + if (ret != size) \ + return ret; \ + } while (0) WARNING: line length of 81 exceeds 80 columns #281: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:26: + ret = bpf_xdp_trait_set(xdp, 32, val, size, 0); \ WARNING: line length of 81 exceeds 80 columns #282: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:27: + if (ret != 0) \ WARNING: line length of 81 exceeds 80 columns #283: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:28: + return ret; \ WARNING: line length of 81 exceeds 80 columns #284: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:29: + for (i = 0; i < ITERATIONS; i++) \ WARNING: line length of 81 exceeds 80 columns #285: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:30: + ret = bpf_xdp_trait_get(xdp, 32, val, size); \ WARNING: line length of 81 exceeds 80 columns #286: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:31: + if (ret != size) \ WARNING: line length of 81 exceeds 80 columns #287: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:32: + return ret; \ WARNING: Argument 'val' is not used in function-like macro #344: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:89: +#define BENCH_MOVE(val, size) do { \ + for (i = 0; i < 8; i++) { \ + ret = bpf_xdp_trait_set(xdp, 40+i, &val8, sizeof(val8), 0); \ + if (ret != 0) \ + return ret; \ + } \ + /* We do two operations per iteration, so do half as many to make it WARNING: Argument 'size' is not used in function-like macro #344: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:89: +#define BENCH_MOVE(val, size) do { \ + for (i = 0; i < 8; i++) { \ + ret = bpf_xdp_trait_set(xdp, 40+i, &val8, sizeof(val8), 0); \ + if (ret != 0) \ + return ret; \ + } \ + /* We do two operations per iteration, so do half as many to make it WARNING: Macros with flow control statements should be avoided #344: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:89: +#define BENCH_MOVE(val, size) do { \ + for (i = 0; i < 8; i++) { \ + ret = bpf_xdp_trait_set(xdp, 40+i, &val8, sizeof(val8), 0); \ + if (ret != 0) \ + return ret; \ + } \ + /* We do two operations per iteration, so do half as many to make it WARNING: line length of 89 exceeds 80 columns #345: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:90: + for (i = 0; i < 8; i++) { \ WARNING: line length of 89 exceeds 80 columns #346: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:91: + ret = bpf_xdp_trait_set(xdp, 40+i, &val8, sizeof(val8), 0); \ CHECK: spaces preferred around that '+' (ctx:VxV) #346: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:91: + ret = bpf_xdp_trait_set(xdp, 40+i, &val8, sizeof(val8), 0); \ ^ WARNING: line length of 89 exceeds 80 columns #347: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:92: + if (ret != 0) \ WARNING: line length of 89 exceeds 80 columns #348: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:93: + return ret; \ WARNING: line length of 89 exceeds 80 columns #349: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:94: + } \ WARNING: line length of 84 exceeds 80 columns #350: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:95: + /* We do two operations per iteration, so do half as many to make it WARNING: line length of 89 exceeds 80 columns #352: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:97: + */ \ WARNING: Avoid unnecessary line continuations #352: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:97: + */ \ WARNING: line length of 89 exceeds 80 columns #353: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:98: + for (i = 0; i < ITERATIONS/2; i++) { \ CHECK: spaces preferred around that '/' (ctx:VxV) #353: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:98: + for (i = 0; i < ITERATIONS/2; i++) { \ ^ WARNING: line length of 82 exceeds 80 columns #354: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:99: + /* Need to delete after, otherwise we'll just overwrite an WARNING: line length of 89 exceeds 80 columns #356: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:101: + */ \ WARNING: Avoid unnecessary line continuations #356: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:101: + */ \ WARNING: line length of 89 exceeds 80 columns #357: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:102: + ret = bpf_xdp_trait_set(xdp, 32, val, size, 0); \ WARNING: line length of 89 exceeds 80 columns #358: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:103: + ret_del = bpf_xdp_trait_del(xdp, 32); \ WARNING: line length of 89 exceeds 80 columns #359: FILE: tools/testing/selftests/bpf/progs/bench_xdp_traits.c:104: + } \ total: 0 errors, 34 warnings, 3 checks, 334 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. Commit 38942dd07cad ("trait: XDP benchmark") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. total: 0 errors, 34 warnings, 3 checks, 334 lines checked