I'm not sure of a good way to make them fit . . .

At any rate, I'm getting rid of the rule_from_cls_rule() function in a
future patch so that will clean this up quite a bit.

Ethan

On Wed, Apr 30, 2014 at 3:02 PM, Jarno Rajahalme <jrajaha...@nicira.com> wrote:
> Acked-by: Jarno Rajahalme <jrajaha...@nicira.com>
>
> I would put the match and priority parameters on the same line, though.
>
>   Jarno
>
> On Apr 30, 2014, at 2:53 PM, Ethan Jackson <et...@nicira.com> wrote:
>
>> This code created a cls_rule without destroying it.  Found by
>> inspection.
>>
>> Signed-off-by: Ethan Jackson <et...@nicira.com>
>> ---
>> ofproto/ofproto.c | 7 +++----
>> 1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
>> index 3d788a6..208efc1 100644
>> --- a/ofproto/ofproto.c
>> +++ b/ofproto/ofproto.c
>> @@ -1975,14 +1975,13 @@ ofproto_flow_mod(struct ofproto *ofproto, struct 
>> ofputil_flow_mod *fm)
>>     if (fm->command == OFPFC_MODIFY_STRICT && fm->table_id != OFPTT_ALL
>>         && !(fm->flags & OFPUTIL_FF_RESET_COUNTS)) {
>>         struct oftable *table = &ofproto->tables[fm->table_id];
>> -        struct cls_rule match_rule;
>>         struct rule *rule;
>>         bool done = false;
>>
>> -        cls_rule_init(&match_rule, &fm->match, fm->priority);
>>         fat_rwlock_rdlock(&table->cls.rwlock);
>> -        rule = rule_from_cls_rule(classifier_find_rule_exactly(&table->cls,
>> -                                                               
>> &match_rule));
>> +        rule = rule_from_cls_rule(classifier_find_match_exactly(&table->cls,
>> +                                                                &fm->match,
>> +                                                                
>> fm->priority));
>>         if (rule) {
>>             /* Reading many of the rule fields and writing on 'modified'
>>              * requires the rule->mutex.  Also, rule->actions may change
>> --
>> 1.8.1.2
>>
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> http://openvswitch.org/mailman/listinfo/dev
>
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to