[ovs-dev] [mirrors 2/3] ovs-vswitchd: Track packet and byte statistics sent on mirrors.
Justin Pettit
jpettit at nicira.com
Thu Nov 24 01:34:32 UTC 2011
On Nov 23, 2011, at 3:29 PM, Ben Pfaff wrote:
> 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).
Ah, thanks. Fixed.
> I see why you did it but it's unusual to maintain an event counter
> with a signed integer type.
Okay, I switched it over to uint64_t.
> I'd prefer to give mirror_get_stats() an int return value even though
> the only existing implementation cannot fail.
Sounds good.
> 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.
Okay, done.
> In the comment on the mirror_get_stats function pointer, s/STP/mirror
> statistics/.
Whoops. Thanks.
--Justin
More information about the dev
mailing list