diff mbox series

[ovs-dev,2/5] ovn-trace: Don't assert for next(stage=ingress, ..).

Message ID 20201005174919.4169397-1-numans@ovn.org
State Accepted
Headers show
Series ovn-northd: Optimize logical flow generation for reject ACLs. | expand

Commit Message

Numan Siddique Oct. 5, 2020, 5:49 p.m. UTC
From: Numan Siddique <numans@ovn.org>

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 <numans@ovn.org>
---
 utilities/ovn-trace.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

Comments

Dumitru Ceara Oct. 12, 2020, 7:13 p.m. UTC | #1
On 10/5/20 7:49 PM, numans@ovn.org wrote:
> From: Numan Siddique <numans@ovn.org>
> 
> 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 <numans@ovn.org>

Looks good to me, thanks!

Acked-by: Dumitru Ceara <dceara@redhat.com>
diff mbox series

Patch

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);