[ovs-dev] [PATCH] dirs: dbdir default must be based on sysconfdir.

2012-08-01 Thread Ben Pfaff
Some in-tree and out-of-tree code sets the OVS_SYSCONFDIR environment variable to control where /etc files go (mostly for test purposes). When the database directory (dbdir) was split off from the sysconfdir, the configure-time default continued to be based on the sysconfdir, but overriding the sy

Re: [ovs-dev] [PATCH] Create .conf.db.~lock~ in same dir as DBDIR.

2012-08-01 Thread Ben Pfaff
On Wed, Aug 01, 2012 at 10:52:08PM -0700, Mehak Mahajan wrote: > Commit f973f2af (Make the location of the database separately configurable.) > introduced the environment variable OVS_DBDIR which specifies the path for > the conf.db. With this commit, .conf.db.~lock~ will also be created in the >

[ovs-dev] [PATCH] Create .conf.db.~lock~ in same dir as DBDIR.

2012-08-01 Thread Mehak Mahajan
Commit f973f2af (Make the location of the database separately configurable.) introduced the environment variable OVS_DBDIR which specifies the path for the conf.db. With this commit, .conf.db.~lock~ will also be created in the DBDIR. Signed-off-by: Mehak Mahajan --- tests/ofproto-macros.at |

Re: [ovs-dev] [PATCH] Fix a typo in commit f973f2af2.

2012-08-01 Thread Mehak Mahajan
Thanks Ben. I pushed this to master. thanx! mehak On Wed, Aug 1, 2012 at 5:38 PM, Ben Pfaff wrote: > On Wed, Aug 01, 2012 at 05:10:36PM -0700, Mehak Mahajan wrote: > > Signed-off-by: Mehak Mahajan > > Looks good, please push. > ___ dev mailing list d

Re: [ovs-dev] [PATCH] Fix a typo in commit f973f2af2.

2012-08-01 Thread Ben Pfaff
On Wed, Aug 01, 2012 at 05:10:36PM -0700, Mehak Mahajan wrote: > Signed-off-by: Mehak Mahajan Looks good, please push. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH] Fix a typo in commit f973f2af2.

2012-08-01 Thread Mehak Mahajan
Signed-off-by: Mehak Mahajan --- python/ovs/dirs.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/python/ovs/dirs.py b/python/ovs/dirs.py index a5717fc..e4b37f9 100644 --- a/python/ovs/dirs.py +++ b/python/ovs/dirs.py @@ -5,5 +5,5 @@ import os PKGDATADIR = os.environ.

Re: [ovs-dev] [PATCH] flow: Fix wild pointer dereference in flow_compose().

2012-08-01 Thread Ethan Jackson
> Looks good. > > This is a fairly old bug, I think, so should you backport this? Sure ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] flow: Fix wild pointer dereference in flow_compose().

2012-08-01 Thread Ben Pfaff
On Wed, Aug 01, 2012 at 01:19:56PM -0700, Ethan Jackson wrote: > The 'ip' variable in flow_compose() points to some memory allocated > in an ofpbuf. The ofpbuf is modified without making the necessary > updates to the location of 'ip' causing a potential wild memory > access. > > Found by inspect

Re: [ovs-dev] [PATCH] Adding checksum to IP packets created by ovs for testing.

2012-08-01 Thread Ethan Jackson
Sounds good. You may want to wait a bit to resend it, I sent out a bug fix patch which should probably go in first. Ethan On Wed, Aug 1, 2012 at 1:19 PM, Mehak Mahajan wrote: > Sure ... Makes sense. > I will modify it, and since practically the complete patch is changed, I > will sent out anoth

[ovs-dev] [PATCH] flow: Fix wild pointer dereference in flow_compose().

2012-08-01 Thread Ethan Jackson
The 'ip' variable in flow_compose() points to some memory allocated in an ofpbuf. The ofpbuf is modified without making the necessary updates to the location of 'ip' causing a potential wild memory access. Found by inspection. Signed-off-by: Ethan Jackson --- lib/flow.c | 1 + 1 file changed,

Re: [ovs-dev] [PATCH] Adding checksum to IP packets created by ovs for testing.

2012-08-01 Thread Mehak Mahajan
Sure ... Makes sense. I will modify it, and since practically the complete patch is changed, I will sent out another patch. Thanks! Mehak On Wed, Aug 1, 2012 at 12:57 PM, Ethan Jackson wrote: > > I agree its cleaner, but I am still inclined to keep it as is because > sizeof > > *ip does not con

Re: [ovs-dev] [PATCH] Adding checksum to IP packets created by ovs for testing.

2012-08-01 Thread Ethan Jackson
> I agree its cleaner, but I am still inclined to keep it as is because sizeof > *ip does not contain the options which should also be included in computing > the IP checksum. IP_IHL takes the header length and uses that which is what > the IP Checksum calculations should use. What do you think ?

Re: [ovs-dev] [PATCH] Adding checksum to IP packets created by ovs for testing.

2012-08-01 Thread Mehak Mahajan
I agree its cleaner, but I am still inclined to keep it as is because sizeof *ip does not contain the options which should also be included in computing the IP checksum. IP_IHL takes the header length and uses that which is what the IP Checksum calculations should use. What do you think ? thanx!

[ovs-dev] (no subject)

2012-08-01 Thread LONDON 2012 OLYMPIC GAMES LOTTO PROMOTIONAL DRAW
Congratulations lucky winners of(£800,000.00GBP)in the LONDON 2012 OLYMPIC GAMES LOTTO DRAW,Email us Your! Name..., Country., Age, Cell Phone... Thank You___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/de

Re: [ovs-dev] [PATCH] Adding checksum to IP packets created by ovs for testing.

2012-08-01 Thread Ethan Jackson
> +ip->ip_csum = csum(ip, IP_IHL(ip->ip_ihl_ver) * 4); I think what you have here is correct, but would be a bit safer/cleaner if we changed it to: ip->ip_csum = csum(ip, sizeof *ip); Ethan > } else if (flow->dl_type == htons(ETH_TYPE_IPV6)) { > /* XXX */ > } else if

Re: [ovs-dev] [PATCH] Adding checksum to IP packets created by ovs for testing.

