Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1347920
| From | Jiri Pirko <jiri@resnulli.us> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] net: mellanox: add DEVLINK dependencies |
| Date | 2016-03-02 11:20 +0100 |
| Message-ID | <r8c2R-6eY-9@gated-at.bofh.it> (permalink) |
| References | <r8bzQ-5NZ-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Wed, Mar 02, 2016 at 10:40:54AM CET, arnd@arndb.de wrote: >The new NET_DEVLINK infrastructure can be a loadable module, but the drivers >using it might be built-in, which causes link errors like: > >drivers/net/built-in.o: In function `mlx4_load_one': >:(.text+0x2fbfda): undefined reference to `devlink_port_register' >:(.text+0x2fc084): undefined reference to `devlink_port_unregister' >drivers/net/built-in.o: In function `mlxsw_sx_port_remove': >:(.text+0x33a03a): undefined reference to `devlink_port_type_clear' >:(.text+0x33a04e): undefined reference to `devlink_port_unregister' > >There are multiple ways to avoid this: > >a) add 'depends on NET_DEVLINK || !NET_DEVLINK' dependencies > for each user >b) use 'select NET_DEVLINK' from each driver that uses it > and hide the symbol in Kconfig. >c) make NET_DEVLINK a 'bool' option so we don't have to > list it as a dependency, and rely on the APIs to be > stubbed out when it is disabled >d) use IS_REACHABLE() rather than IS_ENABLED() to check for > NET_DEVLINK in include/net/devlink.h > >This implements a variation of approach a) by adding an >intermediate symbol that drivers can depend on, and changes >the three drivers using it. Approach a) looks like the best. Thanks for taking care of this. > >Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Jiri Pirko <jiri@mellanox.com>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] net: mellanox: add DEVLINK dependencies Arnd Bergmann <arnd@arndb.de> - 2016-03-02 10:50 +0100 Re: [PATCH] net: mellanox: add DEVLINK dependencies Jiri Pirko <jiri@resnulli.us> - 2016-03-02 11:20 +0100 Re: [PATCH] net: mellanox: add DEVLINK dependencies David Miller <davem@davemloft.net> - 2016-03-03 22:50 +0100
csiph-web