Re: [ovs-dev] [python 08/31] python: Avoid using 'tuple' as a variable name.

2011-08-23 Thread Justin Pettit
pylint will complain about some of these things. It would be good to kick it off, when available, when builds are run (or at least on a "make check"). I've had it on my to-do list for a while, but haven't gotten around to it... --Justin On Aug 23, 2011, at 2:05 PM, Ben Pfaff wrote: > 'tuple

Re: [ovs-dev] From Openflow port number to hardware port number

2011-08-23 Thread Justin Pettit
The confusion on our end is that what you call a hardware port number, we consider to be just the interface name (e.g., "eth0" on Linux). What platform is this? I haven't seen that naming convention. If you want to script it, one option is to query the config database with the following:

Re: [ovs-dev] From Openflow port number to hardware port number

2011-08-23 Thread Bibrak Qamar
/ # ./openvswitch/utilities/ovs-ofctl show br0 --> gives the following result 1(p1): addr:00:00:00:00:00:01, config: 0, state:0x1 current:1GB-FD COPPER advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-HD 1GB-FD supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-HD 1GB-FD 2(p4)

Re: [ovs-dev] [PATCH] debian: Apply Ubuntu patch to add DKMS support.

2011-08-23 Thread Justin Pettit
This looks reasonable to me, but I'm pretty uninformed when it comes to Debian packaging. Simon's input would be much more valuable than mine. --Justin On Aug 23, 2011, at 3:37 PM, Ben Pfaff wrote: > I tested that installing openvswitch-datapath-dkms worked OK on my own > Debian machine. > >

[ovs-dev] [PATCH] [patch v4.2] datapath: add key support to CAPWAP tunnel

2011-08-23 Thread Simon Horman
From: Valient Gough Add tunnel key support to CAPWAP vport. Uses the optional WSI field in a CAPWAP header to store a 64bit key. It can also be used without keys, in which case it is backward compatible with the old code. Documentation about the WSI field format is in CAPWAP.txt. Signed-off-b

Re: [ovs-dev] [PATCH 1/1] datapath: add key support to CAPWAP tunnel

2011-08-23 Thread Simon Horman
On Tue, Aug 02, 2011 at 01:56:22PM +0700, Jesse Gross wrote: > On Tue, Aug 2, 2011 at 12:01 PM, Simon Horman wrote: > > Hi, > > > > in an effort to move things forward I decided to take the liberty > > of posting a fresh version of this patch which addresses each > > of the issues that Jesse raise

Re: [ovs-dev] From Openflow port number to hardware port number

2011-08-23 Thread Ben Pfaff
On Wed, Aug 24, 2011 at 10:10:01AM +0500, Bibrak Qamar wrote: > ovs-ofctl show br0 --- > Shows list of ports with their OVS port number and > Hardware port number. Is there any simple way (may be a function) to convert > ovs port number to its corresponding hardware port number and vise versa . Ca

[ovs-dev] From Openflow port number to hardware port number

2011-08-23 Thread Bibrak Qamar
Hello all, ovs-ofctl show br0 --- > Shows list of ports with their OVS port number and Hardware port number. Is there any simple way (may be a function) to convert ovs port number to its corresponding hardware port number and vise versa . Bibrak NUST-School of Electrical Engineering and Computer

[ovs-dev] Bug#636815: marked as done (ovsdbmonitor and openvswitch-common: error when trying to install together)

2011-08-23 Thread Debian Bug Tracking System
Your message dated Wed, 24 Aug 2011 11:17:23 +0900 with message-id <20110824021722.ga19...@verge.net.au> and subject line Bug#636815: ovsdbmonitor and openvswitch-common: error when trying to install together has caused the Debian Bug report #636815, regarding ovsdbmonitor and openvswitch-common:

Re: [ovs-dev] [PATCH] VLAN actions should use push/pop semantics

