From ddd3c9755d5fb1606445a72fb5f25e615518a162 Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Thu, 13 Jun 2013 12:51:05 -0700 Subject: [PATCH] ofproto-dpif-xlate: Remove useless variable in patch port logic. Signed-off-by: Ethan Jackson --- ofproto/ofproto-dpif-xlate.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index a796f9860..ca26acb14 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -817,7 +817,6 @@ compose_output_action__(struct xlate_ctx *ctx, uint16_t ofp_port, struct ofport_dpif *peer = ofport_get_peer(ofport); struct flow old_flow = ctx->xin->flow; enum slow_path_reason special; - struct ofport_dpif *in_port; if (!peer) { xlate_report(ctx, "Nonexistent patch port peer"); @@ -830,13 +829,12 @@ compose_output_action__(struct xlate_ctx *ctx, uint16_t ofp_port, memset(&flow->tunnel, 0, sizeof flow->tunnel); memset(flow->regs, 0, sizeof flow->regs); - in_port = get_ofp_port(ctx->ofproto, flow->in_port); - special = process_special(ctx->ofproto, &ctx->xin->flow, in_port, + special = process_special(ctx->ofproto, &ctx->xin->flow, peer, ctx->xin->packet); if (special) { ctx->xout->slow = special; - } else if (!in_port || may_receive(in_port, ctx)) { - if (!in_port || stp_forward_in_state(in_port->stp_state)) { + } else if (may_receive(peer, ctx)) { + if (stp_forward_in_state(peer->stp_state)) { xlate_table_action(ctx, flow->in_port, 0, true); } else { /* Forwarding is disabled by STP. Let OFPP_NORMAL and the -- 2.47.0