From: Ethan Jackson Date: Sat, 16 Feb 2013 20:07:18 +0000 (-0800) Subject: ofproto-dpif: Receive special packets on patch ports. X-Git-Tag: sliver-openvswitch-1.10.90-1~11^2~21 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=bb374ef6703b6c8b16bf52fa5a7962d7b7b554e1;p=sliver-openvswitch.git ofproto-dpif: Receive special packets on patch ports. Commit 0a740f48293 (ofproto-dpif: Implement patch ports in userspace.) allowed special packets (i.e. LACP, CFM, etc) to be sent on patch ports, but not received. This patch implements the logic required to receive special packets on patch ports. Bug #15154. Signed-off-by: Ethan Jackson --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 1e6fdc8b2..2078685d9 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -5738,6 +5738,7 @@ compose_output_action__(struct action_xlate_ctx *ctx, uint16_t ofp_port, struct ofport_dpif *peer = ofport_get_peer(ofport); struct flow old_flow = ctx->flow; const struct ofproto_dpif *peer_ofproto; + enum slow_path_reason special; struct ofport_dpif *in_port; if (!peer) { @@ -5758,7 +5759,11 @@ compose_output_action__(struct action_xlate_ctx *ctx, uint16_t ofp_port, memset(ctx->flow.regs, 0, sizeof ctx->flow.regs); in_port = get_ofp_port(ctx->ofproto, ctx->flow.in_port); - if (!in_port || may_receive(in_port, ctx)) { + special = process_special(ctx->ofproto, &ctx->flow, in_port, + ctx->packet); + if (special) { + ctx->slow |= special; + } else if (!in_port || may_receive(in_port, ctx)) { if (!in_port || stp_forward_in_state(in_port->stp_state)) { xlate_table_action(ctx, ctx->flow.in_port, 0, true); } else {