diff mbox series

octeontx2_pf: Select NET_DEVLINK when enabling OCTEONTX2_PF

Message ID 20221216215509.821591-1-paul@pgazz.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series octeontx2_pf: Select NET_DEVLINK when enabling OCTEONTX2_PF | expand

Checks

Context Check Description
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Paul Gazzillo Dec. 16, 2022, 9:54 p.m. UTC
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 driver
5. 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.

Signed-off-by: Paul Gazzillo <paul@pgazz.com>
---
 drivers/net/ethernet/marvell/octeontx2/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Jakub Kicinski Dec. 17, 2022, 5:29 a.m. UTC | #1
On Fri, 16 Dec 2022 16:54:48 -0500 Paul Gazzillo wrote:
> This fix adds "select NET_DEVLINK" link to OCTEONTX2_PF's Kconfig
> specification to match OCTEONTX2_AF.

Where was the use of devlink introduced in OCTEONTX2_PF?
Could you provide a Fixes tag?
Paul Gazzillo Dec. 19, 2022, 5:08 p.m. UTC | #2
On 12/16/2022, Jakub Kicinski wrote:
> On Fri, 16 Dec 2022 16:54:48 -0500 Paul Gazzillo wrote:
> > This fix adds "select NET_DEVLINK" link to OCTEONTX2_PF's Kconfig
> > specification to match OCTEONTX2_AF.
> 
> Where was the use of devlink introduced in OCTEONTX2_PF?
> Could you provide a Fixes tag?

It looks like it was introduced in

  2da489432747 ("octeontx2-pf: devlink params support to set mcam entry count")

I will send a new version of the patch with a "Fixes:" tag now.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/marvell/octeontx2/Kconfig b/drivers/net/ethernet/marvell/octeontx2/Kconfig
index 3f982ccf2c85..639893d87055 100644
--- a/drivers/net/ethernet/marvell/octeontx2/Kconfig
+++ b/drivers/net/ethernet/marvell/octeontx2/Kconfig
@@ -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