Re: [ovs-dev] [PATCH] dpif: Ensure ERSPAN GRE support

2018-06-01 Thread William Tu
On Fri, Jun 1, 2018 at 9:56 AM, Gregory Rose wrote: > On 6/1/2018 9:38 AM, Jiri Benc wrote: >> >> On Fri, 1 Jun 2018 09:15:33 -0700, Gregory Rose wrote: >>> >>> Since ERSPAN over gre/ip_gre was added to the Linux 4.16 kernel the >>> compat interface is needed >>> for kernels up to 4.15 so that we

Re: [ovs-dev] [PATCH] dpif: Ensure ERSPAN GRE support

2018-06-01 Thread William Tu
On Fri, Jun 1, 2018 at 9:38 AM, Jiri Benc wrote: > On Fri, 1 Jun 2018 09:15:33 -0700, Gregory Rose wrote: >> Since ERSPAN over gre/ip_gre was added to the Linux 4.16 kernel the >> compat interface is needed >> for kernels up to 4.15 so that we can support ERSPAN. If the built-in >> gre/ip_gre ker

Re: [ovs-dev] [PATCH] compat: Add skb_checksum_simple_complete()

2018-06-01 Thread William Tu
f-by: Greg Rose > --- LGTM. Acked-by: William Tu ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] [PATCH 1/3] Revert "dpif: Ensure ERSPAN GRE support"

2018-06-05 Thread William Tu
On Mon, Jun 4, 2018 at 1:14 PM, Greg Rose wrote: > This reverts commit 8929c55287abae37efeac1e8876e6b3c2ccad0b9. > > This is the wrong direction for the solution to the ip_gre/gre kernel > module conflicts. > > Signed-off-by: Greg Rose > --- LGTM Acked-by: William Tu

Re: [ovs-dev] [PATCH 2/3] Revert "utilities/ovs-ctl: Force removal of ip_gre/gre"

2018-06-05 Thread William Tu
ause the openvswitch kernel > module to fail to load when the ip_gre/gre protocol entry > points are already claimed. > > Signed-off-by: Greg Rose > --- LGTM Acked-by: William Tu ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] [PATCH 3/3] datapath: Do not fail to load on gre protocol conflict

2018-06-05 Thread William Tu
s are experiencing failures due to the > conflicts and high priority bugs are resulting. > > Signed-off-by: Greg Rose > --- I read through the patch and look good to me. Acked-by: William Tu ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] [PATCH] datapath: Check if gre kernel module is loaded

2018-06-06 Thread William Tu
port address family not supported. > > Signed-off-by: Greg Rose > --- LGTM. Acked-by: William Tu ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] eBPF and OVS

2018-06-14 Thread William Tu
On Thu, Jun 14, 2018 at 3:25 PM, Ben Pfaff wrote: > On Mon, Jun 11, 2018 at 10:32:52AM +, Stokes, Ian wrote: >> Hi all, >> >> The recent DPDK 18.05 release provides BPF functionality for DPDK devices. >> >> The BPF Library provides the ability to load and execute Enhanced Berkeley >> Packet F

Re: [ovs-dev] eBPF and OVS

2018-06-21 Thread William Tu
On Wed, Jun 20, 2018 at 2:38 AM, Ian Stokes wrote: > On 6/14/2018 11:31 PM, William Tu wrote: >> >> On Thu, Jun 14, 2018 at 3:25 PM, Ben Pfaff wrote: >>> >>> On Mon, Jun 11, 2018 at 10:32:52AM +, Stokes, Ian wrote: >>>> >>>> Hi

[ovs-dev] [RFC PATCH 00/11] OVS eBPF datapath.

2018-06-23 Thread William Tu
: 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.

[ovs-dev] [RFC PATCH 01/11] ovs-bpf: add documentation and configuration.

2018-06-23 Thread William Tu
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

[ovs-dev] [RFC PATCH 02/11] netdev: add ebpf support for netdev provider.

2018-06-23 Thread William Tu
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

[ovs-dev] [RFC PATCH 03/11] lib: implement perf event ringbuffer for upcall.

2018-06-23 Thread William Tu
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

[ovs-dev] [RFC PATCH 04/11] lib/bpf: add support for managing bpf program/map.

2018-06-23 Thread 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

[ovs-dev] [RFC PATCH 05/11] dpif: add 'dpif-bpf' provider.

2018-06-23 Thread William Tu
=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

[ovs-dev] [RFC PATCH 06/11] dpif-bpf-odp: Add bpf datapath interface and impl.

2018-06-23 Thread William Tu
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

[ovs-dev] [RFC PATCH 09/11] utilities: Add ovs-bpfctl utility.

2018-06-23 Thread William Tu
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

[ovs-dev] [RFC PATCH 08/11] vswitch/bridge.c: add bpf datapath initialization.

2018-06-23 Thread 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

[ovs-dev] [RFC PATCH 11/11] vagrant: add ebpf support using ubuntu/bionic

2018-06-23 Thread William Tu
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

[ovs-dev] [RFC PATCH 07/11] bpf: implement OVS BPF datapath.

2018-06-23 Thread William Tu
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

[ovs-dev] [RFC PATCH 10/11] tests: Add "make check-bpf" traffic target.

2018-06-23 Thread William Tu
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

Re: [ovs-dev] [iovisor-dev] [RFC PATCH 00/11] OVS eBPF datapath.

2018-06-28 Thread William Tu
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

Re: [ovs-dev] [PATCH 1/2] compat: Fix gre header bug

2018-06-28 Thread William Tu
g that isn't present. > > Fixes: 436d36db ("compat: Fixups for newer kernels") > Signed-off-by: Greg Rose > --- Looks good to me. Acked-by: William Tu > datapath/linux/compat/ip_gre.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) >

Re: [ovs-dev] [PATCH 2/2] datapath: Ignore key in ip_tunnel_lookup

