[ovs-git] Open vSwitch: ofp-errors: Make every error encodable. (master)

dev at openvswitch.org dev at openvswitch.org
Tue Dec 4 16:29:10 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  07c8ec217b5641b74f20b216ad63fef230649f2c (commit)
       via  df30f9b1cde861e157059d225f46e16826fe13c0 (commit)
       via  edd70aa7715800f4b109f879e448c8efa40dadd5 (commit)
       via  15549878535c7331c3952e656a2eb9944d0021bb (commit)
       via  7a7b64289cd96c5019168f7f0905f59e2d078b76 (commit)
      from  6494ea4c962118de72410f62045603279eb967da (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 07c8ec217b5641b74f20b216ad63fef230649f2c
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=07c8ec217b5641b74f20b216ad63fef230649f2c
Author: Ben Pfaff <blp at nicira.com>
		
ofp-errors: Make every error encodable.
		
Until now, some values could not be encoded to send over OpenFlow, for a
few possible reasons.  This meant that, when one of these situations came
up, that a controller would not receive any notification that its request
failed.  This is not a good way to behave, so this commit changes the
error encoder so that, if a particular error cannot be encoded, it will
instead encode a fallback error code.

This commit also slightly simplifies ofconn_send_error() because it no
longer has to handle ofperr_encode_error() returning NULL.

Reported-by: Jarno Rajahalme <jarno.rajahalme at nsn.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


commit df30f9b1cde861e157059d225f46e16826fe13c0
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=df30f9b1cde861e157059d225f46e16826fe13c0
Author: Jarno Rajahalme <jarno.rajahalme at nsn.com>
		
ofp-errors: Remove OFPERR_* values for error categories.
		
The main use of OFPERR_* is to define specific errors, but OFPERR_* also
existed for each possible category of error, to enable partial decoding of
unknown specific errors within a known category.  However, in practice,
it was very easy to misuse the error categories as if they were particular
errors.  This commit removes the error category values, to make that error
impossible.

(If partial decoding of unknown specific errors turns out to have been a
valuable feature, then we can reintroduce it some other way.)

Signed-off-by: Jarno Rajahalme <jarno.rajahalme at nsn.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


commit edd70aa7715800f4b109f879e448c8efa40dadd5
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=edd70aa7715800f4b109f879e448c8efa40dadd5
Author: Ben Pfaff <blp at nicira.com>
		
ofp-errors: Correctly encode errors as extensions or not depending on domain.
		
When ofp-errors was introduced, each OFPERR_* was either an extension or
not.  However, since then, some Nicira extension error code have been
given official error codes in later OpenFlow versions, so now whether an
OFPERR_* is an extension depends on the OpenFlow versions.  This means
that certain errors were encoded incorrectly as extensions in later
OpenFlow versions.  This commit fixes the problem.

This commit also adds a test that should prevent a regression.

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


commit 15549878535c7331c3952e656a2eb9944d0021bb
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=15549878535c7331c3952e656a2eb9944d0021bb
Author: Jarno Rajahalme <jarno.rajahalme at nsn.com>
		
Don't use error categories as if they were actually errors.
		
The OFPERR_* naming scheme is confusing, because it mixes categories with
specific errors.  Categories can't be encoded for sending to controllers,
so this is a problem.  This commit fixes up the cases where categories
were used as errors, replacing them by real errors types.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme at nsn.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 7a7b64289cd96c5019168f7f0905f59e2d078b76
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7a7b64289cd96c5019168f7f0905f59e2d078b76
Author: Jarno Rajahalme <jarno.rajahalme at nsn.com>
		
ofp-errors: Fix typo in comment.
		
Signed-off-by: Ben Pfaff <blp at nicira.com>
Signed-off-by: Jarno Rajahalme <jarno.rajahalme at nsn.com>


-----------------------------------------------------------------------

Summary of changes:
 build-aux/extract-ofp-errors |   22 +--------
 lib/ofp-actions.c            |    7 ++-
 lib/ofp-errors.c             |  109 ++++++++----------------------------------
 lib/ofp-errors.h             |   60 ++++-------------------
 lib/ofp-util.c               |    2 +-
 ofproto/connmgr.c            |   37 +++++++--------
 tests/ofp-actions.at         |    4 +-
 tests/ofp-errors.at          |   21 ++++++++
 utilities/ovs-ofctl.c        |   35 +++++++++++++
 9 files changed, 112 insertions(+), 185 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list