mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 22:35:15 +00:00
utilities: Add netlink flow operation USDT probes and upcall_cost script.
This patch adds a series of NetLink flow operation USDT probes. These probes are in turn used in the upcall_cost Python script, which in addition of some kernel tracepoints, give an insight into the time spent on processing upcall. Signed-off-by: Eelco Chaudron <echaudro@redhat.com> Acked-by: Paolo Valerio <pvalerio@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
51ec98635e
commit
85d3785e6a
@@ -56,6 +56,7 @@
|
||||
#include "openvswitch/poll-loop.h"
|
||||
#include "openvswitch/shash.h"
|
||||
#include "openvswitch/thread.h"
|
||||
#include "openvswitch/usdt-probes.h"
|
||||
#include "openvswitch/vlog.h"
|
||||
#include "packets.h"
|
||||
#include "random.h"
|
||||
@@ -2052,6 +2053,9 @@ dpif_netlink_operate__(struct dpif_netlink *dpif,
|
||||
aux->txn.reply = &aux->reply;
|
||||
}
|
||||
dpif_netlink_flow_to_ofpbuf(&flow, &aux->request);
|
||||
|
||||
OVS_USDT_PROBE(dpif_netlink_operate__, op_flow_put,
|
||||
dpif, put, &flow, &aux->request);
|
||||
break;
|
||||
|
||||
case DPIF_OP_FLOW_DEL:
|
||||
@@ -2062,6 +2066,9 @@ dpif_netlink_operate__(struct dpif_netlink *dpif,
|
||||
aux->txn.reply = &aux->reply;
|
||||
}
|
||||
dpif_netlink_flow_to_ofpbuf(&flow, &aux->request);
|
||||
|
||||
OVS_USDT_PROBE(dpif_netlink_operate__, op_flow_del,
|
||||
dpif, del, &flow, &aux->request);
|
||||
break;
|
||||
|
||||
case DPIF_OP_EXECUTE:
|
||||
@@ -2082,6 +2089,12 @@ dpif_netlink_operate__(struct dpif_netlink *dpif,
|
||||
} else {
|
||||
dpif_netlink_encode_execute(dpif->dp_ifindex, &op->execute,
|
||||
&aux->request);
|
||||
|
||||
OVS_USDT_PROBE(dpif_netlink_operate__, op_flow_execute,
|
||||
dpif, &op->execute,
|
||||
dp_packet_data(op->execute.packet),
|
||||
dp_packet_size(op->execute.packet),
|
||||
&aux->request);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2090,6 +2103,9 @@ dpif_netlink_operate__(struct dpif_netlink *dpif,
|
||||
dpif_netlink_init_flow_get(dpif, get, &flow);
|
||||
aux->txn.reply = get->buffer;
|
||||
dpif_netlink_flow_to_ofpbuf(&flow, &aux->request);
|
||||
|
||||
OVS_USDT_PROBE(dpif_netlink_operate__, op_flow_get,
|
||||
dpif, get, &flow, &aux->request);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user