2011-08-23 Thread Ben Pfaff
On Wed, Aug 24, 2011 at 09:29:29AM +0800, Jesse Gross wrote: > On Wed, Aug 24, 2011 at 2:22 AM, Ben Pfaff wrote: > > On Tue, Aug 23, 2011 at 11:17:22AM -0700, Pravin Shelar wrote: > >> On Tue, Aug 23, 2011 at 10:55 AM, Ben Pfaff wrote: > >> > On Tue, Aug 23, 2011 at 10:48:42AM -0700, Pravin Shela

[ovs-dev] [PATCH] Debian: Transition to dh_python2

2011-08-23 Thread Simon Horman
--- debian/control|8 +++- debian/python-openvswitch.dirs|4 ++-- debian/python-openvswitch.install |4 ++-- debian/rules |2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/debian/control b/debian/control index 19

[ovs-dev] (no subject)

2011-08-23 Thread Simon Horman
I made this change in preparation for 1.2.1-1 but decided to omit it from that upload as it seems more appropriate for development than a stable release. So I am submitting it for consideration for inclusion in the master branch ___ dev mailing list dev

[ovs-dev] Bug#636816: marked as done (ovsdbmonitor and openvswitch-switch: error when trying to install together)

2011-08-23 Thread Debian Bug Tracking System
Your message dated Wed, 24 Aug 2011 01:47:56 + with message-id and subject line Bug#636816: fixed in openvswitch 1.2.1-1 has caused the Debian Bug report #636816, regarding ovsdbmonitor and openvswitch-switch: error when trying to install together to be marked as done. This means that you cl

[ovs-dev] openvswitch_1.2.1-1_amd64.changes ACCEPTED into unstable

2011-08-23 Thread Debian FTP Masters
Accepted: openvswitch-brcompat_1.2.1-1_amd64.deb to main/o/openvswitch/openvswitch-brcompat_1.2.1-1_amd64.deb openvswitch-common_1.2.1-1_amd64.deb to main/o/openvswitch/openvswitch-common_1.2.1-1_amd64.deb openvswitch-controller_1.2.1-1_amd64.deb to main/o/openvswitch/openvswitch-controlle

[ovs-dev] [PATCH 5/6] Debian: set -e in brcompat postinst

2011-08-23 Thread Simon Horman
As reported by lintian: The maintainer script doesn't seem to set the -e flag which ensures that the script's execution is aborted when any executed command fails. Refer to Debian Policy Manual section 10.4 (Scripts) for details. --- debian/openvswitch-brcompat.po

[ovs-dev] [PATCH 6/6] Debian: update changelog for 1.2.1-1

2011-08-23 Thread Simon Horman
--- debian/changelog | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4186d33..ab81659 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,15 @@ openvswitch (1.2.1-1) unstable; urgency=low - [ Open vSwitch

[ovs-dev] [PATCH 1/6] Debian: Add dependency on ${misc:Depends}

2011-08-23 Thread Simon Horman
Add dependency on ${misc:Depends} to openvswitch-brcompat and ovsdbmonitor. As reported by Lintian: The source package uses debhelper, but it does not include ${misc:Depends} in the given binary package's debian/control entry. Any debhelper command may add dependencies to $

[ovs-dev] [PATCH 3/6] docs: Add missing escape

2011-08-23 Thread Simon Horman
This adds what appears to be a missing character to an escape sequence. This resolves a problem reported as "a newline character is not allowed in an escape name". Reported by lintian --- utilities/ovs-appctl.8.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/utilitie

[ovs-dev] [PATCH 4/6] doc: Consistently escape bundle_load() arguments

2011-08-23 Thread Simon Horman
This escapes the arguments to the bundle_load() example in the same way that the description above is escaped. This resolves a warning reported as "71: warning [p 11, 5.0i]: cannot adjust line" Reported by lintian --- utilities/ovs-ofctl.8.in |2 +- 1 files changed, 1 insertions(+), 1 deleti

[ovs-dev] [PATCH 0/6] Updates for Debian 1.2.1-1 package

2011-08-23 Thread Simon Horman
Hi, I have uploaded 1.2.1-1 to the Debian archive. This series includes the (minor) changes I made, mostly to make lintian happier. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH 2/6] docs: Suppress "warning: macro `DD' not defined" warning

2011-08-23 Thread Simon Horman
Suppress "warning: macro `DD' not defined" warning for ovs-brcompatd.8. As per the description by Ben Pfaff for the same problem effecting other files: deamon.man allows the file that is including it to include extra text in the description of --detach by defining a macro named DD

[ovs-dev] Processing of openvswitch_1.2.1-1_amd64.changes

2011-08-23 Thread Debian FTP Masters
openvswitch_1.2.1-1_amd64.changes uploaded successfully to localhost along with the files: openvswitch_1.2.1-1.dsc openvswitch_1.2.1.orig.tar.gz openvswitch_1.2.1-1.debian.tar.gz openvswitch-common_1.2.1-1_amd64.deb openvswitch-switch_1.2.1-1_amd64.deb openvswitch-ipsec_1.2.1-1_amd64.de

Re: [ovs-dev] [PATCH] VLAN actions should use push/pop semantics

2011-08-23 Thread Jesse Gross
On Wed, Aug 24, 2011 at 2:22 AM, Ben Pfaff wrote: > On Tue, Aug 23, 2011 at 11:17:22AM -0700, Pravin Shelar wrote: >> On Tue, Aug 23, 2011 at 10:55 AM, Ben Pfaff wrote: >> > On Tue, Aug 23, 2011 at 10:48:42AM -0700, Pravin Shelar wrote: >> >> Currently the kernel vlan actions mirror those used by

Re: [ovs-dev] [PATCH 3/4] Implement initial Python bindings for Open vSwitch database.

2011-08-23 Thread Reid Price
A few notes inline, any lack of response indicates wholehearted agreement On Tue, Aug 23, 2011 at 2:42 PM, Ben Pfaff wrote: > I just sent out a patch series that addresses most of these. I'll > just respond to the ones that I didn't do anything about, below. > > If you've lost the message that

[ovs-dev] Bug#637802: Bug #637802: patch for DKMS support now available

2011-08-23 Thread Ben Pfaff
tags 637802 patch thanks A patch to add DKMS support has been posted for review to ovs-dev here: http://openvswitch.org/pipermail/dev/2011-August/010715.html Most likely, this patch or some variant on it will make it into Open vSwitch 1.3.0. ___ dev m

[ovs-dev] Processed: Bug #637802: patch for DKMS support now available

2011-08-23 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org: > tags 637802 patch Bug #637802 [openvswitch-datapath-source] Please add DKMS support Added tag(s) patch. > thanks Stopping processing here. Please contact me if you need assistance. -- 637802: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=6378

[ovs-dev] Processed: Bug #636816: fixed upstream in 1.2.1

2011-08-23 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org: > tags 636816 patch fixed-upstream Bug #636816 [openvswitch-switch,ovsdbmonitor] ovsdbmonitor and openvswitch-switch: error when trying to install together Added tag(s) fixed-upstream and patch. > thanks Stopping processing here. Please contact me

[ovs-dev] Bug#636816: Bug #636816: fixed upstream in 1.2.1

2011-08-23 Thread Ben Pfaff
tags 636816 patch fixed-upstream thanks A patch to fix this was committed as part of upstream 1.2.1, so this problem will be fixed when 1.2.1 is uploaded. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH] debian: Apply Ubuntu patch to add DKMS support.

2011-08-23 Thread Ben Pfaff
I tested that installing openvswitch-datapath-dkms worked OK on my own Debian machine. The bulk of this patch is taken from downstream Ubuntu DKMS support written by Chuck Short , version 1.2.0-1ubuntu1. I made the following changes: * Update debian/.gitignore. * Update debian/automake.mk.

[ovs-dev] [PATCH] Improve kernel hash table

2011-08-23 Thread Pravin Shelar
Currently OVS uses its own hashing implmentation for hash tables which has some problems, e.g. error case on deletion code. Following patch replaces that with hlist based hash table which is consistent with other kernel hash tables. As Jesse suggested, flex-array is used for allocating hash bu

[ovs-dev] [python2] python: Use enumerate() builtin function to simplify counted iteration.

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- Here's another one that I missed before. diff --git a/python/ovs/db/data.py b/python/ovs/db/data.py index 90ad7dd..9cab2a4 100644 --- a/python/ovs/db/data.py +++ b/python/ovs/db/data.py @@ -348,11 +348,9 @@ class Datum(object): if head: s.append(

Re: [ovs-dev] [PATCH 3/4] Implement initial Python bindings for Open vSwitch database.

2011-08-23 Thread Ben Pfaff
I just sent out a patch series that addresses most of these. I'll just respond to the ones that I didn't do anything about, below. If you've lost the message that I'm replying to, it's archived here: http://openvswitch.org/pipermail/dev/2010-October/003927.html On Wed, Oct 06, 2010 at 03:10:12AM

[ovs-dev] [python 18/31] ovs.db.types: Simplify code to avoid try/except case.

2011-08-23 Thread Ben Pfaff
Also fixes a typo that caused one version of the error message to have a hyphen and the other to have a space. Suggested-by: Reid Price --- python/ovs/db/types.py |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/python/ovs/db/types.py b/python/ovs/db/types.py index f

[ovs-dev] [python 20/31] ovs.db.types: Introduce DEFAULT_MIN, DEFAULT_MAX as Type class members.

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- python/ovs/db/types.py | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/python/ovs/db/types.py b/python/ovs/db/types.py index 5f50d65..00b9ab4 100644 --- a/python/ovs/db/types.py +++ b/python/ovs/db/types.py @@ -365,7 +365,10 @@ cla

[ovs-dev] [python 22/31] ovs.fatal_signal: Remove unnecessary "global" statement.

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- python/ovs/fatal_signal.py |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/python/ovs/fatal_signal.py b/python/ovs/fatal_signal.py index 839df32..b931512 100644 --- a/python/ovs/fatal_signal.py +++ b/python/ovs/fatal_signal.py @@ -21,8 +21,6

[ovs-dev] [python 10/31] daemon: Stylistic improvement for __read_pidfile in Python implementation.

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- python/ovs/daemon.py |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/ovs/daemon.py b/python/ovs/daemon.py index 5aa5bc1..da7eb8a 100644 --- a/python/ovs/daemon.py +++ b/python/ovs/daemon.py @@ -422,10 +422,10 @@ def __read_pidfil

