netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] octeontx2_pf: Select NET_DEVLINK when enabling OCTEONTX2_PF
@ 2022-12-16 21:54 Paul Gazzillo
  2022-12-17  5:29 ` Jakub Kicinski
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Gazzillo @ 2022-12-16 21:54 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Randy Dunlap, Zheng Bin, Yang Yingliang, Suman Ghosh, netdev,
	linux-kernel
  Cc: Paul Gazzillo

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(+)

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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] octeontx2_pf: Select NET_DEVLINK when enabling OCTEONTX2_PF
  2022-12-16 21:54 Paul Gazzillo
@ 2022-12-17  5:29 ` Jakub Kicinski
  2022-12-19 17:08   ` Paul Gazzillo
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2022-12-17  5:29 UTC (permalink / raw)
  To: Paul Gazzillo
  Cc: David S. Miller, Eric Dumazet, Paolo Abeni, Randy Dunlap,
	Zheng Bin, Yang Yingliang, Suman Ghosh, netdev, linux-kernel

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?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] octeontx2_pf: Select NET_DEVLINK when enabling OCTEONTX2_PF
  2022-12-17  5:29 ` Jakub Kicinski
@ 2022-12-19 17:08   ` Paul Gazzillo
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Gazzillo @ 2022-12-19 17:08 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: David S. Miller, Eric Dumazet, Paolo Abeni, Randy Dunlap,
	Zheng Bin, Yang Yingliang, Suman Ghosh, netdev, linux-kernel

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] octeontx2_pf: Select NET_DEVLINK when enabling OCTEONTX2_PF
@ 2022-12-19 17:11 Paul Gazzillo
  2022-12-27 13:45 ` Leon Romanovsky
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Gazzillo @ 2022-12-19 17:11 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Randy Dunlap, Zheng Bin, Yang Yingliang, Suman Ghosh,
	Subbaraya Sundeep, Sunil Goutham, netdev, linux-kernel
  Cc: Paul Gazzillo

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.

Fixes: 2da489432747 ("octeontx2-pf: devlink params support to set mcam entry count")
Signed-off-by: Paul Gazzillo <paul@pgazz.com>
---
v1 -> v2: Added the fixes tag

 drivers/net/ethernet/marvell/octeontx2/Kconfig | 1 +
 1 file changed, 1 insertion(+)

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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] octeontx2_pf: Select NET_DEVLINK when enabling OCTEONTX2_PF
  2022-12-19 17:11 [PATCH] octeontx2_pf: Select NET_DEVLINK when enabling OCTEONTX2_PF Paul Gazzillo
@ 2022-12-27 13:45 ` Leon Romanovsky
  0 siblings, 0 replies; 5+ messages in thread
From: Leon Romanovsky @ 2022-12-27 13:45 UTC (permalink / raw)
  To: Paul Gazzillo
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Randy Dunlap, Zheng Bin, Yang Yingliang, Suman Ghosh,
	Subbaraya Sundeep, Sunil Goutham, netdev, linux-kernel

On Mon, Dec 19, 2022 at 12:11:28PM -0500, Paul Gazzillo wrote:
> 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.
> 
> Fixes: 2da489432747 ("octeontx2-pf: devlink params support to set mcam entry count")
> Signed-off-by: Paul Gazzillo <paul@pgazz.com>
> ---
> v1 -> v2: Added the fixes tag
> 
>  drivers/net/ethernet/marvell/octeontx2/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-27 13:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-19 17:11 [PATCH] octeontx2_pf: Select NET_DEVLINK when enabling OCTEONTX2_PF Paul Gazzillo
2022-12-27 13:45 ` Leon Romanovsky
  -- strict thread matches above, loose matches on Subject: below --
2022-12-16 21:54 Paul Gazzillo
2022-12-17  5:29 ` Jakub Kicinski
2022-12-19 17:08   ` Paul Gazzillo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).