[ovs-dev] [PATCH 2/2] Allow hexdump packet data of PACKET_{IN, OUT} messages

Ben Pfaff blp at nicira.com
Fri May 17 04:43:03 UTC 2013


On Fri, May 17, 2013 at 12:26:26PM +0900, Simon Horman wrote:
> 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>

Looks good, I'll commit this after we finish iterating on patch 1.

Thanks!

Ben.



More information about the dev mailing list