mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
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>
This commit is contained in:
@@ -5361,6 +5361,9 @@ get_stats_via_netlink(const struct netdev *netdev_, struct netdev_stats *stats)
|
||||
struct ofpbuf *reply;
|
||||
int error;
|
||||
|
||||
/* Filtering all counters by default */
|
||||
memset(stats, 0xFF, sizeof(struct netdev_stats));
|
||||
|
||||
ofpbuf_init(&request, 0);
|
||||
nl_msg_put_nlmsghdr(&request,
|
||||
sizeof(struct ifinfomsg) + NL_ATTR_SIZE(IFNAMSIZ),
|
||||
|
Reference in New Issue
Block a user