WARNING: 'oustanding' may be misspelled - perhaps 'outstanding'?
#39: 
oustanding packets: 3
^^^^^^^^^^

ERROR: do not set execute permissions for source files
#99: FILE: tools/testing/selftests/bpf/progs/xsk_rr_progs.c

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#99: 
new file mode 100755

ERROR: spaces required around that '<' (ctx:VxV)
#202: FILE: tools/testing/selftests/bpf/xsk_rr.c:33:
+#define MIN(x, y) (((x)<(y))?(x):(y))
                        ^

CHECK: spaces required around that '?' (ctx:VxV)
#202: FILE: tools/testing/selftests/bpf/xsk_rr.c:33:
+#define MIN(x, y) (((x)<(y))?(x):(y))
                             ^

CHECK: spaces required around that ':' (ctx:VxV)
#202: FILE: tools/testing/selftests/bpf/xsk_rr.c:33:
+#define MIN(x, y) (((x)<(y))?(x):(y))
                                 ^

CHECK: Macro argument 'x' may be better as '(x)' to avoid precedence issues
#205: FILE: tools/testing/selftests/bpf/xsk_rr.c:36:
+#define OUTSTANDING_MASK(x) (x & (MAX_OUTSTANDING - 1))

WARNING: __constant_htons should be htons
#220: FILE: tools/testing/selftests/bpf/xsk_rr.c:51:
+static uint16_t cfg_port = __constant_htons(8000);

CHECK: spaces preferred around that '|' (ctx:VxW)
#225: FILE: tools/testing/selftests/bpf/xsk_rr.c:56:
+static __u16 cfg_xdp_bind_flags = XDP_COPY| XDP_USE_NEED_WAKEUP;
                                           ^

ERROR: do not initialise statics to 0
#227: FILE: tools/testing/selftests/bpf/xsk_rr.c:58:
+static uint64_t cfg_server_delay = 0;

ERROR: do not initialise statics to 0
#228: FILE: tools/testing/selftests/bpf/xsk_rr.c:59:
+static uint64_t cfg_client_send_period = 0;

ERROR: do not initialise statics to false
#229: FILE: tools/testing/selftests/bpf/xsk_rr.c:60:
+static bool cfg_client_send_threaded = false;

ERROR: do not initialise statics to false
#230: FILE: tools/testing/selftests/bpf/xsk_rr.c:61:
+static bool cfg_rx_polling = false;

ERROR: do not initialise statics to false
#231: FILE: tools/testing/selftests/bpf/xsk_rr.c:62:
+static bool cfg_skip_kick = false;

ERROR: do not initialise statics to false
#232: FILE: tools/testing/selftests/bpf/xsk_rr.c:63:
+static bool cfg_verify = false;

ERROR: do not initialise globals to 0
#267: FILE: tools/testing/selftests/bpf/xsk_rr.c:98:
+uint64_t max_rtt = 0;

ERROR: do not initialise globals to 0
#268: FILE: tools/testing/selftests/bpf/xsk_rr.c:99:
+uint64_t avg_rtt = 0;

ERROR: do not initialise statics to 0
#269: FILE: tools/testing/selftests/bpf/xsk_rr.c:100:
+static int first_idx = 0;

ERROR: do not initialise statics to 0
#270: FILE: tools/testing/selftests/bpf/xsk_rr.c:101:
+static int next_idx = 0;

ERROR: do not initialise statics to 0
#272: FILE: tools/testing/selftests/bpf/xsk_rr.c:103:
+static uint64_t empty_rx_tries = 0;

ERROR: do not initialise statics to 0
#273: FILE: tools/testing/selftests/bpf/xsk_rr.c:104:
+static uint64_t rx_tries = 0;

ERROR: do not initialise statics to 0
#275: FILE: tools/testing/selftests/bpf/xsk_rr.c:106:
+static uint64_t prev_print = 0;

ERROR: do not initialise statics to 0
#286: FILE: tools/testing/selftests/bpf/xsk_rr.c:117:
+static uint64_t total_pkts_intvl = 0;

ERROR: do not initialise statics to 0
#288: FILE: tools/testing/selftests/bpf/xsk_rr.c:119:
+static uint64_t pending_sends = 0;

ERROR: do not initialise statics to 0
#289: FILE: tools/testing/selftests/bpf/xsk_rr.c:120:
+static uint64_t done_sends = 0;

ERROR: Bad function definition - uint64_t get_current_time() should probably be uint64_t get_current_time(void)
#291: FILE: tools/testing/selftests/bpf/xsk_rr.c:122:
+static inline uint64_t get_current_time()

ERROR: Bad function definition - void clean_buckets() should probably be void clean_buckets(void)
#301: FILE: tools/testing/selftests/bpf/xsk_rr.c:132:
+static void clean_buckets()

ERROR: spaces required around that '=' (ctx:VxV)
#308: FILE: tools/testing/selftests/bpf/xsk_rr.c:139:
+	int i=0;
 	     ^

