From patchwork Wed Aug 30 22:51:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 807959 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=) 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 3xjLNZ5dcBz9s65 for ; Thu, 31 Aug 2017 08:51:58 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 622BFB00; Wed, 30 Aug 2017 22:51:55 +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 01248481 for ; Wed, 30 Aug 2017 22:51:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 5FEA71D7 for ; Wed, 30 Aug 2017 22:51:52 +0000 (UTC) X-Originating-IP: 209.66.79.214 Received: from localhost.localdomain (unknown [209.66.79.214]) (Authenticated sender: jpettit@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id DA26441C080 for ; Thu, 31 Aug 2017 00:51:50 +0200 (CEST) From: Justin Pettit To: dev@openvswitch.org Date: Wed, 30 Aug 2017 15:51:48 -0700 Message-Id: <1504133508-95409-1-git-send-email-jpettit@ovn.org> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW 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] [branch-2.7] Revert "ofproto-dpif-xlate: Fixes for propagating state of conntrack." 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 This reverts commit 8294d78ab124ec6f4b51c621e9baf7f29b287bb9. This patch was mistakenly backported to branch-2.7. The change breaks the OpenFlow API, which is not appropriate for a maintenance release. Signed-off-by: Justin Pettit Reported-by: Russell Bryant Acked-by: Russell Bryant --- ofproto/ofproto-dpif-xlate.c | 10 ++++------ tests/ofproto-dpif.at | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 7724a10d1d28..646a7bca3979 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -4863,9 +4863,9 @@ put_ct_nat(struct xlate_ctx *ctx) static void compose_conntrack_action(struct xlate_ctx *ctx, struct ofpact_conntrack *ofc) { - ovs_u128 old_ct_label = ctx->xin->flow.ct_label; + ovs_u128 old_ct_label = ctx->base_flow.ct_label; ovs_u128 old_ct_label_mask = ctx->wc->masks.ct_label; - uint32_t old_ct_mark = ctx->xin->flow.ct_mark; + uint32_t old_ct_mark = ctx->base_flow.ct_mark; uint32_t old_ct_mark_mask = ctx->wc->masks.ct_mark; size_t ct_offset; uint16_t zone; @@ -4900,9 +4900,9 @@ compose_conntrack_action(struct xlate_ctx *ctx, struct ofpact_conntrack *ofc) /* Restore the original ct fields in the key. These should only be exposed * after recirculation to another table. */ - ctx->xin->flow.ct_mark = old_ct_mark; + ctx->base_flow.ct_mark = old_ct_mark; ctx->wc->masks.ct_mark = old_ct_mark_mask; - ctx->xin->flow.ct_label = old_ct_label; + ctx->base_flow.ct_label = old_ct_label; ctx->wc->masks.ct_label = old_ct_label_mask; if (ofc->recirc_table == NX_CT_RECIRC_NONE) { @@ -4913,7 +4913,6 @@ compose_conntrack_action(struct xlate_ctx *ctx, struct ofpact_conntrack *ofc) /* Use ct_* fields from datapath during recirculation upcall. */ ctx->conntracked = true; compose_recirculate_and_fork(ctx, ofc->recirc_table); - ctx->conntracked = false; } } @@ -5788,7 +5787,6 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout) xlate_report(&ctx, OFT_THAW, "Resuming from table %"PRIu8, ctx.table_id); - ctx.conntracked = state->conntracked; if (!state->conntracked) { clear_conntrack(&ctx); } diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 907e1759235e..0a9a40d2ff0f 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -8908,13 +8908,13 @@ OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) dnl Check this output. AT_CHECK([cat ofctl_monitor.log], [0], [dnl -NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=42 in_port=1 (via action) data_len=42 (unbuffered) +NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=42 ct_mark=0x1,in_port=1 (via action) data_len=42 (unbuffered) udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=1,tp_dst=2 udp_csum:e9d6 dnl -NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=42 in_port=1 (via action) data_len=42 (unbuffered) +NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=42 ct_mark=0x3,in_port=1 (via action) data_len=42 (unbuffered) udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=3,tp_dst=4 udp_csum:e9d2 dnl -NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=42 in_port=1 (via action) data_len=42 (unbuffered) +NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=42 ct_mark=0x5,in_port=1 (via action) data_len=42 (unbuffered) udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=5,tp_dst=6 udp_csum:e9ce dnl NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=42 ct_state=est|rpl|trk,ct_mark=0x1,in_port=2 (via action) data_len=42 (unbuffered)