[ovs-dev] [PATCHv2] revalidator: Prevent handling the same flow twice.

Alex Wang alexw at nicira.com
Wed Apr 23 16:56:52 UTC 2014


On Tue, Apr 22, 2014 at 10:24 PM, Alex Wang <alexw at nicira.com> wrote:

> diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
>> index 416cfdc..906bf17 100644
>> --- a/ofproto/ofproto-dpif-upcall.c
>> +++ b/ofproto/ofproto-dpif-upcall.c
>> @@ -45,6 +45,8 @@
>>
>>  VLOG_DEFINE_THIS_MODULE(ofproto_dpif_upcall);
>>
>> +COVERAGE_DEFINE(upcall_duplicate_flow);
>> +
>>  /* A thread that reads upcalls from dpif, forwards each upcall's packet,
>>   * and possibly sets up a kernel flow as a cache. */
>>  struct handler {
>> @@ -161,6 +163,7 @@ struct udpif_key {
>>      long long int created;         /* Estimation of creation time. */
>>
>>      bool mark;                     /* Used by mark and sweep GC
>> algorithm. */
>> +    bool flow_exists;              /* Ensures flows are only deleted
>> once. */
>>
>>
>
> Do we still need mark?  I think the function of 'mark' and 'flow_exists'
> is overlapped.
>

Based on discussion offline, we still need the 'mark' for garbage
collection.  Don't know if you want to add more comments
to explain them,

Acked-by: Alex Wang <alexw at nicira.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20140423/e55f33ff/attachment-0005.html>


More information about the dev mailing list