From bb374ef6703b6c8b16bf52fa5a7962d7b7b554e1 Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Sat, 16 Feb 2013 12:07:18 -0800 Subject: [PATCH] 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 --- ofproto/ofproto-dpif.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 { -- 2.43.0