[ovs-dev] [PATCH] ofproto-dpif-xlate: Remove assertion for truncated

IWASE Yusuke iwase.yusuke0 at gmail.com
Wed Oct 4 13:54:16 UTC 2017


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 <iwase.yusuke0 at gmail.com>
---
 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



More information about the dev mailing list