From patchwork Mon Oct 5 17:49:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1376979 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=hemlock.osuosl.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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C4vnH4v7Wz9sTf for ; Tue, 6 Oct 2020 09:06:11 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4E2E987100; Mon, 5 Oct 2020 17:49:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wrqRQ2rCFXHp; Mon, 5 Oct 2020 17:49:31 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 01BE2870EB; Mon, 5 Oct 2020 17:49:31 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id EAC45C016F; Mon, 5 Oct 2020 17:49:30 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id BC10FC0051 for ; Mon, 5 Oct 2020 17:49:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B9610870FA for ; Mon, 5 Oct 2020 17:49:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s5Pum195ZPjf for ; Mon, 5 Oct 2020 17:49:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by hemlock.osuosl.org (Postfix) with ESMTPS id ADC65870EB for ; Mon, 5 Oct 2020 17:49:28 +0000 (UTC) X-Originating-IP: 27.7.100.13 Received: from nusiddiq.home.org.com (unknown [27.7.100.13]) (Authenticated sender: numans@ovn.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 52ED62000D; Mon, 5 Oct 2020 17:49:23 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Mon, 5 Oct 2020 23:19:19 +0530 Message-Id: <20201005174919.4169397-1-numans@ovn.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201005174829.4169091-1-numans@ovn.org> References: <20201005174829.4169091-1-numans@ovn.org> MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn 2/5] ovn-trace: Don't assert for next(stage=ingress, ..). X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Numan Siddique The commit [1] allowed next action to advance from ingress to egress pipeline, but ovn-trace was not modified to handle this condition. Also corrected the ovntrace node format message as per the next stage. [1] - b4b68177eb2f("Fix conntrack entry leaks because of TCP RST packets not sent to conntrack.") Fixes: b4b68177eb2f("Fix conntrack entry leaks because of TCP RST packets not sent to conntrack.") Signed-off-by: Numan Siddique Acked-by: Dumitru Ceara --- utilities/ovn-trace.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/utilities/ovn-trace.c b/utilities/ovn-trace.c index 33afc4f43c..0920ae1599 100644 --- a/utilities/ovn-trace.c +++ b/utilities/ovn-trace.c @@ -1888,12 +1888,15 @@ execute_next(const struct ovnact_next *next, enum ovnact_pipeline pipeline, struct ovs_list *super) { if (pipeline != next->pipeline) { - ovs_assert(next->pipeline == OVNACT_P_INGRESS); - - uint16_t in_key = uflow->regs[MFF_LOG_INPORT - MFF_REG0]; + uint16_t key = next->pipeline == OVNACT_P_INGRESS + ? uflow->regs[MFF_LOG_INPORT - MFF_REG0] + : uflow->regs[MFF_LOG_OUTPORT - MFF_REG0]; struct ovntrace_node *node = ovntrace_node_append( - super, OVNTRACE_NODE_PIPELINE, "ingress(dp=\"%s\", inport=\"%s\")", - dp->friendly_name, ovntrace_port_key_to_name(dp, in_key)); + super, OVNTRACE_NODE_PIPELINE, "%s(dp=\"%s\", %s=\"%s\")", + next->pipeline == OVNACT_P_INGRESS ? "ingress" : "egress", + dp->friendly_name, + next->pipeline == OVNACT_P_INGRESS ? "inport" : "outport", + ovntrace_port_key_to_name(dp, key)); super = &node->subs; } trace__(dp, uflow, next->ltable, next->pipeline, super);