]> git.proxmox.com Git - mirror_ovs.git/commit - tests/stp.at
ofproto-dpif: Make ofproto/trace output easier to read.
authorBen Pfaff <blp@ovn.org>
Thu, 12 Jan 2017 16:15:02 +0000 (08:15 -0800)
committerBen Pfaff <blp@ovn.org>
Thu, 12 Jan 2017 16:58:20 +0000 (08:58 -0800)
commit2d9b49dd92bfbd040da5ad60b84d0629a355b099
tree39dd0d57ec7745dd4236d9e1f8d1f3c7d51137bd
parent9fff138ec3a6dbe75073d16cba7fbe86ac273c36
ofproto-dpif: Make ofproto/trace output easier to read.

"ovs-appctl ofproto/trace" is invaluable for debugging, but as the users of
Open vSwitch have evolved it has failed to keep up with the times.  It's
pretty easy to design OpenFlow tables and pipelines that resubmit dozens of
times.  Each resubmit causes an additional tab of indentation, so the
output wraps around, sometimes again and again, and makes the output close
to unreadable.

ovn-trace pioneered better formatting for tracing in OVN logical datapaths,
mostly by not increasing indentation for tail recursion, which in practice
gets rid of almost all indentation.

This commit experiments with redoing ofproto/trace the same way.  Try
looking at, for example, the testsuite output for test 2282 "ovn -- 3 HVs,
3 LRs connected via LS, source IP based routes".  Without this commit, it
indents 61 levels (488 spaces!).  With this commit, it indents 1 level
(4 spaces) and it's possible to actually understand what's going on almost
at a glance.

To see this for yourself, try the following command either with or without
this commit (but be sure to keep the change to ovn.at that adds an
ofproto/trace to the test):
make check TESTSUITEFLAGS='-d 2282' && less tests/testsuite.dir/2282/testsuite.log

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Lance Richardson <lrichard@redhat.com>
Acked-by: Justin Pettit <jpettit@ovn.org>
13 files changed:
Documentation/tutorials/ovs-advanced.rst
lib/nx-match.c
lib/nx-match.h
ofproto/ofproto-dpif-trace.c
ofproto/ofproto-dpif-trace.h
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif-xlate.h
ofproto/ofproto-dpif.c
ofproto/ofproto-dpif.h
tests/ofproto-dpif.at
tests/ovn.at
tests/rstp.at
tests/stp.at