Skip to content

Commit

Permalink
ofproto-dpif-xlate: Change assertion to log message.
Browse files Browse the repository at this point in the history
Until now, compose_output_action__() has asserted that a packet output to
a patch port is not to be truncated.  This commit changes this to an error
that will be included in trace output, for two reasons.  First, this sounds
like only a minor problem to me which doesn't warrant killing the process.
Second, it will be easier to track down the actual problem (if any) if we
can get a trace instead of a segfault.

Reported-by: Kevin Lin <[email protected]>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2017-December/045832.html
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
blp committed Dec 8, 2017
1 parent 8b496c7 commit 5cb9218
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ofproto/ofproto-dpif-xlate.c
Original file line number Diff line number Diff line change
Expand Up @@ -3701,7 +3701,9 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port,
}

if (xport->peer) {
ovs_assert(!truncate);
if (truncate) {
xlate_report_error(ctx, "Cannot truncate output to patch port");
}
patch_port_output(ctx, xport, xport->peer);
return;
}
Expand Down

0 comments on commit 5cb9218

Please sign in to comment.