mirror of
https://github.com/openvswitch/ovs
synced 2025-10-21 14:49:41 +00:00
ofproto: Querying port stats for individual ports (OpenFlow 1.0)
OpenFlow 1.0 adds "port_no" field to the Port Stat request messages to allow stats for individual ports to be queried. Port stats for all ports can still be requested by specifying OFPP_NONE as the port number. NOTE: OVS at this point is not wire-compatible with OpenFlow 1.0 until the final commit in this OpenFlow 1.0 set.
This commit is contained in:
@@ -693,7 +693,7 @@ enum ofp_stats_types {
|
||||
OFPST_TABLE,
|
||||
|
||||
/* Physical port statistics.
|
||||
* The request body is empty.
|
||||
* The request body is struct ofp_port_stats_request.
|
||||
* The reply body is an array of struct ofp_port_stats. */
|
||||
OFPST_PORT,
|
||||
|
||||
@@ -807,6 +807,15 @@ struct ofp_table_stats {
|
||||
};
|
||||
OFP_ASSERT(sizeof(struct ofp_table_stats) == 64);
|
||||
|
||||
/* Body for ofp_stats_request of type OFPST_PORT. */
|
||||
struct ofp_port_stats_request {
|
||||
uint16_t port_no; /* OFPST_PORT message may request statistics
|
||||
for a single port (specified with port_no)
|
||||
or for all ports (port_no == OFPP_NONE). */
|
||||
uint8_t pad[6];
|
||||
};
|
||||
OFP_ASSERT(sizeof(struct ofp_port_stats_request) == 8);
|
||||
|
||||
/* Body of reply to OFPST_PORT request. If a counter is unsupported, set
|
||||
* the field to all ones. */
|
||||
struct ofp_port_stats {
|
||||
|
Reference in New Issue
Block a user