Re: [ovs-dev] about ovs truncate action

2017-02-07 Thread William Tu
On Tue, Feb 7, 2017 at 6:25 AM, Big Strong wrote: > hello, sir > > I noticed that you commit a patch to add truncate action to ovs at > https://github.com/openvswitch/ovs/commit/aaca4fe0ce9e90a41b3f4db84be7d05823c733e4. > It is a great job. Would you be kind to tell me what

[ovs-dev] [PATCHv2 2/2] ovs-ofctl: fix memory leak reported by valgrind.

2017-02-08 Thread William Tu
Testcase 1057 ofproto-dpif - fragment handling - upcall reports the following leak: xrealloc (util.c:123) vconn_dump_flows (vconn.c:1030) read_flows_from_switch (ovs-ofctl.c:3360) ofctl_replace_flows (ovs-ofctl.c:3433) ovs_cmdl_run_command__ (command-line.c:115) Signed-off-by: William

[ovs-dev] [PATCHv2 1/2] ovs-router: fix memory leak reported by valgrind.

2017-02-08 Thread William Tu
-by: William Tu <u9012...@gmail.com> --- lib/ovs-router.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ovs-router.c b/lib/ovs-router.c index d98de20..0c5430a 100644 --- a/lib/ovs-router.c +++ b/lib/ovs-router.c @@ -280,6 +280,8 @@ rt_entry_delete(uint32_t mark, uint8_t priority,

Re: [ovs-dev] [PATCH] ofctrl: Free contents of symbol table in ofctrl_destroy().

2017-02-08 Thread William Tu
thanks! I tested it and found no problem. On Wed, Feb 8, 2017 at 8:40 AM, Ben Pfaff <b...@ovn.org> wrote: > This fixes a memory leak, although it was not a significant leak because > the symbol table is in use until shortly before ovn-controller exits. > > Reported-by:

[ovs-dev] [PATCH 1/2] ovs-router: fix memory leak reported by valgrind.

2017-02-07 Thread William Tu
-by: William Tu <u9012...@gmail.com> --- lib/ovs-router.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ovs-router.c b/lib/ovs-router.c index d98de20..53fb834 100644 --- a/lib/ovs-router.c +++ b/lib/ovs-router.c @@ -280,6 +280,7 @@ rt_entry_delete(uint32_t mark, uint8_t priority,

Re: [ovs-dev] [PATCH 1/2] ovs-router: fix memory leak reported by valgrind.

2017-02-08 Thread William Tu
yes, thanks. I will introduce cls_rule_destroy() and free the minimatch inside. --William On Tue, Feb 7, 2017 at 11:33 PM, Andy Zhou <az...@ovn.org> wrote: > On Tue, Feb 7, 2017 at 10:41 PM, William Tu <u9012...@gmail.com> wrote: >> Valgrind testcase 772: appctl -

Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-15 Thread William Tu
> Here are some examples of translations from OpenFlow to datapath > actions, the way I would expect them to happen: > > OF: 1, clone(truncate(100), push_vlan, 2), 3 > dp: 1, truncate(100), push_vlan, 2, pop_vlan, 3 > I see your point; the "clone" is handled at translation code, and

Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-14 Thread William Tu
uot;. So I assume we need to limit the number or bump up this value. Other than this, I'm not sure whether any action can put inside clone, for example some nested case: clone(clone(sample(...))). >> Signed-off-by: William Tu <u9012...@gmail.com> > > This incremental is needed to

Re: [ovs-dev] [PATCH v2 03/11] ofp-actions: Add clone action.

2016-12-17 Thread William Tu
Thanks for the patch, I have some comments. > +static char * OVS_WARN_UNUSED_RESULT > +parse_CLONE(char *arg, struct ofpbuf *ofpacts, > + enum ofputil_protocol *usable_protocols) > +{ > + > +const size_t ct_offset = ofpacts_pull(ofpacts); I will s/ct_offset/clone_offset/g > +

Re: [ovs-dev] [RFC PATCH] ofp-actions: Add clone action.

2016-11-30 Thread William Tu
OK, I will rebase and resubmit. On Wed, Nov 30, 2016 at 1:25 PM, Ben Pfaff <b...@ovn.org> wrote: > On Wed, Nov 30, 2016 at 01:13:35PM -0800, William Tu wrote: >> This patch adds OpenFlow clone action with syntax as below: >> "clone([action][,action...])".

[ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-11-30 Thread William Tu
g the truncate_unset() because truncated packet is not visible outside the clone(). We definitely should put some limit on the action types available inside clone(). For this patch, there is no restriction. Signed-off-by: William Tu <u9012...@gmail.com> --- v1->v2 - rebase and change

[ovs-dev] [RFC PATCH] ofp-actions: Add clone action.

2016-11-30 Thread William Tu
g the truncate_unset() because truncated packet is not visible outside the clone(). We definitely should put some limit on the action types available inside clone(). For this patch, there is no restriction. Signed-off-by: William Tu <u9012...@gmail.com> --- include/openvswitch/ofp-actions.

Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-02 Thread William Tu
t;b...@ovn.org> wrote: > On Wed, Nov 30, 2016 at 01:35:49PM -0800, William Tu wrote: >> This patch adds OpenFlow clone action with syntax as below: >> "clone([action][,action...])". The clone() action makes a copy of the >> current packet and executes the list of a

Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-01 Thread William Tu
ok. But it might complicate things a lot. > BTW, I believe the port 3 will get a 104byte size packet with this action, > right? > actions= clone(truncate(100), push_vlan, output:3) > Yes. Regards, William > > Thanks > Zhenyu Gao > > 2016-12-01 5:35 GMT+08:00 William T

Re: [ovs-dev] [PATCH v3 05/16] ofp-actions: Add clone action.

2016-12-20 Thread William Tu
Hi Joe, Thanks I will take a look. William On Tue, Dec 20, 2016 at 10:25 AM, Joe Stringer <j...@ovn.org> wrote: > On 18 December 2016 at 00:18, Ben Pfaff <b...@ovn.org> wrote: >> From: William Tu <u9012...@gmail.com> >> >> This patch adds OpenFlow clone

Re: [ovs-dev] [PATCH v3 05/16] ofp-actions: Add clone action.

2016-12-21 Thread William Tu
([ovs-ofctl add-flow br0 "actions=normal"]) ADD_NAMESPACES(at_ns0, at_ns1, at_ns2) ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24") Thanks William On Tue, Dec 20, 2016 at 4:39 PM, William Tu <u9012...@gmail.com> wrote: > Hi Joe, > Thanks I will take a look. > William &

Re: [ovs-dev] [PATCH v3 05/16] ofp-actions: Add clone action.

2016-12-21 Thread William Tu
ceived, 0% packet loss, time 0ms Regards, William On Wed, Dec 21, 2016 at 10:21 AM, Joe Stringer <j...@ovn.org> wrote: > On 21 December 2016 at 07:45, William Tu <u9012...@gmail.com> wrote: >> Hi Joe, >> >> I think we're missing the normal action for handling the no

[ovs-dev] [PATCH] system-traffic: Fix clone test.

2016-12-21 Thread William Tu
The existing clone test fails the system testsuite. The patch provides fix, removes the unused at_ns2, and uses "ovs-ofctl monitor" to validate the packet contents after actions inside a clone. Signed-off-by: William Tu <u9012...@gmail.com> --- tests/system-common-macros.at |

Re: [ovs-dev] [PATCH v1] ofproto-dpif-mirror: Fix issue of reseting snaplen in mirroring

2017-03-31 Thread William Tu
Looks good to me, thanks for the fix. Acked-by: William Tu <u9012...@gmail.com> On Sun, Mar 26, 2017 at 8:16 PM, Zhenyu Gao <sysugaozhe...@gmail.com> wrote: > Currently, the mirror code doesn't check new value of snaplen when try > to reconfigure snaplen. > This patch f

[ovs-dev] [PATCH] bridge: Prohibit "default" bridge name.

2017-04-27 Thread William Tu
ill invoke several kernel elements who has registered on the netdevice notifier chain. One of the notifier, the inetdev_event rejects this devname and register_netdevice fails. The patch prohibits creating "default" bridge name. VMWare-BZ: #1842388 Signed-off-by: William Tu <u9012...@g

Re: [ovs-dev] [PATCH] bridge: Prohibit "default" bridge name.

2017-04-27 Thread William Tu
On Thu, Apr 27, 2017 at 9:57 AM, Ben Pfaff <b...@ovn.org> wrote: > On Thu, Apr 27, 2017 at 04:02:10AM -0700, William Tu wrote: >> Before the patch, when users create bridge named "default", although >> ovs-vsctl fails but vswitchd in the background will keep retr

Re: [ovs-dev] [PATCH] bridge: Prohibit "default" bridge name.

2017-04-28 Thread William Tu
> OK, if I understand properly here, the problem is that asking the Linux > kernel datapath to add a bridge named "default" does two things. First, > it fails. Second, it triggers a notifier that causes OVS to try again. > The second part is what makes this different from other failures and >

Re: [ovs-dev] [PATCH] bridge: Prohibit "default" bridge name.

2017-04-27 Thread William Tu
On Thu, Apr 27, 2017 at 11:17 AM, Ben Pfaff <b...@ovn.org> wrote: > On Thu, Apr 27, 2017 at 10:17:20AM -0700, William Tu wrote: >> On Thu, Apr 27, 2017 at 9:57 AM, Ben Pfaff <b...@ovn.org> wrote: >> > On Thu, Apr 27, 2017 at 04:02:10AM -0700, William Tu wrote: >

[ovs-dev] [PATCH] doc: Fix sphinx reference warning for windows.

2017-04-29 Thread William Tu
Footnote reference 5, 8, and 9 are not referenced in the windws.rst content, causing the following error: Warning, treated as error: /root/ovs/Documentation/topics/windows.rst:506:Footnote [5] is not referenced. Signed-off-by: William Tu <u9012...@gmail.com> --- Documentation/topics/windo

[ovs-dev] [PATCHv2] bridge: Prohibit "default" and "all" bridge name.

2017-04-29 Thread William Tu
has registered on the netdevice notifier chain. And due to creation failed, OVS wakes up and re-recreate the device, which ends up as a high CPU loop. VMWare-BZ: #1842388 Signed-off-by: William Tu <u9012...@gmail.com> Signed-off-by: Ben Pfaff <b...@ovn.org> Acked-by: Greg Rose <g

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-11 Thread William Tu
[snip] >>> Picking up the topic of trunc on patch port. >>> >>> Instead of banning trunc output to a patch port, any down side of >>> translating that >>> to trunc, clone()? After all, native tunneling >>> looks a lot like patch port conceptually. >> >> How does clone() interact with trunc() in

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-11 Thread William Tu
On Wed, May 10, 2017 at 11:04 AM, Darrell Ball wrote: > What are the use case(s) of truncate “outside” of sampling/mirroring ? > The use of truncation in the context of sampling/mirroring is well known. > I don't know any other use cases outside sampling/mirroring. Truncate the

Re: [ovs-dev] [PATCHv2] tunnel-tests: Add test to match tunnel traffic.

2017-05-10 Thread William Tu
On Wed, May 10, 2017 at 3:07 PM, Darrell Ball wrote: > fyi: > > I submitted an updated patch here > https://patchwork.ozlabs.org/patch/760876/ > > I removed the ack since there were significant changes from the > original patch. > > Hi Darrell, Thanks for the tunnel v3 test

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-10 Thread William Tu
> It may be cleaner if we add a new trunc action for the datapath, say > trunc2 that applies > to all outputs within the clone. > > So the translation will look like: clone(trunc2, native tunnel > translation). Would this > approach work? > Or how about we apply actual packet truncation when

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-08 Thread William Tu
I sent you before, but flow stats are not correct on the > underlay bridge. > > Could you confirm this, please? > > Best regards, > Zoltan > >> -Original Message- >> From: Zoltán Balogh >> Sent: Sunday, May 07, 2017 9:16 PM >> To: 'Joe S

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-04 Thread William Tu
On Thu, May 4, 2017 at 4:39 AM, Zoltán Balogh wrote: >> I think that what's happening is that when build_tunnel_send() >> serializes the ODP action for push_tunnel, it doesn't update the >> 'flow' to reflect the new encapsulated state of the packet. Then, when >>

Re: [ovs-dev] [PATCH 1/2] Revert "tunneling: Avoid recirculation on datapath."

2017-05-08 Thread William Tu
Hi Joe and Greg, Maybe it's better I put this revert tunneling patch (1/2) and its tunnel-tests (2/2) in one patch, so the "make check" can pass? Regards, William On Mon, May 8, 2017 at 11:34 AM, Greg Rose wrote: > On Mon, 2017-05-08 at 11:15 -0700, Joe Stringer wrote: >>

Re: [ovs-dev] [PATCH 2/2] tunnel-tests: Add test to match tunnel traffic.

2017-05-08 Thread William Tu
Thanks. I will re-submit this test. William On Mon, May 8, 2017 at 3:56 PM, Joe Stringer <j...@ovn.org> wrote: > On 8 May 2017 at 11:35, Greg Rose <gvrose8...@gmail.com> wrote: >> On Mon, 2017-05-08 at 11:15 -0700, Joe Stringer wrote: >>> From: William Tu <u901

[ovs-dev] [PATCH] tunnel-tests: Add test to match tunnel traffic.

2017-05-08 Thread William Tu
, with the intention to apply GRE tunnel headers and send the packet through the underlay bridge. The underlay bridge should observe GRE traffic. Signed-off-by: William Tu <u9012...@gmail.com> Signed-off-by: Joe Stringer <j...@ovn.org> Acked-by: Greg Rose <gvrose8...@gmail.com> ---

Re: [ovs-dev] [PATCH 2/2] tunnel-tests: Add test to match tunnel traffic.

2017-05-08 Thread William Tu
[snip] > -dnl Check ARP Snoop > +dnl Use arp reply to achieve tunnel next hop mac binding > AT_CHECK([ovs-appctl netdev-dummy/receive br0 > 'recirc_id(0),in_port(100),eth(src=f8:bc:12:44:34:b6,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.92,ti > > AT_CHECK([ovs-appctl tnl/neigh/show |

[ovs-dev] [PATCHv2] tunnel-tests: Add test to match tunnel traffic.

2017-05-08 Thread William Tu
, with the intention to apply GRE tunnel headers and send the packet through the underlay bridge. The underlay bridge should observe GRE traffic. Signed-off-by: William Tu <u9012...@gmail.com> Signed-off-by: Joe Stringer <j...@ovn.org> Acked-by: Greg Rose <gvrose8...@gmail.com> ---

[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 <u9012...@gmail.com> --- acinclude.m4 | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 89f88c

[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: William Tu <

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

2017-10-13 Thread William Tu
runcated") Cc: IWASE Yusuke <iwase.yusu...@gmail.com> Signed-off-by: William Tu <u9012...@gmail.com> --- 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 cd371556

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

2017-10-12 Thread William Tu
Found by inspection. Signed-off-by: William Tu <u9012...@gmail.com> --- 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(

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

2017-10-12 Thread William Tu
> lock. > > --8<--cut here-->8-- > > From: Ben Pfaff <b...@ovn.org> > 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 <

[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 <u9012...@gmail.com> --- lib/netdev.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/netdev.c b/lib/netdev.c index b4e570bafd08..e47bfe1c831d

[ovs-dev] [PATCH] memory: kill ovs-vswitchd under super high memory usage.

2017-11-17 Thread William Tu
to generate coredump file to help debugging. Signed-off-by: William Tu <u9012...@gmail.com> --- lib/memory.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/lib/memory.c b/lib/memory.c index da97476c6a45..75cce6e5dcc3 100644 --- a/lib/memory.c +++ b/lib/me

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

2017-11-10 Thread William Tu
the patch increment refcnt of geneve instead of vport_geneve. Fixes: b6d6830d29e4 ("dpif-netlink-rtnl: Support GENEVE creation") Signed-off-by: William Tu <u9012...@gmail.com> Cc: Eric Garver <e...@erig.me> --- Adding more testing details: On OVS2.7 without dpif-netlink-

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

2017-11-10 Thread William Tu
On Fri, Nov 10, 2017 at 7:54 AM, Eric Garver <e...@erig.me> wrote: > On Fri, Nov 10, 2017 at 05:36:25AM -0800, William Tu wrote: >> Before we introduce dpif-netlink-rtnl, creating a tunnel device >> depends on openvswitch/vport kernel module calling kernel's tunnel API. >

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

2017-11-10 Thread William Tu
>> After the dpif-netlink-rtnl, a tunnel device can be created by using >> rtnetlink, so the creation of fb device comes from the ovs-vswitchd >> instead of going through OVS kernel modules. This breaks the module >> dependency between 1) and 2). As a result, when ovs-vswitchd is running, >> the

Re: [ovs-dev] [PATCH] ovs-ctl: Don't remember vport-* kernel modules

2017-11-13 Thread William Tu
eneve. And when "iptables stop" runs, since > "geneve" has nothing to do with conntrack, it spares it. > Ideally, we should fix this by incrementing the refcount > on the kernel modules. > > Signed-off-by: Gurucharan Shetty <g...@ovn.org> > --- Looks good

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

2017-11-13 Thread William Tu
On Mon, Nov 13, 2017 at 5:01 AM, Pravin Shelar <pshe...@ovn.org> wrote: > On Sat, Nov 11, 2017 at 11:53 PM, Guru Shetty <g...@ovn.org> wrote: >> On 10 November 2017 at 22:54, Gregory Rose <gvrose8...@gmail.com> wrote: >> >>> On 11/11/20

Re: [ovs-dev] [PATCH] tests: Try harder to figure out whether IPv6 is supported.

2017-11-14 Thread William Tu
>> failures on Travis which appear to be because, although the system >> supports >> IPv6, test programs are not allowed to connect or bind IPv6 addresses. >> This commit refines the test for IPv6 to also try to bind the IPv6 >> localhost address, which should convert

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

2017-11-13 Thread William Tu
>> >> That is always been behavior of the port lifecycle. If you remove the >> driver of a device, port is removed from kernel datapath and the >> device is deleted from kernel networking stack. For example you can >> remove intel NIC driver, or veth module even if there is a >> corresponding port

Re: [ovs-dev] [PATCH] Skip processing actions when batch is emptied.

2017-11-15 Thread William Tu
--- nit: please wrap your commit messages to about 75 columns otherwise looks good to me. Acked-by: William Tu <u9012...@gmail.com> > lib/odp-execute.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/lib/odp-execute.c b/lib/odp-execute.c &

Re: [ovs-dev] [PATCH v2 1/2] netdev: Indentation and style fixes.

2017-11-15 Thread William Tu
On Tue, Nov 14, 2017 at 10:15 AM, Ben Pfaff <b...@ovn.org> wrote: > White space changes only. > > Signed-off-by: Ben Pfaff <b...@ovn.org> > --- Acked-by: William Tu <u9012...@gmail.com> ___ dev mailing l

Re: [ovs-dev] [PATCH v2 2/2] netdev: Eliminate redundant ifindex mapping.

2017-11-15 Thread William Tu
ome out of sync > with each other since either one could change independently. This commit > merges them into a single data structure (with two indexes), which at least > means that if one is removed then the other is as well. > > Signed-off-by: Ben Pfaff <b...@ovn.org> > --- Looks g

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

2017-11-10 Thread William Tu
>> yes, this is an artificial dependency. Another way I'm thinking is for >> ovs-vswitchd >> to hold the geneve.ko dependency instead of openvswitch.ko, when user >> creates >> a geneve device. Is there a way to do that through rtnetlink or at >> dpif_netlink_rtnl_create()? > > It should be

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

2017-11-01 Thread William Tu
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 <u9012...@gmail.com> Cc: Eric Garver <e...@erig.me> Cc:

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 <e...@erig.me> 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 unconditional

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

2017-11-02 Thread William Tu
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 <u9012...@gmail.com> Cc: Eric Garver <e...@erig.me> Cc:

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 <e...@erig.me> 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

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

2017-10-24 Thread William Tu
the > datapath actually supports it. > > Signed-off-by: Eric Garver <e...@erig.me> > --- Look good to me. Acked-by: William Tu <u9012...@gmail.com> ___ 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 <e...@erig.me> wrote: > New macro OVS_CHECK_CT_CLEAR() to check if ct_clear action is supported > by the datapath. > > Signed-off-by: Eric Garver <e...@erig.me> > --- Looks good to me, Tested-by: Wil

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.

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 <e...@erig.me> 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 <e...@erig.me> wrote: >> > This test cases uses floating IP (FIP) addresses for each end

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

2017-10-24 Thread William Tu
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 <u9012...@gmail.com> Cc: Eric Garver <e...@erig.me> Cc:

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 <b...@ovn.org> 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 >> ne

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 <b...@ovn.org> 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 <u

[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 <u9012...@gmail.com> --- ovn/controller/pinctrl.c | 1 + 1 file changed, 1 insertion(+) diff --git

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

2017-10-28 Thread William Tu
educes 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: Fix po

[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 <u9012...@gmail.

[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 <u9012...@gmail.com> --- utilities/ovs-appctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utilities/ovs-appctl.c b/utilities/ovs-appctl.c index 8f87cc

[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 <u9012...@gmail.com> --- lib/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/process.c b/lib/process.c index 3e119b

[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 <u9012...@gmail.com> --- utilities/ovs-ofctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 5b7f1b

[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 <u9012...@gmail.com> --- lib/packets.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/packets.c b/lib/packets.c index 74d87e

[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 <u9012...@gmail.com> --- ovn/utiliti

[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, >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 <u9012...@gmail.com> --- lib/packets.c | 1 + 1 file changed, 1 insertion

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

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

[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 <u9012...@gmail.com> --- lib/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/process.c b/lib/process.c index 254052f2c27d..0b8f994f9b75 100644 ---

[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 <u9012...@gmail.com> --- utilities/ovs-testcontroller.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utilities/ovs-testcontroller.c b/utilities/ovs-testcontroller.c

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

2017-10-30 Thread William Tu
do in this case is to 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 <u9012...@gmail.com> wrote: >> >> Clang reports possible null pointe

[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 <u9012...@gmail.com> --- Documentation/faq/contributing.rst | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Documentation/faq/contributing.rst b/Documentati

[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 <u9012...@gmail.com> --- 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

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

2017-10-30 Thread William Tu
. If 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 <e...@erig.me> wrote: > On Thu, Oct 26, 2017 at 12:31:03PM -0700, W

[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 <u9012...@gmail.com> --- 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 7af586

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

2017-10-30 Thread William Tu
analyzer as a workaround. Signed-off-by: William Tu <u9012...@gmail.com> --- 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)

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

2017-10-30 Thread William Tu
t;dalva...@redhat.com> > Signed-off-by: Yi-Hung Wei <yihung@gmail.com> > --- Looks good to me. Tested-by: William Tu <u9012...@gmail.com> ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

[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 <u9012...@gmail.com>

[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] [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: William

[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 <u9012...@gmail.com> --- ovn/utiliti

[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 <u9012...@gmail.com>

[ovs-dev] [PATCHv2] tunnel: make tun_key_to_attr aware of tunnel type.

2018-05-14 Thread William Tu
unnel port. A userspace test case using geneve and gre also demonstrates the issue. The patch makes the tun_key_to_attr aware of the tunnel type. So only the relevant output tunnel's options are set. Reported-by: Xiaoyan Jin <xiaoy...@vmware.com> Signed-off-by: William Tu <u9012...@gmail.com>

Re: [ovs-dev] [PATCHv2] tunnel: make tun_key_to_attr aware of tunnel type.

2018-05-14 Thread William Tu
On Mon, May 14, 2018 at 4:22 PM, Ben Pfaff <b...@ovn.org> wrote: > On Mon, May 14, 2018 at 11:46:47AM -0700, William Tu wrote: >> When there is a flow rule which forwards a packet from geneve >> port to another tunnel port, ex: gre, the tun_metadata carried >> from t

Re: [ovs-dev] [PATCH] tunnel: cleanup geneve md before forwarding to another port.

2018-05-13 Thread William Tu
On Thu, May 10, 2018 at 11:51 PM, William Tu <u9012...@gmail.com> wrote: > When there is a flow rule which forwards a packet from geneve > port to another tunnel port, ex: gre, the tun_metadata carried > from the geneve port needs to be clean up. Otherwise, the outpu

[ovs-dev] [PATCH] tunnel: cleanup geneve md before forwarding to another port.

2018-05-11 Thread William Tu
uot;, when there is a rule forwarding the geneve packet to vxlan/erspan tunnel port. A userspace test case using geneve and gre also demonstrates the issue. Reported-by: Xiaoyan Jin <xiaoy...@vmware.com> Signed-off-by: William Tu <u9012...@gmail.com> Cc: Greg Rose <gvrose8...@gmail.com>

Re: [ovs-dev] [PATCH V3 03/40] gre: fix goto statement typo

2018-05-21 Thread William Tu
On Fri, May 18, 2018 at 5:49 PM, Greg Rose <gvrose8...@gmail.com> wrote: > From: William Tu <u9012...@gmail.com> > > Upstream commit: > commit e3d0328c76dde0b957f62f8c407b79f1d8fe3ef8 > Author: William Tu <u9012...@gmail.com> > Date: Tue Aug 22

Re: [ovs-dev] [PATCH V3 06/40] ip_gre: check packet length and mtu correctly in erspan tx

2018-05-21 Thread William Tu
On Fri, May 18, 2018 at 5:49 PM, Greg Rose <gvrose8...@gmail.com> wrote: > From: William Tu <u9012...@gmail.com> > > Upstream commit: > commit f192970de860d3ab90aa9e2a22853201a57bde78 > Author: William Tu <u9012...@gmail.com> > Date: Thu Oct

Re: [ovs-dev] [PATCH V3 10/40] ip_gre: Refactor the erpsan tunnel code.

2018-05-21 Thread William Tu
On Fri, May 18, 2018 at 5:49 PM, Greg Rose <gvrose8...@gmail.com> wrote: > From: William Tu <u9012...@gmail.com> > > Upstream commit: > commit a3222dc95ca751cdc5f6ac3c9b092b160b73ed9f > Author: William Tu <u9012...@gmail.com> > Date: Thu Nov 3

Re: [ovs-dev] [PATCH V3 11/40] compat/erspan: refactor existing erspan code

2018-05-21 Thread William Tu
On Fri, May 18, 2018 at 5:49 PM, Greg Rose <gvrose8...@gmail.com> wrote: > From: William Tu <u9012...@gmail.com> > > Upstream commit: > commit 1d7e2ed22f8d9171fa8b629754022f22115b3f03 > Author: William Tu <u9012...@gmail.com> > Date: Wed Dec 13 16:

Re: [ovs-dev] [PATCH V3 13/40] ip_gre: erspan: reload pointer after pskb_may_pull

2018-05-21 Thread William Tu
On Fri, May 18, 2018 at 5:49 PM, Greg Rose <gvrose8...@gmail.com> wrote: > From: William Tu <u9012...@gmail.com> > > Upstream commit: > commit d91e8db5b629a3c8c81db4dc317a66c7b5591821 > Author: William Tu <u9012...@gmail.com> > Date: Fri Dec 15 14:

Re: [ovs-dev] [PATCH V3 20/40] datapath: Use correct tunnel receive for ip6gre

2018-05-21 Thread William Tu
nnel.c ip6_tnl_rcv(). > > Signed-off-by: Greg Rose <gvrose8...@gmail.com> > --- LGTM Acked-by: William Tu <u9012...@gmail.com> > datapath/linux/compat/ip6_gre.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/datapath/linux/compat/ip6_gre.

Re: [ovs-dev] [PATCH V3 05/40] compat/gre: add collect_md mode

2018-05-21 Thread William Tu
On Fri, May 18, 2018 at 5:49 PM, Greg Rose <gvrose8...@gmail.com> wrote: > From: William Tu <u9012...@gmail.com> > > commit 1a66a836da630cd70f3639208da549b549ce576b > Author: William Tu <u9012...@gmail.com> > Date: Fri Aug 25 09:21:28 2017 -0700

  1   2   3   4   5   6   7   >