From patchwork Thu Sep 20 18:34:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 972649 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; dmarc=none (p=none dis=none) header.from=ovn.org 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 42GQPr5Tllz9sCh for ; Fri, 21 Sep 2018 04:34:56 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B9423FA4; Thu, 20 Sep 2018 18:34:53 +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 B6DC0FA1 for ; Thu, 20 Sep 2018 18:34:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 46A2BB0 for ; Thu, 20 Sep 2018 18:34:49 +0000 (UTC) X-Originating-IP: 208.91.3.26 Received: from sigabrt.benpfaff.org (unknown [208.91.3.26]) (Authenticated sender: blp@ovn.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 1312960004; Thu, 20 Sep 2018 18:34:45 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Thu, 20 Sep 2018 11:34:42 -0700 Message-Id: <20180920183442.23048-1-blp@ovn.org> X-Mailer: git-send-email 2.16.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff , Gurucharan Shetty Subject: [ovs-dev] [PATCH] meta-flow: Make "nw_frag" a synonym for "ip_frag". 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 Since the time that support for IP fragments was introduce, the OVS functions that format flows have used "nw_frag", but the ones that parse flows have expected "ip_frag". Obviously this is a bug and it's a surprise that it's gone so long without anyone reporting the problem. This fixes it and adds a test. Reported-by: Gurucharan Shetty Signed-off-by: Ben Pfaff Acked-by: Gurucharan Shetty --- include/openvswitch/meta-flow.h | 2 +- tests/ofproto-dpif.at | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/openvswitch/meta-flow.h b/include/openvswitch/meta-flow.h index 627c8a3912a3..152f512db3e8 100644 --- a/include/openvswitch/meta-flow.h +++ b/include/openvswitch/meta-flow.h @@ -1454,7 +1454,7 @@ enum OVS_PACKED_ENUM mf_field_id { */ MFF_IP_TTL, - /* "ip_frag". + /* "ip_frag" (aka "nw_frag"). * * IP fragment information. * diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 362c58db437b..6b1499f99d78 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -4337,11 +4337,11 @@ AT_SETUP([ofproto-dpif - fragment handling - trace]) OVS_VSWITCHD_START add_of_ports br0 1 2 3 4 5 6 90 AT_DATA([flows.txt], [dnl -priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1 -priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2 -priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4 -priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5 -priority=50 tcp ip_frag=later actions=output:6 +priority=75 tcp nw_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1 +priority=75 tcp nw_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2 +priority=50 tcp nw_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4 +priority=50 tcp nw_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5 +priority=50 tcp nw_frag=later actions=output:6 ]) AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])