* [PATCH net-next v2] net: mana: Add get_link and get_link_ksettings in ethtool
@ 2024-09-30 5:42 Erni Sri Satya Vennela
2024-09-30 15:54 ` Simon Horman
2024-10-03 11:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Erni Sri Satya Vennela @ 2024-09-30 5:42 UTC (permalink / raw)
To: kys, haiyangz, wei.liu, decui, davem, edumazet, kuba, pabeni,
shradhagupta, leon, colin.i.king, ahmed.zaki, linux-hyperv,
netdev, linux-kernel
Cc: Erni Sri Satya Vennela
Add support for the ethtool get_link and get_link_ksettings
operations. Display standard port information using ethtool.
Before the change:
$ethtool enP30832s1
> No data available
After the change:
$ethtool enP30832s1
> Settings for enP30832s1:
Supported ports: [ ]
Supported link modes: Not reported
Supported pause frame use: No
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Full
Auto-negotiation: off
Port: Other
PHYAD: 0
Transceiver: internal
Link detected: yes
Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
---
Changes in v2:
* Remove support for displaying auto-negotiation details
* Change PORT_DA to PORT_OTHER
---
drivers/net/ethernet/microsoft/mana/mana_ethtool.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/ethernet/microsoft/mana/mana_ethtool.c b/drivers/net/ethernet/microsoft/mana/mana_ethtool.c
index dc3864377538..349f11bf8e64 100644
--- a/drivers/net/ethernet/microsoft/mana/mana_ethtool.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_ethtool.c
@@ -443,6 +443,15 @@ static int mana_set_ringparam(struct net_device *ndev,
return err;
}
+static int mana_get_link_ksettings(struct net_device *ndev,
+ struct ethtool_link_ksettings *cmd)
+{
+ cmd->base.duplex = DUPLEX_FULL;
+ cmd->base.port = PORT_OTHER;
+
+ return 0;
+}
+
const struct ethtool_ops mana_ethtool_ops = {
.get_ethtool_stats = mana_get_ethtool_stats,
.get_sset_count = mana_get_sset_count,
@@ -456,4 +465,6 @@ const struct ethtool_ops mana_ethtool_ops = {
.set_channels = mana_set_channels,
.get_ringparam = mana_get_ringparam,
.set_ringparam = mana_set_ringparam,
+ .get_link_ksettings = mana_get_link_ksettings,
+ .get_link = ethtool_op_get_link,
};
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next v2] net: mana: Add get_link and get_link_ksettings in ethtool
2024-09-30 5:42 [PATCH net-next v2] net: mana: Add get_link and get_link_ksettings in ethtool Erni Sri Satya Vennela
@ 2024-09-30 15:54 ` Simon Horman
2024-10-03 11:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-09-30 15:54 UTC (permalink / raw)
To: Erni Sri Satya Vennela
Cc: kys, haiyangz, wei.liu, decui, davem, edumazet, kuba, pabeni,
shradhagupta, leon, colin.i.king, ahmed.zaki, linux-hyperv,
netdev, linux-kernel
On Sun, Sep 29, 2024 at 10:42:14PM -0700, Erni Sri Satya Vennela wrote:
> Add support for the ethtool get_link and get_link_ksettings
> operations. Display standard port information using ethtool.
>
> Before the change:
> $ethtool enP30832s1
> > No data available
>
> After the change:
> $ethtool enP30832s1
> > Settings for enP30832s1:
> Supported ports: [ ]
> Supported link modes: Not reported
> Supported pause frame use: No
> Supports auto-negotiation: No
> Supported FEC modes: Not reported
> Advertised link modes: Not reported
> Advertised pause frame use: No
> Advertised auto-negotiation: No
> Advertised FEC modes: Not reported
> Speed: Unknown!
> Duplex: Full
> Auto-negotiation: off
> Port: Other
> PHYAD: 0
> Transceiver: internal
> Link detected: yes
>
> Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
> Reviewed-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
> ---
> Changes in v2:
> * Remove support for displaying auto-negotiation details
> * Change PORT_DA to PORT_OTHER
Thanks, this version looks good to me.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2] net: mana: Add get_link and get_link_ksettings in ethtool
2024-09-30 5:42 [PATCH net-next v2] net: mana: Add get_link and get_link_ksettings in ethtool Erni Sri Satya Vennela
2024-09-30 15:54 ` Simon Horman
@ 2024-10-03 11:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-03 11:50 UTC (permalink / raw)
To: Erni Sri Satya Vennela
Cc: kys, haiyangz, wei.liu, decui, davem, edumazet, kuba, pabeni,
shradhagupta, leon, colin.i.king, ahmed.zaki, linux-hyperv,
netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Sun, 29 Sep 2024 22:42:14 -0700 you wrote:
> Add support for the ethtool get_link and get_link_ksettings
> operations. Display standard port information using ethtool.
>
> Before the change:
> $ethtool enP30832s1
> > No data available
>
> [...]
Here is the summary with links:
- [net-next,v2] net: mana: Add get_link and get_link_ksettings in ethtool
https://git.kernel.org/netdev/net-next/c/c30a3f54e661
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-03 11:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 5:42 [PATCH net-next v2] net: mana: Add get_link and get_link_ksettings in ethtool Erni Sri Satya Vennela
2024-09-30 15:54 ` Simon Horman
2024-10-03 11:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).