2018-06-28 Thread William Tu
On Thu, Jun 28, 2018 at 4:01 PM, Greg Rose wrote: > The key value is always zero in ip_tunnel_lookup() for all OVS > tunnels but in received packets it is set. Just ignore it for > the ip_tunnel_lookup() in the same manner as erspan_rcv(). > > Fixes: 8e53509c ("gre: introduce native tunnel suppor

Re: [ovs-dev] [PATCH V2 1/2] compat: Fix gre header bug

2018-06-29 Thread William Tu
g that isn't present. > > Fixes: 436d36db ("compat: Fixups for newer kernels") > Signed-off-by: Greg Rose > --- LGTM Acked-by: William Tu > datapath/linux/compat/ip_gre.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --gi

Re: [ovs-dev] [PATCH V2 2/2] datapath: Add missing code in ip_tunnel_lookup()

2018-06-29 Thread William Tu
e key parameter so that the tunnel lookups wouldn't fail. > > Fixes: 8e53509c ("gre: introduce native tunnel support for ERSPAN") > Reported-by: William Tu > Signed-off-by: Greg Rose > > --- Looks great! thanks Acked-by: William Tu > > V2 - Add

Re: [ovs-dev] [iovisor-dev] [RFC PATCH 00/11] OVS eBPF datapath.

2018-07-04 Thread William Tu
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

Re: [ovs-dev] [iovisor-dev] [RFC PATCH 00/11] OVS eBPF datapath.

2018-07-05 Thread William Tu
> > 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

[ovs-dev] [PATCH] datapath: work around the single GRE receive limitation.

2018-07-10 Thread William Tu
ceiver. We can either try to unload the gre.ko by removing its dependencies, or, in this patch, we try to register OVS as only the GRE transmit portion when detecting there already exists another GRE receiver. Signed-off-by: William Tu Cc: Greg Rose Cc: Yifeng Sun --- datapath/linux/compa

Re: [ovs-dev] [PATCH] datapath: work around the single GRE receive limitation.

2018-07-10 Thread William Tu
On Tue, Jul 10, 2018 at 4:27 PM, Yifeng Sun wrote: > Looks good to me, thanks. > > Reviewed-by: Yifeng Sun > > > > On Tue, Jul 10, 2018 at 10:50 AM, William Tu wrote: >> >> Commit 9f57c67c379d ("gre: Remove support for sharing GRE protocol hook") >&

[ovs-dev] [PATCHv2] datapath: work around the single GRE receive limitation.

2018-07-11 Thread William Tu
ceiver. We can either try to unload the gre.ko by removing its dependencies, or, in this patch, we try to register OVS as only the GRE transmit portion when detecting there already exists another GRE receiver. Signed-off-by: William Tu Cc: Greg Rose Cc: Yifeng Sun --- v1->v2: improv

[ovs-dev] [PATCHv3] datapath: work around the single GRE receive limitation.

2018-07-11 Thread William Tu
ceiver. We can either try to unload the gre.ko by removing its dependencies, or, in this patch, we try to register OVS as only the GRE transmit portion when detecting there already exists another GRE receiver. Signed-off-by: William Tu Tested-by: Greg Rose Reviewed-by: Greg Rose Cc: Greg Rose

Re: [ovs-dev] [PATCH] tests: Add gre test that doesn't requiring Linux gre module

2018-07-11 Thread William Tu
re module to setup gre port. > > This patch repairs the gre test by completely removing the > dependancy of kernel's gre module and emulating a virtual > Linux gre port that sends out arp and icmp packets. > > Suggested-by: William Tu > Signed-off-by: Yifeng Sun > ---

[ovs-dev] [RFC PATCHv2 00/13] OVS eBPF datapath.

2018-07-14 Thread William Tu
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

[ovs-dev] [RFC PATCHv2 01/13] ovs-bpf: add documentation and configuration.

2018-07-14 Thread William Tu
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

[ovs-dev] [RFC PATCHv2 02/13] netdev: add ebpf support for netdev provider.

2018-07-14 Thread William Tu
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

[ovs-dev] [RFC PATCHv2 03/13] lib: implement perf event ringbuffer for upcall.

2018-07-14 Thread William Tu
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

[ovs-dev] [RFC PATCHv2 04/13] lib/bpf: add support for managing bpf program/map.

2018-07-14 Thread 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

[ovs-dev] [RFC PATCHv2 05/13] dpif: add 'dpif-bpf' provider.

2018-07-14 Thread William Tu
=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

[ovs-dev] [RFC PATCHv2 06/13] dpif-bpf-odp: Add bpf datapath interface and impl.

2018-07-14 Thread William Tu
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

[ovs-dev] [RFC PATCHv2 08/13] vswitch/bridge.c: add bpf datapath initialization.

2018-07-14 Thread 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

[ovs-dev] [RFC PATCHv2 09/13] utilities: Add ovs-bpfctl utility.

2018-07-14 Thread William Tu
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

[ovs-dev] [RFC PATCHv2 07/13] bpf: implement OVS BPF datapath.

2018-07-14 Thread William Tu
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

[ovs-dev] [RFC PATCHv2 11/13] vagrant: add ebpf support using ubuntu/bionic

2018-07-14 Thread William Tu
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

[ovs-dev] [RFC PATCHv2 13/13] xdp: early drop ipv6 packet.

2018-07-14 Thread William Tu
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")

[ovs-dev] [RFC PATCHv2 12/13] ofproto: disable megaflow for bpf datapath.

2018-07-14 Thread William Tu
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

[ovs-dev] [RFC PATCHv2 10/13] tests: Add "make check-bpf" traffic target.

2018-07-14 Thread William Tu
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

Re: [ovs-dev] [PATCH] erspan: set bso bit based on mirrored packet's len

2018-07-18 Thread William Tu
Bad Frame with CRC or Alignment Error > 01 --> Payload is a Short Frame > 10 --> Payload is an Oversized Frame > > Based the short/oversized definitions in RFC1757, the patch sets > the bso bit based on the mirrored packet's size. > > Repo

Re: [ovs-dev] [PATCH] ip_tunnel: Fix bugs that could crash kernel

2018-07-20 Thread William Tu
w underlay.pcap & > sleep 1 > OVS_TRAFFIC_VSWITCHD_STOP > AT_CLEANUP > > Signed-off-by: Yifeng Sun > --- LGTM, Thanks for the fix. Acked-by: William Tu ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] [PATCH] compat: Allow IPv6 GRE/ERSPAN Tx when ip6_gre is loaded

2018-07-27 Thread William Tu
On Thu, Jul 26, 2018 at 9:11 AM, Greg Rose wrote: > When for some reason the built-in kernel ip6_gre module is loaded that > would prevent the openvswitch kernel driver from loading. Even when > the built-in kernel ip6_gre module is loaded we can still perform > port mirroring via Tx. Adjust th

[ovs-dev] [PATCH] compat: ip6_tunnel: improve error message.

2018-07-27 Thread William Tu
When loading compact ip6 tunnel, if the system already loads upstream kernel's ip6 tunnel, print error message before return. Signed-off-by: William Tu Cc: Greg Rose --- datapath/linux/compat/ip6_tunnel.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dat

Re: [ovs-dev] [PATCH V2] compat: Allow IPv6 GRE/ERSPAN Tx when ip6_gre is loaded

2018-07-27 Thread William Tu
Tx. Adjust the error handling and detect when > the ip6_gre kernel module is loaded and in that case still enable > IPv6 GRE/ERSPAN Tx. > > Signed-off-by: Greg Rose > > --- > LGTM, Thanks. Acked-by: William Tu ___ dev mailin

[ovs-dev] [PATCH] netdev: Fix memory leak on error path.

2017-10-12 Thread William Tu
Found by inspection. Signed-off-by: William Tu --- lib/netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/netdev.c b/lib/netdev.c index b4e570bafd08..bedc21dec48e 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -2220,6 +2220,8 @@ netdev_ports_insert(struct netdev *netdev, const

Re: [ovs-dev] [PATCH] netdev: Fix memory leak on error path.

2017-10-12 Thread William Tu
this > lock. > > --8<--cut here-->8-- > > From: Ben Pfaff > Date: Thu, 12 Oct 2017 10:33:06 -0700 > Subject: [PATCH] netdev: Fix memory leak on error path in > netdev_ports_insert(). > > Reported-by: William Tu > Signed-off-by: Ben Pf

[ovs-dev] [PATCHv2] netdev: Fix memory leak on error path.

2017-10-12 Thread William Tu
Instead of freeing in the error path, move the allocation after it. Found by inspection. Signed-off-by: William Tu --- lib/netdev.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/netdev.c b/lib/netdev.c index b4e570bafd08..e47bfe1c831d 100644 --- a/lib/netdev.c

[ovs-dev] [PATCH] ofproto-dpif-xlate: Fix truncate and native tunnnel

2017-10-13 Thread William Tu
tion for truncated") Cc: IWASE Yusuke Signed-off-by: William Tu --- ofproto/ofproto-dpif-xlate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index cd3715562a57..ddcaf059ded2 100644 --- a/ofproto/ofproto-dpi

[ovs-dev] [PATCH 1/2] acinclude: Add support for grep option.

2017-10-16 Thread William Tu
Allow to pass grep's option to OVS_GREP_IFELSE. One use case is to pass '-w' for exact match. Signed-off-by: William Tu --- acinclude.m4 | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 89f88ca8de75..543e1e3f06

[ovs-dev] [PATCH 2/2] acinclude: Fix SKB_GSO_UDP check.

2017-10-16 Thread William Tu
The HAVE_SKB_GSO_UDP checks whether skbuff.h defines SKB_GSO_UDP. However, it falsely returns yes because it finds SKB_GSO_UDP_TUNNEL. Thus, add exact match "-w" option for the grep command. Fixes: ad283644f0e4 ("acinclude: Check for SKB_GSO_UDP") Signed-off-by: Willi

[ovs-dev] [PATCH] travis: Fix OSX build on travis

2017-10-23 Thread William Tu
Run "brew update" before any installs. This yields a clean build: https://travis-ci.org/williamtu/ovs-travis/builds/291616874 Signed-off-by: William Tu Cc: Yi-Hung Wei --- .travis/osx-prepare.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis/osx-prepare.sh b/.

Re: [ovs-dev] [PATCH 1/3] dpif: Add support for OVS_ACTION_ATTR_CT_CLEAR

2017-10-24 Thread William Tu
supports it. > > Signed-off-by: Eric Garver > --- Look good to me. Acked-by: William Tu ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] [PATCH 2/3] system-common-macros: Check for ct_clear action in datapath

2017-10-24 Thread William Tu
On Fri, Oct 20, 2017 at 11:23 AM, Eric Garver wrote: > New macro OVS_CHECK_CT_CLEAR() to check if ct_clear action is supported > by the datapath. > > Signed-off-by: Eric Garver > --- Looks good to me, Tested-by: William Tu ___ dev

