Jeremie Courreges-Anglas <[email protected]> writes:

> Florian Obser <[email protected]> writes:
>
>> On Sat, Feb 18, 2017 at 06:06:01PM +0100, Jeremie Courreges-Anglas wrote:
>>> 
>>> This one is a bit weird, the driver doesn't just increment the stats but
>>> also uses them at runtime, hence the additional helper functions.
>>
>> I'm wondering if we should just drop the reading.
>> We have two cases, the init case and the packet sending case.
>> First the sending case:
>> Isn't this always true?
>>      if (pflowstats.pflow_flows == sc->sc_gcounter)
>> If yes we can just skip that and do the inc.

If it not true if you have multiple interfaces.

>> The init case tries to preserve the flow counter betwen ifdown/ifup

I don't think it is just about preserving an interface's counter.

>> Maybe we should just init the global counter to 0, like on reboot.
>> Benno?
>
>   revision 1.9
>   date: 2009/01/03 21:47:32;  author: gollo;  state: Exp;  lines: +11 -7;
>   sync flow sequence ids on all used pflow interfaces.
>
> Right now I can't tell whether this change makes little or a lot of
> sense, so I'd better not touch this.  :)

Thinking about it some more, this is probably desirable.  After all, it
means that netstat -s shows a flow count that matches the sequence seen
by each collector.  On the other hand, removing this means that the
counters API is enough to handle plow_flows.  Thoughts?

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to