|
Re: 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
<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
|
By
Yonghong Song
·
#1387
·
|
|
Re: 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
·
|
|
Re: 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
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
|
By
Yonghong Song
·
#1385
·
|
|
Accessing pinned eBPF map from the kernel
Hi,
I have an eBPF map created and pinned by a userspace process.
Now I would like several eBPF programs to access this pinned eBPF map.
Is there any bcc APIs that can be used?
BPF_TABLE(), etc
Hi,
I have an eBPF map created and pinned by a userspace process.
Now I would like several eBPF programs to access this pinned eBPF map.
Is there any bcc APIs that can be used?
BPF_TABLE(), etc
|
By
Hyunseok
·
#1384
·
|
|
Re: problems with __sync_add_and_fetch in BPF code
<palvarez=akamai.com@...> wrote:
I added a comment to bugzilla.
Thank you for bringing it up.
It was considered a known quirk before, but we should improve it.
__sync_add_and_fetch
<palvarez=akamai.com@...> wrote:
I added a comment to bugzilla.
Thank you for bringing it up.
It was considered a known quirk before, but we should improve it.
__sync_add_and_fetch
|
By
Alexei Starovoitov
·
#1383
·
|
|
Re: problems with __sync_add_and_fetch in BPF code
Hi Daniel,
Yes. If you look at the bug report, you will see that what it actually
returns is some form of the increment. that is,
__sync_add_and_fetch(myptr, increment)
returns either increment or
Hi Daniel,
Yes. If you look at the bug report, you will see that what it actually
returns is some form of the increment. that is,
__sync_add_and_fetch(myptr, increment)
returns either increment or
|
By
Pablo Alvarez
·
#1382
·
|
|
Re: problems with __sync_add_and_fetch in BPF code
Hi Pablo,
I'm facing the same problem by compiling and running on kernel 4.15.
Calls to __sync_fetch_and_add keeps returning the same value while the actual value has been incremented.
Also I add
Hi Pablo,
I'm facing the same problem by compiling and running on kernel 4.15.
Calls to __sync_fetch_and_add keeps returning the same value while the actual value has been incremented.
Also I add
|
By
Daniel Zozin
·
#1381
·
|
|
problems with __sync_add_and_fetch in BPF code
Hi all,
A while ago, I filed a bug with LLVM about __sync_add_and_fetch as compiled into eBPF code.
https://bugs.llvm.org/show_bug.cgi?id=36573
Both it and __sync_fetch_and_add fail to return the
Hi all,
A while ago, I filed a bug with LLVM about __sync_add_and_fetch as compiled into eBPF code.
https://bugs.llvm.org/show_bug.cgi?id=36573
Both it and __sync_fetch_and_add fail to return the
|
By
Pablo Alvarez
·
#1380
·
|
|
[RFC PATCHv2 13/13] xdp: early drop ipv6 packet.
If not using ipv6, drop it in XDP.
Signed-off-by: William Tu <u9012063@...>
---
bpf/xdp.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/bpf/xdp.h b/bpf/xdp.h
index
If not using ipv6, drop it in XDP.
Signed-off-by: William Tu <u9012063@...>
---
bpf/xdp.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/bpf/xdp.h b/bpf/xdp.h
index
|
By
William Tu
·
#1379
·
|
|
[RFC PATCHv2 12/13] ofproto: disable megaflow for bpf datapath.
BPF datapath is always exact match.
Signed-off-by: William Tu <u9012063@...>
---
ofproto/ofproto-dpif-upcall.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git
BPF datapath is always exact match.
Signed-off-by: William Tu <u9012063@...>
---
ofproto/ofproto-dpif-upcall.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git
|
By
William Tu
·
#1378
·
|
|
[RFC PATCHv2 10/13] tests: Add "make check-bpf" traffic target.
Add a separate test file tests/system-bpf-traffic.at for
bpf testing. The test cases are a subset of the existing
system-traffic.at, and with additional bpf-specific tests.
When test passes, the log
Add a separate test file tests/system-bpf-traffic.at for
bpf testing. The test cases are a subset of the existing
system-traffic.at, and with additional bpf-specific tests.
When test passes, the log
|
By
William Tu
·
#1377
·
|
|
[RFC PATCHv2 11/13] vagrant: add ebpf support using ubuntu/bionic
VAGRANT_VAGRANTFILE=Vagrantfile-eBPF vagrant up
Signed-off-by: William Tu <u9012063@...>
Signed-off-by: Yifeng Sun <pkusunyifeng@...>
---
Makefile.am | 1 +
Vagrantfile-eBPF | 99
VAGRANT_VAGRANTFILE=Vagrantfile-eBPF vagrant up
Signed-off-by: William Tu <u9012063@...>
Signed-off-by: Yifeng Sun <pkusunyifeng@...>
---
Makefile.am | 1 +
Vagrantfile-eBPF | 99
|
By
William Tu
·
#1376
·
|
|
[RFC PATCHv2 09/13] utilities: Add ovs-bpfctl utility.
From: Joe Stringer <joe@...>
This new utility is used for standalone probing of BPF datapath state.
Signed-off-by: Joe Stringer <joe@...>
Signed-off-by: William Tu
From: Joe Stringer <joe@...>
This new utility is used for standalone probing of BPF datapath state.
Signed-off-by: Joe Stringer <joe@...>
Signed-off-by: William Tu
|
By
William Tu
·
#1375
·
|
|
[RFC PATCHv2 07/13] bpf: implement OVS BPF datapath.
This patch adds the OVS-eBPF datapath implementation for dpif-bpf.
Three stages are added: parse, lookup, and actions. Each stages are
tail called to the next stage. When executing multiple
This patch adds the OVS-eBPF datapath implementation for dpif-bpf.
Three stages are added: parse, lookup, and actions. Each stages are
tail called to the next stage. When executing multiple
|
By
William Tu
·
#1374
·
|
|
[RFC PATCHv2 08/13] vswitch/bridge.c: add bpf datapath initialization.
The patch initializes the bpf datapath when bridge starts.
The check_support could be avoided since we know what datapath
bpf program supports what feature.
Signed-off-by: Joe Stringer
The patch initializes the bpf datapath when bridge starts.
The check_support could be avoided since we know what datapath
bpf program supports what feature.
Signed-off-by: Joe Stringer
|
By
William Tu
·
#1373
·
|
|
[RFC PATCHv2 06/13] dpif-bpf-odp: Add bpf datapath interface and impl.
From: Joe Stringer <joe@...>
Add an implementation of the API between the userspace "Open
vSwitch Datapath Protocol" and the BPF datapath.
Signed-off-by: Joe Stringer
From: Joe Stringer <joe@...>
Add an implementation of the API between the userspace "Open
vSwitch Datapath Protocol" and the BPF datapath.
Signed-off-by: Joe Stringer
|
By
William Tu
·
#1372
·
|
|
[RFC PATCHv2 05/13] dpif: add 'dpif-bpf' provider.
From: Joe Stringer <joe@...>
Implement a new datapath interface for use with BPF datapaths.
Like dpif-netlink, dpif-bpf is backed by an implementation which resides
within the kernel. It uses
From: Joe Stringer <joe@...>
Implement a new datapath interface for use with BPF datapaths.
Like dpif-netlink, dpif-bpf is backed by an implementation which resides
within the kernel. It uses
|
By
William Tu
·
#1371
·
|
|
[RFC PATCHv2 04/13] lib/bpf: add support for managing bpf program/map.
From: Joe Stringer <joe@...>
Through libbpf, the patch adds support for loading bpf program
and maps, pinning the program and map to /sys/fs/bpf/ovs/, managing
the file descriptor of each loaded
From: Joe Stringer <joe@...>
Through libbpf, the patch adds support for loading bpf program
and maps, pinning the program and map to /sys/fs/bpf/ovs/, managing
the file descriptor of each loaded
|
By
William Tu
·
#1370
·
|
|
[RFC PATCHv2 03/13] lib: implement perf event ringbuffer for upcall.
From: Joe Stringer <joe@...>
A flow missed by the match action table in ebpf triggers an upcall,
which forwards the information to ovs-vswitchd using skb_perf_event_output
helper function. The
From: Joe Stringer <joe@...>
A flow missed by the match action table in ebpf triggers an upcall,
which forwards the information to ovs-vswitchd using skb_perf_event_output
helper function. The
|
By
William Tu
·
#1369
·
|
|
[RFC PATCHv2 02/13] netdev: add ebpf support for netdev provider.
From: Joe Stringer <joe@...>
To receive packets, an eBPF program has to be attached to a netdev
through tc ingress/egress, an XDP program has to be attached to
a netdev's xdp hook point. The
From: Joe Stringer <joe@...>
To receive packets, an eBPF program has to be attached to a netdev
through tc ingress/egress, an XDP program has to be attached to
a netdev's xdp hook point. The
|
By
William Tu
·
#1368
·
|