Re: [ovs-dev] [PATCH 3/3] system-traffic: Add conntrack floating IP test

2017-10-24 Thread William Tu
On Fri, Oct 20, 2017 at 11:23 AM, Eric Garver wrote: > This test cases uses floating IP (FIP) addresses for each endpoint. If > the destination is a FIP, the packet will undergo a transformation of > the form (dst=FIP, src=non-FIP) --> (dst=non-FIP, src=FIP) before > egress. Otherwise the packet i

Re: [ovs-dev] [PATCH 3/3] system-traffic: Add conntrack floating IP test

2017-10-24 Thread William Tu
On Tue, Oct 24, 2017 at 1:44 PM, Eric Garver wrote: > On Tue, Oct 24, 2017 at 12:46:46PM -0700, William Tu wrote: >> On Fri, Oct 20, 2017 at 11:23 AM, Eric Garver wrote: >> > This test cases uses floating IP (FIP) addresses for each endpoint. If >> > the destinatio

[ovs-dev] [PATCH] dpif-netlink-rtnl: Fix ovs_geneve probing after restart

2017-10-24 Thread William Tu
eat a bridge and attach a geneve port using out-of-tree geneve > /etc/init.d/openvswitch-switch restart Fixes: 921c370a9df5 ("dpif-netlink: Probe for out-of-tree tunnels, decides used interface") Signed-off-by: William Tu Cc: Eric Garver Cc: Gurucharan Shetty --- lib/dpif-netlink-rtn

Re: [ovs-dev] [PATCH 3/3] system-traffic: Add conntrack floating IP test

2017-10-26 Thread William Tu
Hi Eric, Thanks for the reply. >> >> dnl means the datapath didn't process the ct_clear action. Ending in >> >> SYN_RECV >> >> dnl (OVS maps to ESTABLISHED) means the initial frame was committed, but >> >> not a >> >> dnl second time after the FIP translation (because ct_clear didn't >> >> o

Re: [ovs-dev] [PATCH] dpif-netlink-rtnl: Fix ovs_geneve probing after restart

2017-10-26 Thread William Tu
On Wed, Oct 25, 2017 at 10:39 AM, Eric Garver wrote: > On Tue, Oct 24, 2017 at 02:43:31PM -0700, William Tu wrote: > > Hi William, > Thanks for taking a look at this. > >> When using the out-of-tree (openvswitch compat) geneve module, >> the first time oot tunnel pr

Re: [ovs-dev] [PATCH] dpif-netlink-rtnl: Fix ovs_geneve probing after restart

2017-10-26 Thread William Tu
On Thu, Oct 26, 2017 at 11:15 AM, Eric Garver wrote: > On Thu, Oct 26, 2017 at 09:12:14AM -0700, William Tu wrote: >> On Wed, Oct 25, 2017 at 10:39 AM, Eric Garver wrote: >> > On Tue, Oct 24, 2017 at 02:43:31PM -0700, William Tu wrote: >> > >> > Hi William, &

[ovs-dev] [PATCH] dpif-netlink-rtnl: Fix ovs_geneve probing after restart

2017-10-26 Thread William Tu
d/openvswitch-switch start > creat a bridge and attach a geneve port using out-of-tree geneve > /etc/init.d/openvswitch-switch restart Fixes: 921c370a9df5 ("dpif-netlink: Probe for out-of-tree tunnels, decides used interface") Signed-off-by: William Tu Cc: Eric Garver Cc: Gur

Re: [ovs-dev] [PATCH v2 3/3] system-traffic: Add conntrack floating IP test

2017-10-27 Thread William Tu
wise the packet is untouched. > > This exercises the ct_clear action in the datapath. > > Signed-off-by: Eric Garver > --- Looks good to me. Acked-by: William Tu ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

[ovs-dev] [PATCH 00/11] Fix clang static analysis null pointer bugs.

2017-10-28 Thread William Tu
reduces to 35. Tested it by doing "make clang-analyze" William Tu (11): dp-packet: fix possible null pointer argument ovn-controller: Fix possible null pointer in memcmp. ovs-appctl: Fix possible null pointer argument. lib/process: Fix possible null pointer argument. ovs-ofctl: F

