From patchwork Wed Oct 4 13:54:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iwase Yusuke X-Patchwork-Id: 821320 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sydCRb9T"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y6cpV4m65z9s7M for ; Thu, 5 Oct 2017 00:54:42 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 6F4E79F8; Wed, 4 Oct 2017 13:54:39 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 8941297A for ; Wed, 4 Oct 2017 13:54:38 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8E49119B for ; Wed, 4 Oct 2017 13:54:37 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id u27so13204166pgn.1 for ; Wed, 04 Oct 2017 06:54:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=glgBIgMr0dkenHcgj/2n33nc3grq8zJcoDta/t/8uo4=; b=sydCRb9ThMbHyfzIjwHimWAuS4Vr8EUf+8fjJnLH9kfL+3OuCvxORL83moMfw9Qvm/ 01mKFKsiGoK4BgZAJ6SaqMP5lnuxq1HrHO25dTzvgtd5xKPlq4hpJGsbS5nJXiukczob GN7cQkhWK2nXFy40GND9sAgCDk9j2pq7uDWsurY+LKxAJtrl2d9HfA/yWqhECDLQkver IYQP514BcXk/aiLgQhsWaMIX9mGIlbD0BW1xIU+34NjjoD71nrnxxZ/za+dLjpYgkT9Q j2hkBe7DYoZ1aq7FfUVDxsDf5Svq+B7jj8iJMhI8q1b29T8Ievqru8+DwjXG89YDue8b SCpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=glgBIgMr0dkenHcgj/2n33nc3grq8zJcoDta/t/8uo4=; b=V9yTyZsk3G8O4q1qiFbf9y0qWGShVIKsRMpdUpNJ8sn5XEfLbIcKtNNDSejV0bS61E eJCYS/Oy+RZXnHHiwj+Q1DHUNJjvyapvqumN/6yF9A7lIIxD8SRtFC0RVlkLmJniLD0i QH9yZlQkRxfDSX9SwQh//w9d+OBwVCPZ6eBmbQfF/miQyowoCgVcOne3jIT8NrMR6Kpa RBeljDK/2Y8nxPnW39nh0h1ZT5VhF4NXvV33u4S8tAyZ6YIgpxmegs5MwB4M75yYR/PM 73Etan0sy4/8gfAldXj7NZMxlVmueA/6jrz/6IQZ+wY9Ydw6QT/+KcWPWYaF1psXrfyy u5gA== X-Gm-Message-State: AHPjjUgrKWYGoedL+Lc89xYFKRRdfm9DODAEmsi8hoSVktC5Ivx2yUFK eWIr7FEgoWZfLGx+cdaj/KOLzA== X-Google-Smtp-Source: AOwi7QDDnykIc0SzStwovxAtpjD4AuusT+srBdc8MFJUM9yT8Hn8r4ICn4QBO2I7Sa+XBfdInwRY9A== X-Received: by 10.84.240.67 with SMTP id h3mr20840104plt.422.1507125276968; Wed, 04 Oct 2017 06:54:36 -0700 (PDT) Received: from localhost.localdomain (p15100-ipngn2801funabasi.chiba.ocn.ne.jp. [153.212.142.100]) by smtp.gmail.com with ESMTPSA id k24sm15222605pfj.151.2017.10.04.06.54.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Oct 2017 06:54:36 -0700 (PDT) From: IWASE Yusuke To: dev@openvswitch.org Date: Wed, 4 Oct 2017 22:54:16 +0900 Message-Id: <1507125256-7420-1-git-send-email-iwase.yusuke0@gmail.com> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] ofproto-dpif-xlate: Remove assertion for truncated X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org 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 --- 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: