[ovs-git] Open vSwitch: Allow hexdump of packet data of PACKET_{IN, OUT} messages (master)

dev at openvswitch.org dev at openvswitch.org
Fri May 17 05:50:14 UTC 2013


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  b4ccee7576e5bbc36764b88ad50f5052ecea25be (commit)
       via  4b2d9d113f8eb7ee4e6bf703e81d4169377fc26b (commit)
       via  2291eb080c1afe13a5d3cb3048f0d160386b714b (commit)
      from  63a10d0e099fe8eb6052fadf6b80a0ab208a6381 (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 b4ccee7576e5bbc36764b88ad50f5052ecea25be
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=b4ccee7576e5bbc36764b88ad50f5052ecea25be
Author: Simon Horman <horms at verge.net.au>
		
Allow hexdump of packet data of PACKET_{IN, OUT} messages
		
If verbosity parameter of ofp_print_packet_{in,out}() is greater than 2
then when formatting packet data include a hex dump as well as the output
of ofp_packet_to_string(), which is already included if verbosity is
greater than 0.

This feature may be accesed in serveral ways including:

* Including the -m parameter in an invoocation of ovs-ofctl monitor.
* Including a verbosity greater than 2 in an invocation of
  ovs-ofctl ofp-print.

This patch includes tests to exercise this feature using ovs-ofctl ofp-print.

The motivation of this is to allow tests to be written that use ovs-ofctl
-m monitor to check packet data which is not output by
ofp_packet_to_string(). Specifically, as the protocol of the inner-packet
is not known by ofp_packet_to_string() it only decodes and stringifies an
MPLS packet up to and including the first MPLS label stack entry. However
it may be useful to create tests which verify the contents of the inner
packet.

One example may be verify the effect of dec_ttl in the following sequence
of actions applied to a packet with a single MPLS label stack entry.

	pop_mpls(0x800),dec_ttl,push_mpls(0x8847)

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


commit 4b2d9d113f8eb7ee4e6bf703e81d4169377fc26b
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=4b2d9d113f8eb7ee4e6bf703e81d4169377fc26b
Author: Simon Horman <horms at verge.net.au>
		
ofp-print: ofp_packet_to_string() Do not emit extra trailing newline
		
The string produced by ofp_packet_to_string() includes a trailing
newline, so in the case where packet data is formatted by
ofp_print_packet_out() there is already a newline present.

This patch updates ofp_print_packet_out() so that it does not
add a second newline in this case.

It is not necessary to update the case where there is packet data
to ensure that the result it is terminated by a "\n" as the higher-level
ofp_to_string() function will ensure that the result is "\n" terminated.

The test-suite has be updated to exercise output of packet data by
ofp_packet_to_string()

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


commit 2291eb080c1afe13a5d3cb3048f0d160386b714b
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=2291eb080c1afe13a5d3cb3048f0d160386b714b
Author: Ben Pfaff <blp at nicira.com>
		
bridge: Fix use of wild pointer in iface_do_create().
		
'netdev' was not initialized at this point in the function, so the cleanup
at the error label referenced a wild pointer.

Introduced in commit 94a538422d4b (netdev: Prevent using reserved names).

CC: Alex Wang <alexw at nicira.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


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

Summary of changes:
 lib/ofp-print.c    |    7 +++-
 tests/ofp-print.at |  128 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 vswitchd/bridge.c  |    2 +-
 3 files changed, 135 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list