[ovs-git] Open vSwitch: ofp-util: Again allow OpenFlow port 0 in commands and actions. (master)

dev at openvswitch.org dev at openvswitch.org
Thu Oct 18 16:27:02 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  e3432ee978b4fd740aa4db785742a28a573e2cde (commit)
       via  8010100bb17598479d1b3bb06452546075038f6f (commit)
      from  7bcb1506ee2de6a460db35404e642f21d8219b5f (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 e3432ee978b4fd740aa4db785742a28a573e2cde
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=e3432ee978b4fd740aa4db785742a28a573e2cde
Author: Ben Pfaff <blp at nicira.com>
		
ofp-util: Again allow OpenFlow port 0 in commands and actions.
		
Commit c6100d92142b (ovs-ofctl: Accept port keywords, OF1.1 port numbers,
reject port number 0.) intentionally prohibited using port 0, which is not
a valid OpenFlow port number, in OpenFlow commands and actions.  However,
since then we have discovered that the NVP controller uses port 0 in
"resubmit" actions and hence in flow matches as well.  This seems like a
valid enough use case; after all, the port number in a resubmit action is
really just an arbitrary number that need not (and preferably does not)
refer to an actual OpenFlow port.  Therefore, this commit restores the
ability to use port 0.

(Only functions that parse OpenFlow commands and actions from strings, not
those that interpret binary OpenFlow coming in on OpenFlow connections,
were affected by this prohibition, so this only comes up in corner cases
anyhow.)

Reported-by: Gurucharan Shetty <gshetty at nicira.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 8010100bb17598479d1b3bb06452546075038f6f
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=8010100bb17598479d1b3bb06452546075038f6f
Author: Ben Pfaff <blp at nicira.com>
		
ofp-util: Separate output, error reporting in ofputil_port_from_string().
		
When I wrote this function I didn't think that port 0 was important (it's
not a valid OpenFlow port number) so I used a return value of 0 to indicate
an error.  However, my assumption turns out to be wrong, so this commit
changes the interface to use the return value only for error reporting
and store the parsed port number into a pointer passed in as a parameter.

This commit doesn't change the behavior of ofputil_port_from_string().

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


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

Summary of changes:
 NEWS                  |    2 --
 lib/autopath.c        |    5 +++--
 lib/bundle.c          |    3 +--
 lib/meta-flow.c       |    3 +--
 lib/ofp-parse.c       |   10 ++++------
 lib/ofp-util.c        |   44 ++++++++++++++++++++++++--------------------
 lib/ofp-util.h        |    2 +-
 tests/ovs-ofctl.at    |    2 ++
 utilities/ovs-ofctl.c |    5 +++--
 9 files changed, 39 insertions(+), 37 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list