octeontx2_pf: Select NET_DEVLINK when enabling OCTEONTX2_PF
Subsystems (2)
PATCH v2 1/1 octeontx2_pf: Select NET_DEVLINK when enabling OCTEONTX2_PF
When using COMPILE_TEST, the driver controlled by OCTEONTX2_PF does not select NET_DEVLINK while the related OCTEONTX2_AF driver does. This means that when OCTEONTX2_PF is enabled from a default configuration, linker errors will occur due to undefined references to code controlled by NET_DEVLINK.
1. make.cross ARCH=x86_64 defconfig
2. make.cross ARCH=x86_64 menuconfig
3. Enable COMPILE_TEST
General setup --->
Compile also drivers which will not load
4. Enable OCTEONTX2_PF
Device Drivers --->
Network device support --->
Ethernet driver support --->
Marvell OcteonTX2 NIC Physical Function driver5. Exit and save configuration. NET_DEVLINK will still be disabled.
6. make.cross ARCH=x86_64 several linker errors, for example,
ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.o:
in function `otx2_register_dl':
otx2_devlink.c:(.text+0x142): undefined reference to `devlink_alloc_ns'
This fix adds "select NET_DEVLINK" link to OCTEONTX2_PF's Kconfig specification to match OCTEONTX2_AF.
---
v1 -> v2: Added the fixes tag
drivers/net/ethernet/marvell/octeontx2/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/marvell/octeontx2/Kconfig +1 -0
@@ -31,6 +31,7 @@ config NDC_DIS_DYNAMIC_CACHING config OCTEONTX2_PF tristate "Marvell OcteonTX2 NIC Physical Function driver" select OCTEONTX2_MBOX + select NET_DEVLINK depends on (64BIT && COMPILE_TEST) || ARM64 depends on PCI depends on PTP_1588_CLOCK_OPTIONAL
Signature · 1 line
2.25.1
Jakub Kicinski
maintainerQuoted 5 lines · On Mon, 19 Dec 2022 12:19:11 -0500 Paul Gazzillo wrote:
When using
COMPILE_TEST, the driver controlled byOCTEONTX2_PFdoes not selectNET_DEVLINKwhile the relatedOCTEONTX2_AFdriver does. This means that whenOCTEONTX2_PFis enabled from a default configuration, linker errors will occur due to undefined references to code controlled byNET_DEVLINK.
This has been fixed a long time ago by 9cbc3367968d ("octeontx2-pf:
select CONFIG_NET_DEVLINK") no?
Quoted 9 lines · Jakub Kicinski
Quoted 5 lines · On Mon, 19 Dec 2022 12:19:11 -0500 Paul Gazzillo wrote:
When using
COMPILE_TEST, the driver controlled byOCTEONTX2_PFdoes not selectNET_DEVLINKwhile the relatedOCTEONTX2_AFdriver does. This means that whenOCTEONTX2_PFis enabled from a default configuration, linker errors will occur due to undefined references to code controlled byNET_DEVLINK.This has been fixed a long time ago by
9cbc3367968d("octeontx2-pf:
selectCONFIG_NET_DEVLINK") no?
You are right. My apologies. I was looking at an older kernel.