[ovs-dev] [PATCH 01/11] dp-packet: fix possible null pointer argument

2017-10-28 Thread William Tu
Clang reports possible null pointer argument to the memcpy src. This is due to at dp_packet_clone_data_with_headroom, the dp_packet *b might have a NULL base due to allocating a dp_packet with size = 0. Fix it by adding ovs_assert to satisfy clang. Signed-off-by: William Tu --- lib/dp-packet.c

[ovs-dev] [PATCH 02/11] ovn-controller: Fix possible null pointer in memcmp.

2017-10-28 Thread William Tu
Clang reports possible null pointer in_dhcp_opt passing to memcmp. This might due to dp_packet_get_udp_payload retuning null. Fix it by adding ovs_assert. Signed-off-by: William Tu --- ovn/controller/pinctrl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ovn/controller/pinctrl.c b/ovn

[ovs-dev] [PATCH 03/11] ovs-appctl: Fix possible null pointer argument.

2017-10-28 Thread William Tu
Clang reports possible optarg as null pointer passed to atoi. Fix it by adding ovs_assert check before. Signed-off-by: William Tu --- utilities/ovs-appctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utilities/ovs-appctl.c b/utilities/ovs-appctl.c index 8f87cc4f6c6e..cc1326bc9478

[ovs-dev] [PATCH 04/11] lib/process: Fix possible null pointer argument.

2017-10-28 Thread William Tu
Clang reports possible null pointer due to process_register could take the name from argv[0]. Fix it by adding ovs_assert check. Signed-off-by: William Tu --- lib/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/process.c b/lib/process.c index 3e119b59bfbc..254052f2c27d 100644

[ovs-dev] [PATCH 05/11] ovs-ofctl: Fix possible null pointer.

2017-10-28 Thread William Tu
Clang reports possible null pointer of optarg as argument to strtoul. Fix it by adding ovs_assert check. Signed-off-by: William Tu --- utilities/ovs-ofctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 5b7f1b02104f..05c5995fa775 100644

[ovs-dev] [PATCH 06/11] packets: Fix possible null pointer argument to memmove.

2017-10-28 Thread William Tu
Clang reports possible null pointer to memmove due to dp_packet_data might retun null. Fix it by adding ovs_assert check. Signed-off-by: William Tu --- lib/packets.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/packets.c b/lib/packets.c index 74d87eda89e1..230a62553ff6 100644 --- a

[ovs-dev] [PATCH 07/11] packets: Fix possible null pointer to memcmp.

2017-10-28 Thread William Tu
Clang reports possible null pointer passes to dst of memcmp, &nh->ip6_src. This is due to *nh comes from dp_packet_l3, and dp_packet_l3 might return NULL. Fix it by adding ovs_assert check. Signed-off-by: William Tu --- lib/packets.c | 1 + 1 file changed, 1 insertion(+) diff --gi

[ovs-dev] [PATCH 08/11] ovn-sbctl: Fix possible null pointer to qsort.

2017-10-28 Thread William Tu
Clang reports possible null pointer 'lflows' passed to qsort. This is due to the checker unable to make sure whether 'lflows' gets malloc or not in the previous loop. Thus, fix it by adding ovs_assert to pass clang checker. Signed-off-by: William Tu --- ovn/utilities/ovn-s

[ovs-dev] [PATCH 09/11] tnl-neigh-cache: Fix possible null pointer.

2017-10-28 Thread William Tu
Clang reports possible null pointer '&wc->masks.ipv6_src' to memset. Workaround it by adding extra pointer check. Signed-off-by: William Tu --- lib/tnl-neigh-cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tnl-neigh-cache.c b/lib/tnl-neigh-cache.c i

[ovs-dev] [PATCH 10/11] lib: Fix possible null pointer to execvp.

2017-10-28 Thread William Tu
Clang reports possible null pointer 'argv[0]' to execvp. Fix it by adding ovs_assert check. Signed-off-by: William Tu --- lib/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/process.c b/lib/process.c index 254052f2c27d..0b8f994f9b75 100644 --- a/lib/process.c

[ovs-dev] [PATCH 11/11] ovs-testcontroller: Fix possible null pointer to atoi.

2017-10-28 Thread William Tu
Clang reports possible optarg as null passed to atoi. Fix it by adding ovs_assert check. Signed-off-by: William Tu --- utilities/ovs-testcontroller.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utilities/ovs-testcontroller.c b/utilities/ovs-testcontroller.c index b4a451286455

[ovs-dev] [PATCH 1/4] ofproto-dpif-xlate: Fix bad memory free.

2017-10-30 Thread William Tu
Clang reports possibly bad free of 'ofm' when it comes from the stack instead of malloc because Clang is not able to verify whether the previous if condition 'ctx->xin->xcache' still hold the same. Fix it by adding additional condition. Signed-off-by: William Tu

[ovs-dev] [PATCH 0/4] Fix clang static checker errors.

2017-10-30 Thread William Tu
The patch series fix three bug types reported by clang, dead assignment, bad free, and memory leak. William Tu (4): ofproto-dpif-xlate: Fix bad memory free. ofp-actions: Fix dead assignment. ovn-sbctl: Fix dead assignment. util: Fix potential leak of memory. lib/ofp-actions.c

[ovs-dev] [PATCH 2/4] ofp-actions: Fix dead assignment.

2017-10-30 Thread William Tu
Clang reports value stored to 'eah' in never read. Fix it by removing it. Signed-off-by: William Tu --- lib/ofp-actions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index 71eb70c3c239..79041c281ed0 100644 --- a/lib/ofp

[ovs-dev] [PATCH 3/4] ovn-sbctl: Fix dead assignment.

2017-10-30 Thread William Tu
Clang reports value stored to 'sb' is never read. Fix it by removing it. Signed-off-by: William Tu --- ovn/utilities/ovn-sbctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c index 7af5863b08fc..c5ec4e6ea

[ovs-dev] [PATCH 4/4] util: Fix potential leak of memory.

2017-10-30 Thread William Tu
clude the clang analyzer as a workaround. Signed-off-by: William Tu --- lib/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/util.c b/lib/util.c index a26cd51dcf6d..7153e8b8a5b6 100644 --- a/lib/util.c +++ b/lib/util.c @@ -534,6 +534,7 @@ get_subprogram_name(void) void set_subpro

Re: [ovs-dev] [PATCH] system-traffic: Fix conntrack tests

2017-10-30 Thread William Tu
check-system-userspace TESTSUITEFLAGS='18 19 37' > > This patch modifies the check messages to fix the breakage. > > Fixes: 7827edcaebd8 ("Add dl_type to flow metadata for correct interpretation > of conntrack metadata") > CC: Daniel Alvarez > Signed-off-b

Re: [ovs-dev] [PATCH] dpif-netlink-rtnl: Fix ovs_geneve probing after restart

2017-10-30 Thread William Tu
restarting ovs-vswitch restarts the geneve device, then we might see more packets lost. So I'm thinking about another way to fix it without deleting the device. Thanks William On Thu, Oct 26, 2017 at 1:20 PM, Eric Garver wrote: > On Thu, Oct 26, 2017 at 12:31:03PM -0700, William Tu wrote:

[ovs-dev] [PATCH] faq: Fix header path of ofp-msgs.h.

2017-10-30 Thread William Tu
Replace path 'lib/ofp-msgs.h' with 'include/openvswitch/ofp-msgs.h' Signed-off-by: William Tu --- Documentation/faq/contributing.rst | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Documentation/faq/contributing.rst b/Documentation/faq/co

Re: [ovs-dev] [PATCH 08/11] ovn-sbctl: Fix possible null pointer to qsort.

2017-10-30 Thread William Tu
check the value of n_flows after the > loop that populates lflows. If it is 0, then close the vconn and exit the > function early. > > On Sat, Oct 28, 2017 at 12:37 PM William Tu wrote: >> >> Clang reports possible null pointer 'lflows' passed to qsort. >> This

Re: [ovs-dev] [PATCH 4/4] util: Fix potential leak of memory.

2017-10-30 Thread William Tu
On Mon, Oct 30, 2017 at 12:49 PM, Ben Pfaff wrote: > On Mon, Oct 30, 2017 at 10:27:55AM -0700, William Tu wrote: >> Clang reports potiential leak of memory pointed to by 'pname'. >> We already free the previous subporgram name when setting the >> new subprogram na

Re: [ovs-dev] [PATCH 1/2] acinclude: Add support for grep option.

2017-10-31 Thread William Tu
On Mon, Oct 30, 2017 at 1:04 PM, Ben Pfaff wrote: > On Mon, Oct 16, 2017 at 07:26:44AM -0700, William Tu wrote: >> Allow to pass grep's option to OVS_GREP_IFELSE. >> One use case is to pass '-w' for exact match. >> >> Signed-off-by: William Tu >

[ovs-dev] [PATCHv2] acinclude: Fix SKB_GSO_UDP check.

2017-10-31 Thread William Tu
The HAVE_SKB_GSO_UDP checks whether skbuff.h defines SKB_GSO_UDP. However, it falsely returns yes because grep matches SKB_GSO_UDP_TUNNEL. Thus, add space character '[:space:]' before and after it. Fixes: ad283644f0e4 ("acinclude: Check for SKB_GSO_UDP") Signed-off-by: Willi

[ovs-dev] [PATCHv2 2/2] ovn-sbctl: Fix possible null pointer to qsort.

2017-10-31 Thread William Tu
Clang reports possible null pointer 'lflows' passed to qsort. This is due to the checker unable to make sure whether 'lflows' gets malloc or not in the previous loop. Fix it by checking the 'n_flows' before calling qsort. Signed-off-by: William Tu --- ovn/util

[ovs-dev] [PATCHv2 1/2] ofproto-dpif-xlate: Fix bad memory free.

2017-10-31 Thread William Tu
Clang reports possibly bad free of 'ofm' when it comes from the stack instead of malloc because Clang is not able to verify whether the previous if condition 'ctx->xin->xcache' still hold the same. Fix it by adding additional condition. Signed-off-by: William Tu

[ovs-dev] [PATCHv2] dpif-netlink-rtnl: Fix ovs_geneve probing after restart.

2017-11-01 Thread William Tu
nvswitch-switch start > creat a bridge and attach a geneve port using out-of-tree geneve > /etc/init.d/openvswitch-switch restart Fixes: 921c370a9df5 ("dpif-netlink: Probe for out-of-tree tunnels, decides used interface") Signed-off-by: William Tu Cc: Eric Garver Cc: Gurucharan Sh

Re: [ovs-dev] [PATCH] dpif-netlink-rtnl: Fix ovs_geneve probing after restart

2017-11-02 Thread William Tu
On Wed, Nov 1, 2017 at 8:29 AM, Eric Garver wrote: > On Mon, Oct 30, 2017 at 10:36:29AM -0700, William Tu wrote: >> Thanks for the review. >> >> Guru and I had some offline discussion. We have concern about possible >> packet lost when unconditionally remove the inte

[ovs-dev] [PATCHv3] dpif-netlink-rtnl: Fix ovs_geneve probing after restart.

2017-11-02 Thread William Tu
nvswitch-switch start > creat a bridge and attach a geneve port using out-of-tree geneve > /etc/init.d/openvswitch-switch restart Fixes: 921c370a9df5 ("dpif-netlink: Probe for out-of-tree tunnels, decides used interface") Signed-off-by: William Tu Cc: Eric Garver Cc: Guruchara

Re: [ovs-dev] [PATCHv2] dpif-netlink-rtnl: Fix ovs_geneve probing after restart.

2017-11-02 Thread William Tu
On Thu, Nov 2, 2017 at 10:32 AM, Eric Garver wrote: > On Wed, Nov 01, 2017 at 12:35:40PM -0700, William Tu wrote: >> When using the out-of-tree (openvswitch compat) geneve module, >> the first time oot tunnel probing returns true (correct). >> Without unloading the geneve mod

[ovs-dev] [PATCH] datapath: compat: fix kernel module reference count.

2017-11-10 Thread William Tu
lly need vport_geneve, so the patch increment refcnt of geneve instead of vport_geneve. Fixes: b6d6830d29e4 ("dpif-netlink-rtnl: Support GENEVE creation") Signed-off-by: William Tu Cc: Eric Garver --- Adding more testing details: On OVS2.7 without dpif-netlink-rtnl, kernel 4.8 lsmo

  1   2   3   4   5   6   7   8   9   10   >