CHECK: spaces preferred around that '*' (ctx:VxV)
#318: FILE: tools/testing/selftests/bpf/xsk_rr.c:149:
+	total_count = (total_count*percentile)/100;
 	                          ^

CHECK: spaces preferred around that '/' (ctx:VxV)
#318: FILE: tools/testing/selftests/bpf/xsk_rr.c:149:
+	total_count = (total_count*percentile)/100;
 	                                      ^

WARNING: line length of 82 exceeds 80 columns
#324: FILE: tools/testing/selftests/bpf/xsk_rr.c:155:
+			rtt = (buckets[i]*(i) + count*rtt) / (count + buckets[i]);

CHECK: spaces preferred around that '*' (ctx:VxV)
#324: FILE: tools/testing/selftests/bpf/xsk_rr.c:155:
+			rtt = (buckets[i]*(i) + count*rtt) / (count + buckets[i]);
 			                 ^

CHECK: spaces preferred around that '*' (ctx:VxV)
#324: FILE: tools/testing/selftests/bpf/xsk_rr.c:155:
+			rtt = (buckets[i]*(i) + count*rtt) / (count + buckets[i]);
 			                             ^

CHECK: spaces preferred around that '*' (ctx:VxV)
#329: FILE: tools/testing/selftests/bpf/xsk_rr.c:160:
+	printf("count: %lu p%d: %lu\n", count, percentile, rtt*BUCKET_SIZE_NM);
 	                                                      ^

ERROR: Bad function definition - void show_rate() should probably be void show_rate(void)
#332: FILE: tools/testing/selftests/bpf/xsk_rr.c:163:
+static void show_rate()

ERROR: code indent should use tabs where possible
#334: FILE: tools/testing/selftests/bpf/xsk_rr.c:165:
+        printf("rate: %lu\n", total_pkts_intvl/cfg_log_f);$

WARNING: please, no spaces at the start of a line
#334: FILE: tools/testing/selftests/bpf/xsk_rr.c:165:
+        printf("rate: %lu\n", total_pkts_intvl/cfg_log_f);$

CHECK: spaces preferred around that '/' (ctx:VxV)
#334: FILE: tools/testing/selftests/bpf/xsk_rr.c:165:
+        printf("rate: %lu\n", total_pkts_intvl/cfg_log_f);
                                               ^

ERROR: Bad function definition - int record_send() should probably be int record_send(void)
#338: FILE: tools/testing/selftests/bpf/xsk_rr.c:169:
+static inline int record_send()

WARNING: 'oustanding' may be misspelled - perhaps 'outstanding'?
#345: FILE: tools/testing/selftests/bpf/xsk_rr.c:176:
+		error(1, 0, "oustanding array full");
 		             ^^^^^^^^^^

WARNING: return of an errno should typically be negative (ie: return -EAGAIN)
#346: FILE: tools/testing/selftests/bpf/xsk_rr.c:177:
+		return EAGAIN;

ERROR: Bad function definition - void record_recv() should probably be void record_recv(void)
#352: FILE: tools/testing/selftests/bpf/xsk_rr.c:183:
+static inline void record_recv()

CHECK: spaces preferred around that '*' (ctx:VxV)
#365: FILE: tools/testing/selftests/bpf/xsk_rr.c:196:
+	avg_rtt = (avg_rtt*total_pkts_intvl + rtt) /
 	                  ^

CHECK: spaces preferred around that '/' (ctx:VxV)
#369: FILE: tools/testing/selftests/bpf/xsk_rr.c:200:
+		buckets[(rtt/BUCKET_SIZE_NM)] += 1;
 		            ^

CHECK: spaces preferred around that '*' (ctx:VxV)
#375: FILE: tools/testing/selftests/bpf/xsk_rr.c:206:
+	if (now >= (prev_print + (cfg_log_f*1000000000UL))) {
 	                                   ^

CHECK: Alignment should match open parenthesis
#378: FILE: tools/testing/selftests/bpf/xsk_rr.c:209:
+		printf("min: %lu max: %lu avg: %lu empty: %lu\n",
+			min_rtt,

CHECK: spaces preferred around that '*' (ctx:VxV)
#379: FILE: tools/testing/selftests/bpf/xsk_rr.c:210:
+			max_rtt, avg_rtt, (empty_rx_tries*100)/rx_tries);
 			                                 ^

CHECK: spaces preferred around that '/' (ctx:VxV)
#379: FILE: tools/testing/selftests/bpf/xsk_rr.c:210:
+			max_rtt, avg_rtt, (empty_rx_tries*100)/rx_tries);
 			                                      ^

WARNING: 'oustanding' may be misspelled - perhaps 'outstanding'?
#391: FILE: tools/testing/selftests/bpf/xsk_rr.c:222:
+		printf("oustanding packets: %lu\n", (pending_sends - done_sends));
 		        ^^^^^^^^^^

WARNING: line length of 82 exceeds 80 columns
#391: FILE: tools/testing/selftests/bpf/xsk_rr.c:222:
+		printf("oustanding packets: %lu\n", (pending_sends - done_sends));

WARNING: unnecessary whitespace before a quoted newline
#474: FILE: tools/testing/selftests/bpf/xsk_rr.c:305:
+		error(1, 0, "sscanf mac dst ('-M') \n");

WARNING: line length of 81 exceeds 80 columns
#477: FILE: tools/testing/selftests/bpf/xsk_rr.c:308:
+		   &eth->h_source[3], &eth->h_source[4], &eth->h_source[5]) != 6)

WARNING: line length of 86 exceeds 80 columns
#497: FILE: tools/testing/selftests/bpf/xsk_rr.c:328:
+			      (cfg_addr_len * 2) + sizeof(*uh) + cfg_payload_size, 0);

WARNING: line length of 90 exceeds 80 columns
#605: FILE: tools/testing/selftests/bpf/xsk_rr.c:436:
+	xsk->umem_area = mmap(NULL, UMEM_SIZE, PROT_READ | PROT_WRITE, mmap_flags, -1, 0);

WARNING: line length of 84 exceeds 80 columns
#646: FILE: tools/testing/selftests/bpf/xsk_rr.c:477:
+	n = xsk_ring_cons__peek(&xsk->comp, XSK_RING_CONS__DEFAULT_NUM_DESCS, &idx);

ERROR: do not initialise statics to 0
#691: FILE: tools/testing/selftests/bpf/xsk_rr.c:522:
+	static int max_descs = 0;

WARNING: line length of 84 exceeds 80 columns
#706: FILE: tools/testing/selftests/bpf/xsk_rr.c:537:
+				recvfrom(xsk_fd, NULL, 0, MSG_DONTWAIT, NULL, NULL);

WARNING: line length of 96 exceeds 80 columns
#729: FILE: tools/testing/selftests/bpf/xsk_rr.c:560:
+				verify_pkt(xsk_umem__get_data(xsk->umem_area, addr), desc->len);

WARNING: Missing a blank line after declarations
#743: FILE: tools/testing/selftests/bpf/xsk_rr.c:574:
+		int ret = record_send();
+		if (ret) {

ERROR: do not initialise statics to 0
#757: FILE: tools/testing/selftests/bpf/xsk_rr.c:588:
+	static uint64_t until = 0;

CHECK: Please don't use multiple blank lines
#772: FILE: tools/testing/selftests/bpf/xsk_rr.c:603:
+
+

ERROR: Bad function definition - void setup_rx_polling() should probably be void setup_rx_polling(void)
#788: FILE: tools/testing/selftests/bpf/xsk_rr.c:619:
+static void setup_rx_polling()

ERROR: open brace '{' following function definitions go on the next line
#798: FILE: tools/testing/selftests/bpf/xsk_rr.c:629:
+static void *do_client_period_send_run(void *arg) {

ERROR: space required before the open parenthesis '('
#801: FILE: tools/testing/selftests/bpf/xsk_rr.c:632:
+	while(cfg_client_send_threaded) {

ERROR: Bad function definition - void do_client_send_period() should probably be void do_client_send_period(void)
#815: FILE: tools/testing/selftests/bpf/xsk_rr.c:646:
+static void do_client_send_period()

WARNING: Missing a blank line after declarations
#843: FILE: tools/testing/selftests/bpf/xsk_rr.c:674:
+		void *th_ret;
+		cfg_client_send_threaded = false;

ERROR: Bad function definition - void do_client() should probably be void do_client(void)
#848: FILE: tools/testing/selftests/bpf/xsk_rr.c:679:
+static void do_client() {

ERROR: open brace '{' following function definitions go on the next line
#848: FILE: tools/testing/selftests/bpf/xsk_rr.c:679:
+static void do_client() {

ERROR: Bad function definition - void do_server() should probably be void do_server(void)
#868: FILE: tools/testing/selftests/bpf/xsk_rr.c:699:
+static void do_server() {

ERROR: open brace '{' following function definitions go on the next line
#868: FILE: tools/testing/selftests/bpf/xsk_rr.c:699:
+static void do_server() {

WARNING: line length of 81 exceeds 80 columns
#934: FILE: tools/testing/selftests/bpf/xsk_rr.c:765:
+	while ((c = getopt(argc, argv, "46B:D:d:hi:l:m:M:no:p:P:S:tTv")) != -1) {

ERROR: space required before the open parenthesis '('
#1066: FILE: tools/testing/selftests/bpf/xsk_rr.c:897:
+	if(cfg_rx_polling)

total: 36 errors, 19 warnings, 17 checks, 998 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.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

Commit b6a0ceab0fbf ("Add xsk_rr an AF_XDP benchmark to measure latency") 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.