mirror of
https://github.com/jsimonetti/rtnetlink.git
synced 2026-03-27 06:51:07 +01:00
Add support for decoding Virtual Function (VF) information from netlink messages. This enables users to retrieve SR-IOV VF details when querying network interfaces. The implementation adds: - VFStats struct containing per-VF traffic statistics (packets, bytes, broadcast, multicast, dropped counters for both RX and TX) - VFInfo struct containing VF configuration (MAC address, VLAN, QoS, TX rate limits, spoof check, link state, RSS query, trust settings) - VFLinkState type with Auto/Enable/Disable constants - NumVF and VFInfoList fields to LinkAttributes - Decoding logic for IFLA_NUM_VF and IFLA_VFINFO_LIST nested attributes The VF information follows the kernel's nested attribute structure. This is useful for monitoring and managing SR-IOV enabled network interfaces where the Physical Function (PF) exposes multiple Virtual Functions to guest VMs or containers. Signed-off-by: Anthony Harivel <aharivel@redhat.com>