summaryrefslogtreecommitdiff
path: root/ofproto
diff options
context:
space:
mode:
authorEelco Chaudron <echaudro@redhat.com>2023-01-23 12:03:29 +0100
committerIlya Maximets <i.maximets@ovn.org>2023-01-27 16:57:27 +0100
commit6ad35dd80e0c4695c6ff0ae8605738f5bb1b56e7 (patch)
tree81a2d7d569d80ad87b33925777f32531a1c383b0 /ofproto
parentc3ed0bf34b8a77af4dd4e6d7a6991ce92b7f1aaf (diff)
downloadopenvswitch-6ad35dd80e0c4695c6ff0ae8605738f5bb1b56e7.tar.gz
utilities: Add revalidator measurement script and needed USDT probes.
This patch adds a Python script that can be used to analyze the revalidator runs by providing statistics (including some real time graphs). The USDT events can also be captured to a file and used for later offline analysis. The following blog explains the Open vSwitch revalidator implementation and how this tool can help you understand what is happening in your system. https://developers.redhat.com/articles/2022/10/19/open-vswitch-revalidator-process-explained Signed-off-by: Eelco Chaudron <echaudro@redhat.com> Acked-by: Adrian Moreno <amorenoz@redhat.com> Acked-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r--ofproto/ofproto-dpif-upcall.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index 442141ccd..31ac02d11 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -42,6 +42,7 @@
#include "seq.h"
#include "tunnel.h"
#include "unixctl.h"
+#include "openvswitch/usdt-probes.h"
#include "openvswitch/vlog.h"
#include "lib/netdev-provider.h"
@@ -978,6 +979,7 @@ udpif_revalidator(void *arg)
terse_dump = udpif_use_ufid(udpif);
udpif->dump = dpif_flow_dump_create(udpif->dpif, terse_dump,
NULL);
+ OVS_USDT_PROBE(udpif_revalidator, start_dump, udpif, n_flows);
}
}
@@ -1029,6 +1031,9 @@ udpif_revalidator(void *arg)
duration);
}
+ OVS_USDT_PROBE(udpif_revalidator, sweep_done, udpif, n_flows,
+ MIN(ofproto_max_idle, ofproto_max_revalidator));
+
poll_timer_wait_until(start_time + MIN(ofproto_max_idle,
ofproto_max_revalidator));
seq_wait(udpif->reval_seq, last_reval_seq);
@@ -2239,6 +2244,9 @@ revalidate_ukey__(struct udpif *udpif, const struct udpif_key *ukey,
.wc = &wc,
};
+ OVS_USDT_PROBE(revalidate_ukey__, entry, udpif, ukey, tcp_flags,
+ odp_actions, recircs, xcache);
+
result = UKEY_DELETE;
xoutp = NULL;
netflow = NULL;
@@ -2302,6 +2310,9 @@ exit:
netflow_flow_clear(netflow, &ctx.flow);
}
xlate_out_uninit(xoutp);
+
+ OVS_USDT_PROBE(revalidate_ukey__, exit, udpif, ukey, result);
+
return result;
}