ofp-print: Abbreviate duplicated table features.
authorBen Pfaff <blp@nicira.com>
Tue, 7 Jul 2015 05:15:40 +0000 (22:15 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 28 Jul 2015 22:18:48 +0000 (15:18 -0700)
commit8811fc0ae150f51078321798b22d49e9f98fa454
treee4443b823a28eeb168b966cc0ab86821de5c868e
parent693e11384088643e2dcf7822e392d9a7af1f94b8
ofp-print: Abbreviate duplicated table features.

I spent some time recently looking at the results of "ovs-ofctl
dump-table-features".  It was really distressing because of the volume of
information.  Every table yielded well over 100 lines of output and for 253
(visible) tables that meant over 25,300 lines of output total, which is
basically unusable.

This commit cuts the volume of output greatly by eliminating most of the
duplication from one table to the next.  The command now prints the full
output only for table 0, and for each subsequent table prints only the
parts that differ.  That reduces the output volume for tables after the
first to only 9 lines each (one of which is blank), for a total of more
like 2,400 lines, which is still not short but reasonably manageable.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
lib/ofp-print.c
lib/ofp-print.h
tests/ofp-print.at
tests/ofproto-dpif.at
tests/ofproto.at
utilities/ovs-ofctl.c