From 4d84a20d68a7c3ceec726aefaa0eca234598fb97 Mon Sep 17 00:00:00 2001
From: Numan Siddique <numans@ovn.org>
Date: Mon, 5 Oct 2020 22:26:56 +0530
Subject: [PATCH 2/5] ovn-trace: Don't assert for next(stage=ingress,..).
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.")
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
(cherry-picked from upstream branch-20.09 commit 3583f4312eb6ad5af86053a2b0c795ee9dbec81e)
Change-Id: Ia6c11333a51a2dc85fbdc7829e327b412b6e88d1
---
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 33afc4f43..0920ae159 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);
--
2.26.2