[ovs-dev] [PATCH] ofproto-dpif-xlate: Fix truncate and native tunnnel
William Tu
u9012063 at gmail.com
Sat Oct 14 04:33:58 UTC 2017
Previous commit a67b337dc281 breaks the truncate and native
tunnel testcase by removing the truncate flag. The patch fixes
it by putting it back. Reproduce the error by:
> make check-system-userspace TESTSUITEFLAGS='17'
Fixes: a67b337dc281 ("ofproto-dpif-xlate: Remove assertion for truncated")
Cc: IWASE Yusuke <iwase.yusuke0 at gmail.com>
Signed-off-by: William Tu <u9012063 at gmail.com>
---
ofproto/ofproto-dpif-xlate.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index cd3715562a57..ddcaf059ded2 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -4829,13 +4829,14 @@ xlate_output_action(struct xlate_ctx *ctx,
bool is_last_action)
{
ofp_port_t prev_nf_output_iface = ctx->nf_output_iface;
+ bool truncate = max_len != 0;
ctx->nf_output_iface = NF_OUT_DROP;
switch (port) {
case OFPP_IN_PORT:
compose_output_action(ctx, ctx->xin->flow.in_port.ofp_port, NULL,
- is_last_action, false);
+ is_last_action, truncate);
break;
case OFPP_TABLE:
xlate_table_action(ctx, ctx->xin->flow.in_port.ofp_port,
@@ -4864,7 +4865,7 @@ xlate_output_action(struct xlate_ctx *ctx,
case OFPP_LOCAL:
default:
if (port != ctx->xin->flow.in_port.ofp_port) {
- compose_output_action(ctx, port, NULL, is_last_action, false);
+ compose_output_action(ctx, port, NULL, is_last_action, truncate);
} else {
xlate_report(ctx, OFT_WARN, "skipping output to input port");
}
--
2.7.4
More information about the dev
mailing list