|
[RFC PATCH 2/3] tests/bpf: add some test cases for BPF_MAP_TYPE_QUEUE
<mauricio.vasquez@...> wrote: Order the declaration based on reverse Christmas tree shape.
<mauricio.vasquez@...> wrote: Order the declaration based on reverse Christmas tree shape.
|
By
Yonghong Song
· #1409
·
|
|
[RFC PATCH 1/3] bpf: add bpf queue map
<mauricio.vasquez@...> wrote: It is totally up to you, but you could replace the above licensing portion from "This program" to 'more details" with /* SPDX-License-Identifier: GPL-2.0 */ Similar
<mauricio.vasquez@...> wrote: It is totally up to you, but you could replace the above licensing portion from "This program" to 'more details" with /* SPDX-License-Identifier: GPL-2.0 */ Similar
|
By
Yonghong Song
· #1408
·
|
|
Helper functions available for XDP?
There is no skb in XDP. The helper bpf_l4_csum_replace cannot be used. You need to use other csum functions and can directly modify the packet data.
There is no skb in XDP. The helper bpf_l4_csum_replace cannot be used. You need to use other csum functions and can directly modify the packet data.
|
By
Yonghong Song
· #1399
·
|
|
Fixing stack trace function names by argument introspection
It is a piece of complicated software, let me see how much I can do. Yes, it is `#pragma unroll`. Not 100% whether just frame pointers are enough for you or not. Remeber, on the stack, typically only
It is a piece of complicated software, let me see how much I can do. Yes, it is `#pragma unroll`. Not 100% whether just frame pointers are enough for you or not. Remeber, on the stack, typically only
|
By
Yonghong Song
· #1398
·
|
|
Helper functions available for XDP?
bpf_csum_diff only accesses packet data and can be used in both cls_act and xdp. bpf_l4_csum_replace accesses skb data structure, e.g., it needs to replace the csum and hence needs to test whether skb
bpf_csum_diff only accesses packet data and can be used in both cls_act and xdp. bpf_l4_csum_replace accesses skb data structure, e.g., it needs to replace the csum and hence needs to test whether skb
|
By
Yonghong Song
· #1395
·
|
|
Fixing stack trace function names by argument introspection
We did not have such an example in BCC. In Facebook, we have a bpf program to catch stack traces for python programs. It is very similar to what you want to achieve in the above. Basically, you need t
We did not have such an example in BCC. In Facebook, we have a bpf program to catch stack traces for python programs. It is very similar to what you want to achieve in the above. Basically, you need t
|
By
Yonghong Song
· #1391
·
|
|
Accessing pinned eBPF map from the kernel
No. The example uses a locally-created map to illustrate the process, but a pinned map works in a similar way. The user space application: . using bpf_obj_get to get a FD for the pinned map. . create
No. The example uses a locally-created map to illustrate the process, but a pinned map works in a similar way. The user space application: . using bpf_obj_get to get a FD for the pinned map. . create
|
By
Yonghong Song
· #1389
·
|
|
problems with __sync_add_and_fetch in BPF code
<palvarez=akamai.com@...> wrote: Pablo, I added the below comment in the bug report: === The table description for bpf_xadd operation is at BPFInstrInfo.td: // Atomics class XADD<BPFWidt
<palvarez=akamai.com@...> wrote: Pablo, I added the below comment in the bug report: === The table description for bpf_xadd operation is at BPFInstrInfo.td: // Atomics class XADD<BPFWidt
|
By
Yonghong Song
· #1387
·
|
|
Accessing pinned eBPF map from the kernel
The following is an example in C++ to import an external map to BPF modules. https://github.com/iovisor/bcc/blob/master/examples/cpp/UseExternalMap.cc You can use libbpf function `bpf_obj_get` to get
The following is an example in C++ to import an external map to BPF modules. https://github.com/iovisor/bcc/blob/master/examples/cpp/UseExternalMap.cc You can use libbpf function `bpf_obj_get` to get
|
By
Yonghong Song
· #1386
·
|
|
Verifier error: variable stack access var_off
The kernel needs to a constant offset from the stack for write. The corresponding kernel verifier code below: /* stack accesses must be at a fixed offset, so that we can * determine what type of data
The kernel needs to a constant offset from the stack for write. The corresponding kernel verifier code below: /* stack accesses must be at a fixed offset, so that we can * determine what type of data
|
By
Yonghong Song
· #1385
·
|
|
GCOV coverage on BPF program
This will not work. '-coverage' flag will introduce some additional global functions called by the program, e.g., __llvm_gcov_init, __llvm_gcov_flush, etc. global memset functions are called from one
This will not work. '-coverage' flag will introduce some additional global functions called by the program, e.g., __llvm_gcov_init, __llvm_gcov_flush, etc. global memset functions are called from one
|
By
Yonghong Song
· #1337
·
|
|
Contributing example code
Here is the github information about how to create a pull request. https://help.github.com/articles/creating-a-pull-request/ Basically you create a pull request against iovisor/bcc repository for revi
Here is the github information about how to create a pull request. https://help.github.com/articles/creating-a-pull-request/ Basically you create a pull request against iovisor/bcc repository for revi
|
By
Yonghong Song
· #1316
·
|
|
Contributing example code
Then it should be okay. Thanks for your contribution! Yonghong
Then it should be okay. Thanks for your contribution! Yonghong
|
By
Yonghong Song
· #1314
·
|
|
minutes: IO Visor TSC / Dev Meeting
<iovisor-dev@...> wrote: This is the test_tools_memleak issue I mentioned. https://github.com/iovisor/bcc/issues/1685 I would be great if somebody who knows python (esp. python3) better
<iovisor-dev@...> wrote: This is the test_tools_memleak issue I mentioned. https://github.com/iovisor/bcc/issues/1685 I would be great if somebody who knows python (esp. python3) better
|
By
Yonghong Song
· #1310
·
|
|
Contributing example code
<iovisor-dev@...> wrote: Any details of exactly what you want to minotor? Just sniff the packet and if it is vlan do some accounting in map? The example code should be self contained so
<iovisor-dev@...> wrote: Any details of exactly what you want to minotor? Just sniff the packet and if it is vlan do some accounting in map? The example code should be self contained so
|
By
Yonghong Song
· #1308
·
|
|
BPF verifier: ctx+const+const is not allowed
Now I remembered that we had this issue before in bcc. it is a compiler optimization likes this: if (...) *(ctx + 60) else *(ctx + 56) The compiler translates it to if (...) ptr = ctx + 60 else ptr =
Now I remembered that we had this issue before in bcc. it is a compiler optimization likes this: if (...) *(ctx + 60) else *(ctx + 56) The compiler translates it to if (...) ptr = ctx + 60 else ptr =
|
By
Yonghong Song
· #1304
·
|
|
BPF verifier: ctx+const+const is not allowed
Hi, William, Do you have a test (just compile and load) to demonstrate the problem? I would like to understand why the compiler generates r1+0 and whether we could possibly avoid it. Thanks, Yonghong
Hi, William, Do you have a test (just compile and load) to demonstrate the problem? I would like to understand why the compiler generates r1+0 and whether we could possibly avoid it. Thanks, Yonghong
|
By
Yonghong Song
· #1303
·
|
|
Access to struct with kprobe
<iovisor-dev@...> wrote: You can access through arguments or through "current" task pointer. What exactly you want access on which kprobe? More information will help people to understand
<iovisor-dev@...> wrote: You can access through arguments or through "current" task pointer. What exactly you want access on which kprobe? More information will help people to understand
|
By
Yonghong Song
· #1292
·
|
|
bps helper functions
Ashish, Some comments below. Could you have more details here? Maybe have a skeleton of bpf program to at least see how this helper will be used? A lot of compression happens in the application and ke
Ashish, Some comments below. Could you have more details here? Maybe have a skeleton of bpf program to at least see how this helper will be used? A lot of compression happens in the application and ke
|
By
Yonghong Song
· #1281
·
|
|
bps helper functions
Hi, Ashish, It seems that this has not been actively discussed before. Could you describe your use case? Thanks! Yonghong <iovisor-dev@...> wrote:
Hi, Ashish, It seems that this has not been actively discussed before. Could you describe your use case? Thanks! Yonghong <iovisor-dev@...> wrote:
|
By
Yonghong Song
· #1266
·
|