[ovs-dev] [PATCH] secchan: Avoid sending NetFlow packets for empty flows.

Ben Pfaff blp at nicira.com
Mon Aug 31 16:07:49 UTC 2009


Thanks to both of you.

I pushed this out.

Justin Pettit <jpettit at nicira.com> writes:

> To quote the inimitable Patrick Swayze: "Ditto".
>
> --Justin
>
>
> On Aug 28, 2009, at 3:08 PM, Peter Balland wrote:
>
>> Seems like a perfectly reasonable check to me.
>>
>> Peter
>>
>> Ben Pfaff wrote:
>>> There is no value in sending out NetFlow messages when the byte
>>> counter
>>> (hence, packet counter) is 0.  This does not often happen, but it
>>> can in
>>> corner cases where a flow gets installed but never sees any traffic
>>> before
>>> it is uninstalled.
>>> CC: Peter Balland <peter at nicira.com>
>>> ---
>>> secchan/ofproto.c |    2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>> diff --git a/secchan/ofproto.c b/secchan/ofproto.c
>>> index efa5c9b..b3fef1b 100644
>>> --- a/secchan/ofproto.c
>>> +++ b/secchan/ofproto.c
>>> @@ -1696,7 +1696,7 @@ rule_post_uninstall(struct ofproto *ofproto,
>>> struct rule *rule)
>>>     struct rule *super = rule->super;
>>>      rule_account(ofproto, rule, 0);
>>> -    if (ofproto->netflow) {
>>> +    if (ofproto->netflow && rule->byte_count) {
>>>         struct ofexpired expired;
>>>         expired.flow = rule->cr.flow;
>>>         expired.packet_count = rule->packet_count;
>>
>>
>> _______________________________________________
>> discuss mailing list
>> discuss at openvswitch.org
>> http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org




More information about the dev mailing list