> On Aug 9, 2016, at 12:15 AM, dev-requ...@openvswitch.org wrote: > > Date: Mon, 8 Aug 2016 09:14:32 -0700 > From: Ben Pfaff <b...@ovn.org <mailto:b...@ovn.org>> > To: dev@openvswitch.org <mailto:dev@openvswitch.org> > Cc: Ben Pfaff <b...@ovn.org <mailto:b...@ovn.org>> > Subject: [ovs-dev] [PATCH v2 21/21] ovn-trace: New utility. > Message-ID: <1470672872-19450-22-git-send-email-...@ovn.org > <mailto:1470672872-19450-22-git-send-email-...@ovn.org>> > > This new utility is intended to fulfill for OVN the purpose that > "ofproto/trace" has for Open vSwitch. First, it's meant to be a useful > tool for troubleshooting and diagnosis and in general for improving one's > understanding of the emergent properties of a flow table. Second, it > simplifies and increases the practical scope of testing, as well as making > testing more reliable and repeatable and failures easier to interpret. > > This commit adds only a single test that uses the new utility, based on the > oldest OVN end-to-end test "ovn -- 3 HVs, 1 LS, 3 lports/HV". The > differences between the old and the new test illustrate properties of > tracing. First, the new test does not start any ovn-controller processes > or simulate any hypervisors in a nontrivial way. This is because ovn-trace > does not actually forward packets or rely on the physical structure of the > system. Second, whereas the old test tested not just the logical but also > the physical structure of the system, it needed to have several logical > ports, a total of 9 (3 on each of 3 HVs), whereas since this test only > tests the logical network implementation it can use a smaller number. This > property also means that the new test runs signicantly faster than the old > one (less than a second on my laptop). > > In my opinion this approach points the way toward the future of OVN > testing. Certainly, we need end-to-end tests. However, I believe that the > bulk of our tests can be broken into ones that test the logical network > implementation (using tracing) and ones that test physical/logical > translation. > > Signed-off-by: Ben Pfaff <b...@ovn.org <mailto:b...@ovn.org>> > --- > > + > +/* --detailed: Show a detailed, table-by-table trace. */ > +static bool detailed; > + > +/* --summary: Show a trace that omits table information. */ > +static bool summary; > + > +/* --minimal: Show a trace with only minimal information. */ > +static bool minimal; > +
As a little reminder, it is better to initialize ‘detailed’, ‘summary’, and ‘minimal' variables with a value of ‘false'. Thanks, zhangtonghao. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev