[ovs-git] Open vSwitch: tests: Add tests for encoding and decoding OpenFlow hello messages. (master)

dev at openvswitch.org dev at openvswitch.org
Fri Nov 9 18:06:48 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  681ea7a0e98edf156aab79b062425d7ac638e415 (commit)
       via  1804d25a21dcdec83437ab1ebf9daf683d7e50da (commit)
       via  0935de410ce518f6abe60c8bce35f67171e3059a (commit)
       via  cf7cf630e24dddba9177fcd68bcfa903689c7b72 (commit)
       via  74c4b9c1c24b6579dcaa127268530af9bffa29b4 (commit)
      from  6694e498efc445ec24ef1715ae03ebb43daa678f (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 681ea7a0e98edf156aab79b062425d7ac638e415
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=681ea7a0e98edf156aab79b062425d7ac638e415
Author: Ben Pfaff <blp at nicira.com>
		
tests: Add tests for encoding and decoding OpenFlow hello messages.
		
These tests helped me find the problems that I fixed in previous commits.

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


commit 1804d25a21dcdec83437ab1ebf9daf683d7e50da
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=1804d25a21dcdec83437ab1ebf9daf683d7e50da
Author: Ben Pfaff <blp at nicira.com>
		
ofp-util: Make ofputil_encode_hello() return a message with correct length.
		
This doesn't fix a visible bug, because code to send OpenFlow messages
updates the length itself, but it still seems like the right thing to do.

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


commit 0935de410ce518f6abe60c8bce35f67171e3059a
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=0935de410ce518f6abe60c8bce35f67171e3059a
Author: Ben Pfaff <blp at nicira.com>
		
ofp-util: Ignore invalid bitmaps in ofputil_decode_hello_bitmap().
		
This code has, until now, parsed and accepted invalid bitmaps.  It seems
better to simply ignore them, leaving the original set of allowed versions
from the version field in the ofp_header.

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


commit cf7cf630e24dddba9177fcd68bcfa903689c7b72
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=cf7cf630e24dddba9177fcd68bcfa903689c7b72
Author: Ben Pfaff <blp at nicira.com>
		
ofp-msgs: Accept all versions of OpenFlow "hello" messages.
		
Since the ofp-msgs code was introduced, only "hello" messages for versions
of OpenFlow actually understood (to some extent) by Open vSwitch could be
decoded correctly.  This commit corrects that, by making every version of
OpenFlow immutable messages acceptable.

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


commit 74c4b9c1c24b6579dcaa127268530af9bffa29b4
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=74c4b9c1c24b6579dcaa127268530af9bffa29b4
Author: Simon Horman <horms at verge.net.au>
		
ofp-util: Correct length of hello version bitmap
		
The length of the hello version bitmap is measured in bytes
so the return value of sizeof is sufficient. Dividing
this by CHAR_BIT (=8) seems to be an artifact of reworking
a previous version of this code.

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


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

Summary of changes:
 build-aux/extract-ofp-msgs |    5 ++-
 lib/ofp-msgs.h             |   27 ++++++++++++++++---
 lib/ofp-util.c             |   16 +++++++----
 tests/automake.mk          |    1 +
 tests/ofp-print.at         |   59 ++++++++++++++++++++++++++++++++++++++++++++
 tests/ofp-util.at          |   47 +++++++++++++++++++++++++++++++++++
 tests/testsuite.at         |    1 +
 utilities/ovs-ofctl.c      |   15 +++++++++++
 8 files changed, 158 insertions(+), 13 deletions(-)
 create mode 100644 tests/ofp-util.at


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list