Skip to content

Commit 248c7f9

Browse files
magnus-karlssonborkmann
authored andcommitted
samples/bpf: convert xdpsock to use libbpf for AF_XDP access
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 <bjorn.topel@intel.com> Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent 1cad078 commit 248c7f9

File tree

4 files changed

+261
-648
lines changed

4 files changed

+261
-648
lines changed

samples/bpf/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ always += xdp2skb_meta_kern.o
163163
always += syscall_tp_kern.o
164164
always += cpustat_kern.o
165165
always += xdp_adjust_tail_kern.o
166-
always += xdpsock_kern.o
167166
always += xdp_fwd_kern.o
168167
always += task_fd_query_kern.o
169168
always += xdp_sample_pkts_kern.o

samples/bpf/xdpsock.h

Lines changed: 0 additions & 11 deletions
This file was deleted.

samples/bpf/xdpsock_kern.c

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)