summaryrefslogtreecommitdiff
path: root/lib/dpif.h
diff options
context:
space:
mode:
authorJarno Rajahalme <jarno@ovn.org>2017-02-23 11:27:54 -0800
committerAndy Zhou <azhou@ovn.org>2017-03-08 13:09:43 -0800
commit5dddf9606517b149c6a00aa3508acd1048fdae63 (patch)
tree87d088ba22f1624d5abf43416bf2e07fc1275283 /lib/dpif.h
parenta89a38bac0d886a1c08f83c484fe56e343546772 (diff)
downloadopenvswitch-5dddf9606517b149c6a00aa3508acd1048fdae63.tar.gz
dpif: Meter framework.
Add DPIF-level infrastructure for meters. Allow meter_set to modify the meter configuration (e.g. set the burst size if unspecified). Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Signed-off-by: Andy Zhou <azhou@ovn.org>
Diffstat (limited to 'lib/dpif.h')
-rw-r--r--lib/dpif.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/dpif.h b/lib/dpif.h
index d5b4b5827..f81d9fef0 100644
--- a/lib/dpif.h
+++ b/lib/dpif.h
@@ -389,9 +389,10 @@
#include <stdint.h>
#include "dpdk.h"
-#include "netdev.h"
#include "dp-packet.h"
+#include "netdev.h"
#include "openflow/openflow.h"
+#include "openvswitch/ofp-util.h"
#include "ovs-numa.h"
#include "packets.h"
#include "util.h"
@@ -856,6 +857,16 @@ void dpif_disable_upcall(struct dpif *);
void dpif_print_packet(struct dpif *, struct dpif_upcall *);
+/* Meters. */
+void dpif_meter_get_features(const struct dpif *,
+ struct ofputil_meter_features *);
+int dpif_meter_set(struct dpif *, ofproto_meter_id *meter_id,
+ struct ofputil_meter_config *);
+int dpif_meter_get(const struct dpif *, ofproto_meter_id meter_id,
+ struct ofputil_meter_stats *, uint16_t n_bands);
+int dpif_meter_del(struct dpif *, ofproto_meter_id meter_id,
+ struct ofputil_meter_stats *, uint16_t n_bands);
+
/* Miscellaneous. */
void dpif_get_netflow_ids(const struct dpif *,