2012-08-01 Thread Mehak Mahajan
Thanks for pointing that out. I have modified the comment to be in line with the changes. diff --git a/lib/flow.c b/lib/flow.c index bc88718..fd31333 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -1010,7 +1010,8 @@ flow_set_vlan_pcp(struct flow *flow, uint8_t pcp) * 'flow'. * * (This is useful

Re: [ovs-dev] [PATCH] FAQ: Add section on basic configuration.

2012-08-01 Thread Gurucharan Shetty
On Wed, Aug 1, 2012 at 10:44 AM, Ben Pfaff wrote: > On Wed, Aug 01, 2012 at 10:39:50AM -0700, Gurucharan Shetty wrote: > > On Thu, Jul 26, 2012 at 10:27 PM, Ben Pfaff wrote: > > > > > Signed-off-by: Ben Pfaff > > > --- > > > FAQ | 93 > > >

Re: [ovs-dev] [debian 7/9] util: New function follow_symlinks().

2012-08-01 Thread Ansis Atteka
On Wed, Aug 1, 2012 at 10:53 AM, Ben Pfaff wrote: > On Wed, Aug 01, 2012 at 10:32:59AM -0700, Ansis Atteka wrote: > > On Wed, Aug 1, 2012 at 10:11 AM, Ben Pfaff wrote: > > > > > On Tue, Jul 31, 2012 at 10:06:33AM -0700, Ansis Atteka wrote: > > > > On Mon, Jul 30, 2012 at 3:18 PM, Ben Pfaff wrot

Re: [ovs-dev] [debian 0/9] move conf.db from /etc to /var on Debian

2012-08-01 Thread Ben Pfaff
On Mon, Jul 30, 2012 at 03:18:15PM -0700, Ben Pfaff wrote: > Here's a series that takes the "bug 681880" series from last week > a step further, both fixing a bug that Bastian Blank pointed out > (regarding compaction) and making the implementation safer. > > Ansis already reviewed the first three

Re: [ovs-dev] [debian 7/9] util: New function follow_symlinks().

2012-08-01 Thread Ben Pfaff
On Wed, Aug 01, 2012 at 10:32:59AM -0700, Ansis Atteka wrote: > On Wed, Aug 1, 2012 at 10:11 AM, Ben Pfaff wrote: > > > On Tue, Jul 31, 2012 at 10:06:33AM -0700, Ansis Atteka wrote: > > > On Mon, Jul 30, 2012 at 3:18 PM, Ben Pfaff wrote: > > > > > > > It will acquire its first user in an upcomin

Re: [ovs-dev] [PATCH] FAQ: Add section on basic configuration.

2012-08-01 Thread Ben Pfaff
On Wed, Aug 01, 2012 at 10:39:50AM -0700, Gurucharan Shetty wrote: > On Thu, Jul 26, 2012 at 10:27 PM, Ben Pfaff wrote: > > > Signed-off-by: Ben Pfaff > > --- > > FAQ | 93 > > +++ > > 1 files changed, 93 insertions(+), 0 deletio

Re: [ovs-dev] [PATCH] FAQ: Add section on basic configuration.

2012-08-01 Thread Gurucharan Shetty
On Wed, Aug 1, 2012 at 10:39 AM, Gurucharan Shetty wrote: > > > On Thu, Jul 26, 2012 at 10:27 PM, Ben Pfaff wrote: > >> Signed-off-by: Ben Pfaff >> --- >> FAQ | 93 >> +++ >> 1 files changed, 93 insertions(+), 0 deletions(-) >> >

Re: [ovs-dev] [PATCH] FAQ: Add section on basic configuration.

2012-08-01 Thread Gurucharan Shetty
On Thu, Jul 26, 2012 at 10:27 PM, Ben Pfaff wrote: > Signed-off-by: Ben Pfaff > --- > FAQ | 93 > +++ > 1 files changed, 93 insertions(+), 0 deletions(-) > > diff --git a/FAQ b/FAQ > index bdd96ce..7cba6f0 100644 > --- a/FAQ > ++

Re: [ovs-dev] [debian 7/9] util: New function follow_symlinks().

2012-08-01 Thread Ansis Atteka
On Wed, Aug 1, 2012 at 10:11 AM, Ben Pfaff wrote: > On Tue, Jul 31, 2012 at 10:06:33AM -0700, Ansis Atteka wrote: > > On Mon, Jul 30, 2012 at 3:18 PM, Ben Pfaff wrote: > > > > > It will acquire its first user in an upcoming commit. > > > > > > Signed-off-by: Ben Pfaff > > ... > > > > +xreadlink

Re: [ovs-dev] [PATCH] FAQ: Add section on basic configuration.

2012-08-01 Thread Ben Pfaff
On Thu, Jul 26, 2012 at 10:27:07PM -0700, Ben Pfaff wrote: > Signed-off-by: Ben Pfaff Anyone want to read this? It shouldn't take long. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [debian 7/9] util: New function follow_symlinks().

2012-08-01 Thread Ben Pfaff
On Tue, Jul 31, 2012 at 10:06:33AM -0700, Ansis Atteka wrote: > On Mon, Jul 30, 2012 at 3:18 PM, Ben Pfaff wrote: > > > It will acquire its first user in an upcoming commit. > > > > Signed-off-by: Ben Pfaff ... > > +xreadlink(const char *filename) > > +{ > > +size_t size; > > > + > > +

[ovs-dev] [PATCH v4 06/10] instruction: support goto-table action

2012-08-01 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- v4 - squashed goto-table instruction part into single patch - only introduce goto-table. Other instruction will be addressed by other patches. - check zero padding - man page - unit test v3 - introduce OFPACT_{CLEAR_ACTIONS, WRITE_ACTIONS, GOTO_TABLE} v2 - cha

[ovs-dev] [PATCH v4 05/10] ofp-actions/instruction: helper functions for intructions

2012-08-01 Thread Isaku Yamahata
This patch introduces helper functions - to cast - to convert from/to text Signed-off-by: Isaku Yamahata --- v4 - newly introduced --- lib/ofp-actions.c | 42 ++ lib/ofp-actions.h |3 +++ 2 files changed, 45 insertions(+), 0 deletions(-) diff --git

[ovs-dev] [PATCH v4 08/10] ofproto-dpif: teach goto-table instruction packet-in

2012-08-01 Thread Isaku Yamahata
When goto-table instruction results in table miss, generate packet-in event Signed-off-by: Isaku Yamahata --- v4 - manual rebase v3 - changed for OFPACT_GOTO_ABLE v2 - minor change to compile Conflicts: ofproto/ofproto-dpif.c --- ofproto/ofproto-dpif.c | 29

[ovs-dev] [PATCH v4 10/10] instruction/write-actions: add text parser/formater, of packet decoder/encoder

2012-08-01 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- v4 - write-action part is split out - man page --- lib/ofp-actions.c| 55 + lib/ofp-actions.h| 10 +--- lib/ofp-parse.c |6 +--- ofproto/ofproto-dpif.c | 10 tests/ofp-a

[ovs-dev] [PATCH v4 09/10] instruction/clear-actions: string parser/formater, of packet decoder/encoder

2012-08-01 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- v4 - clear-actions part is split outed. - check zero padding - man page --- lib/ofp-actions.c| 33 ++--- lib/ofp-actions.h| 14 +- lib/ofp-parse.c |5 + ofproto/ofproto-dpif.c |8 +

[ovs-dev] [PATCH v4 07/10] ofproto-dpif: refactor rule_dpif_lookup() for table miss whose id > 0

2012-08-01 Thread Isaku Yamahata
The refactored function, rule_dpif_miss_rule(), will be used for handling table miss whose table_id > 0 by goto-table instruction. Signed-off-by: Isaku Yamahata --- v4 - commit message v3 - no change v2 - no chnage --- ofproto/ofproto-dpif.c | 31 --- 1 files chan

[ovs-dev] [PATCH v4 01/10] ofp-actions: allow ofpacts_put_openflow10() return error

2012-08-01 Thread Isaku Yamahata
When OF11+ only actions is introduced, ofpacts_put_openflow10() will be unable to handle all ofp-actions. So allow it return error in that case. Signed-off-by: Isaku Yamahata --- v4 - newly introduced --- lib/learning-switch.c | 35 + lib/ofp-actions.c | 11 ++

[ovs-dev] [PATCH v4 03/10] ofp-actions: export OVSINST_OFPIT11_xxx

2012-08-01 Thread Isaku Yamahata
They will be used by ofp-parser.c. Signed-off-by: Isaku Yamahata --- v4 - no change v3 - no change v2 - newly introduced --- lib/ofp-actions.c | 33 - lib/ofp-actions.h | 35 +++ 2 files changed, 35 insertions(+), 33 deletions

[ovs-dev] [PATCH v4 02/10] ofp-actions: allow ofpacts_to_openflow11_{actions, instructions} return error

2012-08-01 Thread Isaku Yamahata
When OF1.2+ only actions are introduced, ofpacts_put_openflow11_{actions, instructions}() will be unable to handle all ofp-actions. For such cases, allow it return error. Signed-off-by: Isaku Yamahata --- v4 - newly introduced --- lib/ofp-actions.c | 17 - lib/ofp-actions.h

[ovs-dev] [PATCH v4 04/10] ofp-actions: sort OVSINST_OFPIT11_xxx value in execution order

2012-08-01 Thread Isaku Yamahata
This order is used by parser from text string to check if the instruction is given in this order. Signed-off-by: Isaku Yamahata --- v4 - improve commit message/comment to clarify it's for parser from text string v3 - newly introduced --- lib/ofp-actions.h | 30 --

[ovs-dev] [PATCH v4 00/10] instruction apply-actions/goto-table support

2012-08-01 Thread Isaku Yamahata
This patch adds instruction OF11 apply-actions/goto-table supports. Now the patch is in good shape and unit tests pass. The first and second patch (1,2/10) allows action encoder to return error. The changes to caller of the action decoder would be arguable. Especially the behaviour of monitor. The

Re: [ovs-dev] Development question

2012-08-01 Thread Ben Pfaff
On Wed, Aug 01, 2012 at 11:14:02AM +0100, mvp...@iol.pt wrote: > I'm looking to Openvswictch and I'm thinking in do some development, so I > have clone the Git repository for Open vSwitch. Is there some API or some > document that explain how files, classes and structs are connected, to > understa

Re: [ovs-dev] [PATCH v2] ofp-actions: Implement writing to metadata field

2012-08-01 Thread Joe Stringer
Hi Ben, I've got a working copy that fixes the above criticisms, following the suggested approach of verifying correct ordering at the end of the parsing functions. I have a few queries regarding this. In the above patch, there is a test for "ofproto - packet-out with metadata (NXM)", in tests/of

[ovs-dev] Development question

2012-08-01 Thread mvpblc
Hello, I have subscribe to openvswitch dev discuss because I'm thinking in do some development work on openvswitch. I'm looking to Openvswictch and I'm thinking in do some development, so I have clone the Git repository for Open vSwitch. Is there some API or some document that explain how file

[ovs-dev] [PATCH 34/47] ofp-util: Allow decoding of Open Flow 1.1 & 1.2 Table Statistics Request Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * Set wildcards, match, write_setfields and apply_setfields based on a bitmap of (1 << OFPXMT_*) v8 * Manual rebase * Make use of enum ofp_version * Add ofp-tests v7 * Omitted v6 * No change v5 * Manual rebase * Add OFPST_TABLE entry for Open Flow 1.1 and

[ovs-dev] [PATCH 23/47] ofp-util: Allow encoding of Open Flow 1.2 Port Mod Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Manual Rebase v7 * Omitted v6 * No change v5 * No change v4 * Manual rebase v3 * No change v2 * No change --- lib/ofp-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 6

[ovs-dev] [PATCH 24/47] ofp-util: Allow decoding of Open Flow 1.2 Port Mod Message

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Initial post --- lib/ofp-msgs.h | 2 +- tests/ofp-print.at | 14 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/ofp-msgs.h b/lib/ofp-msgs.h index 05ef334..0683bc5 100644 --- a/lib/ofp-msgs.h +++ b/lib/o

[ovs-dev] [PATCH 32/47] ofp-msgs: Split OFPRAW_OFPST_TABLE_REPLY

2012-08-01 Thread Simon Horman
Split OFPRAW_OFPST_TABLE_REPLY into OpenFlow 1.0, 1.1 and 1.2 versions. This is preparation for allowing encoding and decoding of Open Flow 1.1 and 1.2 Table Stats Reply messages. Signed-off-by: Simon Horman --- v9 * No change v8 * Initial post --- lib/ofp-msgs.h | 12 +--- 1 file c

[ovs-dev] [PATCH 27/47] ofp-util: Allow decoding of Open Flow 1.2 Flow Statistics Request Messages

2012-08-01 Thread Simon Horman
Allow decoding of Open Flow 1.1 and 1.2 flow and aggregate flow statistics request messages. Signed-off-by: Simon Horman --- v9 * No change v8 * Manual rebase * Add ofp-print test v7 * Omitted v6 * No change v5 * Manual rebase v4 * Use OFPG11_ANY in place of OFPG_ANY. The value is the sa

[ovs-dev] [PATCH 17/47] ofp-util: Allow encoding of Open Flow 1.1 and 1.2 Packet Out Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Manual Rebase * ofpacts_put_openflow11_actions() now returns the length of encoded actions, make use of this. v7 * Manual Rebase v6 * No change v5 * No change v4 * Manual rebase v3 * Correct title: this patch relates to Packet Out not P

[ovs-dev] [PATCH 11/47] ofp-util: Allow decoding of Open Flow 1.2 Flow Mod messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Manual rebase * Add ofp-print test v7 * Manual rebase v6 * No change v5 * Manual rebase v4 * No change v3 * No change v2 * No change Conflicts: lib/ofp-util.c flow mod test --- lib/ofp-util.c | 3 ++- tests/ofp-print.at |

[ovs-dev] [PATCH 13/47] ofp-util: Allow decoding of Open Flow 1.2 Packet In Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Manual rebase * Add ofp-print test v7 * Manual rebase * Use struct ofp12_packet_in instead of struct ofp11_packet_in v6 * No change v5 * Manual rebase v4 * No change v3 * Add OF1.2 entry to to ofputil_msg_types * Make OF1.2 the first opti

[ovs-dev] [PATCH 12/47] ofp-util: Allow encoding of Open Flow 1.2 Packet In Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Manual Rebase v7 * Manual Rebase * Use struct ofp12_packet_in instead of struct ofp11_packet_in v6 * No change v5 * No change v4 * No change v3 * Add protocol parameter to ofputil_encode_packet_in(). This allows packet_in_format to be i

[ovs-dev] [PATCH 10/47] ofp-util: Allow encoding of Open Flow 1.2 Flow Mod messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Manual Rebase * Do not use memset from ofputil_encode_flow_mod it is (now) unnecessary v7 * Manual Rebase v6 * No change v5 * No change v4 * Manual rebase * Use OFPT11_FLOW_MOD as type of message. Previously OFPT10_FLOW_MOD was incorrect

[ovs-dev] [PATCH 14/47] ofp-msgs: Update OFPRAW_OFPT_SET_CONFIG for OpenFlow 1.2

2012-08-01 Thread Simon Horman
This is sufficient to allow encoding and decoding of OpenFlow 1.2 Set Config messages as the format is the same as OpenFlow 1.0 and OpenFlow 1.2. Signed-off-by: Simon Horman --- v9 * No change v8 * No change v7 * Initial Post --- lib/ofp-msgs.h | 2 +- 1 file changed, 1 insertion(+), 1 delet

[ovs-dev] [PATCH 09/47] learning-switch: Send Features Request and Set Config with correct version

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * No change v7 * No change v6 * Initial post --- lib/learning-switch.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/learning-switch.c b/lib/learning-switch.c index 887a365..b7a435c 100644 --- a/lib/learning

[ovs-dev] [PATCH 31/47] ofp-msgs: Allow 1.0-1.2 range

2012-08-01 Thread Simon Horman
This is intended for use with OFPRAW_OFPST_TABLE_REQUEST in order for it to be symmetric with OpenFlow 1.0, 1.1 and 1.2 versions of OFPRAW_OFPST1TABLE_REPLY. OpenFlow 1.3 introduces yet another format for OFPRAW_OFPST1TABLE_REPLY. Signed-off-by: Simon Horman --- v9 * No change v8 * Initial po

[ovs-dev] [PATCH 25/47] ofp-msgs: Split OFPRAW_OFPST_FLOW_{REQUEST, REPLY}

2012-08-01 Thread Simon Horman
Split OFPRAW_OFPST_FLOW_{REQUEST,REPLY} into OpenFlow 1.0 and 1.1+ versions. This is in preparation for adding encoding and decoding of Open Flow 1.1 & 1.2 messages. Signed-off-by: Simon Horman --- v9 * No change v8 * Initial post --- lib/ofp-msgs.h | 14 ++ lib/ofp-util.c | 10 +

[ovs-dev] [PATCH 47/47] Local: Allow Open Flow 1.2 session to be negotiated

2012-08-01 Thread Simon Horman
* request OFP12_VERSION * Reset ofconn to OF1.2 * Allow OF1.2 to be used as a dump protocol This is a local hack and should not be applied --- lib/ofp-util.c| 1 + lib/vconn.c | 12 ++-- ofproto/connmgr.c | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff

[ovs-dev] [PATCH 46/47] Local: ovs-controller: Make sure vconn is connected before making messages

2012-08-01 Thread Simon Horman
This is a rather unpleasant hack but I am unsure of how to rework things such that ovs-controller will work with a version of make_openflow() which uses prevailing OpenFlow version in the header of OpenFlow messages. This is a local hack and should not be applied --- v9 * No change v8

[ovs-dev] [PATCH 42/47] ofp-util: Allow decoding of Open Flow 1.1 & 1.2 Port Status Request Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * Manual Rebase * Make use of enum ofp_version v8 * Omitted v7 * Omitted v6 * No change v5 * Initial Post --- ofproto/ofproto.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofp

[ovs-dev] [PATCH 44/47] ovs-ofctl: Teach dump-ports about Open Flow 1.1 & 1.2

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * Initial post --- utilities/ovs-ofctl.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 606a3f2..81df40c 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl

[ovs-dev] [PATCH 45/47] Local: learning-switch: Call ofputil_encode_flow_mod() with correct protocol

2012-08-01 Thread Simon Horman
Empirically it appears that process_packet_in() should call ofputil_encode_flow_mod() with protocol as defived from rconn rather than sw->protocol. This is a local hack and should not be applied --- v9 * Fix for re-ordering of patches in v8 v8 * No change v7 * No change v6 * No chan

[ovs-dev] [PATCH 43/47] ofp-print: Allow printing of Open Flow 1.1 & 1.2 Port Status Request Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * Manual Rebase * Make use of enum ofp_version * Change title from "ofp-print: Allow display of Open Flow 1.1 & 1.2 Port Status Request Messages" to "ofp-print: Allow printing of Open Flow 1.1 & 1.2 Port Status Request Messages" * Add ofp-print test v8 *

[ovs-dev] [PATCH 41/47] ofp-print: Allow printing of Open Flow 1.1 & 1.2 Port Reply Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * Make use of enum ofp_version * Add ofp-print test * Correct printing of port number for Open Flow 1.0 * Replace UINT64_MAX with htonll(UINT64_MAX) in ofp_print_port_stat() to correct byte-order problem detected by sparse v8 * Omitted v7 * Omitted v6 * No

[ovs-dev] [PATCH 21/47] ofp-util: Allow encoding Open Flow 1.2 Flow Stats Request Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Manual rebase v7 * Omitted v6 * No change v5 * No change v4 * Manual rebase v3 * No change v2 * Use ofputil_put_match() Fix ofputil_encode_flow_stats_request --- lib/ofp-util.c | 18 +- 1 file changed, 17 insertions(+),

[ovs-dev] [PATCH 40/47] ofp-util: Allow encoding of Open Flow 1.1 & 1.2 Port Statistics Reply Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * Move print test to "ofp-print: Allow printing of Open Flow 1.1 & 1.2 Port Reply Messages" v8 * Manual rebase * Make use of enum ofp_version * Add ofp-print test v7 * Omitted v6 * No change v5 * No change v4 * Initial post fix port test --- ofproto/of

[ovs-dev] [PATCH 15/47] ofp-actions: Return action size

2012-08-01 Thread Simon Horman
Modify ofpacts_put_openflow11_actions() to return the length of actions appended. This will be used when encoding Packet Out messages for Open Flow 1.1 and 1.2. The motivation for this is to avoid open coding the size calculation which may end up being needed elsewhere too. Signed-off-by: Simon Ho

[ovs-dev] [PATCH 39/47] ofp-util: Pass vconn to fetch_port_by_features()

2012-08-01 Thread Simon Horman
Pass vconn to fetch_port_by_features() and callers. In some cases this will reduce the number of connections that ovs-ofputil sets up. It should not alter the behaviour of ovs-ofputil. Signed-off-by: Simon Horman --- v9 * Manual rebase v8 * Omitted v7 * Omitted v6 * No change v5 * Initial

[ovs-dev] [PATCH 38/47] ovs-ofputil: Make str_to_port_no() aware of invalid ports

2012-08-01 Thread Simon Horman
Open Flow 1.1 and 1.2 make use of 32 bit ports, however Open vSwtich maps them to 16 bits. Make ovs-ofputl aware of this. Also, only accept ports that fit into 16 bits for Open Flow 1.0. Signed-off-by: Simon Horman --- v9 * Manual Rebase v8 * Omitted v7 * Omitted v6 * No change v5 * Initia

[ovs-dev] [PATCH 37/47] ofp-msgs: Split OFPRAW_OFPST_PORT_{REQUEST, REPLY}

2012-08-01 Thread Simon Horman
Split OFPRAW_OFPST_PORT_{REQUEST,REPLY} into OpenFlow 1.0 and 1.1+ versions. This prepares for encoding and decoding Open Flow 1.1 and 1.2 Port Stats Request and Reply messages. Signed-off-by: Simon Horman --- v9 * Update description - this only prepares for both encoding and decoding * Move t

[ovs-dev] [PATCH 05/47] ofp-util: Make ofperr_encode_msg__() use correct Open Flow version

2012-08-01 Thread Simon Horman
Make ofperr_encode_msg__() use correct Open Flow version in the header of messages. Signed-off-by: Simon Horman --- v9 * No change v8 * Manual rebase v7 * Manual rebase v6 * No change v5 * No change v4 * Initial post Conflicts: lib/ofp-errors.c --- lib/ofp-errors.c | 30 +

[ovs-dev] [PATCH 07/47] ofp-util: Make make_echo_request() aware of different OpenFlow versions.

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Manual Rebase v7 * Manual Rebase v6 * No change v5 * No change v4 * Initial post --- lib/ofp-util.c| 4 ++-- lib/ofp-util.h| 2 +- lib/rconn.c | 7 ++- utilities/ovs-ofctl.c | 2 +- 4 files changed, 10 insert

[ovs-dev] [PATCH 35/47] ovs-ofctl: Use vconn as a parameter of dump_stats_transaction()

2012-08-01 Thread Simon Horman
In order to form a stats message for the prevailing OpenFlow version of a vconn the vconn needs to be open at the time the request is encoded. Thus there is no longer a case where it makes sense to use dump_stats_transaction() without a vconn already being open and available to pass as a parameter.

[ovs-dev] [PATCH 36/47] ofp-msgs: Allow encoding and decoding of Open Flow 1.1 & 1.2 Barrier Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Initial post --- lib/ofp-msgs.h | 4 ++-- tests/ofp-print.at | 32 ++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/lib/ofp-msgs.h b/lib/ofp-msgs.h index 7ef7c5a..752d12c 100644 --- a/lib/o

[ovs-dev] [PATCH 30/47] ofp-msgs: Split OFPRAW_OFPST_AGGREGATE_REQUEST

2012-08-01 Thread Simon Horman
Split OFPRAW_OFPST_AGGREGATE_REQUEST into OpenFlow 1.0 and 1.1+ versions. This should be sufficient to allow adding encoding and decoding of Open Flow 1.1 and 1.2 Aggregate Stats Request messages. Encoding and decoding of Open Flow 1.1 and 1.2 Aggregate Stats Response messages works using the exi

[ovs-dev] [PATCH 29/47] ofp-util: Allow decoding of Open Flow 1.2 Flow Statistics Response Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Manual rebase * Add ofp-print test v7 * Omitted v6 * No change v5 * Manual rebase * Use padded_match_len parameter of ofputil_pull_ofp12_match() to obtain the length of a match. Using the remaining length of the message only works for t

[ovs-dev] [PATCH 28/47] ofp-util: Allow encoding of Open Flow 1.2 Flow Statistics Response Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Manual Rebase v7 * Omitted v6 * No change v5 * No change v4 * Do not manually add header pad, it is handled by ofputil_postappend_stats_reply() v3 * Initial post fix --- lib/ofp-util.c | 23 ++- 1 file changed, 22

[ovs-dev] [PATCH 26/47] ofp-util: Prepare Flow Statistics Request Decoder for other Open Flow versions

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Initial post --- lib/ofp-util.c | 35 +++ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 9121686..e3d3ca4 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @

[ovs-dev] [PATCH 16/47] ofp-util: Prepare Packet Out encoder for other Open Flow versions

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * Resolve breakage caused by reordering patches in v8 v8 * Make use of enum ofp_version v7 * Manual Rebase v6 * No change v5 * No change v4 * Manual rebase v3 * Add protocol variable to do_probe(). Previously this was added by a separate patch. v2 * No

[ovs-dev] [PATCH 22/47] ofp-util: Allow use of OF12 flow format

2012-08-01 Thread Simon Horman
This enables the use of the OF12 format, the prerequisites of which were added by "Add OFPUTIL_P_OF12 and NXFF_OPENFLOW12" and patches to fill out other functions that use OFPUTIL_P_OF12 directly. Signed-off-by: Simon Horman --- v9 * No change v8 * Initial post --- lib/ofp-util.c | 2 +- lib/

[ovs-dev] [PATCH 19/47] ofp-util: Allow decoding of Open Flow 1.1 and 1.2 Packet Out Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Return error value returned by ofputil_port_from_ofp11() rather than OFPERR_OFPBMC_BAD_VALUE. - This fix, from v3, disappeared somewhere along the way * Add ofp-print test for Open Flow 1.2 - I'm not sure how to generate an Open Flow 1.1

[ovs-dev] [PATCH 20/47] ofp-util: Allow encoding of Open Flow 1.2 Flow Removed messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Manual Rebase v7 * Omitted v6 * No change v5 * No change v4 * Manual rebase v3 * No change v2 * Use ofputil_put_match() Conflicts: lib/ofp-util.c --- lib/ofp-msgs.h | 3 +++ lib/ofp-util.c | 21 - 2 files c

[ovs-dev] [PATCH 18/47] ofp-util: Prepare Packet Out decoder for other Open Flow versions

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * No change v7 * Manual Rebase * Only use OFPERR_NXBRC_BAD_IN_PORT in the case of OFPRAW_OFPT10_PACKET_OUT v6 * No change v5 * No change v4 * No change v3 * Differentiate versions using oh->version rather than relying on a separate code f

[ovs-dev] [PATCH 06/47] ofp-error: Remove ofperr_domain from external API

2012-08-01 Thread Simon Horman
It seems that ofp_version suffices in all cases. Signed-off-by: Simon Horman --- v9 * Reinstate enum ofperr_* in lib/ofp-errors.h as these are used in ./lib/ofp-errors.inc v8 * Initial post A preliminary version of this patch changed ofperr_domain_from_version() such that it uses NOT_RE

[ovs-dev] [PATCH 08/47] ofp-print: Use the prevailing protocol to call ofputil_decode_flow_mod()

2012-08-01 Thread Simon Horman
Pass a protocol based on the prevailing protocol to ofputil_decode_flow_mod() Note that ofputil_protocol_from_ofp_version() needs to be made Open Flow 1.1 aware. Signed-off-by: Simon Horman --- v9 * No change v8 * Make use of ofputil_protocol_set_tid() As suggested by Ben Pfaff v7 * Manual

[ovs-dev] [PATCH 02/47] nx-match: Separate raw match and header/pad pull/put

2012-08-01 Thread Simon Horman
In the case of Open Flow 1.2, which is currently the only time that OXM is be used, there is a 4 byte header before the match which needs to be taken into account when calculating the pad length. This complicates nx_match pull and put somewhat. This patch takes an approach suggested by Ben Pfaff t

[ovs-dev] [PATCH 03/47] ofp-util: Add ofputil_pull_ofp12_match()

2012-08-01 Thread Simon Horman
This may be used by both ofputil_decode_flow_mod() and ofputil_decode_packet_in() Signed-off-by: Simon Horman --- v9 * No change v8 * Manual Rebase - Remove cookie and cookie mask parameters * Use '__' as a suffix rather than a prefix v7 * Make use of oxm_pull_match() Change subject from

[ovs-dev] [PATCH 01/47] ofp-util: Set switch_features actions to zero for Open Flow 1.1+

2012-08-01 Thread Simon Horman
As of Open Flow 1.1 what was the actions element of struct switch_features becomes reserved. As such it seems sensible to always decode it as zero. Signed-off-by: Simon Horman --- v9 * Initial post --- lib/ofp-util.c | 60 +- 1 file chang

[ovs-dev] [PATCH 00/47 v9] Preliminary Open Flow 1.2 Message Support

2012-08-01 Thread Simon Horman
Hi Ben, Hi All, this series adds infrastructure and message encoding and decoding to allow Open Flow 1.2 to be used to the extent that ovs-controller works as a learning-switch and similar logic implemented using Ryu[1]. [1] Ryu is an OpenFlow controller implemented in Python http://osrg.gith

[ovs-dev] [PATCH 04/47] ofp-util: Allow encoding of Open Flow 1.1 & 1.2 Barrier Request Messages

2012-08-01 Thread Simon Horman
Signed-off-by: Simon Horman --- v9 * No change v8 * Manual Rebase v7 * Manual Rebase v6 * No change v5 * No change v4 * Initial post Conflicts: lib/ofp-util.c --- lib/ofp-util.c| 20 ++-- lib/ofp-util.h| 2 +- lib/vconn.c | 2 +- utiliti