summaryrefslogtreecommitdiff
path: root/vswitchd
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 /vswitchd
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 'vswitchd')
-rw-r--r--vswitchd/bridge.c45
1 files changed, 33 insertions, 12 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index b4e5ea7ff..41ec4ba9a 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -2310,18 +2310,39 @@ static void
iface_refresh_stats(struct iface *iface)
{
#define IFACE_STATS \
- IFACE_STAT(rx_packets, "rx_packets") \
- IFACE_STAT(tx_packets, "tx_packets") \
- IFACE_STAT(rx_bytes, "rx_bytes") \
- IFACE_STAT(tx_bytes, "tx_bytes") \
- IFACE_STAT(rx_dropped, "rx_dropped") \
- IFACE_STAT(tx_dropped, "tx_dropped") \
- IFACE_STAT(rx_errors, "rx_errors") \
- IFACE_STAT(tx_errors, "tx_errors") \
- IFACE_STAT(rx_frame_errors, "rx_frame_err") \
- IFACE_STAT(rx_over_errors, "rx_over_err") \
- IFACE_STAT(rx_crc_errors, "rx_crc_err") \
- IFACE_STAT(collisions, "collisions")
+ IFACE_STAT(rx_packets, "rx_packets") \
+ IFACE_STAT(tx_packets, "tx_packets") \
+ IFACE_STAT(rx_bytes, "rx_bytes") \
+ IFACE_STAT(tx_bytes, "tx_bytes") \
+ IFACE_STAT(rx_dropped, "rx_dropped") \
+ IFACE_STAT(tx_dropped, "tx_dropped") \
+ IFACE_STAT(rx_errors, "rx_errors") \
+ IFACE_STAT(tx_errors, "tx_errors") \
+ IFACE_STAT(rx_frame_errors, "rx_frame_err") \
+ IFACE_STAT(rx_over_errors, "rx_over_err") \
+ IFACE_STAT(rx_crc_errors, "rx_crc_err") \
+ IFACE_STAT(collisions, "collisions") \
+ IFACE_STAT(rx_1_to_64_packets, "rx_1_to_64_packets") \
+ IFACE_STAT(rx_65_to_127_packets, "rx_65_to_127_packets") \
+ IFACE_STAT(rx_128_to_255_packets, "rx_128_to_255_packets") \
+ IFACE_STAT(rx_256_to_511_packets, "rx_256_to_511_packets") \
+ IFACE_STAT(rx_512_to_1023_packets, "rx_512_to_1023_packets") \
+ IFACE_STAT(rx_1024_to_1522_packets, "rx_1024_to_1518_packets") \
+ IFACE_STAT(rx_1523_to_max_packets, "rx_1523_to_max_packets") \
+ IFACE_STAT(tx_1_to_64_packets, "tx_1_to_64_packets") \
+ IFACE_STAT(tx_65_to_127_packets, "tx_65_to_127_packets") \
+ IFACE_STAT(tx_128_to_255_packets, "tx_128_to_255_packets") \
+ IFACE_STAT(tx_256_to_511_packets, "tx_256_to_511_packets") \
+ IFACE_STAT(tx_512_to_1023_packets, "tx_512_to_1023_packets") \
+ IFACE_STAT(tx_1024_to_1522_packets, "tx_1024_to_1518_packets") \
+ IFACE_STAT(tx_1523_to_max_packets, "tx_1523_to_max_packets") \
+ IFACE_STAT(tx_multicast_packets, "tx_multicast_packets") \
+ IFACE_STAT(rx_broadcast_packets, "rx_broadcast_packets") \
+ IFACE_STAT(tx_broadcast_packets, "tx_broadcast_packets") \
+ IFACE_STAT(rx_undersized_errors, "rx_undersized_errors") \
+ IFACE_STAT(rx_oversize_errors, "rx_oversize_errors") \
+ IFACE_STAT(rx_fragmented_errors, "rx_fragmented_errors") \
+ IFACE_STAT(rx_jabber_errors, "rx_jabber_errors")
#define IFACE_STAT(MEMBER, NAME) + 1
enum { N_IFACE_STATS = IFACE_STATS };