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.
Ea
he
> springtime
> - 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
> Ja
The patch creates a new netdev type called "afxdp" and re-uses some of the
AF_XDP API implementation from xdpsock_user.c at linux sample code.
By default, it binds a device's queue 0 and uses the generic XDP support
to send and receive packets.
Signed-off-by: William Tu
--
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
There are still two issues causing some test cases
failed. This patch provides an work-around.
Signed-off-by: William Tu
---
lib/dpif-netdev.c| 2 +-
tests/system-afxdp-macros.at | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif
or 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_X
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
r packet: 3985 v.s 18124
Next Step
=
1) optimize the 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
am/map to the netdev, and initializes the af_xdp socket.
Signed-off-by: William Tu
---
lib/automake.mk| 5 +-
lib/dp-packet.c| 20 ++
lib/dp-packet.h| 27 +-
lib/dpif-netdev-perf.h | 16 +-
lib/dpif-netdev.c | 59 +++-
lib/if_xdp.h | 79 +
lib/netd
AF_XDP requires attaching an xdp program and xskmap for
each netdev. The patch provides these program/map and
the loading and attaching implementation.
Signed-off-by: William Tu
---
acinclude.m4 | 1 +
bpf/api.h | 6 ++
bpf/helpers.h | 2 ++
bpf/maps.h| 12
AF_XDP requires attaching an xdp program and xskmap for
each netdev. The patch provides these program/map and
the loading and attaching implementation.
Signed-off-by: William Tu
---
acinclude.m4 | 1 +
bpf/api.h | 6 ++
bpf/helpers.h | 2 ++
bpf/maps.h| 12
am/map to the netdev, and initializes the af_xdp socket.
Signed-off-by: William Tu
---
lib/automake.mk | 3 +-
lib/dpif-netdev.c | 74 -
lib/if_xdp.h | 79 ++
lib/netdev-dummy.c| 1 +
lib/netdev-linux.c| 741 ++
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
he patch series is based on the 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|
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-by
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 a
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
If not using ipv6, drop it in XDP.
Signed-off-by: William Tu
---
bpf/xdp.h | 18 ++
1 file changed, 18 insertions(+)
diff --git a/bpf/xdp.h b/bpf/xdp.h
index 2d2102a6ba28..e71b268370c6 100644
--- a/bpf/xdp.h
+++ b/bpf/xdp.h
@@ -23,8 +23,26 @@ __section("xdp")
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
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
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
types, 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/n
r (7):
ovs-bpf: add documentation and configuration.
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
>
> 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, currently
=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
: add 'dpif-bpf' provider.
dpif-bpf-odp: Add bpf datapath 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.
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-by
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
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
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 a
types, 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/n
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
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 -Wbad-function
t;> we could possibly avoid it.
>>
>> Thanks,
>> Yonghong
>>
>>
>> On Sat, Apr 28, 2018 at 7:57 AM, William Tu via iovisor-dev
>> wrote:
>>> Hi,
>>>
>>> We're hitting a BPF verifier error saying
>>> "dereferen
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
Hi Heung,
You can also find more details here:
https://dl.acm.org/citation.cfm?id=3139657
William
On Wed, Dec 27, 2017 at 7:52 AM, William Tu wrote:
> Hi Heung,
>
> Thanks for your interest.
> The eBPF+OVS project is still under development in our private repo.
> We'll
t; 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
> MSc.CS, Principal Kernel Engineer at Red Hat
> LinkedIn: http
On Sun, Sep 3, 2017 at 3:26 PM, Thomas Graf wrote:
> On 1 September 2017 at 04:30, William Tu via iovisor-dev
> wrote:
> > This patch adds two BPF conntrack helper functions, bpf_ct_lookup()
> > and bpf_ct_commit(), to enable the possibility of BPF stateful firewall.
> >
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 wrote:
>
>
> On Fri, Sep 1, 2017 at 10:53 PM, Alexei Starovoitov <
> alexei.starovoi...@gmail.com> wrote:
>
>> On Fri, Sep 1,
On Fri, Sep 1, 2017 at 10:53 PM, Alexei Starovoitov <
alexei.starovoi...@gmail.com> wrote:
> On Fri, Sep 1, 2017 at 4:30 AM, William Tu wrote:
> > +
> > + /* TODO: conntrack expectation */
> > +
> > + nf_
ks. Thanks!
Signed-off-by: William Tu
Cc: Joe Stringer
Cc: Daniel Borkmann
Cc: Alexei Starovoitov
---
include/uapi/linux/bpf.h | 31 +
net/core/filter.c | 224 ++
samples/bpf/Makefile | 1 +
s
On Wed, Apr 19, 2017 at 10:44 AM, William Tu 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 verify it.
>
>> If
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 recogniz
.
> In general, a message like this "back-edge from insn 240 to 219" indicates a
> loop (back-edge ...).
>
> Compiler probably should give a warning if it is BPF backend to indicate
> there
> are loops in the byte code. I will look into this.
>
> Yonghong
>
egards,
William
On Tue, Apr 18, 2017 at 6:22 PM, Mauricio Vasquez
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 lookup as
>> bel
Hi,
I have a struct like below:
struct bpf_flow_keys {
long src;
};
I'm initializing an array of it using structures like below:
struct bpf_flow_keys flow_mask_array[] = {
{.src = },
{.src = },
};
instead of initialize it one-by-one
struct bpf_flow_keys flow_
Hi,
I found that if the loop variable "int i" is used in the map lookup as below:
#pragma clang loop unroll(full)
for (i = 0; i < 8; ++i) {
struct bpf_flow_keys *mask;
mask = bpf_map_lookup_elem(&flow_mask, &i);
if (!mask)
break;
}
Then the compiled BPF code d
rogram is too large. Processed 65537 insn
Error fetching program/map!
Regards,
William
On Fri, Feb 10, 2017 at 10:59 AM, Alexei Starovoitov
wrote:
> On Fri, Feb 10, 2017 at 9:08 AM, William Tu wrote:
>> my program is too huge so I start with simple example using xdp1_kern.c
>> I t
On Mon, Mar 6, 2017 at 7:07 AM, Jesper Dangaard Brouer via iovisor-dev
wrote:
> (repost with subscribed email)
> Hi All,
>
> I've added a section to my eBPF documentation, about how to read the
> eBPF generated ELF binary, and deduct the size of the compiled program
> (mostly for kernel/samples/bp
te:
> 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
>>
>> My guess is that when regi
Hi,
I encountered another BPF verifier issue related to my previous one
https://lists.iovisor.org/pipermail/iovisor-dev/2017-January/000603.html
My guess is that when register spills to stack and restore, the state
of imm upper zero bits does not get restore? Any comments are
appreciated!
This t
ther header structure definitions, I think it's the
reason I use more than 512 byte stack memory.
--William
On Thu, Feb 9, 2017 at 9:48 AM, William Tu wrote:
> On Thu, Feb 9, 2017 at 8:59 AM, Alexei Starovoitov
> wrote:
>> On Thu, Feb 9, 2017 at 8:43 AM, William Tu via io
On Thu, Feb 9, 2017 at 8:59 AM, Alexei Starovoitov
wrote:
> On Thu, Feb 9, 2017 at 8:43 AM, William Tu via iovisor-dev
> wrote:
>>
>> $(CLANG) \
>> -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \
>> -Wno-compare-distinct-point
> You are generating the C files in the end, right? So the code
> shown is what clang gets to compile; or does this come from
> another llvm front end somehow?
yes, we are generating C files, then clang v3.8, then LLVM v4.0. It's
the same compile options used in sample/bpf/Makefile
>
> Also this
On Thu, Feb 9, 2017 at 5:11 AM, Daniel Borkmann 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 the "struct Headers"
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 sta
thanks for the patch, it works.
>> from 52 to 80: R0=imm1,min_value=1,max_value=1 R1=pkt(id=0,off=0,r=34)
>> R2=pkt_end R3=inv R4=imm272 R5=inv56,min_value=17,max_value=17
>> R6=pkt(id=0,off=26,r=34) R10=fp
>> 80: (07) r4 += 71
>> 81: (18) r5 = 0xfff8
>> 83: (5f) r4 &= r5
>> 84: (77) r4 >>= 3
eg->imm &= src_reg->imm;
+
+ else if (opcode == BPF_AND && BPF_SRC(insn->code) == BPF_X &&
+ src_reg->type == UNKNOWN_VALUE)
+ {
+ dst_reg->min_value &= src_reg->min_value;
+ dst_reg->max_value &= sr
thanks! code generation is a good idea.
On Fri, Jan 13, 2017 at 2:28 PM, Thomas Graf wrote:
> On 12 January 2017 at 10:50, William Tu via iovisor-dev
> wrote:
>> Hi,
>>
>> I observed that for direct packet access, we have to use this data and
>> data_end checkin
Hi,
I observed that for direct packet access, we have to use this data and
data_end checking pattern:
int xdp_prog1(struct xdp_md *ctx)
{
void *data_end = (void *)(long)ctx->data_end;
void *data = (void *)(long)ctx->data;
struct ethhdr *eth = data;
...
nh_off = sizeof(*eth);
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 >>=
sage.
>
> On Fri, Jan 6, 2017 at 1:30 PM, William Tu via iovisor-dev
> wrote:
>> thanks
>> the code is at
>> https://gist.github.com/williamtu/7e41392a34672d7b4574aee063ea4a3b
>>
>>
>> On Fri, Jan 6, 2017 at 1:21 PM, Brenden Blanco wrote:
>>> Yes,
thanks
the code is at
https://gist.github.com/williamtu/7e41392a34672d7b4574aee063ea4a3b
On Fri, Jan 6, 2017 at 1:21 PM, Brenden Blanco wrote:
> Yes, it would be helpful to share the code.
>
> On Fri, Jan 6, 2017 at 12:34 PM, William Tu via iovisor-dev
> wrote:
>>
>&
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 a
Hi,
I want to modify packet and broadcast/multicast to different ports.
One way is that at tc ingress, attach a single eBPF program and call
multiple "bpf_skb_clone_redirect()". For example:
set_mac1, clone_redirect(1), set_mac2, inc_ttl, clone_redirect(2),
set_mac3, clone_redirect(3), ...
Someti
Hi Brenden, thanks, I will double check my kernel settings.
On Sat, Oct 29, 2016 at 3:16 PM, Brenden Blanco wrote:
>
>
> On Sat, Oct 29, 2016 at 1:27 AM, William Tu via iovisor-dev
> wrote:
>>
>> Hi,
>>
>> I'm trying to measure the performance of my BPF
Hi,
I'm trying to measure the performance of my BPF programs, which attach
to clsact. As a start, I thought I could simply measure the cycles
spent on cls_bpf_classify(), because it's the wrapper calling into my
BPF programs.
However, it seems that kprobe can not probe cls_bpf_classify(), even
th
Hi Alexei,
Thanks for your reply.
On Mon, Oct 24, 2016 at 7:01 PM, Alexei Starovoitov
wrote:
> On Mon, Oct 24, 2016 at 2:22 PM, William Tu via iovisor-dev
> wrote:
>> Hi,
>>
>> Is there an easy way to clear all entries in a BPF hash map?
>>
>> My use case:
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 al
http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=57a09bf0a416700676e77102c28f9cfcb48267e0
>
> On Sun, Oct 23, 2016 at 4:35 PM, William Tu via iovisor-dev
> wrote:
>> Thanks! I upgrade LLVM to 4.0.0 and this error no longer shows up.
>> William
>>
&
Thanks! I upgrade LLVM to 4.0.0 and this error no longer shows up.
William
On Sat, Oct 22, 2016 at 8:33 AM, Alexei Starovoitov
wrote:
> On Fri, Oct 21, 2016 at 11:38 PM, William Tu via iovisor-dev
> wrote:
>> Hi,
>> I'm running into this LLVM ERROR at compile time. D
test_map and tracex3 uses percpu array. Currently it might fail due to
number of CPU mismatch between kernel and userspace. We will provide
patch later.
Regards,
William
On Thu, Sep 8, 2016 at 3:36 AM, Louie Lu via iovisor-dev
wrote:
> Hi everyone,
>
> I'm running kernel 4.8.0-rc5, and after run
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 [ORD=1] [ID=8]
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
wrote:
> On Mon, Aug 22, 2016 at 4:26 PM, William Tu via iovisor-dev
> wrote:
Hi,
I'm not sure if we discussed this before, but I'm thinking that if I
have two identical NICs (ex: two e1000 cards with ifindex 1 and 2),
and I load the e1000.ko driver. At userspace, I run
$ /samples/bpf/xdp 1
$ /samples/bpf/xdp 2
Then the latter XDP BPF actually overwrites the former because
attached to tc egress and bpf_skb_get_* is attached to egress
qdisc. A ping between two tunnels is used to verify correctness and
the result of bpf_skb_get_* printed by bpf_trace_printk.
Signed-off-by: William Tu
---
samples/bpf/Makefile | 1 +
samples/bpf/bpf_helpers.h | 8
27;s similar that once we check index is within correct
range, the access to the array is safe.
Regards,
William
>
> Thanks
>
>> Regards,
>> William
>>
>> On Mon, Apr 18, 2016 at 1:00 PM, Alexei Starovoitov
>> wrote:
>>> On Mon, Apr 18, 2016 a
Hi Alexei,
I wonder if anyone is working on this issue currently?
Or I could start learning from your "direct packet access" patch and
see if could implement it? Thanks.
Regards,
William
On Mon, Apr 18, 2016 at 1:00 PM, Alexei Starovoitov
wrote:
> On Mon, Apr 18, 2016 at 12:47 P
Hi Alexei,
Thanks! Looking at the xdp_convert_ctx_access(), now I understand that
it's actually doesn't matter and the generated code is the same.
Regards,
William
On Mon, Aug 1, 2016 at 10:02 AM, Alexei Starovoitov
wrote:
> On Sun, Jul 31, 2016 at 11:05:55PM -0700, William Tu vi
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 *)(long)
Hi Brenden,
I've patched the e1000 driver using your link and tested on my VM. I
can run samples/bpf/xdp1 and xdp2 with ping from the other machine
without any issue. Thanks!
Regards,
William
On Wed, Jul 27, 2016 at 1:32 PM, William Tu wrote:
> thanks! I will try it.
>
> On Wed
thanks! I will try it.
On Wed, Jul 27, 2016 at 1:05 PM, Brenden Blanco wrote:
> On Wed, Jul 27, 2016 at 12:50 PM, William Tu via iovisor-dev
> wrote:
>>
>> Hi,
>>
>> I'm planning to test XDP in VM, I wonder if XDP has been ported to
>> net-next, or
Hi,
I'm planning to test XDP in VM, I wonder if XDP has been ported to
net-next, or currently anyone is working on it? Thanks!
Regards,
William
___
iovisor-dev mailing list
iovisor-dev@lists.iovisor.org
https://lists.iovisor.org/mailman/listinfo/iovisor
Jesper Dangaard Brouer
>>> wrote:
>>> > On Tue, 21 Jun 2016 18:54:53 -0700
>>> > Alexei Starovoitov wrote:
>>> >
>>> >> On Tue, Jun 21, 2016 at 11:48 AM, William Tu via iovisor-dev
>>> >> wrote:
>>> >> &g
Hi Alexei,
Thank you, I've sent the patch to netdev.
Regards,
William
On Tue, Jun 21, 2016 at 6:45 PM, Alexei Starovoitov
wrote:
> On Tue, Jun 21, 2016 at 11:03 AM, William Tu via iovisor-dev
> wrote:
>> Hi,
>>
>> I'm trying to run sockex2 and sockex3 but
Hi,
I'm running test_maps under net-next/samples/bpf/, commit
601009780635. The code logic all make sense but I got the assertion
errors / coredump for some unknown reason under different compiler
optimization flags (-O0 and -O2). The test_hashmap_sanity() works fine
but fails at test_percpu_hashm
Hi,
I'm trying to run sockex2 and sockex3 but got the error:
[root@vm-dev bpf]# ./sockex2
failed to create a map: 1 Operation not permitted
Then I found that I have max locked memory set to 64K, after reconfig
to unlimited then the bpf map is created and sockex2/3 works fine.
The hash_map created
99 matches
Mail list logo