[ovs-git] Open vSwitch: learning-switch: Normalize the flows that are sent to the switch. (master)

dev at openvswitch.org dev at openvswitch.org
Tue Aug 7 19:43:00 UTC 2012

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  125ee67317fcaa2fd11ab1671c268015105d191d (commit)
       via  3cbd99318d04d07cfce8469711fb0398a832c8a7 (commit)
       via  f702893a7cc2380b2640e1ccb3a987d46766c685 (commit)
       via  002c3f1734454492d921de29f2d5be6428ed1a18 (commit)
       via  733c8ed3b95e54f9245dc7175fc89cee672f9405 (commit)
       via  48d84b1706f76882bc5265c09257e70899fb9c41 (commit)
      from  922b3bab9235766934aa60712b1dbad2a17612ae (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 125ee67317fcaa2fd11ab1671c268015105d191d
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=125ee67317fcaa2fd11ab1671c268015105d191d
Author: Ben Pfaff <blp at nicira.com>
learning-switch: Normalize the flows that are sent to the switch.
This suppresses a long-standing warning from ovs-vswitchd about
non-normalized flows.

Signed-off-by: Ben Pfaff <blp at nicira.com>

commit 3cbd99318d04d07cfce8469711fb0398a832c8a7
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=3cbd99318d04d07cfce8469711fb0398a832c8a7
Author: Ben Pfaff <blp at nicira.com>
learning-switch: Don't use exact-match on every field by default.
OVS has all kinds of odd fields, e.g. registers, and it doesn't make sense
to try to match on all of them.  This commit changes learning-switch to
only try to match on the fields defined by OpenFlow 1.0.  That's still not
minimal, but it's more reasonable.

This commit should not have an immediately visible effect since
ovs-controller always sends OF1.0 format flows to the switch, and OF1.0
format flows don't have these extra fields.  But in the future when we
add support for new protocols and flow formats to ovs-controller, it
will make a difference.

Signed-off-by: Ben Pfaff <blp at nicira.com>

commit f702893a7cc2380b2640e1ccb3a987d46766c685
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=f702893a7cc2380b2640e1ccb3a987d46766c685
Author: Ben Pfaff <blp at nicira.com>
learning-switch: Delay sending handshake until version negotiation is done.
The learning-switch implementation needs to know the OpenFlow version in
use to send the initial handshake messages (e.g. the feature request), but
the version is not always available at the time that the code currently
sends the handshake.  This can cause an assertion failure later when
ofputil_encode_flow_mod() checks the protocol, which will be 0 if the
version wasn't known.

This commit fixes the problem by introducing a state machine that sends the
handshake messages only after version negotiation has finished.

Reported-by: Simon Horman <horms at verge.net.au>
Signed-off-by: Ben Pfaff <blp at nicira.com>

commit 002c3f1734454492d921de29f2d5be6428ed1a18
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=002c3f1734454492d921de29f2d5be6428ed1a18
Author: Ben Pfaff <blp at nicira.com>
learning-switch: Make lswitch own its rconn.
Until now, ovs-controller and the learning-switch code split responsibility
for the OpenFlow connection.  This commit moves all the responsibility into
the learning-switch code.

The rationale here is twofold.  First, the split itself seems odd; I think
there must have been a reason for it at one time, but I don't remember it
and don't see one anymore.  Second, I intend to make the lswitch code more
stateful in upcoming commits, and it seems odd to have the lswitch manage
quite a bit of state but not the entity that that state applies to.

Signed-off-by: Ben Pfaff <blp at nicira.com>

commit 733c8ed3b95e54f9245dc7175fc89cee672f9405
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=733c8ed3b95e54f9245dc7175fc89cee672f9405
Author: Ben Pfaff <blp at nicira.com>
vconn: Fix vconn_get_version().
It's documented to return -1 if the version isn't yet known, but in fact
it returned 0.

Signed-off-by: Ben Pfaff <blp at nicira.com>

commit 48d84b1706f76882bc5265c09257e70899fb9c41
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=48d84b1706f76882bc5265c09257e70899fb9c41
Author: Ben Pfaff <blp at nicira.com>
vconn: Ensure that vconn_run() is enough to complete a connection.
Until now, it seems that all vconn users have immediately started reading
messages from the connection.  Today, however, I added a new user that
only wants to read packets after the OpenFlow version is negotiated, so
it never called vconn_recv() before that happened.  It turns out that if
you do this, the version never gets negotiated at all.

This commit fixes the problem by ensuring that vconn_run() will continue
version negotiation if it isn't done yet.

This changes the error return that I get for Unix sockets in the
test-vconn "accept-then-close" test from EPIPE to ECONNRESET, so this
commit also adjusts that test to accept either error code; both of them
seem reasonable enough to me.

Signed-off-by: Ben Pfaff <blp at nicira.com>


Summary of changes:
 lib/learning-switch.c      |  208 ++++++++++++++++++++++++++++---------------
 lib/learning-switch.h      |    8 ++-
 lib/ofp-util.c             |   54 ++++++++----
 lib/ofp-util.h             |    1 +
 lib/vconn.c                |   16 +++-
 lib/vconn.h                |    3 +-
 tests/test-vconn.c         |   18 +++--
 utilities/ovs-controller.c |   68 +++------------
 8 files changed, 219 insertions(+), 157 deletions(-)

Open vSwitch

More information about the git mailing list