On Fri, Aug 2, 2019 at 3:23 AM Bjorn Topel wrote:
>
> On Tue, 30 Jul 2019 at 22:25, Kanthi P wrote:
> >
> > Hi,
> >
> > Is it possible to have 2 processes each with its own AF_XDP socket and its
> > own UMEM?
> >
>
Hi Kanthi,
In the case of OVS AF_XDP netdev, we've used multiple PMD threads.
gtime
> - March-May timeframe
> - 2 days?
>
> William
> * Adding AF_XDP support to vSphere driver
Sorry, I mean AF_XDP for veth driver.
Thank you
William
>
>
> === Attendees ===
> Brenden Blanco
> Quentin Monnet
> Jakub Kicinski
&g
interface.
Signed-off-by: William Tu
---
tests/automake.mk | 17 +
tests/system-afxdp-macros.at| 153
tests/system-afxdp-testsuite.at | 26 +
tests/system-afxdp-traffic.at | 1541 +++
4 files changed, 1737 insertions(+)
create mode
r more specific function to pull in pthread library.")
- remove the dependency on libbpf and dpif-bpf.
instead, use the built-in XDP_ATTACH feature.
- data structure optimizations for better performance, see[1]
- more test cases support
William Tu (3):
netdev-afxdp: add new netdev type for AF_XDP
The patch adds the test framework for OVS using afxdp.
Currently there are two test cases, using ping and http
as traffic forwarding through ovs with 2 afxdp netdev.
Signed-off-by: William Tu
---
tests/automake.mk | 17 +
tests/ofproto-macros.at | 1 +
tests/system
e tx part as well as l2fwd
2) try the zero copy mode driver
v1->v2:
- add a list to maintain unused umem elements
- remove copy from rx umem to ovs internal buffer
- use hugetlb to reduce misses (not much difference)
- use pmd mode netdev in OVS (huge performance improve)
- remove malloc dp_packet,
The patch adds the test framework for OVS using afxdp.
Currently there are two test cases, using ping and http
as traffic forwarding through ovs with 2 afxdp netdev.
Signed-off-by: William Tu
---
tests/automake.mk | 17 +
tests/ofproto-macros.at | 1 +
tests/system
e ovs-ebpf implementaion.
A copy is put at: https://github.com/williamtu/ovs-ebpf/
branch afxdp-v1
William Tu (3):
afxdp: add ebpf code for afxdp and xskmap.
netdev-linux: add new netdev type afxdp.
tests: add afxdp test cases.
acinclude.m4| 1 +
bpf/api.h
BPF datapath is always exact match.
Signed-off-by: William Tu
---
ofproto/ofproto-dpif-upcall.c | 4
1 file changed, 4 insertions(+)
diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index 4f696fdca7f6..92a55d0b7768 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b
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 file is saved under:
tests/system-bpf-testsuite.dir//
Signed-off-by: William Tu
Signed-off
From: Joe Stringer
This new utility is used for standalone probing of BPF datapath state.
Signed-off-by: Joe Stringer
Signed-off-by: William Tu
Signed-off-by: Yifeng Sun
Co-authored-by: William Tu
Co-authored-by: Yifeng Sun
---
utilities/automake.mk | 9 ++
utilities/ovs-bpfctl.8
lookup.
The protocol headers are auto-generated and defined at generated_headers.h.
The bpf_flow_key is extracted using the P4-to-eBPF compiler from
the bcc project. A couple of manual tweaks are required, see parser.h.
Signed-off-by: William Tu
Signed-off-by: Yifeng Sun
Signed-off-by: Joe Stringer
From: Joe Stringer
Add an implementation of the API between the userspace "Open
vSwitch Datapath Protocol" and the BPF datapath.
Signed-off-by: Joe Stringer
Signed-off-by: William Tu
Signed-off-by: Yifeng Sun
Co-authored-by: William Tu
Co-authored-by: Yifeng Sun
---
lib/a
From: Joe Stringer
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 patch implements the userspace receiving logic.
Signed-off-by: Joe Stringer
Signed-off-by: William Tu
From: Joe Stringer
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 map, and printting.
Signed-off-by: Joe Stringer
Co-authored-by: William Tu
Co-authored-by: Yifeng Sun
=3139657
[2] http://openvswitch.org/support/ovscon2016/7/1120-tu.pdf
Signed-off-by: Joe Stringer
Signed-off-by: William Tu
Signed-off-by: Yifeng Sun
Co-authored-by: William Tu
Co-authored-by: Yifeng Sun
---
lib/dpif-bpf.c | 1996 +++
lib/dpif
From: Joe Stringer
The patch add bpf installation guide and configuration
for linking to libbpf library.
Co-authored-by: William Tu
Co-authored-by: Yifeng Sun
---
Documentation/automake.mk | 1 +
Documentation/index.rst | 2 +-
Documentation/intro/install
, netdev-linux and netdev-vport, have the actual implementation.
Signed-off-by: William Tu
Co-authored-by: William Tu
Co-authored-by: Yifeng Sun
---
include/linux/pkt_cls.h | 21 +++
lib/dpif-netdev.c | 29 ++--
lib/netdev-bsd.c| 2 +
lib/netdev-dpdk.c | 2 +
lib/netdev
ion.
netdev: add ebpf support for netdev provider.
lib: implement perf event ringbuffer for upcall.
lib/bpf: add support for managing bpf program/map.
dpif: add 'dpif-bpf' provider.
dpif-bpf-odp: Add bpf datapath interface and impl.
utilities: Add ovs-bpfctl utility.
William Tu (6):
>
> d71962f ("bpf: allow map helpers access to map values directly") removes
> that limitation from the verifier and should allow you to use map values
> as map keys directly. 4.18-rc1 has it.
>
>> Thanks
>> William
Hi Paul,
Thanks a lot! This is very helpful.
I'm testing it now, works great so
On Tue, Jul 3, 2018 at 10:56 AM, Alexei Starovoitov
wrote:
> On Thu, Jun 28, 2018 at 07:19:35AM -0700, William Tu wrote:
>> Hi Alexei,
>>
>> Thanks a lot for the feedback!
>>
>> On Wed, Jun 27, 2018 at 8:00 PM, Alexei Starovoitov
>> wrote:
>> > O
Hi Alexei,
Thanks a lot for the feedback!
On Wed, Jun 27, 2018 at 8:00 PM, Alexei Starovoitov
wrote:
> On Sat, Jun 23, 2018 at 05:16:32AM -0700, William Tu wrote:
>>
>> Discussion
>> ==
>> We are still actively working on finishing the feature, curren
=3139657
[2] http://openvswitch.org/support/ovscon2016/7/1120-tu.pdf
Signed-off-by: Joe Stringer
Signed-off-by: William Tu
Signed-off-by: Yifeng Sun
Co-authored-by: William Tu
Co-authored-by: Yifeng Sun
---
lib/dpif-bpf.c | 1995 +++
lib/dpif
path interface and impl.
utilities: Add ovs-bpfctl utility.
William Tu (4):
bpf: implement OVS BPF datapath.
vswitch/bridge.c: add bpf datapath initialization.
tests: Add "make check-bpf" traffic target.
vagrant: add ebpf support using ubuntu/bionic
Documentation/au
From: Joe Stringer
The patch add bpf installation guide and configuration
for linking to libbpf library.
Co-authored-by: William Tu
Co-authored-by: Yifeng Sun
---
Documentation/automake.mk | 1 +
Documentation/index.rst | 2 +-
Documentation/intro/install
From: Joe Stringer
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 map, and printting.
Signed-off-by: Joe Stringer
Co-authored-by: William Tu
Co-authored-by: Yifeng Sun
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 file is saved under:
tests/system-bpf-testsuite.dir//
Signed-off-by: William Tu
Signed-off
From: Joe Stringer
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 patch implements the userspace receiving logic.
Signed-off-by: Joe Stringer
Signed-off-by: William Tu
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
Signed-off-by: William Tu
Signed-off-by: Yifeng Sun
Co-authored-by: William Tu
Co-authored-by: Yifeng Sun
VAGRANT_VAGRANTFILE=Vagrantfile-eBPF vagrant up
Signed-off-by: William Tu
Signed-off-by: Yifeng Sun
---
Makefile.am | 1 +
Vagrantfile-eBPF | 99
2 files changed, 100 insertions(+)
create mode 100644 Vagrantfile-eBPF
diff --git
, netdev-linux and netdev-vport, have the actual implementation.
Signed-off-by: William Tu
Co-authored-by: William Tu
Co-authored-by: Yifeng Sun
---
include/linux/pkt_cls.h | 21 +++
lib/dpif-netdev.c | 29 ++--
lib/netdev-bsd.c| 2 +
lib/netdev-dpdk.c | 2 +
lib/netdev
From: Joe Stringer
This new utility is used for standalone probing of BPF datapath state.
Signed-off-by: Joe Stringer
Signed-off-by: William Tu
Signed-off-by: Yifeng Sun
Co-authored-by: William Tu
Co-authored-by: Yifeng Sun
---
utilities/automake.mk | 9 ++
utilities/ovs-bpfctl.8
lookup.
The protocol headers are auto-generated and defined at generated_headers.h.
The bpf_flow_key is extracted using the P4-to-eBPF compiler from
the bcc project. A couple of manual tweaks are required, see parser.h.
Signed-off-by: William Tu
Signed-off-by: Yifeng Sun
Signed-off-by: Joe Stringer
On Tue, Jun 19, 2018 at 8:47 AM, Y Song wrote:
> On Tue, Jun 19, 2018 at 7:54 AM, William Tu wrote:
>> Hi,
>>
>> I'm trying to run coverage tests on my bpf program and it compiles fails.
>> I guess BPF does not support '--coverage' flags?
>
> This will not work.
Hi,
I'm trying to run coverage tests on my bpf program and it compiles fails.
I guess BPF does not support '--coverage' flags?
root@boxes:~/ovs# clang-4.0 -Wstrict-prototypes -Wall -Wextra
-Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security
-Wswitch-enum -Wunused-parameter
erstand why the compiler generates r1+0 and whether
>> we could possibly avoid it.
>>
>> Thanks,
>> Yonghong
>>
>>
>> On Sat, Apr 28, 2018 at 7:57 AM, William Tu via iovisor-dev
>> <iovisor-dev@lists.iovisor.org> wrote:
>>> Hi,
>>
Hi,
We're hitting a BPF verifier error saying
"dereference of modified ctx ptr R1 off=36+0, ctx+const is allowed,
ctx+const+const is not
"
but actually the 2nd const is 0. I don't know why compiler generate (r1+0)
in this case:
602: (61) r4 = *(u32 *)(r1 +0)
verifier log
594: (15) if r6
t find any information on how to install it.
>>
>> If you are using eBPF + OVS, please let me know if you have any insights
>> about it.
>
> I'll redirect that question to William Tu (Cc'ed).
>
> --
> Best regards,
> Jesper Dangaard Brouer
>
On Sun, Sep 3, 2017 at 3:26 PM, Thomas Graf <tg...@suug.ch> wrote:
> On 1 September 2017 at 04:30, William Tu via iovisor-dev
> <iovisor-dev@lists.iovisor.org> wrote:
> > This patch adds two BPF conntrack helper functions, bpf_ct_lookup()
> > and bpf_ct_commit(), to
Hi Alexei,
Thanks, I do see the lockdep complain now. I will switch to use GFP_ATOMIC.
William
On Sat, Sep 2, 2017 at 8:20 AM, William Tu <u9012...@gmail.com> wrote:
>
>
> On Fri, Sep 1, 2017 at 10:53 PM, Alexei Starovoitov <
> alexei.starovoi...@gmail.com> wrote:
>
!
Signed-off-by: William Tu <u9012...@gmail.com>
Cc: Joe Stringer <j...@ovn.org>
Cc: Daniel Borkmann <dan...@iogearbox.net>
Cc: Alexei Starovoitov <a...@kernel.org>
---
include/uapi/linux/bpf.h | 31 +
net/core/filter.c
On Wed, Apr 19, 2017 at 10:44 AM, William Tu <u9012...@gmail.com> wrote:
> Thanks for the reply.
>
>> could you increase the max to 1M or so
>> and see what the actual number of insns it needs?
>
> it takes 112,762 insns. And the kernel runs a while (~6 seconds) to
Thanks for the reply.
> could you increase the max to 1M or so
> and see what the actual number of insns it needs?
it takes 112,762 insns. And the kernel runs a while (~6 seconds) to verify it.
> If the program is short, as you say, can you debug
> the state prunning to see why it's not
t; Yonghong
>
>
> On Tue, Apr 18, 2017 at 9:00 PM, William Tu via iovisor-dev
> <iovisor-dev@lists.iovisor.org> wrote:
>>
>> Hi Mauricio,
>>
>> Thanks! Yes, I think like you said the compiler couldn't unroll in
>> this case. Because we are passing
On Tue, Apr 18, 2017 at 6:22 PM, Mauricio Vasquez
<mauricio.vasq...@polito.it> wrote:
> Hi William,
>
> On 04/18/2017 06:54 PM, William Tu via iovisor-dev wrote:
>>
>> Hi,
>>
>> I found that if the loop variable "int i" is used in the map look
Error fetching program/map!
Regards,
William
On Fri, Feb 10, 2017 at 10:59 AM, Alexei Starovoitov
<alexei.starovoi...@gmail.com> wrote:
> On Fri, Feb 10, 2017 at 9:08 AM, William Tu <u9012...@gmail.com> wrote:
>> my program is too huge so I start with simple example using
Borkmann <dan...@iogearbox.net> wrote:
> On 02/17/2017 06:07 PM, William Tu via iovisor-dev wrote:
>>
>> Hi,
>>
>> I encountered another BPF verifier issue related to my previous one
>> https://lists.iovisor.org/pipermail/iovisor-dev/2017-January/000603.html
>>
&g
On Thu, Feb 9, 2017 at 5:11 AM, Daniel Borkmann <dan...@iogearbox.net> wrote:
> On 02/08/2017 09:22 PM, William Tu via iovisor-dev wrote:
>>
>> Hi,
>>
>> I have a program which I use around at most 300byte of local stack as
>> below. The largest struct is
Hi,
I have a program which I use around at most 300byte of local stack as
below. The largest struct is the "struct Headers" which is around 80
byte. However, when loading into the verifier, it says
393: (7b) *(u64 *)(r10 -56) = r1
394: (05) goto pc+56
451: (7b) *(u64 *)(r10 -528) = r0
invalid
>max_value;
+ }
Then it passes verifier.
William
On Tue, Jan 17, 2017 at 3:16 PM, Daniel Borkmann <dan...@iogearbox.net> wrote:
> Hi William,
>
>
> On 01/12/2017 07:32 PM, William Tu via iovisor-dev wrote:
>>
>> Hi,
>> I encounter the following BPF veri
thanks! code generation is a good idea.
On Fri, Jan 13, 2017 at 2:28 PM, Thomas Graf <tg...@suug.ch> wrote:
> On 12 January 2017 at 10:50, William Tu via iovisor-dev
> <iovisor-dev@lists.iovisor.org> wrote:
>> Hi,
>>
>> I observed that for direct pac
Hi,
I encounter the following BPF verifier error:
from 28 to 30: R0=imm1,min_value=1,max_value=1 R1=pkt(id=0,off=0,r=22)
R2=pkt_end R3=imm144,min_value=144,max_value=144
R4=imm0,min_value=0,max_value=0 R5=inv48,min_value=2054,max_value=2054
R10=fp
30: (bf) r5 = r3
31: (07) r5 += 23
32: (77) r5
C and look for inline asm usage.
>
> On Fri, Jan 6, 2017 at 1:30 PM, William Tu via iovisor-dev
> <iovisor-dev@lists.iovisor.org> wrote:
>> thanks
>> the code is at
>> https://gist.github.com/williamtu/7e41392a34672d7b4574aee063ea4a3b
>>
>>
>> On Fri, J
thanks
the code is at
https://gist.github.com/williamtu/7e41392a34672d7b4574aee063ea4a3b
On Fri, Jan 6, 2017 at 1:21 PM, Brenden Blanco <bbla...@gmail.com> wrote:
> Yes, it would be helpful to share the code.
>
> On Fri, Jan 6, 2017 at 12:34 PM, William Tu via iovisor-dev
Hi,
I'm adding parser and extra map lookup into the xdp1_kern.c and
encounter this LLVM error. My environment:
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
LLVM version 4.0.0svn
I think it might be related to bpf map access, if I comment out the
map access code, then the problem goes
Hi Brenden, thanks, I will double check my kernel settings.
On Sat, Oct 29, 2016 at 3:16 PM, Brenden Blanco <bbla...@plumgrid.com> wrote:
>
>
> On Sat, Oct 29, 2016 at 1:27 AM, William Tu via iovisor-dev
> <iovisor-dev@lists.iovisor.org> wrote:
>>
>
Hi,
Is there an easy way to clear all entries in a BPF hash map?
My use case:
When my BPF userspace program and kernel BPF is running, I want to
dynamically adding a new BPF hash map. IIUC, there is no way to do
that. So at beginning when loading the BPF, I pre-allocate a pool of
hash maps and
Hi,
I'm running into this LLVM ERROR at compile time. Does anyone seem
this before or can give me some suggestions? thanks!
---
LLVM ERROR: Cannot select: 0x3bafa28: ch = brind 0x3bc98f0:1,
0x3bc98f0 [ORD=1] [ID=9]
0x3bc98f0: i64,ch = load 0x3bb0db0:1, 0x3baf588,
0x3bc8c58
I see, thanks!
I miss the fact that the xdp prog is attached to struct e1000_adapter
*adapter, which is different per netdev, and thus different per
ifindex.
On Mon, Aug 22, 2016 at 4:47 PM, Alexei Starovoitov
<alexei.starovoi...@gmail.com> wrote:
> On Mon, Aug 22, 2016 at 4:26 PM, W
Hi,
I'm looking at definition of xdp_md:
struct xdp_md {
__u32 data;
__u32 data_end;
};
I'm curious why are we using __u32? Isn't data and data_end an 8-byte
pointer to the packet's buffer? For example in xdp2_kern.c
int xdp_prog1(struct xdp_md *ctx)
{
void *data_end = (void
60 matches
Mail list logo