forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> [[email protected] made software devices more consistent] Signed-off-by: Ben Pfaff <[email protected]>
- Loading branch information
Showing
17 changed files
with
563 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* Copyright(c) 2016 Intel Corporation. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef OPENFLOW_INTEL_EXT_H | ||
#define OPENFLOW_INTEL_EXT_H | ||
|
||
/* This file presents Intel vendor extension. It is not anyhow | ||
* standardized, so all those definitions are not part of | ||
* official openflow headers (openflow.h). Nevertheless below | ||
* features introduces real value so it could be suitable for | ||
* standardization */ | ||
|
||
/* Intel extended statistics type */ | ||
|
||
enum intel_port_stats_subtype { | ||
INTEL_PORT_STATS_RFC2819 = 1, | ||
}; | ||
|
||
#define INTEL_PORT_STATS_RFC2819_SIZE 184 | ||
|
||
/* Struct implements custom property type based on | ||
* 'ofp_prop_experimenter'. */ | ||
struct intel_port_stats_rfc2819 { | ||
ovs_be16 type; /* OFPPSPT14_EXPERIMENTER. */ | ||
ovs_be16 length; /* Length in bytes of this property excluding | ||
* trailing padding. */ | ||
ovs_be32 experimenter; /* INTEL_VENDOR_ID. */ | ||
ovs_be32 exp_type; /* INTEL_PORT_STATS_*. */ | ||
|
||
uint8_t pad[4]; | ||
|
||
ovs_be64 rx_1_to_64_packets; | ||
ovs_be64 rx_65_to_127_packets; | ||
ovs_be64 rx_128_to_255_packets; | ||
ovs_be64 rx_256_to_511_packets; | ||
ovs_be64 rx_512_to_1023_packets; | ||
ovs_be64 rx_1024_to_1522_packets; | ||
ovs_be64 rx_1523_to_max_packets; | ||
|
||
ovs_be64 tx_1_to_64_packets; | ||
ovs_be64 tx_65_to_127_packets; | ||
ovs_be64 tx_128_to_255_packets; | ||
ovs_be64 tx_256_to_511_packets; | ||
ovs_be64 tx_512_to_1023_packets; | ||
ovs_be64 tx_1024_to_1522_packets; | ||
ovs_be64 tx_1523_to_max_packets; | ||
|
||
ovs_be64 tx_multicast_packets; | ||
ovs_be64 rx_broadcast_packets; | ||
ovs_be64 tx_broadcast_packets; | ||
ovs_be64 rx_undersized_errors; | ||
ovs_be64 rx_oversize_errors; | ||
ovs_be64 rx_fragmented_errors; | ||
ovs_be64 rx_jabber_errors; | ||
|
||
}; | ||
OFP_ASSERT(sizeof (struct intel_port_stats_rfc2819) == | ||
INTEL_PORT_STATS_RFC2819_SIZE); | ||
|
||
#endif /* openflow/intel-ext.h */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.