net: devlink: turn devlink into a built-in
Being able to build devlink as a module causes growing pains. First all drivers had to add a meta dependency to make sure they are not built in when devlink is built as a module. Now we are struggling to invoke ethtool compat code reliably. Make devlink code built-in, users can still not build it at all but the dynamically loadable module option is removed. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
此提交包含在:
11
net/Kconfig
11
net/Kconfig
@@ -429,21 +429,12 @@ config NET_SOCK_MSG
|
||||
with the help of BPF programs.
|
||||
|
||||
config NET_DEVLINK
|
||||
tristate "Network physical/parent device Netlink interface"
|
||||
bool "Network physical/parent device Netlink interface"
|
||||
help
|
||||
Network physical/parent device Netlink interface provides
|
||||
infrastructure to support access to physical chip-wide config and
|
||||
monitoring.
|
||||
|
||||
config MAY_USE_DEVLINK
|
||||
tristate
|
||||
default m if NET_DEVLINK=m
|
||||
default y if NET_DEVLINK=y || NET_DEVLINK=n
|
||||
help
|
||||
Drivers using the devlink infrastructure should have a dependency
|
||||
on MAY_USE_DEVLINK to ensure they do not cause link errors when
|
||||
devlink is a loadable module and the driver using it is built-in.
|
||||
|
||||
config PAGE_POOL
|
||||
bool
|
||||
|
||||
|
@@ -6482,20 +6482,9 @@ int devlink_compat_flash_update(struct net_device *dev, const char *file_name)
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static int __init devlink_module_init(void)
|
||||
static int __init devlink_init(void)
|
||||
{
|
||||
return genl_register_family(&devlink_nl_family);
|
||||
}
|
||||
|
||||
static void __exit devlink_module_exit(void)
|
||||
{
|
||||
genl_unregister_family(&devlink_nl_family);
|
||||
}
|
||||
|
||||
module_init(devlink_module_init);
|
||||
module_exit(devlink_module_exit);
|
||||
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Jiri Pirko <jiri@mellanox.com>");
|
||||
MODULE_DESCRIPTION("Network physical device Netlink interface");
|
||||
MODULE_ALIAS_GENL_FAMILY(DEVLINK_GENL_NAME);
|
||||
subsys_initcall(devlink_init);
|
||||
|
@@ -6,7 +6,7 @@ config HAVE_NET_DSA
|
||||
|
||||
config NET_DSA
|
||||
tristate "Distributed Switch Architecture"
|
||||
depends on HAVE_NET_DSA && MAY_USE_DEVLINK
|
||||
depends on HAVE_NET_DSA
|
||||
depends on BRIDGE || BRIDGE=n
|
||||
select NET_SWITCHDEV
|
||||
select PHYLINK
|
||||
|
新增問題並參考
封鎖使用者