net: ethtool: set a default driver name
Subsystems (3)
PATCH v3 1/1 net: ethtool: set a default driver name
From: Tonghao Zhang <[email protected]>
The netdev (e.g. ifb, bareudp), which not support ethtool ops (e.g. .get_drvinfo), we can use the rtnl kind as a default name.
ifb netdev may be created by others prefix, not ifbX.
---
v2: remove unnecessary white line
v1: https://lore.kernel.org/all/20211124181858.6c4668db@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/
--- net/ethtool/ioctl.c | 3 +++ 1 file changed, 3 insertions(+)
net/ethtool/ioctl.c +3 -0
@@ -734,6 +734,9 @@ ethtool_get_drvinfo(struct net_device *dev, struct ethtool_devlink_compat *rsp) sizeof(rsp->info.bus_info));strlcpy (rsp->info.driver, dev->dev.parent->driver->name,sizeof (rsp->info.driver)); + }else if (dev->rtnl_link_ops) { +strlcpy (rsp->info.driver, dev->rtnl_link_ops->kind, +sizeof (rsp->info.driver)); }else {return -EOPNOTSUPP ; }
Signature · 1 line
2.27.0
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Fri, 26 Nov 2021 00:30:49 +0800 you wrote:
From: Tonghao Zhang <[email protected]>
The netdev (e.g. ifb, bareudp), which not support ethtool ops (e.g. .get_drvinfo), we can use the rtnl kind as a default name.
ifb netdev may be created by others prefix, not ifbX.
[...]
Here is the summary with links:
- [net-next,v3] net: ethtool: set a default driver name
https://git.kernel.org/netdev/net-next/c/bde3b0fd8055
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html