Re: [ovs-dev] [PATCH] FAQ: ERSPAN is no longer undocumented.

2016-09-29 Thread William Tu
Acked-by: William Tu On Thu, Sep 15, 2016 at 11:11 AM, Ben Pfaff wrote: > See https://tools.ietf.org/html/draft-foschiano-erspan-01. Even though > that draft has expired, it's genuine documentation. > > Signed-off-by: Ben Pfaff > --- > FAQ.md | 5 ++--- > 1 file c

Re: [ovs-dev] [PATCH] system-traffic: Don't rely on --field-separator.

2016-08-18 Thread William Tu
LGTM, tested it and no problem. thanks for the fix. Acked-by: William Tu On Thu, Aug 18, 2016 at 3:56 PM, Joe Stringer wrote: > This is available in GNU awk, but not other awks (eg mawk). Drop this in > favour of "ofctl_strip" to produce reliable output. > > Signe

[ovs-dev] [PATCHv2] system-traffic: Add link-args for ADD_NATIVE_TUNNEL.

2016-08-18 Thread William Tu
igured before becoming up state. Note that the original 'link-args' is renamed to 'type-args'. Signed-off-by: William Tu --- tests/system-common-macros.at | 13 +++-- tests/system-traffic.at | 3 +-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a

[ovs-dev] [PATCH] system-traffic: Add mac addr setting in ADD_NATIVE_TUNNEL.

2016-08-12 Thread William Tu
Ubuntu 14.04 with kernel 3.13 fails to set a GRE tunnel's mac address after device state is up. The patch adds mac address setting in ADD_NATIVE_TUNNEL as an optional configuration parameter so that we can set the mac address, then bring up the device. Signed-off-by: William Tu ---

Re: [ovs-dev] [v2] ovs-vsctl: simply vsctl_parent_process_info()

2016-08-09 Thread William Tu
Thanks for making this code much more clean. I've tested it and no problem. Acked-by: William Tu On Tue, Aug 9, 2016 at 12:50 PM, Andy Zhou wrote: > Use ds_get_line() instead of hand rolling it. Rearrange the logic > to removes some duplication. > > Signed-off-by: Andy Zhou

[ovs-dev] [PATCHv2] fedora.spec: Add OVN include files.

2016-08-02 Thread William Tu
/lex.h The patch fixes it and tested with rpmbuild 4.13.0 under Fedora 23. Signed-off-by: William Tu --- rhel/openvswitch-fedora.spec.in | 1 + 1 file changed, 1 insertion(+) diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 088afcb..34c0f37 100644 --- a/rhel/o

Re: [ovs-dev] [PATCH] fedora.spec: Disable rpmbuild unpackaged files check.

2016-08-02 Thread William Tu
> Is this just because the fedora packaging hasn't been updated to > provide OVN, or someone has forgotten to update the specfile after > adding/moving files? > > It seems to me like the right solution is to specify these files in > the specfile somehow, rather than overriding a warning about > unp

[ovs-dev] [PATCH] fedora.spec: Disable rpmbuild unpackaged files check.

2016-08-02 Thread William Tu
The patch disables it and tested with rpmbuild 4.13.0 under Fedora 23. Signed-off-by: William Tu --- rhel/openvswitch-fedora.spec.in | 4 1 file changed, 4 insertions(+) diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 088afcb..f1edd58 100644 --- a/rhel

Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak in execute_update.

2016-08-01 Thread William Tu
Thanks, I've submitted v2 which removes the 'const'. On Wed, Jul 27, 2016 at 1:39 PM, Ben Pfaff wrote: > On Tue, Jul 26, 2016 at 06:28:30PM -0700, William Tu wrote: >> Valgrind testcase 1804 ovsdb-server.at:1023 insert rows, update rows by value >&

[ovs-dev] [PATCHv2] ovsdb: Fix memory leak in execute_update.

2016-08-01 Thread William Tu
(replication.c:445) process_notification (replication.c:402) check_for_notifications (replication.c:418) replication_run (replication.c:110) Signed-off-by: William Tu --- v1->v2 * remove 'const' at struct json --- ovsdb/replication.c | 7 +-- 1 file changed, 5 insertions(+)

Re: [ovs-dev] [ovs-dev, PATCHv3] ofproto-dpif-sflow: Add snaplen for sample action and sFlow.

2016-08-01 Thread William Tu
{ > +if (!is_all_zeros(nas->zeros, sizeof nas->zeros)) { > +return OFPERR_NXBRC_MUST_BE_ZERO; > +} > + > struct ofpact_sample *sample; > > sample = ofpact_put_SAMPLE(out); > > > Thanks, > > Ben. > > On Sun, Jul 10, 2016 at 09:24:45PM -07

Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak in execute_update.

2016-07-27 Thread William Tu
; ovsdb_condition_destroy(&condition); > +json_destroy(CONST_CAST(struct json *, where)); > + > return error; > } > > @@ -625,6 +627,7 @@ execute_update(struct ovsdb_txn *txn, const char *uuid, > ovsdb_row_destroy(row); > ovsdb_column_set_destroy

[ovs-dev] [PATCH] ovsdb-client: Fix memory leak reported by Valgrind.

2016-07-26 Thread William Tu
Testcase 1857: ovsdb-monitor.at:538 monitor-cond-change reports the following definitely memory leak: ovsdb_schema_create (ovsdb.c:34) ovsdb_schema_from_json (ovsdb.c:196) fetch_schema (ovsdb-client.c:385) do_monitor_cond (ovsdb-client.c:1112) Signed-of-by: William Tu --- ovsdb

[ovs-dev] [PATCH] ovsdb: Fix memory leak reported by Valgrind.

2016-07-26 Thread William Tu
) json_from_string (json.c:1025) parse_json (test-ovsdb.c:227) update_conditions (test-ovsdb.c:2324) do_idl (test-ovsdb.c:2389) ovs_cmdl_run_command (command-line.c:121) main (test-ovsdb.c:73) Signed-off-by: William Tu --- tests/test-ovsdb.c | 1 + 1 file changed, 1

[ovs-dev] [PATCH] ovsdb: Fix memory leak in execute_update.

2016-07-26 Thread William Tu
(replication.c:445) process_notification (replication.c:402) check_for_notifications (replication.c:418) replication_run (replication.c:110) Signed-off-by: William Tu --- ovsdb/replication.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ovsdb/replication.c b/ovsdb/replication.c index

Re: [ovs-dev] [PATCH 2/3] ovsdb: Fix memory leak in replication logic

2016-07-26 Thread William Tu
thanks for fixing the memory leak! Acked-by: William Tu On Tue, Jul 26, 2016 at 1:08 PM, Andy Zhou wrote: > Release the memory of reply message of the initial "monitor" request. > > Reported-at: http://openvswitch.org/pipermail/dev/2016-July/076075.html > Si

Re: [ovs-dev] [PATCH 1/3] ovsdb: Properly close replication rpc connection

2016-07-26 Thread William Tu
Hi Andy, Thanks for fixing the memory leak! I've tested it and it solved the issue. btw, I think we don't have to assign "NULL" to static variable, C99 standard assume all static variable initializes to 0. Acked-by: William Tu On Tue, Jul 26, 2016 at 1:08 PM, Andy Zhou

Re: [ovs-dev] [PATCH] netdev-provider: fix comments for netdev_rxq_recv

2016-07-26 Thread William Tu
Sorry, this should be Acked-by: William Tu On Tue, Jul 26, 2016 at 8:32 AM, William Tu wrote: > Hi Mark, > > Thanks for fixing them! looks good to me. > > Signed-off-by: William Tu > > > > On Tue, Jul 26, 2016 at 6:19 AM, Mark Kavanagh > wrote: >> Commi

Re: [ovs-dev] [PATCH] netdev-provider: fix comments for netdev_rxq_recv

2016-07-26 Thread William Tu
Hi Mark, Thanks for fixing them! looks good to me. Signed-off-by: William Tu On Tue, Jul 26, 2016 at 6:19 AM, Mark Kavanagh wrote: > Commit 64839cf43 applies batch objects to netdev-providers, but > some comments were not updated accordingly. Fix these: >- replace 'pkt

[ovs-dev] OVSDB replication related memory leak

2016-07-25 Thread William Tu
Hi, Valgrind reports definitely memory leak in the testcase 1826: ovsdb-server.at:1081 insert monitored table, update excluded table Can someone take at look? Thank you~ ==52969== 144 (48 direct, 96 indirect) bytes in 1 blocks are definitely lost in loss record 306 of 373 ==52969==at 0x4C

[ovs-dev] [PATCH] netdev-dpdk: Apply batch truncation API.

2016-07-25 Thread William Tu
Instead of looping into each packet and check whether to truncate, the patch moves it out of the loop and uses batch API. If truncation is not set, checking 'trunc' in 'struct dp_packet_batch' at per-batch basis can skip the per-packet checking overhead. Signed-off-by:

Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak reported by valgrind.

2016-07-25 Thread William Tu
Looks good to me, thanks for fixing it! Acked-by: William Tu On Mon, Jul 25, 2016 at 1:00 AM, Liran Schour wrote: > Destroy shash on destroy of session's condition structure. > Reported here: http://openvswitch.org/pipermail/dev/2016-July/075968.html > > Signed-off

[ovs-dev] Valgrind memory leak at ovsdb_monitor_table_condition_create

2016-07-22 Thread William Tu
Hi, Testcases which exercises this code report definitely memory lost. An example is testcast 1000: ofproto-dpif.at:957 ofproto-dpif - Default Table Miss Since I'm not so familiar with ovsdb code, could someone take a look? thanks! ==59366== 160 bytes in 2 blocks are definitely lost in loss reco

Re: [ovs-dev] [PATCHv3] netdev-provider: Apply batch object to netdev provider.

2016-07-18 Thread William Tu
ays be able to optimize them (I checked the assebly > output in a couple of functions). > > Few comments inline, otherwise this looks good to me > > 2016-06-29 13:53 GMT-07:00 William Tu : >> >> Commit 1895cc8dbb64 ("dpif-netdev: create batch object") introduces

[ovs-dev] [PATCHv4] netdev-provider: Apply batch object to netdev provider.

2016-07-18 Thread William Tu
tch APIs can be used in providers. With batch metadata visible in providers, optimizations can be introduced at per-batch level instead of per-packet. Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/145694197 Signed-off-by: William Tu -- v3->v4: - remove extra variables - re

Re: [ovs-dev] [PATCH] system-traffic: Remove datapath specific tests and macro.

