aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2014-05-09 13:35:27 -0700
committerBen Pfaff <blp@nicira.com>2014-05-14 10:31:43 -0700
commit5469537be57efb7c49c848706fbe16772c11771d (patch)
tree50d922be58b4e915306d5d7c93ac93545dc21254 /include
parent37ab26e80c9510c0c5c0c184b381149afbdeb05a (diff)
Implement OpenFlow 1.4 port statistics.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'include')
-rw-r--r--include/openflow/openflow-1.4.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/openflow/openflow-1.4.h b/include/openflow/openflow-1.4.h
index d912161a3..4a18e1f30 100644
--- a/include/openflow/openflow-1.4.h
+++ b/include/openflow/openflow-1.4.h
@@ -156,6 +156,55 @@ struct ofp14_table_mod {
OFP_ASSERT(sizeof(struct ofp14_table_mod) == 8);
+/* ## ---------------- ## */
+/* ## ofp14_port_stats ## */
+/* ## ---------------- ## */
+
+enum ofp14_port_stats_prop_type {
+ OFPPSPT14_ETHERNET = 0, /* Ethernet property. */
+ OFPPSPT14_OPTICAL = 1, /* Optical property. */
+ OFPPSPT14_EXPERIMENTER = 0xFFFF, /* Experimenter property. */
+};
+
+struct ofp14_port_stats_prop_ethernet {
+ ovs_be16 type; /* OFPPSPT14_ETHERNET. */
+ ovs_be16 length; /* Length in bytes of this property. */
+ uint8_t pad[4]; /* Align to 64 bits. */
+
+ ovs_be64 rx_frame_err; /* Number of frame alignment errors. */
+ ovs_be64 rx_over_err; /* Number of packets with RX overrun. */
+ ovs_be64 rx_crc_err; /* Number of CRC errors. */
+ ovs_be64 collisions; /* Number of collisions. */
+};
+OFP_ASSERT(sizeof(struct ofp14_port_stats_prop_ethernet) == 40);
+
+struct ofp14_port_stats {
+ ovs_be16 length; /* Length of this entry. */
+ uint8_t pad[2]; /* Align to 64 bits. */
+ ovs_be32 port_no;
+ ovs_be32 duration_sec; /* Time port has been alive in seconds. */
+ ovs_be32 duration_nsec; /* Time port has been alive in nanoseconds beyond
+ duration_sec. */
+ ovs_be64 rx_packets; /* Number of received packets. */
+ ovs_be64 tx_packets; /* Number of transmitted packets. */
+ ovs_be64 rx_bytes; /* Number of received bytes. */
+ ovs_be64 tx_bytes; /* Number of transmitted bytes. */
+
+ ovs_be64 rx_dropped; /* Number of packets dropped by RX. */
+ ovs_be64 tx_dropped; /* Number of packets dropped by TX. */
+ ovs_be64 rx_errors; /* Number of receive errors. This is a super-set
+ of more specific receive errors and should be
+ greater than or equal to the sum of all
+ rx_*_err values in properties. */
+ ovs_be64 tx_errors; /* Number of transmit errors. This is a super-set
+ of more specific transmit errors and should be
+ greater than or equal to the sum of all
+ tx_*_err values (none currently defined.) */
+ /* Followed by 0 or more OFPPSPT14_* properties. */
+};
+OFP_ASSERT(sizeof(struct ofp14_port_stats) == 80);
+
+
/* ## -------------- ## */
/* ## Miscellaneous. ## */
/* ## -------------- ## */