And with this, I'm done with the “one-a-day” bpftool tweets. I'll slow down, and come back to this thread as new features get added to the tool or as I find new things to say. Do not hesitate to shout if I omitted important stuff, or let me know if you have questions. Thanks!
-
Prikaži ovu nit
-
[41] (It didn't take long!) bpftool just got support for dumping BTF information for BPF programs or maps, for a loaded BTF object, or from an object file containing one. # bpftool btf dump <btf_source> Details in the doc: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/tools/bpf/bpftool/Documentation/bpftool-btf.rst?id=0c0cad2c2824ac38106ad0649263eca30954beb6 …
1 reply 0 proslijeđenih tweetova 3 korisnika označavaju da im se sviđaPrikaži ovu nit -
[42] bpftool now has a “-d|--debug” option to print debug-level information from libbpf and (when attempting to load BPF programs) from kernel verifier, even when all steps succeed.pic.twitter.com/pyY7IVoz3C
1 reply 1 proslijeđeni tweet 4 korisnika označavaju da im se sviđaPrikaži ovu nit -
Quentin Monnet je proslijedio/a tweet korisnika/ceStamus Networks
[43] There is a wrapper around bpftool to pass map values, or dump them, in a more intuitive way (at the moment, for integers and IPv4 addresses).https://twitter.com/StamusN/status/1146107005377097730 …
Quentin Monnet je dodan/na,
1 reply 1 proslijeđeni tweet 4 korisnika označavaju da im se sviđaPrikaži ovu nit -
[44] bpftool can run programs with BPF_PROG_TEST_RUN command available for some prog types. Manually trigger a run for a program loaded in the kernel, on input data/context provided by the user: # bpftool prog run PROG data_in <file> data_out <file> (More options in man page)pic.twitter.com/XwzE0yb8Ad
1 reply 2 proslijeđena tweeta 3 korisnika označavaju da im se sviđaPrikaži ovu nit -
[45] We can now list all BTF objects loaded in the system with bpftool (in addition to seeing BTF object attached to a given program or map): # bpftool btf [show|list]pic.twitter.com/1fDU3h8gzI
0 proslijeđenih tweetova 2 korisnika označavaju da im se sviđaPrikaži ovu nit -
[46] bpftool can be used to “freeze” maps (make them read-only from user space, permissions unchanged from BPF program side). You may have guessed the syntax: # bpftool map freeze id 1337 Will be useful for next summer's heat waves!
1 reply 0 proslijeđenih tweetova 2 korisnika označavaju da im se sviđaPrikaži ovu nit -
[47] Like “ip link”, bpftool can attach programs to the XDP hook (and later detach them). The program must be loaded already, and then we would type: # bpftool net attach xdp id 42 dev eth0 # bpftool net detach xdp dev eth0 (xdpgeneric/xdpdrv/xdpoffload variants also supported)pic.twitter.com/3AxTafs5pF
1 proslijeđeni tweet 8 korisnika označava da im se sviđaPrikaži ovu nit -
[48] At last Ubuntu 19.10 (Eoan) has bpftool packaged! Install with: # apt install linux-tools-common (
Note the packaged version misses the disassembler for JIT-compiled instructions.)3 proslijeđena tweeta 10 korisnika označava da im se sviđaPrikaži ovu nit -
[49] Program names can now be used on the command line to tell bpftool what BPF program to work with (as an alternative to program ids, tags, or related path in the BPF virtual file system): # bpftool prog show name loadbalancer
1 reply 1 proslijeđeni tweet 6 korisnika označava da im se sviđaPrikaži ovu nit
[50] bpftool can generate a “skeleton” header file from a BPF program for inclusion in user space apps managing this BPF prog. Pass the BPF object file to bpftool: $ bpftool gen skeleton bpf_prog.o > user_prog.h Then include "user_prog.h". Details in “bpftool-gen” man page.pic.twitter.com/Ao7FBHB0Wl
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.