Skip to content

Commit

Permalink
samples/bpf: convert xdpsock to use libbpf for AF_XDP access
Browse files Browse the repository at this point in the history
This commit converts the xdpsock sample application to use the AF_XDP
functions present in libbpf. This cuts down the size of it by nearly
300 lines of code.

The default ring sizes plus the batch size has been increased and the
size of the umem area has decreased. This so that the sample application
will provide higher throughput. Note also that the shared umem code
has been removed from the sample as this is not supported by libbpf
at this point in time.

Tested-by: Björn Töpel <[email protected]>
Signed-off-by: Magnus Karlsson <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
  • Loading branch information
magnus-karlsson authored and borkmann committed Feb 25, 2019
1 parent 1cad078 commit 248c7f9
Show file tree
Hide file tree
Showing 4 changed files with 261 additions and 648 deletions.
1 change: 0 additions & 1 deletion samples/bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ always += xdp2skb_meta_kern.o
always += syscall_tp_kern.o
always += cpustat_kern.o
always += xdp_adjust_tail_kern.o
always += xdpsock_kern.o
always += xdp_fwd_kern.o
always += task_fd_query_kern.o
always += xdp_sample_pkts_kern.o
Expand Down
11 changes: 0 additions & 11 deletions samples/bpf/xdpsock.h

This file was deleted.

56 changes: 0 additions & 56 deletions samples/bpf/xdpsock_kern.c

This file was deleted.

Loading

0 comments on commit 248c7f9

Please sign in to comment.