[ovs-dev] [PATCH v2 18/21] actions: Allow caller to specify output table.

Justin Pettit jpettit at nicira.com
Thu Jul 30 23:55:13 UTC 2015


> On Jul 28, 2015, at 8:44 AM, Ben Pfaff <blp at nicira.com> wrote:
> 
> When an upcoming commit divides the pipeline up into ingress and egress
> pipeline, it will become necessary to resubmit to different tables from
> each of those pipelines to implement output.  This commit makes that
> possible.
> 
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> ovn/controller/rule.c |  2 +-
> ovn/lib/actions.c     | 16 +++++++++++-----
> ovn/lib/actions.h     |  6 ++++--
> tests/test-ovn.c      |  2 +-
> 4 files changed, 17 insertions(+), 9 deletions(-)
> 
> diff --git a/ovn/controller/rule.c b/ovn/controller/rule.c
> index 0f5971b..c7281a0 100644
> --- a/ovn/controller/rule.c
> +++ b/ovn/controller/rule.c
> @@ -283,7 +283,7 @@ rule_run(struct controller_ctx *ctx, struct hmap *flow_table)
>         ofpbuf_use_stub(&ofpacts, ofpacts_stub, sizeof ofpacts_stub);
>         next_table_id = rule->table_id < 31 ? rule->table_id + 17 : 0;
>         error = actions_parse_string(rule->actions, &symtab, &ldp->ports,
> -                                     next_table_id, &ofpacts, &prereqs);
> +                                     next_table_id, 64, &ofpacts, &prereqs);

Do you think we should start using #defines or enums for these tables instead of magic numbers?  It's hard to keep track of their values, and if we need to shuffle things around it's going to be tough to not miss some.

Acked-by: Justin Pettit <jpettit at nicira.com>

--Justin





More information about the dev mailing list