On Wed, Nov 23, 2011 at 03:14:05PM -0800, Justin Pettit wrote: > This commit adds support for tracking the number of packets and bytes > sent through a mirror. The numbers are kept in the new "statistics" > column on the mirror table in the "tx_packets" and "tx_bytes" keys.
Important stuff --------------- In bridge_configure_mirrors() we need to assign "m->cfg = cfg;" even in the case where we found a matching UUID, because IDL copies of database records can get destroyed and recreated without the UUID changing in corner cases (e.g. database connection goes down and we reconnect). Nits ---- I see why you did it but it's unusual to maintain an event counter with a signed integer type. I'd prefer to give mirror_get_stats() an int return value even though the only existing implementation cannot fail. Some hardware cannot maintain both byte and packet counters and so in case hardware ever grows support for mirrors we might want to adopt the "all-one-bits means unknown" convention from the start, i.e. initialize the return values to -1 (or to UINT64_MAX if you switch to unsigned values) and omit a given counter from the database if it's unknown. In the comment on the mirror_get_stats function pointer, s/STP/mirror statistics/. Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev