Message ID | 1507955638-1458-1-git-send-email-u9012063@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] ofproto-dpif-xlate: Fix truncate and native tunnnel | expand |
Thanks for the patch. It fixes the system-userspace test "17: datapath - truncate and output to gre tunnel". Acked-by: Yi-Hung Wei <yihung.wei@gmail.com> On Fri, Oct 13, 2017 at 9:33 PM, William Tu <u9012063@gmail.com> wrote: > 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@gmail.com> > Signed-off-by: William Tu <u9012063@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 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
On 13 October 2017 at 21:33, William Tu <u9012063@gmail.com> wrote: > 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@gmail.com> > Signed-off-by: William Tu <u9012063@gmail.com> > Thanks. I applied this to master. > --- > 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 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
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"); }