bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v4] samples/bpf: Add xdp_stat sample program
       [not found] <20200329231630.41950-1-eric@sage.org>
@ 2020-03-29 23:52 ` Andrii Nakryiko
  2020-03-30  6:55 ` Jesper Dangaard Brouer
  1 sibling, 0 replies; 2+ messages in thread
From: Andrii Nakryiko @ 2020-03-29 23:52 UTC (permalink / raw)
  To: Eric Sage
  Cc: bpf, Alexei Starovoitov, Daniel Borkmann, Martin Lau,
	Yonghong Song, Andrii Nakryiko, Jesper Dangaard Brouer,
	john fastabend, David S. Miller, Networking

On Sun, Mar 29, 2020 at 4:35 PM Eric Sage <eric@sage.org> wrote:
>
> At Facebook we use tail calls to jump between our firewall filters and
> our L4LB. This is a program I wrote to estimate per program performance
> by swapping out the entries in the program array with interceptors that
> take measurements and then jump to the original entries.
>
> I found the sample programs to be invaluable in understanding how to use
> the libbpf API (as well as the test env from the xdp-tutorial repo for
> testing), and want to return the favor. I am currently working on
> my next iteration that uses fentry/fexit to be less invasive,
> but I thought it was an interesting PoC of what you can do with program
> arrays.
>
> v4:
> - rebase
> v3:
> - Fixed typos in xdp_stat_kern.c
> - Switch to using key_size, value_size for prog arrays
>
> Signed-off-by: Eric Sage <eric@sage.org>
> Acked-by: Andrii Nakryiko <andriin@fb.com>
> ---
>  samples/bpf/Makefile          |   3 +
>  samples/bpf/xdp_stat          | Bin 0 -> 200488 bytes

Add xdp_stat to .gitignore?

>  samples/bpf/xdp_stat_common.h |  28 ++
>  samples/bpf/xdp_stat_kern.c   | 192 +++++++++
>  samples/bpf/xdp_stat_user.c   | 748 ++++++++++++++++++++++++++++++++++
>  5 files changed, 971 insertions(+)
>  create mode 100755 samples/bpf/xdp_stat
>  create mode 100644 samples/bpf/xdp_stat_common.h
>  create mode 100644 samples/bpf/xdp_stat_kern.c
>  create mode 100644 samples/bpf/xdp_stat_user.c
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v4] samples/bpf: Add xdp_stat sample program
       [not found] <20200329231630.41950-1-eric@sage.org>
  2020-03-29 23:52 ` [PATCH v4] samples/bpf: Add xdp_stat sample program Andrii Nakryiko
@ 2020-03-30  6:55 ` Jesper Dangaard Brouer
  1 sibling, 0 replies; 2+ messages in thread
From: Jesper Dangaard Brouer @ 2020-03-30  6:55 UTC (permalink / raw)
  To: Eric Sage
  Cc: brouer, bpf, ast, daniel, kafai, yhs, andriin, john.fastabend,
	davem, netdev

On Sun, 29 Mar 2020 16:16:30 -0700
Eric Sage <eric@sage.org> wrote:

[...]
> ---
>  samples/bpf/Makefile          |   3 +
>  samples/bpf/xdp_stat          | Bin 0 -> 200488 bytes

No binary files please.

>  samples/bpf/xdp_stat_common.h |  28 ++
>  samples/bpf/xdp_stat_kern.c   | 192 +++++++++
>  samples/bpf/xdp_stat_user.c   | 748 ++++++++++++++++++++++++++++++++++
>  5 files changed, 971 insertions(+)
>  create mode 100755 samples/bpf/xdp_stat
>  create mode 100644 samples/bpf/xdp_stat_common.h
>  create mode 100644 samples/bpf/xdp_stat_kern.c
>  create mode 100644 samples/bpf/xdp_stat_user.c
> 
[...]
> diff --git a/samples/bpf/xdp_stat b/samples/bpf/xdp_stat
> new file mode 100755
> index 0000000000000000000000000000000000000000..32a05e4e3f804400914d5048bfb602888af00b11
> GIT binary patch
> literal 200488
> zcmeFadw3K@7B}3J3=jqBsGw0%qmFA((L_ZP0nL~h=+TKr0YMQ7h6IpXmdrrB5}XOp
> zHiPlHuInmZ*2O!!A~!Laa7hqvfHxE`5ie9T3aCgxg?ztXb<d<>o%i|v`2P8x=M4|(
> zu2ZL~PMtb+>YP(momu|i;0%{bN&aLgmnlru<rhnk^;=OUbjy@!{wh`qmG1a`s&b0b  
> z6=}DGF^74@hdd`_$fS~dW?4yvwXxhHJAY9|F;Ywy^P%*SzdN5v3i)KY&YxoY)p{1%
> z1(Q!D+sbCSE_}`9FZ|>d%SZC*f5d7b`E-_(?ZvHpCGNG#+0VtRtYq@(EJxl{*ION|  
> ze)tNBn0ywhR=G#*XR;izS#EdCD!2QeR=L#ECS$k#O!AX7^8Z?^7@oyQF<s1u;*-BS
> zpTy-)*>|CFd@t)~6)fv#wU>MbyGt}B`An9(7Uf9i|JxsX7?kVm_R{gC;Yh2-<kRk^
> za{lCrw_JSD`IE=>n>=x9xVB$y;l=$fzUaJ~Y3E%a``ru0C{shO9<H46_opwvV6!Ld  
> z#dVX5&-MIzPFB@tpOJ3T!1{>8AL85WlFv${nJ@b#g~gpgSQY-i_H_F(ML!!!u>|DM
> zpHd``ITR#QZ>NFJL*svj&vE@T_zh{`Z=wT#hJR6-cK@5Ep6k-U{b}H2#Gkc$R2uwa  
> z)6n@#ntFasQ_t8m@X|DJk*3|XY1;i)8vHxbj8~sD_+8TAf0u^N9%<@1FAe;qH1*t@

No binary files please.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-30  6:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200329231630.41950-1-eric@sage.org>
2020-03-29 23:52 ` [PATCH v4] samples/bpf: Add xdp_stat sample program Andrii Nakryiko
2020-03-30  6:55 ` Jesper Dangaard Brouer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).