[ovs-dev] [next4] ofproto-dpif: Get rid of effectively unused 'check_special' flag.

Ethan Jackson ethan at nicira.com
Wed May 11 18:05:27 UTC 2011


Looks Good.

Ethan

On Wed, May 11, 2011 at 11:04, Ben Pfaff <blp at nicira.com> wrote:
> Nothing ever sets this flag to false any longer, so there's no need to
> store it or test its value.
>
> Reported-by: Ethan Jackson <ethan at nicira.com>
> ---
>  ofproto/ofproto-dpif.c |    9 +--------
>  1 files changed, 1 insertions(+), 8 deletions(-)
>
> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> index 34af0f5..e6ca016 100644
> --- a/ofproto/ofproto-dpif.c
> +++ b/ofproto/ofproto-dpif.c
> @@ -171,11 +171,6 @@ struct action_xlate_ctx {
>      * calling action_xlate_ctx_init(). */
>     void (*resubmit_hook)(struct action_xlate_ctx *, struct rule_dpif *);
>
> -    /* If true, the speciality of 'flow' should be checked before executing
> -     * its actions.  If special_cb returns false on 'flow' rendered
> -     * uninstallable and no actions will be executed. */
> -    bool check_special;
> -
>  /* xlate_actions() initializes and uses these members.  The client might want
>  * to look at them after it returns. */
>
> @@ -3110,7 +3105,6 @@ action_xlate_ctx_init(struct action_xlate_ctx *ctx,
>     ctx->flow = *flow;
>     ctx->packet = packet;
>     ctx->resubmit_hook = NULL;
> -    ctx->check_special = true;
>  }
>
>  static struct ofpbuf *
> @@ -3126,8 +3120,7 @@ xlate_actions(struct action_xlate_ctx *ctx,
>     ctx->recurse = 0;
>     ctx->last_pop_priority = -1;
>
> -    if (ctx->check_special
> -        && process_special(ctx->ofproto, &ctx->flow, ctx->packet)) {
> +    if (process_special(ctx->ofproto, &ctx->flow, ctx->packet)) {
>         ctx->may_set_up_flow = false;
>     } else {
>         do_xlate_actions(in, n_in, ctx);
> --
> 1.7.4.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>



More information about the dev mailing list