Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xsk: add tracepoints for packet drops #704

Closed
wants to merge 1 commit into from

Conversation

kernel-patches-bot
Copy link

Pull request for series with
subject: xsk: add tracepoints for packet drops
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=420991

@kernel-patches-bot
Copy link
Author

Master branch: 190d1c9
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=420991
version: 1

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/netdevbpf/list/?series=420991
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am -3
  stdout: 'Applying: xsk: add tracepoints for packet drops
Using index info to reconstruct a base tree...
M	net/xdp/xsk.c
M	net/xdp/xsk_buff_pool.c
Falling back to patching base and 3-way merge...
Auto-merging net/xdp/xsk_buff_pool.c
Auto-merging net/xdp/xsk.c
Applying: selftests/bpf: restructure setting the packet count
Applying: selftests/bpf: add framework for xsk selftests
Using index info to reconstruct a base tree...
M	tools/testing/selftests/bpf/xdpxceiver.c
M	tools/testing/selftests/bpf/xdpxceiver.h
Falling back to patching base and 3-way merge...
Auto-merging tools/testing/selftests/bpf/xdpxceiver.h
Auto-merging tools/testing/selftests/bpf/xdpxceiver.c
Applying: selftests/bpf: XSK_TRACE_DROP_RXQ_FULL test
Using index info to reconstruct a base tree...
M	tools/testing/selftests/bpf/xdpxceiver.c
M	tools/testing/selftests/bpf/xdpxceiver.h
Falling back to patching base and 3-way merge...
Auto-merging tools/testing/selftests/bpf/xdpxceiver.h
Auto-merging tools/testing/selftests/bpf/xdpxceiver.c
CONFLICT (content): Merge conflict in tools/testing/selftests/bpf/xdpxceiver.c
Patch failed at 0004 selftests/bpf: XSK_TRACE_DROP_RXQ_FULL test
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".'
  stderr: 'error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch'

conflict:

diff --cc tools/testing/selftests/bpf/xdpxceiver.c
index e6e0d42d8074,321b8013c709..000000000000
--- a/tools/testing/selftests/bpf/xdpxceiver.c
+++ b/tools/testing/selftests/bpf/xdpxceiver.c
@@@ -889,28 -944,39 +937,37 @@@ static void *worker_testapp_validate(vo
  		for (int i = 0; i < num_frames; i++) {
  			/*send EOT frame */
  			if (i == (num_frames - 1))
 -				data->seqnum = -1;
 +				data.seqnum = -1;
  			else
 -				data->seqnum = i;
 -			gen_udp_hdr((void *)data, (void *)arg, udp_hdr);
 -			gen_ip_hdr((void *)arg, ip_hdr);
 +				data.seqnum = i;
 +			gen_udp_hdr(&data, ifobject, udp_hdr);
 +			gen_ip_hdr(ifobject, ip_hdr);
  			gen_udp_csum(udp_hdr, ip_hdr);
 -			gen_eth_hdr((void *)arg, eth_hdr);
 -			gen_eth_frame(((struct ifobject *)arg)->umem,
 -				      i * XSK_UMEM__DEFAULT_FRAME_SIZE);
 +			gen_eth_hdr(ifobject, eth_hdr);
 +			gen_eth_frame(ifobject->umem, i * XSK_UMEM__DEFAULT_FRAME_SIZE);
  		}
  
 -		free(data);
  		ksft_print_msg("Sending %d packets on interface %s\n",
 -			       (opt_pkt_count - 1), ((struct ifobject *)arg)->ifname);
 -		tx_only_all(arg);
 -	} else if (((struct ifobject *)arg)->fv.vector == rx) {
 +			       (opt_pkt_count - 1), ifobject->ifname);
 +		tx_only_all(ifobject);
 +	} else if (ifobject->fv.vector == rx) {
  		struct pollfd fds[MAX_SOCKS] = { };
+ 		FILE *tr_fp = NULL;
  		int ret;
  
+ 		if (opt_trace_enable) {
+ 			tr_fp = get_eof_trace();
+ 			if (tr_fp == NULL) {
+ 				ksft_print_msg("Error getting EOF of trace\n");
+ 				exit_with_error(-1);
+ 			}
+ 		}
+ 
  		if (!bidi_pass)
 -			thread_common_ops(arg, bufs, &sync_mutex_tx, &spinning_rx);
 +			thread_common_ops(ifobject, bufs, &sync_mutex_tx, &spinning_rx);
  
 -		ksft_print_msg("Interface [%s] vector [Rx]\n", ((struct ifobject *)arg)->ifname);
 -		xsk_populate_fill_ring(((struct ifobject *)arg)->umem);
 +		ksft_print_msg("Interface [%s] vector [Rx]\n", ifobject->ifname);
 +		xsk_populate_fill_ring(ifobject->umem);
  
  		TAILQ_INIT(&head);
  		if (debug_pkt_dump) {
@@@ -932,15 -998,22 +989,32 @@@
  				if (ret <= 0)
  					continue;
  			}
++<<<<<<< HEAD
 +			rx_pkt(ifobject->xsk, fds);
 +			worker_pkt_validate();
++=======
+ 
+ 			if (!opt_trace_enable) {
+ 				rx_pkt(((struct ifobject *)arg)->xsk, fds);
+ 				worker_pkt_validate();
+ 			} else {
+ 				worker_trace_validate(tr_fp, ((struct ifobject *)arg)->ifname);
+ 			}
++>>>>>>> selftests/bpf: XSK_TRACE_DROP_RXQ_FULL test
  
  			if (sigvar)
  				break;
  		}
  
++<<<<<<< HEAD
 +		ksft_print_msg("Received %d packets on interface %s\n",
 +			       pkt_counter, ifobject->ifname);
++=======
+ 		ksft_print_msg("%s %d packets on interface %s\n",
+ 			       opt_trace_enable ? "Traced" : "Received",
+ 			       opt_trace_enable ? trace_counter : pkt_counter,
+ 			       ((struct ifobject *)arg)->ifname);
++>>>>>>> selftests/bpf: XSK_TRACE_DROP_RXQ_FULL test
  
  		if (opt_teardown)
  			ksft_print_msg("Destroying socket\n");

@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=420991 irrelevant now. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant