[ovs-dev] [RFC] conntrack: cross zone nat

2015-12-21 Thread Zang MingJie
Hi: Problem === I'm glad to see that ovs add conntrack support, the conntrack support is great, but I want to push it more forward. Consider this scenario: multiple tenant sharing a single global ip by using nat. ip address in different tenant can be overlapped. let's say tenant A ip x and t

Re: [ovs-dev] [PATCH v3 0/4] Meter implementation for userspace datapath.

2015-12-21 Thread Ben Pfaff
On Mon, Nov 30, 2015 at 10:03:11AM -0800, Jarno Rajahalme wrote: > > > On Nov 29, 2015, at 17:12, Ben Pfaff wrote: > > > >> On Mon, Nov 23, 2015 at 08:54:31PM -0800, Jarno Rajahalme wrote: > >> Back by popular demand, here is the OpenFlow meter implementation for > >> the userspace datapath. Me

[ovs-dev] Returned mail: Data format error

2015-12-21 Thread MAILER-DAEMON
___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] types: Define OVS_*128_MAX statically.

2015-12-21 Thread Ben Pfaff
On Mon, Dec 21, 2015 at 04:45:20PM -0800, Joe Stringer wrote: > On 21 December 2015 at 16:11, Joe Stringer wrote: > > On 21 December 2015 at 16:01, Ben Pfaff wrote: > >> On Mon, Dec 21, 2015 at 03:56:40PM -0800, Joe Stringer wrote: > >>> The previous definitions of these variables using designate

Re: [ovs-dev] [PATCH 11/14] ovn-controller: Add data structure for indexing lports, multicast groups.

2015-12-21 Thread Justin Pettit
> On Dec 8, 2015, at 5:08 PM, Ben Pfaff wrote: > > +struct lport { > +struct hmap_node name_node; /* Index by name. */ > +struct hmap_node key_node; /* Index by (dp->tunnel_key, tunnel_key). */ I could go either way, but do you think it might be clearler to change these arguments to "

Re: [ovs-dev] [PATCH 13/14] ovn: Reorganize action parsing test.

2015-12-21 Thread Justin Pettit
> On Dec 8, 2015, at 5:08 PM, Ben Pfaff wrote: > > It seems easier to understand if all of the tests for a given action > are grouped together. > > Signed-off-by: Ben Pfaff Acked-by: Justin Pettit --Justin ___ dev mailing list dev@openvswitch.or

Re: [ovs-dev] [PATCH 12/14] expr: Generalize wording of error message in expand_symbol().

2015-12-21 Thread Justin Pettit
> On Dec 8, 2015, at 5:08 PM, Ben Pfaff wrote: > > The existing wording was very specific to the actual operation being > performed. While this is nice for users, it becomes difficult to maintain > as more and more operations are added. This commit makes the wording less > specific, because a

Re: [ovs-dev] [PATCH v3 00/12] Conntrack debugging appctl/dpctl

2015-12-21 Thread Daniele Di Proietto
Hi Joe, On 14/12/2015 23:06, "Joe Stringer" wrote: >On 2 December 2015 at 11:46, Daniele Di Proietto >wrote: >> The goal of this series is to introduce two dpctl command to interact >> with the Linux kernel connection tracker. The same infrastructure >> will be used by the userspace connection

Re: [ovs-dev] [PATCH] tests: Add ovn keyword to all ovn tests.

2015-12-21 Thread Russell Bryant
On 12/21/2015 06:50 PM, Ben Pfaff wrote: > On Mon, Dec 21, 2015 at 03:35:58PM -0500, Russell Bryant wrote: >> Autotest keywords are helpful for running a subset of the test suite. >> This patch makes it so you can run all OVN tests using the 'ovn' >> keyword. >> >> $ make check TESTSUITEFLAGS="-k

Re: [ovs-dev] [PATCH] types: Define OVS_*128_MAX statically.

2015-12-21 Thread Joe Stringer
On 21 December 2015 at 16:11, Joe Stringer wrote: > On 21 December 2015 at 16:01, Ben Pfaff wrote: >> On Mon, Dec 21, 2015 at 03:56:40PM -0800, Joe Stringer wrote: >>> The previous definitions of these variables using designated >>> initializers caused a variety of issues when attempting to compi

Re: [ovs-dev] [RFC 00/55] Add Python 3 support.

2015-12-21 Thread Ben Pfaff
On Mon, Dec 21, 2015 at 07:29:41PM -0500, Russell Bryant wrote: > On Mon, Dec 21, 2015 at 6:46 PM, Ben Pfaff wrote: > > > On Mon, Dec 21, 2015 at 06:20:42PM -0500, Russell Bryant wrote: > > > On Mon, Dec 21, 2015 at 5:14 PM, Ben Pfaff wrote: > > > > > > > On Sat, Dec 19, 2015 at 11:37:00AM -0500

Re: [ovs-dev] [RFC 00/55] Add Python 3 support.

2015-12-21 Thread Russell Bryant
On Mon, Dec 21, 2015 at 6:46 PM, Ben Pfaff wrote: > On Mon, Dec 21, 2015 at 06:20:42PM -0500, Russell Bryant wrote: > > On Mon, Dec 21, 2015 at 5:14 PM, Ben Pfaff wrote: > > > > > On Sat, Dec 19, 2015 at 11:37:00AM -0500, Russell Bryant wrote: > > > > $ make check TESTSUITEFLAGS="-k pep8" > > >

Re: [ovs-dev] [rhel --user v2 7/7] rhel: run daemons as the ovs user

2015-12-21 Thread Ansis Atteka
On 21 December 2015 at 15:46, Ansis Atteka wrote: > > > On 27 November 2015 at 05:35, Flavio Leitner wrote: > >> On Fri, Nov 20, 2015 at 03:33:20AM -0800, Andy Zhou wrote: >> > Make RHEL systemd distributions start OVS and OVN daemons under user >> > ovs. The 'ovs' user and group will be created

Re: [ovs-dev] [PATCH] types: Define OVS_*128_MAX statically.

2015-12-21 Thread Joe Stringer
On 21 December 2015 at 16:01, Ben Pfaff wrote: > On Mon, Dec 21, 2015 at 03:56:40PM -0800, Joe Stringer wrote: >> The previous definitions of these variables using designated >> initializers caused a variety of issues when attempting to compile with >> MSVC, particularly if including these headers

Re: [ovs-dev] [PATCH] netdev_dpdk: pci_dev pointer check.

2015-12-21 Thread Ben Pfaff
It looks obviously correct to me but I guess that Daniele or Pravin should apply it. On Mon, Dec 21, 2015 at 10:04:55AM +, Weglicki, MichalX wrote: > Hello, > > Is it possible to merge this patch? It is quite simple, and very important > for integration with DPDK 2.2. > > Br, > Michal.

Re: [ovs-dev] [PATCH] types: Define OVS_*128_MAX statically.

2015-12-21 Thread Ben Pfaff
On Mon, Dec 21, 2015 at 03:56:40PM -0800, Joe Stringer wrote: > The previous definitions of these variables using designated > initializers caused a variety of issues when attempting to compile with > MSVC, particularly if including these headers from C++ code. By defining > them like this, we can

[ovs-dev] [PATCH] types: Define OVS_*128_MAX statically.

2015-12-21 Thread Joe Stringer
The previous definitions of these variables using designated initializers caused a variety of issues when attempting to compile with MSVC, particularly if including these headers from C++ code. By defining them like this, we can appease MSVC and keep the definitions the same on all platforms. VMwa

Re: [ovs-dev] [PATCH] tests: Add ovn keyword to all ovn tests.

2015-12-21 Thread Ben Pfaff
On Mon, Dec 21, 2015 at 03:35:58PM -0500, Russell Bryant wrote: > Autotest keywords are helpful for running a subset of the test suite. > This patch makes it so you can run all OVN tests using the 'ovn' > keyword. > > $ make check TESTSUITEFLAGS="-k ovn" > > Signed-off-by: Russell Bryant Acke

[ovs-dev] no Hyper-V or OVN meetings until 2016

2015-12-21 Thread Ben Pfaff
Based on off-list discussions, we're going to cancel the Hyper-V and OVN meetings this week and next week. We'll resume the meetings on Jan. 5 and 7, respectively. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [rhel --user v2 7/7] rhel: run daemons as the ovs user

2015-12-21 Thread Ansis Atteka
On 27 November 2015 at 05:35, Flavio Leitner wrote: > On Fri, Nov 20, 2015 at 03:33:20AM -0800, Andy Zhou wrote: > > Make RHEL systemd distributions start OVS and OVN daemons under user > > ovs. The 'ovs' user and group will be created at the openvswitch RPM > > installtion time. > > > Hi Flavio.

Re: [ovs-dev] [RFC 00/55] Add Python 3 support.

2015-12-21 Thread Ben Pfaff
On Mon, Dec 21, 2015 at 06:20:42PM -0500, Russell Bryant wrote: > On Mon, Dec 21, 2015 at 5:14 PM, Ben Pfaff wrote: > > > On Sat, Dec 19, 2015 at 11:37:00AM -0500, Russell Bryant wrote: > > > $ make check TESTSUITEFLAGS="-k pep8" > > > > > > Another option would be to run this part at ovs build t

[ovs-dev] [PATCH repost] Better abstract OFPT_SET_CONFIG and OFPT_GET_CONFIG_REPLY, make stricter.

2015-12-21 Thread Ben Pfaff
From: Ben Pfaff The OFPT_SET_CONFIG and OFPT_GET_CONFIG_REPLY messages, which have the same format, have a 'flags' field in which OpenFlow defines some bits, which change somewhat from one version to another, and does not define others. Until now, Open vSwitch has not abstracted these messages a

Re: [ovs-dev] [PATCH] datapath: Backport: openvswitch: Fix serialization of non-masked set actions.

2015-12-21 Thread Pravin Shelar
On Mon, Dec 21, 2015 at 3:10 PM, Joe Stringer wrote: > On 21 December 2015 at 14:57, Pravin B Shelar wrote: >> I found this missing commit while checking diff against upstream OVS. >> >> Upstream Commit msg: >> Set actions consist of a regular OVS_KEY_ATTR_* attribute nested inside >> of

[ovs-dev] [PATCH repost 2/2] ofproto: Implement OFPT_QUEUE_GET_CONFIG_REQUEST for OFPP_ANY in OF1.1+.

2015-12-21 Thread Ben Pfaff
From: Ben Pfaff I was not previously aware that this feature was missing. Reported-by: Minoru TAKAHASHI Reported-at: http://openvswitch.org/pipermail/discuss/2015-October/019229.html Signed-off-by: Ben Pfaff --- NEWS | 1 + lib/ofp-util.c | 22 --

[ovs-dev] [PATCH repost 0/2] Fix missing OFPP_ANY for queue requests

2015-12-21 Thread Ben Pfaff
I originally posted this near the beginning of November, but it's received no reviews. I'd like to get it into 2.5 since it's a bug fix. Ben Pfaff (2): ovs-ofctl: Generalize code for finding ports into general-purpose iterator. ofproto: Implement OFPT_QUEUE_GET_CONFIG_REQUEST for OFPP_ANY

[ovs-dev] [PATCH repost 1/2] ovs-ofctl: Generalize code for finding ports into general-purpose iterator.

2015-12-21 Thread Ben Pfaff
From: Ben Pfaff The port_iterator will acquire another user in an upcoming commit. Signed-off-by: Ben Pfaff --- utilities/ovs-ofctl.c | 233 ++ 1 file changed, 123 insertions(+), 110 deletions(-) diff --git a/utilities/ovs-ofctl.c b/utilities/ov

Re: [ovs-dev] [PATCH branch-2.3] odp-util: Return exact mask if netlink mask attribute is missing.

2015-12-21 Thread Ben Pfaff
On Mon, Dec 14, 2015 at 05:23:36PM -0800, Daniele Di Proietto wrote: > In the ODP context an empty mask netlink attribute usually means that > the flow should be an exact match. > > odp_flow_key_to_mask() instead returns a struct flow_wildcards > with matches only on recirc_id and vlan_tci. > > A

Re: [ovs-dev] [RFC 00/55] Add Python 3 support.

2015-12-21 Thread Russell Bryant
On Mon, Dec 21, 2015 at 5:14 PM, Ben Pfaff wrote: > On Sat, Dec 19, 2015 at 11:37:00AM -0500, Russell Bryant wrote: > > $ make check TESTSUITEFLAGS="-k pep8" > > > > Another option would be to run this part at ovs build time, similar to a > > number of other checks currently being done. > > > > $

Re: [ovs-dev] [PATCH] datapath: Backport: openvswitch: Fix serialization of non-masked set actions.

2015-12-21 Thread Joe Stringer
On 21 December 2015 at 14:57, Pravin B Shelar wrote: > I found this missing commit while checking diff against upstream OVS. > > Upstream Commit msg: > Set actions consist of a regular OVS_KEY_ATTR_* attribute nested inside > of a OVS_ACTION_ATTR_SET action attribute. When converting maske

Re: [ovs-dev] [PATCH] datapath/vport: Remove an invalid comment

2015-12-21 Thread Pravin Shelar
On Tue, Nov 24, 2015 at 12:28 PM, Aaron Conole wrote: > Commit 3544358aa596 ("datapath: Improve kernel hash table") removed the > failure condition of ovs_vport_del by switching away from a custom > hashtable which allocated a new bucket, to an hlist with flexible-array > buckets. The function sto

Re: [ovs-dev] [PATCH v2] datapath: stt: Fix device list management.

2015-12-21 Thread Pravin Shelar
On Mon, Dec 21, 2015 at 8:33 AM, Jesse Gross wrote: > On Sun, Dec 20, 2015 at 8:05 PM, Pravin B Shelar wrote: >> STT receive can accept packet on device which is not UP state. >> Following patch fixes this issue by introducing another list >> of devices which contains only devices in up state. Th

[ovs-dev] [PATCH] datapath: Backport: openvswitch: Fix serialization of non-masked set actions.

2015-12-21 Thread Pravin B Shelar
I found this missing commit while checking diff against upstream OVS. Upstream Commit msg: Set actions consist of a regular OVS_KEY_ATTR_* attribute nested inside of a OVS_ACTION_ATTR_SET action attribute. When converting masked actions back to regular set actions, the inner attribute

Re: [ovs-dev] [PATCH] Do not add ARP replies in the lswitch pipeline to all the lports

2015-12-21 Thread Han Zhou
On Mon, Dec 21, 2015 at 1:59 PM, Ben Pfaff wrote: > On Mon, Dec 21, 2015 at 03:03:42PM -0500, Russell Bryant wrote: > > On 12/21/2015 02:52 PM, Ben Pfaff wrote: > > > On Mon, Dec 21, 2015 at 10:39:29AM -0500, Russell Bryant wrote: > > >> On 12/21/2015 09:55 AM, Numan Siddique wrote: > > >>> On 12

Re: [ovs-dev] [PATCH] datapath/vport: Remove an invalid comment

2015-12-21 Thread Ben Pfaff
On Tue, Nov 24, 2015 at 03:28:35PM -0500, Aaron Conole wrote: > Commit 3544358aa596 ("datapath: Improve kernel hash table") removed the > failure condition of ovs_vport_del by switching away from a custom > hashtable which allocated a new bucket, to an hlist with flexible-array > buckets. The funct

Re: [ovs-dev] [RFC 00/55] Add Python 3 support.

2015-12-21 Thread Ben Pfaff
On Sat, Dec 19, 2015 at 11:37:00AM -0500, Russell Bryant wrote: > $ make check TESTSUITEFLAGS="-k pep8" > > Another option would be to run this part at ovs build time, similar to a > number of other checks currently being done. > > $ grep 'ALL_LOCAL.*\-check' Makefile.am > ALL_LOCAL += config-h-c

Re: [ovs-dev] [PATCH] stream-ssl: Fix misleading bound address format.

2015-12-21 Thread Ben Pfaff
On Sat, Dec 19, 2015 at 11:38:51AM -0500, Russell Bryant wrote: > On 12/19/2015 01:09 AM, Ben Pfaff wrote: > > When the SSL code presents the name of the address to which it is bound, > > it should include an "ssl:" or "pssl:" prefix instead of "tcp:" or "ptcp:". > > This bug was introduced by comm

Re: [ovs-dev] [PATCH] Do not add ARP replies in the lswitch pipeline to all the lports

2015-12-21 Thread Ben Pfaff
On Mon, Dec 21, 2015 at 03:03:42PM -0500, Russell Bryant wrote: > On 12/21/2015 02:52 PM, Ben Pfaff wrote: > > On Mon, Dec 21, 2015 at 10:39:29AM -0500, Russell Bryant wrote: > >> On 12/21/2015 09:55 AM, Numan Siddique wrote: > >>> On 12/21/2015 08:13 PM, Russell Bryant wrote: > On 12/21/2015

Re: [ovs-dev] [PATCH] ovs-vtep: Clean up local mac entries on startup.

2015-12-21 Thread Guru Shetty
On 21 December 2015 at 12:20, Anupam Chanda wrote: > This change handles a corner case where local mac entries are not cleared > if a > vlan binding is deleted while the emulator is not running. The fix is to > clean > up the local mac entries once on restart. > > Reported-by: Hsin-Yi Shen > Si

[ovs-dev] [PATCH 55/55] NEWS: Claim support for Python 3.

2015-12-21 Thread Russell Bryant
Also update the Python ovs package info to note that both Python 2 and 3 are supported. Signed-off-by: Russell Bryant --- NEWS| 3 +++ python/setup.py | 6 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 81f49e2..baa98e5 100644 --- a/NEWS +++ b/

[ovs-dev] [PATCH 54/55] tests: Integrate tox with 'make check'.

2015-12-21 Thread Russell Bryant
Add a configure script check for tox, so that we can conditionally run it from 'make check'. Create tox.at which runs the py27, py34, and pep8 tox environments. Signed-off-by: Russell Bryant --- configure.ac | 1 + m4/openvswitch.m4 | 14 ++ tests/atlocal.in | 1 + tests/

[ovs-dev] [PATCH 53/55] vlog.at: Run tests for Python 2 and 3.

2015-12-21 Thread Russell Bryant
Update these Python tests to run with both Python 2 and 3. Signed-off-by: Russell Bryant --- tests/vlog.at | 174 +- 1 file changed, 99 insertions(+), 75 deletions(-) diff --git a/tests/vlog.at b/tests/vlog.at index 99565db..07d4811 100644

[ovs-dev] [PATCH 52/55] unixctl-py.at: Run tests for Python 2 and 3.

2015-12-21 Thread Russell Bryant
Update these Python tests to run with both Python 2 and 3. Signed-off-by: Russell Bryant --- tests/unixctl-py.at | 198 +--- 1 file changed, 111 insertions(+), 87 deletions(-) diff --git a/tests/unixctl-py.at b/tests/unixctl-py.at index 9ba7023..0

[ovs-dev] [PATCH 49/55] jsonrpc-py.at: Run tests with Python 2 and 3.

2015-12-21 Thread Russell Bryant
Convert these Python tests to run with both Python 2 and 3. Signed-off-by: Russell Bryant --- tests/jsonrpc-py.at | 79 +++-- 1 file changed, 47 insertions(+), 32 deletions(-) diff --git a/tests/jsonrpc-py.at b/tests/jsonrpc-py.at index 3d3bd3b..9

[ovs-dev] [PATCH 50/55] reconnect.at: Run tests for Python 2 and 3.

2015-12-21 Thread Russell Bryant
Update the reconnect tests to use both Python 2 and 3. Signed-off-by: Russell Bryant --- tests/reconnect.at | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/reconnect.at b/tests/reconnect.at index 9ebe183..c88ca78 100644 --- a/tests/reconnect.at +++ b/tests/reconn

[ovs-dev] [PATCH 51/55] daemon-py.at: Run tests with Python 2 and 3.

2015-12-21 Thread Russell Bryant
Update these Python tests to run with both Python 2 and 3. Signed-off-by: Russell Bryant --- tests/daemon-py.at | 483 - 1 file changed, 260 insertions(+), 223 deletions(-) diff --git a/tests/daemon-py.at b/tests/daemon-py.at index cafa8df..e5

[ovs-dev] [PATCH 48/55] library.at: Run tests for Python 2 and 3.

2015-12-21 Thread Russell Bryant
Update Python tests to run for both Python 2 and 3. Signed-off-by: Russell Bryant --- tests/library.at | 34 ++ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/tests/library.at b/tests/library.at index d5dcb12..11a405b 100644 --- a/tests/library.at

[ovs-dev] [PATCH 47/55] ovsdb-idl.at: Run tests with both Python 2 and 3.

2015-12-21 Thread Russell Bryant
Update Python tests to run for both Python 2 and Python 3. Signed-off-by: Russell Bryant --- tests/ovsdb-idl.at | 56 ++ 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at index ad780af..27b1

[ovs-dev] [PATCH 46/55] ovsdb.at: Run Python tests for Python 2 and 3.

2015-12-21 Thread Russell Bryant
ovsdb.at includes some macros for running some identical test cases for both C and Python. Update these macros to run the test case for both Python 2 and 3. Retain the existing behavior for the direct use of the _PY versions of these macros to only run against Python 2 without any changes needed.

[ovs-dev] [PATCH 44/55] check-structs.at: Run for both Python 2 and 3.

2015-12-21 Thread Russell Bryant
Update the tests in check-structs.at to run with both Python 2 and 3 if available. The check-structs script is written in Python, though does not use the ovs Python library. The script did require fixes in a previous commit to make it Python 3 compatible, so this ensures that compatibility remain

[ovs-dev] [PATCH 45/55] json.at: Run for Python 2 and 3.

2015-12-21 Thread Russell Bryant
Run json.at tests for both Python 2 and 3 if available. Signed-off-by: Russell Bryant --- tests/json.at | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tests/json.at b/tests/json.at index 8846ac9..a4c40c8 100644 --- a/tests/json.at +++ b/tests/json.at @

[ovs-dev] [PATCH 43/55] configure: Check for presence of Python 3.

2015-12-21 Thread Russell Bryant
The configure script already checked for Python 2 (>=2.7). Add another check for Python 3 (>=3.4). This will be used later for automatically running tests with Python 3 as well if available. Signed-off-by: Russell Bryant --- configure.ac | 1 + m4/openvswitch.m4 | 42

[ovs-dev] [PATCH 41/55] ipfix-gen-entities: Fix Python 3 compatibility.

2015-12-21 Thread Russell Bryant
Also fix minor style issues and add this script to the list of things checked in the pep8 tox environment. Signed-off-by: Russell Bryant --- ofproto/ipfix-gen-entities | 70 +++--- python/tox.ini | 2 +- 2 files changed, 36 insertions(+), 36 d

[ovs-dev] [PATCH 42/55] ovs-xapi-sync: Fix Python 3 compatibility.

2015-12-21 Thread Russell Bryant
Also fix some minor style issues and add this script to the list of things checked in the pep8 tox environment. Signed-off-by: Russell Bryant --- python/tox.ini | 2 +- .../usr_share_openvswitch_scripts_ovs-xapi-sync | 20 +++- 2 files

[ovs-dev] [PATCH 40/55] ovs-vtep: Fix Python 3 compatibility.

2015-12-21 Thread Russell Bryant
Also fix style issues found by the flake8 tool and add ovs-vtep to the list of files checked in the pep8 tox environment. Signed-off-by: Russell Bryant --- python/tox.ini | 2 +- vtep/ovs-vtep | 96 +- 2 files changed, 56 insertions(+), 4

[ovs-dev] [PATCH 37/55] ovs-monitor-ipsec: Fix Python 3 compatibility.

2015-12-21 Thread Russell Bryant
Signed-off-by: Russell Bryant --- debian/ovs-monitor-ipsec | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/debian/ovs-monitor-ipsec b/debian/ovs-monitor-ipsec index d35ec46..1f1562d 100755 --- a/debian/ovs-monitor-ipsec +++ b/debian/ovs-monitor-ipsec @@ -

[ovs-dev] [PATCH 38/55] ovs-monitor-ipsec: Minor style fixes.

2015-12-21 Thread Russell Bryant
Remove an unused import and use "is None" instead of "== None". Also add this script to the list of what's checked in the pep8 tox environment. Signed-off-by: Russell Bryant --- debian/ovs-monitor-ipsec | 5 ++--- python/tox.ini | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-)

[ovs-dev] [PATCH 39/55] ovs-pcap: Fix Python 3 compatibility.

2015-12-21 Thread Russell Bryant
Also address style errors found by flake8 and add it to the list of files checked in the pep8 tox environment. Signed-off-by: Russell Bryant --- python/tox.ini| 2 +- utilities/ovs-pcap.in | 17 +++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/python/tox

[ovs-dev] [PATCH 35/55] python: Fix object comparisons in Python 3.

2015-12-21 Thread Russell Bryant
Python 3 no longer supports __cmp__. Instead, we have to implement the "rich comparison" operators. We implement __eq__ and __lt__ and use functools.total_ordering to implement the rest. In one case, no __cmp__ method was provided and instead relied on the default behavior provided in Python 2.

[ovs-dev] [PATCH 36/55] python: Deal with str and byte differences.

2015-12-21 Thread Russell Bryant
Python 3 has separate types for strings and bytes. Python 2 used the same type for both. We need to convert strings to bytes before writing them out to a socket. We also need to convert data read from the socket to a string. Signed-off-by: Russell Bryant --- python/ovs/jsonrpc.py | 10 +++

[ovs-dev] [PATCH 33/55] python: Don't compare None and int.

2015-12-21 Thread Russell Bryant
Comparing None to an integer worked in Python 2, but fails in Python 3. Signed-off-by: Russell Bryant --- python/ovs/reconnect.py | 2 +- tests/test-reconnect.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ovs/reconnect.py b/python/ovs/reconnect.py index 39dd556

[ovs-dev] [PATCH 34/55] tests: Deal with Python output differences.

2015-12-21 Thread Russell Bryant
This test checks the output based on Python's string representation of an array of two unicode strings. These strings have a "u" prefix in Python 2, but not Python 3. In Python 3, all strings are unicode. Use sed on the output to strip the "u" from Python 2 output when checking for the expected

[ovs-dev] [PATCH 32/55] tests: Python style fixes.

2015-12-21 Thread Russell Bryant
Make flake8 run clean against these. Also use isinstance() instead of direct type comparisons. Update the tox config to run flake8 against these files, as well. Signed-off-by: Russell Bryant --- python/tox.ini| 2 +- tests/MockXenAPI.py | 3 +++ tests/test-daemon.py |

[ovs-dev] [PATCH 28/55] python: Add basic testing of ovs.json.

2015-12-21 Thread Russell Bryant
Add basic testing of the normal code path in the JSON parser. This at least shows how to add more Python unit tests that validate the code works on multiple Python versions. For things that are relatively simple and Python specific, this seems like an easier way to add test cases than autotest.

[ovs-dev] [PATCH 31/55] tests: Make Python 3 compatible.

2015-12-21 Thread Russell Bryant
Apply fixes to the Python scripts in the main ovs test suite to make them work with both Python 2 and Python 3. This makes use of the 'six' module, but six is already a dependency for the ovs Python lib, which is being used here. Signed-off-by: Russell Bryant --- tests/test-json.py | 18 ++

[ovs-dev] [PATCH 29/55] python: Run ovsdb-doc from tox.

2015-12-21 Thread Russell Bryant
The ovsdb-doc utility uses the ovs Python library. This patch runs it in the virtual Python environments (2.7 and 3.4) to ensure that it completes successfully. This helped quickly expose some more bugs in the Python 3 port. The patch includes the addition of the -s/--silent option to ovsdb-doc,

[ovs-dev] [PATCH 30/55] python: Remove reamining direct type comarisons.

2015-12-21 Thread Russell Bryant
I've hit several bugs in this Python 3 work where the fix was some code needed to be converted to use isinstance(). This has been primarily around deadling with the changes to unicode handling. Go ahead and convert the rest of the direct type comparisons to use isinstance(), as it could avoid a b

[ovs-dev] [PATCH 27/55] python: Use six.unichr().

2015-12-21 Thread Russell Bryant
six.unichr() is equivalent to unichr() in Python 2 and chr() in Python 3. Signed-off-by: Russell Bryant --- python/ovs/json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ovs/json.py b/python/ovs/json.py index a59a0c2..db74397 100644 --- a/python/ovs/json.py +++ b/

[ovs-dev] [PATCH 26/55] python: Drop use of sys.maxint.

2015-12-21 Thread Russell Bryant
sys.maxint does not exist in Python 3, as an int does not have a max value anymore (except as limited by implementation details and system resources). sys.maxsize works as a reasonable substitute as it's the same as sys.maxint. The Python 3.0 release notes have this to say: The sys.maxint cons

[ovs-dev] [PATCH 25/55] python: Don't use StringIO directly.

2015-12-21 Thread Russell Bryant
StringIO.StringIO in Python 2 became io.StringIO in Python 3. Use six.StringIO which is an alias for the two cases. Signed-off-by: Russell Bryant --- python/ovs/json.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/ovs/json.py b/python/ovs/json.py index c1dcd63..f

[ovs-dev] [PATCH 24/55] check-structs: Make Python 3 compatible.

2015-12-21 Thread Russell Bryant
Signed-off-by: Russell Bryant --- build-aux/check-structs | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build-aux/check-structs b/build-aux/check-structs index f79f235..449fd41 100755 --- a/build-aux/check-structs +++ b/build-aux/check-structs @@ -1,5 +1,7 @@ #! /usr/

[ovs-dev] [PATCH 18/55] python: Drop unicode type.

2015-12-21 Thread Russell Bryant
Python 2 had str and unicode. Python 3 only has str, which is always a unicode string. Drop use of unicode with the help of six.text_type (unicode in py2 and str in py3) and six.string_types ([str, unicode] in py2 and [str] in py3). Signed-off-by: Russell Bryant --- python/ovs/db/data.py

[ovs-dev] [PATCH 21/55] xml2nroff: Make compatible with Python 3.

2015-12-21 Thread Russell Bryant
Update xml2nroff to work with either Python 2 or Python 3. The changes are minor and can be managed without the use of the six library. For iterating a dict, we now use: for k, v in subst.items(): This is the same as .iteritems() in Python 2. It's technically a little less efficient for Py

[ovs-dev] [PATCH 22/55] ovsdb-doc: Make compatible with Python 3.

2015-12-21 Thread Russell Bryant
Fix minor Python 3 compatibility issues. There was only one place where we needed to adapt based on Python version. The inline implementation of the set of valid string types seemed better than taking on the 'six' dependency in this script since it's executed at ovs build time. Signed-off-by: Ru

[ovs-dev] [PATCH 23/55] extract-ofp: Python 3 compatibility.

2015-12-21 Thread Russell Bryant
Fix build-aux/extract-ofp-* scripts to be compatible with both Python 2 and Python 3. The fixes do not require any new dependencies. Signed-off-by: Russell Bryant --- build-aux/extract-ofp-actions | 72 ++- build-aux/extract-ofp-errors | 38 -

[ovs-dev] [PATCH 19/55] python: Drop use of types.StringTypes.

2015-12-21 Thread Russell Bryant
types.StringTypes does not exist in Python 3. We can use six.string_types, instead. Signed-off-by: Russell Bryant --- python/ovs/unixctl/__init__.py | 4 +++- python/ovs/unixctl/client.py | 5 +++-- python/ovs/unixctl/server.py | 3 +-- 3 files changed, 7 insertions(+), 5 deletions(-) diff

[ovs-dev] [PATCH 20/55] python: Drop use of types.FunctionType.

2015-12-21 Thread Russell Bryant
This code asserted that the callback argument was of type types.FunctionType. It's more pythonic to just check that the argument is callable, and not specifically that it's a function. There are other ways to implement a callback than types.FunctionType. Signed-off-by: Russell Bryant --- pytho

[ovs-dev] [PATCH 17/55] python: Drop usage of long type.

2015-12-21 Thread Russell Bryant
Python 2 has both long and int types. Python 3 only has int, which behaves like long. In the case of needing a set of integer types, we can use six.integer_types which includes int and long for Python 2 and just int for Python 3. We can convert all cases of long(value) to int(value), because as

[ovs-dev] [PATCH 14/55] python: Stop use of tuple parameter unpacking

2015-12-21 Thread Russell Bryant
Python 3 removed support for tuple parameter unpacking. https://www.python.org/dev/peps/pep-3113/ Instead of: def foo((a, b)): print(a) print(b) you should do: def foo(a_b): a, b = a_b print(a) print(b) but in both uses here, the values were nev

[ovs-dev] [PATCH 16/55] python: Convert dict iterators.

2015-12-21 Thread Russell Bryant
In Python 2, dict.items(), dict.keys(), and dict.values() returned a list. dict.iteritems(), dict.iterkeys(), and dict.itervalues() returned an iterator. As of Python 3, dict.iteritems(), dict.itervalues(), and dict.iterkeys() are gone. items(), keys(), and values() now return an iterator. In t

[ovs-dev] [PATCH 15/55] python: Stop using xrange().

2015-12-21 Thread Russell Bryant
Python 2 had range() and xrange(). xrange() is more efficient, but behaves differently so range() was retained for compatibility. Python 3 only has range() and it behaves like Python 2's xrange(). Remove the one explicit use of xrange() and use six.moves.range() to make sure we're using xrange()

[ovs-dev] [PATCH 11/55] python: Fix print function compatibility.

2015-12-21 Thread Russell Bryant
The print statement from Python 2 is a function in Python 3. Enable print function support for Python 2 and convert print statements to function calls. Signed-off-by: Russell Bryant --- python/ovstest/rpcserver.py | 4 +++- python/ovstest/tests.py | 36 +++-

[ovs-dev] [PATCH 13/55] python: Fix xmlrpclib imports.

2015-12-21 Thread Russell Bryant
Fix imports of xmlrpclib to be compatible with Python 3. Python 2 had xmlrpclib (client) and SimpleXMLRPCServer (server). In Python 3, these have been renamed to xmlrpc.client and xmlrpc.server. The solution implemented here is to use the six library. It may seem excessive for this particular i

[ovs-dev] [PATCH 12/55] python: Add missing Apache License headers.

2015-12-21 Thread Russell Bryant
Signed-off-by: Russell Bryant --- python/ovs/dirs.py | 12 python/ovstest/tests.py | 12 2 files changed, 24 insertions(+) diff --git a/python/ovs/dirs.py b/python/ovs/dirs.py index 10571db..dae9288 100644 --- a/python/ovs/dirs.py +++ b/python/ovs/dirs.py @@ -1,3 +

[ovs-dev] [PATCH 09/55] python: Fix several pep8 whitespace errors.

2015-12-21 Thread Russell Bryant
Fix the following pep8 errors: E201 whitespace after '(' E203 whitespace before ',' E226 missing whitespace around arithmetic operator E231 missing whitespace after ':' E241 multiple spaces after ':' E251 unexpected spaces around keyword / parameter equals E261 at least two spaces be

[ovs-dev] [PATCH 10/55] python: Inherit from object.

2015-12-21 Thread Russell Bryant
class Vlog now inherits from "object". This is a "new style" Python class, which isn't new at all at this point. This was introduced back in Python 2.x, and some Python 2 code won't work as expected without it. In Python 3, this happens implicitly. Signed-off-by: Russell Bryant --- python/ovs/

[ovs-dev] [PATCH 07/55] python: Resolve pep8 comparison errors.

2015-12-21 Thread Russell Bryant
Resolve pep8 errors: E711 comparison to None should be 'if cond is None:' The reason comparing against None with "is None" is preferred over "== None" is because a class can define its own equality operator and produce bizarre unexpected behavior. Using "is None" has a very explicit meaning th

[ovs-dev] [PATCH 08/55] python: Restrict line length to 79 chars.

2015-12-21 Thread Russell Bryant
Resolve pep8 error: E501 line too long (80 > 79 characters) Signed-off-by: Russell Bryant --- python/ovs/db/idl.py | 6 -- python/ovs/dirs.py| 10 +- python/ovs/socket_util.py | 12 python/tox.ini| 2 +- 4 files changed, 18 insertions(+), 12

[ovs-dev] [PATCH 04/55] python: Fix invalid variable reference.

2015-12-21 Thread Russell Bryant
This code referred to "rows" where it meant to refer to "fetched_rows". Signed-off-by: Russell Bryant --- python/ovs/db/idl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py index 5e3466e..8d50f65 100644 --- a/python/ovs/db/idl.py

[ovs-dev] [PATCH 06/55] python: Resolve pep8 blank line errors.

2015-12-21 Thread Russell Bryant
Resolve pep8 errors E302 and E303: E302 expected 2 blank lines, found 1 E303 too many blank lines (3) Signed-off-by: Russell Bryant --- python/ovs/poller.py | 1 + python/ovs/timeval.py | 3 +++ python/ovs/unixctl/__init__.py | 1 + python/ovs/unixctl/server.py | 1 + p

[ovs-dev] [PATCH 03/55] python: Remove unused imports and variables.

2015-12-21 Thread Russell Bryant
Signed-off-by: Russell Bryant --- python/ovs/socket_util.py| 5 ++--- python/ovs/unixctl/client.py | 2 -- python/ovstest/vswitch.py| 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/python/ovs/socket_util.py b/python/ovs/socket_util.py index 3bd4750..a01c3aa 100644 -

[ovs-dev] [PATCH 05/55] python: Add pep8 test environment.

2015-12-21 Thread Russell Bryant
PEP8 is the Python formatting standard. This test environment catches cases where the code deviates from this standard. We exclude all of the rules currently violated so we can start with a passing configuration. They can be removed over time when they get cleaned up. Signed-off-by: Russell Brya

[ovs-dev] [PATCH 01/55] python: Set up initial tox test environment.

2015-12-21 Thread Russell Bryant
tox is a tool for running Python tests in virtual Python environments. This initial setup only attempts to install the ovs Python library in both a virtual Python 2.7 environment and a virtual Python 3.4 environment. We also run the beginning of a test suite, which only imports the code. This qui

[ovs-dev] [PATCH 00/55] Python 3 support.

2015-12-21 Thread Russell Bryant
v1: - https://github.com/russellb/ovs/commits/python_submit_v1 I sent an RFC last Friday, but I was able to finish up the final tweaks I wanted to make today, so it's ready for review. This patch series ports the ovs Python library, as well as miscellaneous Python scripts, to Python 3. The ser

[ovs-dev] [PATCH 02/55] python: Start fixing some Python 3 issues.

2015-12-21 Thread Russell Bryant
From: Terry Wilson This patch fixes just the Python 3 problems found by running: python3 setup.py install There are still many other issues to be fixed, but this is a start. Signed-off-by: Terry Wilson Signed-off-by: Russell Bryant --- python/ovs/daemon.py | 31 -

[ovs-dev] [PATCH] tests: Add ovn keyword to all ovn tests.

2015-12-21 Thread Russell Bryant
Autotest keywords are helpful for running a subset of the test suite. This patch makes it so you can run all OVN tests using the 'ovn' keyword. $ make check TESTSUITEFLAGS="-k ovn" Signed-off-by: Russell Bryant --- tests/ovn-controller-vtep.at | 1 + tests/ovn-controller.at | 1 + tests/

[ovs-dev] [PATCH] ovs-vtep: Clean up local mac entries on startup.

2015-12-21 Thread Anupam Chanda
This change handles a corner case where local mac entries are not cleared if a vlan binding is deleted while the emulator is not running. The fix is to clean up the local mac entries once on restart. Reported-by: Hsin-Yi Shen Signed-off-by: Anupam Chanda --- AUTHORS |1 + vtep/ovs-vt

Re: [ovs-dev] [PATCH] Do not add ARP replies in the lswitch pipeline to all the lports

2015-12-21 Thread Russell Bryant
On 12/21/2015 02:52 PM, Ben Pfaff wrote: > On Mon, Dec 21, 2015 at 10:39:29AM -0500, Russell Bryant wrote: >> On 12/21/2015 09:55 AM, Numan Siddique wrote: >>> On 12/21/2015 08:13 PM, Russell Bryant wrote: On 12/21/2015 09:27 AM, Numan Siddique wrote: What problem are you addressing here?

Re: [ovs-dev] [PATCH] Do not add ARP replies in the lswitch pipeline to all the lports

2015-12-21 Thread Ben Pfaff
On Mon, Dec 21, 2015 at 10:39:29AM -0500, Russell Bryant wrote: > On 12/21/2015 09:55 AM, Numan Siddique wrote: > > On 12/21/2015 08:13 PM, Russell Bryant wrote: > >> On 12/21/2015 09:27 AM, Numan Siddique wrote: > >> What problem are you addressing here? It seems we would want the flows > >> crea

Re: [ovs-dev] [PATCH 4/5] lib/daemon: Move the user:group code up one level

2015-12-21 Thread Aaron Conole
"Traynor, Kevin" writes: >> -Original Message- >> From: Aaron Conole [mailto:acon...@redhat.com] >> Sent: Friday, December 18, 2015 6:28 PM >> To: dev@openvswitch.org >> Cc: Flavio Leitner; Traynor, Kevin >> Subject: [PATCH 4/5] lib/daemon: Move the user:group code up one level >> >> It w

Re: [ovs-dev] [PATCH 3/5] netdev-dpdk: Autofill lcore coremask if absent

2015-12-21 Thread Aaron Conole
"Traynor, Kevin" writes: >> -Original Message- >> From: Aaron Conole [mailto:acon...@redhat.com] >> Sent: Friday, December 18, 2015 6:28 PM >> To: dev@openvswitch.org >> Cc: Flavio Leitner; Traynor, Kevin >> Subject: [PATCH 3/5] netdev-dpdk: Autofill lcore coremask if absent >> >> The use

  1   2   >