ixgbe: report link state for VF devices
authorOvidiu Panait <ovidiu.panait@windriver.com>
Fri, 8 Dec 2023 12:00:57 +0000 (14:00 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 2 Jan 2024 21:30:26 +0000 (13:30 -0800)
The link state of VF devices can be controlled via "ip link set", but the
current state (auto/disabled) is not reported by "ip link show".

Update ixgbe_ndo_get_vf_config() to make this info available to userspace.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c

index f8c6ca9fea825f8ba859702fc533df242015c67f..114c85336187b08c1f0c93520415780e27d98c47 100644 (file)
@@ -1847,5 +1847,6 @@ int ixgbe_ndo_get_vf_config(struct net_device *netdev,
        ivi->spoofchk = adapter->vfinfo[vf].spoofchk_enabled;
        ivi->rss_query_en = adapter->vfinfo[vf].rss_query_enabled;
        ivi->trusted = adapter->vfinfo[vf].trusted;
+       ivi->linkstate = adapter->vfinfo[vf].link_state;
        return 0;
 }