* [net-next v3] net: ethtool: set a default driver name
@ 2021-11-25 16:30 xiangxia.m.yue
2021-11-27 0:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: xiangxia.m.yue @ 2021-11-25 16:30 UTC (permalink / raw)
To: netdev
Cc: Tonghao Zhang, David S. Miller, Jakub Kicinski, Leon Romanovsky,
Arnd Bergmann, Hao Chen, Heiner Kallweit, Gustavo A. R. Silva,
Danielle Ratson, Andrew Lunn, Leon Romanovsky
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
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.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Hao Chen <chenhao288@hisilicon.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Danielle Ratson <danieller@nvidia.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
---
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(+)
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index af2d4e022076..3d7bff407580 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -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;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [net-next v3] net: ethtool: set a default driver name
2021-11-25 16:30 [net-next v3] net: ethtool: set a default driver name xiangxia.m.yue
@ 2021-11-27 0:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-27 0:50 UTC (permalink / raw)
To: Tonghao Zhang
Cc: netdev, davem, kuba, leon, arnd, chenhao288, hkallweit1,
gustavoars, danieller, andrew, leonro
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 26 Nov 2021 00:30:49 +0800 you wrote:
> From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
>
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-27 0:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 16:30 [net-next v3] net: ethtool: set a default driver name xiangxia.m.yue
2021-11-27 0:50 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.