Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[network metrics] instance network interface metrics (#747)
Overview ======== This is related to the ongoing work in [plumbing instance/guest metrics](#742) through to an oximeter producer in propolis. Includes: * An update to `NetworkInterfaceRequest` to include an interface_id, which is part of the request on the [sled instance in Omicron](oxidecomputer/omicron#6414). * Within initialization, with concrete types, we create interface_ids mapping nic UUIDs => `minor` number of the device instance of viona. This is done as a Vec because it is limited in size (typically the MAX networks interfaces per VM). - The device instance number matches the Kstat we'll look for. - We track this mapping via a type alias `NetworkInterfaceIds` which is then passed to a `track_network_interfaces_kstats` function which is part of `initialize_network_devices` and adds the target to the kstat sampler. * A new stats module for collecting network_interface metrics. - In `to_samples` we generate multiple network interface targets based on vnics per instance, appropriately updating the `interface_id`, which comes from the network interface identifiers updated in network device initialization. * Move kstat_types out of virtual machine-specific stats and use its mocking for other stats tests * move stats.rs to stats/mod.rs Dependencies ------------ - [X] oxidecomputer/omicron#6414 - [X] https://code.illumos.org/c/illumos-gate/+/3630 Thanks to @pfmooney for exposing kstats directly through the viona (VirtIO-Net) driver as part of https://code.illumos.org/c/illumos-gate/+/3630. This work would be nothing without his!
- Loading branch information