[ovs-dev] [PATCH] ofproto-dpif: Report in trace "output" if an "output" action is ignored.

Ethan Jackson ethan at nicira.com
Tue Sep 25 21:58:35 UTC 2012


Acked-by: Ethan Jackson <ethan at nicira.com>


On Thu, Sep 20, 2012 at 11:05 AM, Ben Pfaff <blp at nicira.com> wrote:
> This would have saved some time and puzzlement earlier today.
>
> Reported-by: Paul Ingram <paul at nicira.com>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
>  ofproto/ofproto-dpif.c |    9 +++++++--
>  1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> index 9f7acd1..dcdd8f2 100644
> --- a/ofproto/ofproto-dpif.c
> +++ b/ofproto/ofproto-dpif.c
> @@ -4957,8 +4957,11 @@ compose_output_action__(struct action_xlate_ctx *ctx, uint16_t ofp_port,
>      if (ofport) {
>          struct priority_to_dscp *pdscp;
>
> -        if (ofport->up.pp.config & OFPUTIL_PC_NO_FWD
> -            || (check_stp && !stp_forward_in_state(ofport->stp_state))) {
> +        if (ofport->up.pp.config & OFPUTIL_PC_NO_FWD) {
> +            xlate_report(ctx, "OFPPC_NO_FWD set, skipping output");
> +            return;
> +        } else if (check_stp && !stp_forward_in_state(ofport->stp_state)) {
> +            xlate_report(ctx, "STP not in forwarding state, skipping output");
>              return;
>          }
>
> @@ -5232,6 +5235,8 @@ xlate_output_action(struct action_xlate_ctx *ctx,
>      default:
>          if (port != ctx->flow.in_port) {
>              compose_output_action(ctx, port);
> +        } else {
> +            xlate_report(ctx, "skipping output to input port");
>          }
>          break;
>      }
> --
> 1.7.2.5
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list