Andy, can you take a quick look at this? It appears to me that it is trivial to trigger this assertion by specifying a max_len in any OpenFlow output action. I guess that wasn't the intention, but maybe there is some other importance purpose for the assertion that should be retained.
Thanks, Ben. On Wed, Oct 04, 2017 at 10:54:16PM +0900, IWASE Yusuke wrote: > Because OpenFlow Spec does not clearly stipulate that "max_len" in > OUTPUT action must be zero when "port" is other than OFPP_CONTROLLER, > it is too strict assertion that confirm "max_len" is not zero, and > "max_len" should be ignored when not used. > Also this assertion causes the lack of the interoperability with some > controller implementations. > > This patch removes these redundant assertions of if truncated or not. > > Signed-off-by: IWASE Yusuke <[email protected]> > --- > ofproto/ofproto-dpif-xlate.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c > index d320d57..c5ed6a0 100644 > --- a/ofproto/ofproto-dpif-xlate.c > +++ b/ofproto/ofproto-dpif-xlate.c > @@ -3700,7 +3700,6 @@ compose_output_action__(struct xlate_ctx *ctx, > ofp_port_t ofp_port, > } > > if (xport->peer) { > - ovs_assert(!truncate) > patch_port_output(ctx, xport, xport->peer); > return; > } > @@ -4839,21 +4838,17 @@ xlate_output_action(struct xlate_ctx *ctx, > is_last_action, truncate); > break; > case OFPP_TABLE: > - ovs_assert(!truncate); > xlate_table_action(ctx, ctx->xin->flow.in_port.ofp_port, > 0, may_packet_in, true, false, false, > do_xlate_actions); > break; > case OFPP_NORMAL: > - ovs_assert(!truncate); > xlate_normal(ctx); > break; > case OFPP_FLOOD: > - ovs_assert(!truncate); > flood_packets(ctx, false, is_last_action); > break; > case OFPP_ALL: > - ovs_assert(!truncate); > flood_packets(ctx, true, is_last_action); > break; > case OFPP_CONTROLLER: > -- > 2.7.4 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