[ovs-dev] [python 31/31] ovs.stream: Simplify logic in Stream.wait().

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- python/ovs/stream.py |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ovs/stream.py b/python/ovs/stream.py index 5954c31..82d4557 100644 --- a/python/ovs/stream.py +++ b/python/ovs/stream.py @@ -206,10 +206,10 @@ class Stream(object

[ovs-dev] [python 30/31] ovs.stream: Drop Stream.get_name() since clients can use 'name' directly.

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- python/ovs/jsonrpc.py |2 +- python/ovs/stream.py |3 --- 2 files changed, 1 insertions(+), 4 deletions(-) diff --git a/python/ovs/jsonrpc.py b/python/ovs/jsonrpc.py index 1cc7fb7..da7fa08 100644 --- a/python/ovs/jsonrpc.py +++ b/python/ovs/jsonrpc.py @@ -17

[ovs-dev] [python 29/31] ovs.stream: Use %d in place of %ld since the two are equivalent in Python.

2011-08-23 Thread Ben Pfaff
Reported-by: Reid Price --- python/ovs/stream.py |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ovs/stream.py b/python/ovs/stream.py index 16e383a..20cd7fe 100644 --- a/python/ovs/stream.py +++ b/python/ovs/stream.py @@ -1,4 +1,4 @@ -# Copyright (c) 2010 Nici

[ovs-dev] [python 03/31] python: Use getattr() and setattr() instead of __dict__.

2011-08-23 Thread Ben Pfaff
This leaves one use of __dict__ used for iterating through attributes. I could use dir() instead, but I was put off by this note in its documentation in the Python Library Reference: Because dir() is supplied primarily as a convenience for use at an interactive prompt, it tries to supply a

[ovs-dev] [python 26/31] ovs.jsonrpc: Use "not X" in place of "len(X) == 0" for testing strings.

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- python/ovs/jsonrpc.py |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ovs/jsonrpc.py b/python/ovs/jsonrpc.py index 1cc3696..1cc7fb7 100644 --- a/python/ovs/jsonrpc.py +++ b/python/ovs/jsonrpc.py @@ -249,7 +249,7 @@ class Connection

[ovs-dev] [python 28/31] ovs.reconnect: Fix typo in documentation.

2011-08-23 Thread Ben Pfaff
Reported-by: Reid Price --- python/ovs/reconnect.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ovs/reconnect.py b/python/ovs/reconnect.py index ac01416..8817494 100644 --- a/python/ovs/reconnect.py +++ b/python/ovs/reconnect.py @@ -513,8 +513,8 @@ class Rec

[ovs-dev] [python 27/31] ovs.reconnect: Make Reconnect.Reconnect inherit from object.

2011-08-23 Thread Ben Pfaff
Reported-by: Reid Price --- python/ovs/reconnect.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/python/ovs/reconnect.py b/python/ovs/reconnect.py index 757e730..ac01416 100644 --- a/python/ovs/reconnect.py +++ b/python/ovs/reconnect.py @@ -117,7 +117,7 @@ class Recon

[ovs-dev] [python 25/31] ovs.jsonrpc: Remove Connection.get_name()--clients can use 'name' directly.

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- python/ovs/jsonrpc.py |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/python/ovs/jsonrpc.py b/python/ovs/jsonrpc.py index 66c260f..1cc3696 100644 --- a/python/ovs/jsonrpc.py +++ b/python/ovs/jsonrpc.py @@ -215,9 +215,6 @@ class Connection(

[ovs-dev] [python 23/31] ovs.json: Optimize __dump_string().

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- python/ovs/json.py | 10 +- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/python/ovs/json.py b/python/ovs/json.py index 67470fc..6362830 100644 --- a/python/ovs/json.py +++ b/python/ovs/json.py @@ -28,15 +28,7 @@ for i in range(32):

[ovs-dev] [python 24/31] ovs.jsonrpc: Remove dead class variable Message.__next_id.

2011-08-23 Thread Ben Pfaff
Reported-by: Reid Price --- python/ovs/jsonrpc.py |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/python/ovs/jsonrpc.py b/python/ovs/jsonrpc.py index 906e93c..66c260f 100644 --- a/python/ovs/jsonrpc.py +++ b/python/ovs/jsonrpc.py @@ -34,7 +34,6 @@ class Message(object):

[ovs-dev] [python 17/31] ovs.db.types: Use .append instead of += for adding to lists.

2011-08-23 Thread Ben Pfaff
Python does not do a good job of appending lists to lists. Suggested-by: Reid Price --- python/ovs/db/types.py |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ovs/db/types.py b/python/ovs/db/types.py index 635922f..f7bc248 100644 --- a/python/ovs/db/types.py

[ovs-dev] [python 21/31] ovs.fatal_signal: Reorder definitions to be more easily readable.

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- python/ovs/fatal_signal.py | 26 +- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/python/ovs/fatal_signal.py b/python/ovs/fatal_signal.py index 5fca820..839df32 100644 --- a/python/ovs/fatal_signal.py +++ b/python/ovs/fatal

[ovs-dev] [python 07/31] python: Avoid using 'type' as a variable name.

2011-08-23 Thread Ben Pfaff
'type' is a Python built-in function, so it's best to avoid using it as a variable name. Reported-by: Reid Price --- python/ovs/db/data.py | 26 +- python/ovs/db/parser.py | 14 +++--- python/ovs/db/schema.py |4 ++-- python/ovs/jsonrpc.py | 10 +

[ovs-dev] [python 16/31] ovs.db.schema: Factor common checks for identifiers into new function.

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- python/ovs/db/schema.py | 18 -- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/python/ovs/db/schema.py b/python/ovs/db/schema.py index 2d053a0..29fe986 100644 --- a/python/ovs/db/schema.py +++ b/python/ovs/db/schema.py @@ -19,6 +19,

[ovs-dev] [python 19/31] ovs.db.types: Use toAtomicType() instead of open-coding it.

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- python/ovs/db/types.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ovs/db/types.py b/python/ovs/db/types.py index 416d745..5f50d65 100644 --- a/python/ovs/db/types.py +++ b/python/ovs/db/types.py @@ -337,8 +337,8 @@ class BaseTyp

[ovs-dev] [python 12/31] ovs.db.idl: Improve error reporting for bad s.

2011-08-23 Thread Ben Pfaff
Strangely malformed s could hypothetically get confusing error message. Using the Parser class should avoid that. Reported-by: Reid Price --- python/ovs/db/idl.py | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py in

[ovs-dev] [python 05/31] python: Avoid lots of \" in quoted strings by using '' as outermost quotes.

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- python/ovs/db/data.py |6 +++--- python/ovs/db/error.py |4 ++-- python/ovs/db/idl.py| 30 +++--- python/ovs/db/parser.py |2 +- python/ovs/db/schema.py |6 +++--- python/ovs/db/types.py | 10 +- 6 files chan

[ovs-dev] [python 06/31] python: Take advantage of Python "x < y < z" syntax.

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- lib/ovsdb-types.c |3 +-- python/ovs/db/data.py |2 +- python/ovs/db/parser.py |4 ++-- python/ovs/db/types.py |8 +++- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/ovsdb-types.c b/lib/ovsdb-types.c index b3452dd..95

[ovs-dev] [python 15/31] ovs.db.parser: Simplify code.

2011-08-23 Thread Ben Pfaff
Suggested-by: Reid Price --- python/ovs/db/parser.py | 12 +--- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/python/ovs/db/parser.py b/python/ovs/db/parser.py index 67b3bd5..173922b 100644 --- a/python/ovs/db/parser.py +++ b/python/ovs/db/parser.py @@ -53,15 +53,13 @@

[ovs-dev] [python 13/31] ovs.db.idl: Actually use Idl.__modify_row()'s return value.

2011-08-23 Thread Ben Pfaff
Idl.__parse_row_update() assumed that every change that the database server sent down actually modified the database. This is generally true, but since Idl.__modify_row() already returns whether there was a change, we might as well use it. Reported-by: Reid Price --- python/ovs/db/idl.py | 13

[ovs-dev] [python 14/31] ovs.db.idl: Use top-level class to represent IDL rows.

2011-08-23 Thread Ben Pfaff
According to Reid, there may be some disadvantages to having this class be anonymous, for example, cannot do instance/typechecking, might be allocating a new class for every row as well, which isn't the most memory efficient. Suggested-by: Reid Price --- python/ovs/db/idl.py |9 +++-- 1

[ovs-dev] [python 11/31] ovsdb-data: Simplify converting an OVSDB datum to JSON by reordering logic.

2011-08-23 Thread Ben Pfaff
Putting the "map" case first avoids duplicate tests. Suggested-by: Reid Price --- lib/ovsdb-data.c | 18 +- python/ovs/db/data.py | 10 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/ovsdb-data.c b/lib/ovsdb-data.c index 54ce72c..1781811

[ovs-dev] [python 00/31] Python fixes

2011-08-23 Thread Ben Pfaff
These fixes are based on Reid's review of the initial Python code back in October: http://openvswitch.org/pipermail/dev/2010-October/003927.html Ben Pfaff (31): ovs.stream: Fix logic bug in Stream.connect(). ovs.db.data: Fix bugs in Atom.is_default() and Datum.is_default(). python: Use getat

[ovs-dev] [python 09/31] daemon: Correct comment in Python implementation.

2011-08-23 Thread Ben Pfaff
Reported-by: Reid Price --- python/ovs/daemon.py |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/python/ovs/daemon.py b/python/ovs/daemon.py index 149c8a1..5aa5bc1 100644 --- a/python/ovs/daemon.py +++ b/python/ovs/daemon.py @@ -75,8 +75,7 @@ def set_pidfile(name): d

[ovs-dev] [python 08/31] python: Avoid using 'tuple' as a variable name.

2011-08-23 Thread Ben Pfaff
'tuple' is a Python built-in function, so it's best to avoid using it as a variable name. Suggested-by: Reid Price --- python/ovs/stream.py |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/python/ovs/stream.py b/python/ovs/stream.py index c1ce422..16e383a 100644 ---

[ovs-dev] [python 04/31] python: Join a list of strings instead of concatenating a long string.

2011-08-23 Thread Ben Pfaff
Python does not do a good job of appending strings: it takes O(n**2) time to append n strings. Suggested-by: Reid Price --- python/ovs/db/data.py | 58 +--- 1 files changed, 30 insertions(+), 28 deletions(-) diff --git a/python/ovs/db/data.py b/pyth

[ovs-dev] [python 01/31] ovs.stream: Fix logic bug in Stream.connect().

2011-08-23 Thread Ben Pfaff
The loop here is supposed to run at least once, and to continue looping as long as the loop body changes the current state, but this bug caused it to continue looping until the connection completed in success or failure. It probably didn't cause many problems in practice because only Unix domain s

[ovs-dev] [python 02/31] ovs.db.data: Fix bugs in Atom.is_default() and Datum.is_default().

2011-08-23 Thread Ben Pfaff
Reported-by: Reid Price --- python/ovs/db/data.py |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/python/ovs/db/data.py b/python/ovs/db/data.py index bfdc11c..a5fcb76 100644 --- a/python/ovs/db/data.py +++ b/python/ovs/db/data.py @@ -89,7 +89,7 @@ class Atom(object):

Re: [ovs-dev] [PATCH 1/1] vswitchd: PVID (Port VLAN ID) tagging feature

2011-08-23 Thread Philippe Jung
Le 23/08/2011 01:16, Ben Pfaff a écrit : > On Tue, Aug 23, 2011 at 12:54:19AM +0200, Philippe Jung wrote: >> If needed, I can post my OpenOffice table where I have written all >> tests I have performed > > That would actually be great. I'd like to convert them to unit tests. Regarding the tests:

Re: [ovs-dev] [PATCH] VLAN actions should use push/pop semantics

2011-08-23 Thread Ben Pfaff
On Tue, Aug 23, 2011 at 11:17:22AM -0700, Pravin Shelar wrote: > On Tue, Aug 23, 2011 at 10:55 AM, Ben Pfaff wrote: > > On Tue, Aug 23, 2011 at 10:48:42AM -0700, Pravin Shelar wrote: > >> Currently the kernel vlan actions mirror those used by OpenFlow 1.0. i.e. > >> MODIFY and STRIP. More flexible

Re: [ovs-dev] [PATCH] VLAN actions should use push/pop semantics

2011-08-23 Thread Pravin Shelar
On Tue, Aug 23, 2011 at 10:55 AM, Ben Pfaff wrote: > On Tue, Aug 23, 2011 at 10:48:42AM -0700, Pravin Shelar wrote: >> Currently the kernel vlan actions mirror those used by OpenFlow 1.0. i.e. >> MODIFY and STRIP. More flexible approach is to have an action to push a >> tag and pop a tag off, so t

Re: [ovs-dev] [PATCH] VLAN actions should use push/pop semantics

2011-08-23 Thread Ben Pfaff
On Tue, Aug 23, 2011 at 10:48:42AM -0700, Pravin Shelar wrote: > Currently the kernel vlan actions mirror those used by OpenFlow 1.0. i.e. > MODIFY and STRIP. More flexible approach is to have an action to push a > tag and pop a tag off, so that it can handle multiple levels of vlan tags. > Plus i

[ovs-dev] [PATCH] VLAN actions should use push/pop semantics

2011-08-23 Thread Pravin Shelar
Currently the kernel vlan actions mirror those used by OpenFlow 1.0. i.e. MODIFY and STRIP. More flexible approach is to have an action to push a tag and pop a tag off, so that it can handle multiple levels of vlan tags. Plus it aligns with newer version of OpenFlow. As this patch replaces