[ovs-dev] [PATCH 2/8] ofp-actions: Allow special handling for nested actions.
Joe Stringer
joestringer at nicira.com
Fri Sep 11 16:49:29 UTC 2015
On 10 September 2015 at 11:01, Ben Pfaff <blp at nicira.com> wrote:
> On Wed, Sep 09, 2015 at 07:00:18PM -0700, Joe Stringer wrote:
>> The next patch will introduce nested actions with special restrictions.
>> Refactor the action verification to allow ofpacts_verify() to identify
>> nesting so that these retrictions may be applied.
>
> s/retrictions/restrictions/
>
> Here's a suggested improved comment:
>
> /* Pull off existing actions or instructions. Used by nesting actions to keep
> * ofpacts_parse() oblivious of actions nesting.
> *
> * Push the actions back on after nested parsing, e.g.:
> *
> * size_t ofs = ofpacts_pull(ofpacts);
> * ...nested parsing...
> * ofpbuf_push_uninit(ofpacts, ofs);
> */
>
> The indentation looks wrong here to me:
>
> + if (outer_action) {
> + enum ofperr error = ofpacts_verify_nested(a, outer_action);
> +
> + if (error) {
> + return error;
> + }
> + }
> +
>
> Will the "extern" function ofpacts_parse_actions() ever be passed a
> nonzero 'outer_action'? If so then I'm fine with that, otherwise I
> think the parameter could be dropped.
It is, but only from a function within lib/ofp-actions.c. That
function can reuse ofpacts_parse_copy() instead.
> Acked-by: Ben Pfaff <blp at nicira.com>
Thanks, I applied your suggestions and pushed this to master.
More information about the dev
mailing list