summaryrefslogtreecommitdiff
path: root/include/openvswitch
diff options
context:
space:
mode:
authormweglicx <michalx.weglicki@intel.com>2016-05-05 09:46:01 +0100
committerBen Pfaff <blp@ovn.org>2016-05-06 15:28:56 -0700
commitd6e3feb57c44e18580015d8e99dd751cff4f2c9e (patch)
tree2d243eed928b2b3fad094e9990f98713176adbc4 /include/openvswitch
parent104aec4e0c57bc92a3c22cea9dff69f74adda861 (diff)
downloadopenvswitch-d6e3feb57c44e18580015d8e99dd751cff4f2c9e.tar.gz
Add support for extended netdev statistics based on RFC 2819.
Implementation of new statistics extension for DPDK ports: - Add new counters definition to netdev struct and open flow, based on RFC2819. - Initialize netdev statistics as "filtered out" before passing it to particular netdev implementation (because of that change, statistics which are not collected are reported as filtered out, and some unit tests were modified in this respect). - 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+. - Add new vendor id: INTEL_VENDOR_ID. - New statistics are printed to output via ofctl only if those are present in reply message. - Add new file header: include/openflow/intel-ext.h which contains new statistics definition. - Extended statistics are implemented only for dpdk-physical and dpdk-vhost port types. - Dpdk-physical implementation uses xstats to collect statistics. - Dpdk-vhost implements only part of statistics (RX packet sized based counters). Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> [blp@ovn.org made software devices more consistent] Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'include/openvswitch')
-rw-r--r--include/openvswitch/netdev.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/openvswitch/netdev.h b/include/openvswitch/netdev.h
index fa5e8f289..88a25dd25 100644
--- a/include/openvswitch/netdev.h
+++ b/include/openvswitch/netdev.h
@@ -52,6 +52,33 @@ struct netdev_stats {
uint64_t tx_fifo_errors;
uint64_t tx_heartbeat_errors;
uint64_t tx_window_errors;
+
+ /* Extended statistics based on RFC2819. */
+ uint64_t rx_1_to_64_packets;
+ uint64_t rx_65_to_127_packets;
+ uint64_t rx_128_to_255_packets;
+ uint64_t rx_256_to_511_packets;
+ uint64_t rx_512_to_1023_packets;
+ uint64_t rx_1024_to_1522_packets;
+ uint64_t rx_1523_to_max_packets;
+
+ uint64_t tx_1_to_64_packets;
+ uint64_t tx_65_to_127_packets;
+ uint64_t tx_128_to_255_packets;
+ uint64_t tx_256_to_511_packets;
+ uint64_t tx_512_to_1023_packets;
+ uint64_t tx_1024_to_1522_packets;
+ uint64_t tx_1523_to_max_packets;
+
+ uint64_t tx_multicast_packets;
+
+ uint64_t rx_broadcast_packets;
+ uint64_t tx_broadcast_packets;
+
+ uint64_t rx_undersized_errors;
+ uint64_t rx_oversize_errors;
+ uint64_t rx_fragmented_errors;
+ uint64_t rx_jabber_errors;
};
/* Features. */