[ovs-git] [openvswitch/ovs] 2d9b49: ofproto-dpif: Make ofproto/trace output easier to ...

GitHub noreply at github.com
Thu Jan 12 17:10:52 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 2d9b49dd92bfbd040da5ad60b84d0629a355b099
      https://github.com/openvswitch/ovs/commit/2d9b49dd92bfbd040da5ad60b84d0629a355b099
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2017-01-12 (Thu, 12 Jan 2017)

  Changed paths:
    M Documentation/tutorials/ovs-advanced.rst
    M lib/nx-match.c
    M lib/nx-match.h
    M ofproto/ofproto-dpif-trace.c
    M ofproto/ofproto-dpif-trace.h
    M ofproto/ofproto-dpif-xlate.c
    M ofproto/ofproto-dpif-xlate.h
    M ofproto/ofproto-dpif.c
    M ofproto/ofproto-dpif.h
    M tests/ofproto-dpif.at
    M tests/ovn.at
    M tests/rstp.at
    M tests/stp.at

  Log Message:
  -----------
  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 at ovn.org>
Acked-by: Lance Richardson <lrichard at redhat.com>
Acked-by: Justin Pettit <jpettit at ovn.org>




More information about the git mailing list