diff options
author | Jarno Rajahalme <jarno@ovn.org> | 2017-02-23 11:27:54 -0800 |
---|---|---|
committer | Andy Zhou <azhou@ovn.org> | 2017-03-08 13:09:43 -0800 |
commit | 5dddf9606517b149c6a00aa3508acd1048fdae63 (patch) | |
tree | 87d088ba22f1624d5abf43416bf2e07fc1275283 /lib/dpif.h | |
parent | a89a38bac0d886a1c08f83c484fe56e343546772 (diff) | |
download | openvswitch-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.h | 13 |
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 *, |