Skip to contentSkip to conversation

ixgbe: report link state for VF devices

PATCH Superseded [email protected] 2 participants 2 messages Dec 8, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ixgbe: report link state for VF devices

From: Ovidiu Panait <[email protected]>

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.

Fixes 366fd1000995 ("ixgbe: add the ability for the PF to disable VF link state")
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +1 -0
index 9cfdfa8a4355..21b18d2f0d55 100644
@@ -1849,5 +1849,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;
 }
Signature · 6 lines
2.34.1

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · On 12/8/23 11:03, [email protected] wrote:

From: Ovidiu Panait <[email protected]>

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.

Fixes 366fd1000995 ("ixgbe: add the ability for the PF to disable VF link state")

I would say that your commit extends ixgbe functionality, and is not a bugfix. For such cases you should avoid Fixes: tag (just mentioning commit "that introduced the code/ndo" is fine). With that, you could also specify the tree as "iwl-next", what will also clarify that you want Intel VAL to process this patch prior to application.

Quoted 10 lines
---
  drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 1 +
  1 file changed, 1 insertion(+)
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +0 -0
index 9cfdfa8a4355..21b18d2f0d55 100644

drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c int ixgbe_ndo_get_vf_config(struct net_device *netdev, · line 1854

Quoted 6 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +1 -0
@@ -1849,5 +1849,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;
  }

code looks fine,

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan