[ovs-dev] [PATCH] Initial implementation of sFlow.
Justin Pettit
jpettit at nicira.com
Fri Jan 8 02:40:19 UTC 2010
On Jan 7, 2010, at 4:08 PM, Neil McKee wrote:
>> + u64 sflow_pool; /* Packets that could have been sampled. */
>>
>>
>> I think the sFlow definition for this is only 32-bit. I'm guessing this is only increasing, since it's never reset any place. I'm a bit surprised that the counters in sFlow are 32 bit in that case...
>
> The sample-pool is send with every packet-sample, so it only needs to have enough bits to avoid wrapping between samples. You would only need more than 32-bits if you wanted a sampling rate of the order of 10^9, and typical settings are more like 1-in-400. The collector will take care of accumulating deltas from sample to sample, using unsigned arithmetic to handle rollovers when they happen.
I thought that might be the case, but then I would have expected sflow_pool to be reset for each sample taken. Right now, it only seems to be monotonically increasing.
--Justin
More information about the dev
mailing list