mlx5e_fill_xdp_buff(rq, va, rx_headroom, cqe_bcnt, &xdp); if(mlx5e_xdp_handle(rq, au->page, prog, &xdp)) returnNULL;/* page/packet was consumed by XDP */ rx_headroom = xdp.data - xdp.data_hard_start; metasize = xdp.data - xdp.data_meta; cqe_bcnt = xdp.data_end -...
某种意义上说,eBPF正朝着一个完备的内核态可编程接口快速进化。
advanced01-xdp-tc-interact advanced03-AF_XDP basic-solutions basic01-xdp-pass basic02-prog-by-name basic03-map-counter basic04-pinning-maps common experiment01-tailgrow lib packet-solutions packet01-parsing Makefile README.org xdp_prog_kern.c packet02-rewriting packet03-redirecting setup-testlab...
I found it very confusing that a program named xdpdump will use the tcpdump hook to dump packets, when there isn't any other XDP-prog already attached on the interfaces. I do like that the xdpdump program warns the end-user about this be...
trace_xdp_exception(rq->netdev, prog, act); fallthrough; caseXDP_DROP: rq->stats->xdp_drop++; returntrue; } } bpf_prog_run_xdp 就是真实运行 XDP 程序的函数。 XDP_PASS on Mellanox 如果XDP 程序里 XDP_PASS 该网络包到内核,Mellanox 网卡驱动还做了哪些处理呢?
trace_xdp_exception(rq->netdev, prog, act); fallthrough; caseXDP_DROP: rq->stats->xdp_drop++; returntrue; } } bpf_prog_run_xdp 就是真实运行 XDP 程序的函数。 XDP_PASS on Mellanox 如果XDP 程序里 XDP_PASS 该网络包到内核,Mellanox 网卡驱动还做了哪些处理呢?
xdp-tcpclassify.c 3 changes: 3 additions & 0 deletions 3 xdp_progs/aot-header/inline-map-ids/common_map_helpers.h Original file line numberDiff line numberDiff line change @@ -21,5 +21,8 @@ int _bpf_helper_ext_0003(); int _bpf_helper_ext_0130(); #define bpf_ringbuf_outpu...
46 changes: 46 additions & 0 deletions 46 experiment01-tailgrow/xdp_prog_fail3.c Original file line numberDiff line numberDiff line change @@ -0,0 +1,46 @@ /* SPDX-License-Identifier: GPL-2.0 */ #include <linux/bpf.h> #include <bpf/bpf_helpers.h>...
What type of PR is this? /kind bug What this PR does / why we need it: Fix: XDP prog duplicate when bpf filesystem mounted Which issue(s) this PR fixes: Fixes # Special notes for your reviewer: Does this PR introduce a user-facing change?:...
4 changes: 2 additions & 2 deletions 4 lib/libxdp/libxdp.c Original file line numberDiff line numberDiff line change @@ -629,7 +629,7 @@ xdp_program__is_attached(const struct xdp_program *xdp_prog, int ifindex) int xdp_program__set_chain_call_enabled(struct xdp_program *prog,...