diff options
author | Michal Weglicki <michalx.weglicki@intel.com> | 2018-01-09 07:55:37 +0000 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-01-10 15:29:13 -0800 |
commit | 971f4b394c6e8480300494787fe919869ff3886c (patch) | |
tree | 8dfa01877f05fbc46ebcc85d3c62f3c06e820ad0 /ofproto | |
parent | cd32509e4af4f9f7a002a6a5c137718f2173c538 (diff) | |
download | openvswitch-971f4b394c6e8480300494787fe919869ff3886c.tar.gz |
netdev: Custom statistics.
- New get_custom_stats interface function is added to netdev. It
allows particular netdev implementation to expose custom
counters in dictionary format (counter name/counter value).
- New statistics are retrieved using experimenter code and
are printed as a result to ofctl dump-ports.
- New counters are available for OpenFlow 1.4+.
- New statistics are printed to output via ofctl only if those
are present in reply message.
- New statistics definition is added to include/openflow/intel-ext.h.
- Custom statistics are implemented only for dpdk-physical
port type.
- DPDK-physical implementation uses xstats to collect statistics.
Only dropped and error counters are exposed.
Co-authored-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r-- | ofproto/ofproto.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 139fcf96e..d42acd747 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -3890,8 +3890,11 @@ append_port_stat(struct ofport *port, struct ovs_list *replies) * 'stats' to all-1s, which is correct for OpenFlow, and * netdev_get_stats() will log errors. */ ofproto_port_get_stats(port, &ops.stats); + netdev_get_custom_stats(port->netdev, &ops.custom_stats); ofputil_append_port_stat(replies, &ops); + + netdev_free_custom_stats_counters(&ops.custom_stats); } static void |