2016-07-13 Thread William Tu
Hi Joe, I agree that this check is kind of redundant. Please remove this line. Thank you~ William On Wed, Jul 13, 2016 at 4:57 PM, Joe Stringer wrote: > On 1 July 2016 at 09:45, William Tu wrote: >> We generally try to keep the testsuite independent of the underlying >> datap

Re: [ovs-dev] [ovs-dev, PATCHv3] ofproto-dpif-sflow: Add snaplen for sample action and sFlow.

2016-07-11 Thread William Tu
Hi Wenyu and Daniel, Thanks for your feedback. On Mon, Jul 11, 2016 at 1:50 AM, Wenyu Zhang wrote: > Hi William, > > In your patch, no codes about supporting “snaplen" in IPFIX included. IPFIX > still get the length of packet as before, whatever the packet is truncated. > If user put a non-zero

Re: [ovs-dev] [ovs-dev, PATCHv3] ofproto-dpif-sflow: Add snaplen for sample action and sFlow.

2016-07-10 Thread William Tu
Hi Daniel, Thanks for reviewing the patch. Indeed, the way sFlow sets up the datapath does not require the OpenFlow sample action, and changing OVSDB/compose_sample_action() is sufficient to program the datapath sample action for current sFlow use case. So if IPFIX does not use 'snaplen', or there

Re: [ovs-dev] [PATCHv2] ofproto-dpif-sflow: Add snaplen for sample action and sFlow.

2016-07-05 Thread William Tu
Hi Ben, Thanks, I've fixed it and submitted new version. Regards, William On Fri, Jul 1, 2016 at 9:28 PM, Ben Pfaff wrote: > On Fri, Jul 01, 2016 at 12:43:02PM -0700, William Tu wrote: >> This patch adds a 'snaplen' field in sample action (nx_action_sample2). >&g

[ovs-dev] [PATCHv3] ofproto-dpif-sflow: Add snaplen for sample action and sFlow.

2016-07-05 Thread William Tu
d. Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/142593443 Signed-off-by: William Tu --- v2->v3 http://openvswitch.org/pipermail/dev/2016-July/074288.html - Update NEWS and ovs-ofctl - Make snaplen default UINT16_MAX - Fix encode_SAMPLE() and format_SAMPLE() - Prevent user from se

Re: [ovs-dev] [PATCH] route-table: Fix memory leak reported by valgrind.

2016-07-05 Thread William Tu
6,9 @@ struct nln { > }; > > struct nln_notifier { > +struct ovs_list node; > struct nln *nln; /* Parent nln. */ > > -struct ovs_list node; > int multicast_group; /* Multicast group we listen on. */ > nln_notify_func *cb; >

Re: [ovs-dev] [PATCH 1/7] bridge: Fix possible null pointer dereference reported by clang.

2016-07-05 Thread William Tu
Hi Ben, Thanks, I tested your patch below and clang no longer reports no error. Regards, William > A port is guaranteed to have at least one interface, so 'iface' can't be > null here. Even if it could, this patch wouldn't help because a few > lines down there's an unconditional dereference. >

Re: [ovs-dev] [PATCH] vagrant: Add FreeBSD 10.2 box support.

2016-07-04 Thread William Tu
oh, I forgot to add the new file to EXTRA_DIST. Thanks for fixing it! On Sun, Jul 3, 2016 at 10:28 AM, Ben Pfaff wrote: > On Wed, Jun 29, 2016 at 10:35:00AM -0700, William Tu wrote: >> Add FreeBSD 10.2 vagrant file "Vagrantfile-FreeBSD". Users can run >> 'VAGRANT_V

[ovs-dev] [PATCHv2] ofproto-dpif-sflow: Add snaplen for sample action and sFlow.

2016-07-01 Thread William Tu
d. Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/141704344 Signed-off-by: William Tu --- v1->v2 http://openvswitch.org/pipermail/dev/2016-June/072404.html - Add snaplen to nx_action_sample2 - Since truncate then userspace action is supported in userspace datapath, ,commit aaca

[ovs-dev] [PATCH] system-traffic: Remove datapath specific tests and macro.

2016-07-01 Thread William Tu
We generally try to keep the testsuite independent of the underlying datapath. This patch removes the datapath-specific tests and macros. Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/141642065 Signed-off-by: William Tu --- tests/system-kmod-macros.at | 7 --- tests

Re: [ovs-dev] [PATCH 5/7] ovn-nbctl: Fix double memory free reported by clang.

2016-06-30 Thread William Tu
Hi Darrell, Thanks, I think we should print the error in VLOG_WARN and free it . Regards, William On Wed, Jun 29, 2016 at 10:08 AM, Darrell Ball wrote: > > > On Tue, Jun 28, 2016 at 10:02 PM, William Tu wrote: >> >> Variable 'error' has been free in line 1795.

[ovs-dev] [PATCHv3] ofproto-dpif-mirror: Add mirror snaplen support.

2016-06-29 Thread William Tu
liamtu/ovs-travis/builds/141186839 Signed-off-by: William Tu --- v2->v3 - fix min and max number in schema http://openvswitch.org/pipermail/dev/2016-June/072630.html v1->v2 - use UINT16_MAX instead of (uint16_t) - 1 http://openvswitch.org/pipermail/dev/2016-June/072297.html --- ofpr

[ovs-dev] [PATCHv3] netdev-provider: Apply batch object to netdev provider.

2016-06-29 Thread William Tu
tch APIs can be used in providers. With batch metadata visible in providers, optimizations can be introduced at per-batch level instead of per-packet. Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/141178364 Signed-off-by: William Tu -- v2->v3: - fix freebsd build issue v1-

[ovs-dev] [PATCH] vagrant: Add FreeBSD 10.2 box support.

2016-06-29 Thread William Tu
Add FreeBSD 10.2 vagrant file "Vagrantfile-FreeBSD". Users can run 'VAGRANT_VAGRANTFILE=Vagrantfile-FreeBSD vagrant up' to test basic OVS configure, build, and check. Signed-off-by: William Tu --- Vagrantfile-FreeBSD | 49 +

[ovs-dev] [PATCH 7/7] ovsdb: Fix dead assignment reported by clang.

2016-06-28 Thread William Tu
Clang reports variable 'error' never been used. Fix by returning error when table_update->type != JSON_OBJECT. Signed-off-by: William Tu --- ovsdb/replication.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ovsdb/replication.c b/ovsdb/replication.c index 3d1bc33..a5f94da

[ovs-dev] [PATCH 5/7] ovn-nbctl: Fix double memory free reported by clang.

2016-06-28 Thread William Tu
Variable 'error' has been free in line 1795. Signed-off-by: William Tu --- ovn/utilities/ovn-nbctl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index 345647a..3228a03 100644 --- a/ovn/utilities/ovn-nbctl.c +++ b/ovn/uti

[ovs-dev] [PATCH 6/7] packets: Fix null pointer dereference reported by clang.

2016-06-28 Thread William Tu
In packet_set_tcp_port(), clang reports passing null pointer of &th->tcp_src when calling packet_set_port(&th->tcp_src, src, &th->tcp_csum); Signed-off-by: William Tu --- lib/packets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/packets.c

[ovs-dev] [PATCH 4/7] ovn-controller-vtep: Fix dead increment reported by clang.

2016-06-28 Thread William Tu
Signed-off-by: William Tu --- ovn/controller-vtep/ovn-controller-vtep.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/ovn/controller-vtep/ovn-controller-vtep.c b/ovn/controller-vtep/ovn-controller-vtep.c index bad3316..36005ed 100644 --- a/ovn/controller-vtep/ovn-controller-vtep.c +++ b

[ovs-dev] [PATCH 3/7] netlink: Fix passing null pointer reported by clang.

2016-06-28 Thread William Tu
In nl_msg_push_flag(), the 3rd NULL parameter causing 'memcpy()' with NULL source pointer in nl_msg_push_unspec(). Signed-off-by: William Tu --- lib/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netlink.c b/lib/netlink.c index 5d8a147..fbdb78e 10

[ovs-dev] [PATCH 0/7] Fix errors reported by clang static check

2016-06-28 Thread William Tu
mory Error Memory leak 1 Use-after-free 5 William Tu (7): bridge: Fix possible null pointer dereference reported by clang. clang: Fix dead assignment. netlink: Fix passing null pointer reported by clang. ovn-controller-vtep: Fix dead increment reported by clang. ovn-nbctl:

[ovs-dev] [PATCH 2/7] clang: Fix dead assignment.

2016-06-28 Thread William Tu
Signed-off-by: William Tu --- lib/dpif-netdev.c | 1 - tests/test-ovsdb.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index ff4227c..37c2631 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -2842,7 +2842,6

[ovs-dev] [PATCH 1/7] bridge: Fix possible null pointer dereference reported by clang.

2016-06-28 Thread William Tu
Signed-off-by: William Tu --- vswitchd/bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 8ebfc66..7244e11 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1999,7 +1999,7 @@ find_local_hw_addr(const struct bridge *br

Re: [ovs-dev] [PATCH] vagrant: Add 'nc' to installed programs.

2016-06-28 Thread William Tu
Thanks, some of my testcases use netcat. Tested-by: William Tu On Tue, Jun 28, 2016 at 2:23 AM, Joe Stringer wrote: > netcat is used in several tests, but when creating a new vagrant VM we > haven't been installing it. Do so. > > Signed-off-by: Joe Stringer > --- >

Re: [ovs-dev] [PATCH] Makefile.am: Add clang static analysis support

2016-06-27 Thread William Tu
This is pretty cool. I tested it and have some comments. On Mon, Jun 27, 2016 at 9:11 AM, Bhanuprakash Bodireddy wrote: > Clang Static Analyzer is a source code analysis tool to find bugs. This > patch adds make target to trigger static analysis using below commands. > > ./boot.sh > ./configure -

Re: [ovs-dev] [PATCHv2] netdev-provider: Apply batch object to netdev provider.

2016-06-26 Thread William Tu
Hi Darrell, Thanks for you feedback! On Sun, Jun 26, 2016 at 8:02 PM, Darrell Ball wrote: > > > On Sat, Jun 25, 2016 at 7:44 AM, William Tu wrote: >> >> Commit 1895cc8dbb64 ("dpif-netdev: create batch object") introduces >> batch process functions and '

Re: [ovs-dev] [PATCH] ofp-util: Zero out padding bytes in ofputil_ipfix_stats_to_reply().

2016-06-26 Thread William Tu
Thanks, the patch solves the valgrind error. Acked-by: William Tu On Sun, Jun 26, 2016 at 2:54 PM, Ben Pfaff wrote: > Otherwise IPFIX statistics leak memory from ovs-vswitchd. > > Reported-by: William Tu > Reported-at: http://openvswitch.org/pipermail/dev/2016-June/073769.html >

[ovs-dev] Valgrind errors on Bridge IPFIX statistics check

2016-06-26 Thread William Tu
Hi, Valgrind reports the error below on # make check-valgrind TESTSUITEFLAGS='1055' Testcase 1055: ofproto-dpif - Bridge IPFIX statistics check I'm not sure if it's a false positive or not, it looks like the memory is allocated by bridge level IPFIX test but error is triggerred from flow stat req

Re: [ovs-dev] [PATCH] util: New function nullable_xstrdup().

2016-06-25 Thread William Tu
Looks good to me. Acked-by: William Tu On Fri, Jun 24, 2016 at 9:23 PM, Ben Pfaff wrote: > It's a pretty common pattern so create a function for it. > > Signed-off-by: Ben Pfaff > --- > lib/dpif-netdev.c| 6 ++ > lib/jsonrpc.c| 2

Re: [ovs-dev] [PATCH] route-table: Fix memory leak reported by valgrind.

2016-06-25 Thread William Tu
Thadeu Lima de Souza Cascardo wrote: > On Mon, Jun 20, 2016 at 07:32:52AM -0700, William Tu wrote: >> Testcase 2050, ovn -- 3 HVs, 1 LS, 3 lports/HV, reports possible leak: >> nln_notifier_create (netlink-notifier.c:131) >> name_table_init (route-table.c:

[ovs-dev] [PATCHv2] netdev-provider: Apply batch object to netdev provider.

2016-06-25 Thread William Tu
tch APIs can be used in providers. With batch metadata visible in providers, optimizations can be introduced at per-batch level instead of per-packet. Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/140135888 Signed-off-by: William Tu -- v1->v2: make commit message more descr

Re: [ovs-dev] [PATCH] netdev-provider: Apply batch object to netdev provider.

2016-06-24 Thread William Tu
oop into each packet and check. Regards, William On Fri, Jun 24, 2016 at 10:35 PM, Ben Pfaff wrote: > On Fri, Jun 24, 2016 at 04:11:47PM -0700, William Tu wrote: >> This patch applies the packet batch object to the netdev providers, >> including dummy, Linux, BSD, and DPDK.

[ovs-dev] [PATCH] netdev-provider: Apply batch object to netdev provider.

2016-06-24 Thread William Tu
This patch applies the packet batch object to the netdev providers, including dummy, Linux, BSD, and DPDK. Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/140135888 Signed-off-by: William Tu --- lib/netdev-bsd.c | 9 -- lib/netdev-dpdk.c | 81

[ovs-dev] [PATCH] datapath:backport: openvswitch: Add packet len info to upcall.

2016-06-24 Thread William Tu
Upstream commit: commit b95e5928fcc76d156352570858abdea7b2628efd Author: William Tu Date: Mon Jun 20 07:26:17 2016 -0700 The commit f2a4d086ed4c ("openvswitch: Add packet truncation support.") introduces packet truncation before sending to userspace upcal

Re: [ovs-dev] [PATCH V2] ipfix: Export user specified virtual observation ID

2016-06-24 Thread William Tu
Hi Wenyu, I was debugging a little bit and the issue is a NULL pointer deference of be_cfg at virtual_obs_id = smap_get(&be_cfg->other_config, "virtual_obs_id"); Maybe adding if (valid_be_cfg) check before the deference? I will leave you to fix it. Also I hope you can add a test case to this ca

[ovs-dev] [PATCHv12 2/2] ofp-actions: Add truncate action.

2016-06-24 Thread William Tu
en=100),output:1,output:2' - The Datapath actions shows: # Datapath actions: trunc(100),1,1,2 Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/140037134 Signed-off-by: William Tu --- NEWS | 4 + include/openvswitch/ofp-actions.h | 10 ++ lib/dp-pa

[ovs-dev] [PATCHv12 0/2] datapath: Packet truncation backports.

2016-06-24 Thread William Tu
o be any OFPUTIL_NAMED_PORTS. - Add more testcases. v1 - Reuse max_len in OpenFlow output controller action. William Tu (2): datapath:backport: openvswitch: Add packet truncation support. ofp-actions: Add truncate action. NEWS

[ovs-dev] [PATCHv12 1/2] datapath:backport: openvswitch: Add packet truncation support.

2016-06-24 Thread William Tu
Upstream commit: commit f2a4d086ed4c588d32fe9b7aa67fead7280e7bf1 Author: William Tu Date: Fri Jun 10 11:49:33 2016 -0700 openvswitch: Add packet truncation support. The patch adds a new OVS action, OVS_ACTION_ATTR_TRUNC, in order to truncate packets. A 'max_le

Re: [ovs-dev] [PATCHv11 2/2] ofp-actions: Add truncate action.

2016-06-23 Thread William Tu
Thanks, I will update and resubmit. On Thu, Jun 23, 2016 at 3:28 PM, pravin shelar wrote: > On Wed, Jun 22, 2016 at 10:02 PM, William Tu wrote: >> The patch adds a new action to support packet truncation. The new action >> is formatted as 'output(port=n,max_len=m)',

[ovs-dev] [PATCHv11 2/2] ofp-actions: Add truncate action.

2016-06-22 Thread William Tu
en=100),output:1,output:2' - The Datapath actions shows: # Datapath actions: trunc(100),1,1,2 Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/139668398 Signed-off-by: William Tu --- include/openvswitch/ofp-actions.h | 10 ++ lib/dp-packet.c | 2 + lib/dp-pa

[ovs-dev] [PATCHv11 0/2] datapath: Packet truncation backports.

2016-06-22 Thread William Tu
max_len in OpenFlow output action. William Tu (2): datapath:backport: openvswitch: Add packet truncation support. ofp-actions: Add truncate action. datapath/actions.c| 40 +++- datapath/datapath.c | 29 +-- datapath/datapath.h

[ovs-dev] [PATCHv11 1/2] datapath:backport: openvswitch: Add packet truncation support.

2016-06-22 Thread William Tu
Upstream commit: commit f2a4d086ed4c588d32fe9b7aa67fead7280e7bf1 Author: William Tu Date: Fri Jun 10 11:49:33 2016 -0700 openvswitch: Add packet truncation support. The patch adds a new OVS action, OVS_ACTION_ATTR_TRUNC, in order to truncate packets. A 'max_le

[ovs-dev] [PATCHv10 0/2] datapath: Packet truncation backports.

2016-06-22 Thread William Tu
d truncate support for tunnel push and pop. - Fix clang error. - Use pskb_trim instead of skb_trim. - Fallback to userspace truncate action when the openvswitch kernel module does not support. - Disallow truncate port to be any OFPUTIL_NAMED_PORTS. - Add more testcases. v1 - Reuse max_len in O

[ovs-dev] [PATCHv10 1/2] datapath:backport: openvswitch: Add packet truncation support.

2016-06-22 Thread William Tu
Upstream commit: commit f2a4d086ed4c588d32fe9b7aa67fead7280e7bf1 Author: William Tu Date: Fri Jun 10 11:49:33 2016 -0700 openvswitch: Add packet truncation support. The patch adds a new OVS action, OVS_ACTION_ATTR_TRUNC, in order to truncate packets. A 'max_le

[ovs-dev] [PATCHv10 2/2] ofp-actions: Add truncate action.

2016-06-22 Thread William Tu
en=100),output:1,output:2' - The Datapath actions shows: # Datapath actions: trunc(100),1,1,2 Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/139597225 Signed-off-by: William Tu --- include/openvswitch/ofp-actions.h | 10 ++ lib/dp-packet.c | 2 + lib/dp-pa

Re: [ovs-dev] [PATCHv9 2/2] ofp-actions: Add truncate action.

2016-06-21 Thread William Tu
Hi Pravin, Thanks for the feedback. >> @@ -4084,10 +4089,13 @@ dp_execute_cb(void *aux_, struct dp_packet_batch >> *packets_, >> int i; >> >> if (!may_steal) { >> - dp_packet_batch_clone(&tnl_pkt, packets_); >> - packets_ = &t

[ovs-dev] [PATCH] route-table: Fix memory leak reported by valgrind.

2016-06-20 Thread William Tu
38910851 Signed-off-by: William Tu --- lib/route-table.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/route-table.c b/lib/route-table.c index 58e7f62..cf01c34 100644 --- a/lib/route-table.c +++ b/lib/route-table.c @@ -316,6 +316,7 @@ route_table_fallback_lookup(const struct in

[ovs-dev] [PATCHv9 2/2] ofp-actions: Add truncate action.

2016-06-18 Thread William Tu
en=100),output:1,output:2' - The Datapath actions shows: # Datapath actions: trunc(100),1,1,2 Signed-off-by: William Tu --- include/openvswitch/ofp-actions.h | 10 +++ lib/dp-packet.c | 2 + lib/dp-packet.h | 67 +++ lib/dpif-netdev.c

[ovs-dev] [PATCHv9 0/2] datapath: Packet truncation backports.

2016-06-18 Thread William Tu
e action when the openvswitch kernel module does not support. - Disallow truncate port to be any OFPUTIL_NAMED_PORTS. - Add more testcases. v1 - Reuse max_len in OpenFlow output action. William Tu (2): datapath:backport: openvswitch: Add packet truncation support. ofp-actions: Add trunca

[ovs-dev] [PATCHv9 1/2] datapath:backport: openvswitch: Add packet truncation support.

2016-06-18 Thread William Tu
Upstream commit: commit f2a4d086ed4c588d32fe9b7aa67fead7280e7bf1 Author: William Tu Date: Fri Jun 10 11:49:33 2016 -0700 openvswitch: Add packet truncation support. The patch adds a new OVS action, OVS_ACTION_ATTR_TRUNC, in order to truncate packets. A 'max_le

Re: [ovs-dev] [PATCHv7 2/2] ofp-actions: Add truncate action.

2016-06-18 Thread William Tu
Hi Pravin, Thanks for the feedback, I've submitted another version to address these. Regards, William On Fri, Jun 17, 2016 at 10:56 AM, pravin shelar wrote: > On Tue, Jun 14, 2016 at 4:42 PM, William Tu wrote: >> The patch adds a new action to support packet truncation. The ne

[ovs-dev] [PATCHv8 2/2] ofp-actions: Add truncate action.

2016-06-18 Thread William Tu
en=100),output:1,output:2' - The Datapath actions shows: # Datapath actions: trunc(100),1,1,2 Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/138596207 Signed-off-by: William Tu Cc: Pravin Shelar --- include/openvswitch/ofp-actions.h | 10 +++ lib/dp-packet.c

[ovs-dev] [PATCHv8 1/2] datapath:backport: openvswitch: Add packet truncation support.

2016-06-18 Thread William Tu
Upstream commit: commit f2a4d086ed4c588d32fe9b7aa67fead7280e7bf1 Author: William Tu Date: Fri Jun 10 11:49:33 2016 -0700 openvswitch: Add packet truncation support. The patch adds a new OVS action, OVS_ACTION_ATTR_TRUNC, in order to truncate packets. A 'max_le

[ovs-dev] [PATCHv8 0/2] datapath: Packet truncation backports.

2016-06-18 Thread William Tu
ORTS. - Add more testcases. v1 - Reuse max_len in OpenFlow output action. William Tu (2): datapath:backport: openvswitch: Add packet truncation support. ofp-actions: Add truncate action. datapath/actions.c| 40 +- datapath/datapath.c

[ovs-dev] [PATCHv7 2/2] ofp-actions: Add truncate action.

2016-06-14 Thread William Tu
en=100),output:1,output:2' - The Datapath actions shows: # Datapath actions: trunc(100),1,1,2 Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/137660394 Signed-off-by: William Tu Cc: Pravin Shelar --- include/openvswitch/ofp-actions.h | 10 +++ lib/dp-packet.c

[ovs-dev] [PATCHv7 0/2] datapath: Packet truncation backports.

2016-06-14 Thread William Tu
oes not support. - Disallow truncate port to be any OFPUTIL_NAMED_PORTS. - Add more testcases. v1 - Reuse max_len in OpenFlow output action. William Tu (2): datapath:backport: openvswitch: Add packet truncation support. ofp-actions: Add truncate action. datapath/actions.c

[ovs-dev] [PATCHv7 1/2] datapath:backport: openvswitch: Add packet truncation support.

2016-06-14 Thread William Tu
Upstream commit: commit f2a4d086ed4c588d32fe9b7aa67fead7280e7bf1 Author: William Tu Date: Fri Jun 10 11:49:33 2016 -0700 openvswitch: Add packet truncation support. The patch adds a new OVS action, OVS_ACTION_ATTR_TRUNC, in order to truncate packets. A 'max_le

Re: [ovs-dev] [PATCH v2] ipfix: Bug fix for not sending template packets on 32-bit OS

2016-06-14 Thread William Tu
Looks good to me. Acked-by: William Tu On Mon, Jun 13, 2016 at 8:09 PM, Benli Ye wrote: > 'last_template_set_time' in truct dpif_ipfix_exporter is declared > as time_t and time_t is long int type. If we initialize > 'last_template_set_time' as TIME_MIN, whose val

Re: [ovs-dev] [PATCH v1] ipfix: Bug fix for not sending template packets on 32-bit OS

2016-06-13 Thread William Tu
Acked-by: William Tu I think it fixes the issue, although the root cause is that we are 1) Comparing signed int (last_template_set_time) and unsigned int (export_time_sec). From the C99, the operand with signed integer type is converted to the type of the operand with unsigned integer type, so

Re: [ovs-dev] [PATCHv6 2/3] ofproto-dpif-sflow: Add snaplen for sample action and sFlow.

2016-06-10 Thread William Tu
;look weird"? > > On Thu, Jun 09, 2016 at 10:20:31PM -0700, William Tu wrote: >> Hi Ben, >> >> Because for sFlow, it doesn't have any benefit to do >> "sample(truncate(n), userspace(...))" in userspace datapath. I tried >> to implement it by tru

Re: [ovs-dev] [PATCHv6 1/3] ofp-actions: Add truncate action.

2016-06-09 Thread William Tu
>> I understand that's what userspace does. What about in the datapath? >> Do the datapaths properly handle it if userspace adds a flow that does >> "truncate, pop_vlan, ..., output"? The kernel datapath, in particular, >> should be able to handle malicious or buggy userspace. >> > > There is che

Re: [ovs-dev] [PATCHv6 2/3] ofproto-dpif-sflow: Add snaplen for sample action and sFlow.

2016-06-09 Thread William Tu
other use case so I let sFlow translates differently for kernel and userspace dp. Regards, William On Thu, Jun 9, 2016 at 8:16 PM, Ben Pfaff wrote: > On Thu, Jun 09, 2016 at 06:06:47PM -0700, William Tu wrote: >> > I'm not sure why CHECK_TRUNC_USERSPACE exists, because I thin

Re: [ovs-dev] [PATCH] ovn-controller: Fix memory leak reported byvalgrind.

2016-06-09 Thread William Tu
Hi Ryan, Thanks for the review. I looked at the jsonrpc-server.c and I think it's OK without leaks. Regards, William On Wed, Jun 8, 2016 at 7:32 PM, Ryan Moats wrote: > "dev" wrote on 06/05/2016 09:37:35 AM: > >> From: William Tu >> To: dev@openvswitch

Re: [ovs-dev] [PATCHv6 2/3] ofproto-dpif-sflow: Add snaplen for sample action and sFlow.

2016-06-09 Thread William Tu
Hi Ben, Thanks for the review. > This changes the "wire format" of the NXAST_SAMPLE action, but we can't > do that because it will break compatibility with older OpenFlow clients. > Usually if we need a new feature in an action we add a new version that > has that feature, e.g. NXAST_SAMPLE2. The

Re: [ovs-dev] [PATCHv6 1/3] ofp-actions: Add truncate action.

2016-06-09 Thread William Tu
Hi Ben, Thanks for the feedback. >> Signed-off-by: William Tu > > I'm a bit nervous about cutlen. Can a packet change, for example by > popping a VLAN header, after cutlen is set? If so, can this cause the > packet length to drop below 0, or below 14? > I don'

[ovs-dev] [PATCHv6 3/3] ofproto-dpif-mirror: Add mirror snaplen support.

2016-06-07 Thread William Tu
This patch adds a 'snaplen' config for mirroring table. A mirrored packet with size larger than snaplen bytes will be truncated in datapath before sending to the mirror output port. A snaplen of 0 equals 65535, which means no truncation applied. Signed-off-by: William Tu --- ofpro

[ovs-dev] [PATCHv6 1/3] ofp-actions: Add truncate action.

2016-06-07 Thread William Tu
en=100),output:1,output:2' - The Datapath actions shows: # Datapath actions: trunc(100),1,1,2 Signed-off-by: William Tu --- datapath/actions.c| 36 - datapath/datapath.c | 25 +++- datapath/datapath.h

[ovs-dev] [PATCHv6 2/3] ofproto-dpif-sflow: Add snaplen for sample action and sFlow.

2016-06-07 Thread William Tu
path. Thus, only N bytes instead of full-packet size will be copied from kernel to userspace, saving the copying overhead. Signed-off-by: William Tu --- include/openvswitch/ofp-actions.h | 1 + lib/ofp-actions.c | 10 - ofproto/ofproto-dpif-sflow.c | 19 ++--

[ovs-dev] [PATCHv6 0/3] ofp-actions: Add truncate action.

2016-06-07 Thread William Tu
im. - Fallback to userspace truncate action when the openvswitch kernel module does not support. - Disallow truncate port to be any OFPUTIL_NAMED_PORTS. - Add more testcases. v2: https://patchwork.ozlabs.org/patch/605082/ William Tu (3): ofp-actions: Add truncate action. ofproto-dpif-sflow: Add

[ovs-dev] [PATCH] ovn-controller: Fix memory leak reported by valgrind.

2016-06-05 Thread William Tu
ession_open (jsonrpc.c:784) ovsdb_idl_create (ovsdb-idl.c:246) main (ovn-controller.c:384) and, xmalloc (util.c:112) jsonrpc_session_open (jsonrpc.c:784) ovsdb_idl_set_remote (ovsdb-idl.c:289) main (ovn-controller.c:409) Signed-off-by: William Tu --- lib/ovsdb-idl.c | 3 +++ 1

[ovs-dev] [PATCHv5] ofp-actions: Add truncate action.

2016-06-01 Thread William Tu
len=)" is supported. Output to any OFPUTIL_NAMED_PORTS or patch port are not supported. - Compatibility: If the openvswitch kernel module does not support OVS_ACTION_ATTR_TRUNC, it falls back to userspace slow path, do the packet truncation and send to the output port

[ovs-dev] [PATCH] ofproto-dpif-mirror: add snaplen/truncate support.

2016-05-27 Thread William Tu
tion patch: https://patchwork.ozlabs.org/patch/626486/ Signed-off-by: William Tu --- ofproto/ofproto-dpif-mirror.c | 9 +- ofproto/ofproto-dpif-mirror.h | 4 +- ofproto/ofproto-dpif-xlate.c | 27 - ofproto/ofproto-dpif.c| 2 +- ofproto/ofproto.h | 2 + tests/ofpro

[ovs-dev] [PATCHv4] ofp-actions: Add truncate action.

2016-05-25 Thread William Tu
len=)" is supported. Output to any OFPUTIL_NAMED_PORTS are not supported. - Compatibility: If the openvswitch kernel module does not support OVS_ACTION_ATTR_TRUNC, it falls back to userspace slow path, do the packet truncation and send to the output port. Signed-o

Re: [ovs-dev] [PATCH 4/4] dpif-netdev: Initialize packet RSS hash in dpif_netdev_execute().

2016-05-19 Thread William Tu
Reported-by: William Tu > Signed-off-by: Daniele Di Proietto > --- > lib/dpif-netdev.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c > index 33fd228..76a8c6b 100644 > --- a/lib/dpif-netdev.c > +++ b/lib/dpif-net

Re: [ovs-dev] [PATCHv3 RFC] ofp-actions: Add a new action to truncate a packet.

2016-05-18 Thread William Tu
nowing that this pipeline adds 4B more, so it translates to datapath as truncate(104) instead of truncate(100). If the next coming packet with 1500B hit the datapath flow, it will also truncate to 104B. Regards, William On Wed, May 4, 2016 at 11:00 AM, William Tu wrote: > The patch proposes

Re: [ovs-dev] [PATCH 1/4] tests: Add a tunnel packet-out test.

2016-05-18 Thread William Tu
Hi Daniele, Thanks! this saves a lot of time to reproduce the error. The new testcase can exercise the code path correctly to reproduce the error, and after applying the 4 patches the error at " 2032: ovn.at:1230 ovn -- 3 HVs, 3 LS, 3 lports/LS, 1 LR" is resolved. The ukey issue also disappears.

  1   2   3   >