[2/2] sfc: add CONFIG_INET dependency for TC offload

Message ID 20230616090844.2677815-2-arnd@kernel.org
State New
Headers
Series [1/2] sfc: fix uninitialized variable use |

Commit Message

Arnd Bergmann June 16, 2023, 9:08 a.m. UTC
  From: Arnd Bergmann <arnd@arndb.de>

The driver now fails to link when CONFIG_INET is disabled, so
add an explicit Kconfig dependency:

ld.lld: error: undefined symbol: ip_route_output_flow
>>> referenced by tc_encap_actions.c
>>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_tc_flower_create_encap_md) in archive vmlinux.a

ld.lld: error: undefined symbol: ip_send_check
>>> referenced by tc_encap_actions.c
>>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_gen_encap_header) in archive vmlinux.a
>>> referenced by tc_encap_actions.c
>>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_gen_encap_header) in archive vmlinux.a

ld.lld: error: undefined symbol: arp_tbl
>>> referenced by tc_encap_actions.c
>>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_tc_netevent_event) in archive vmlinux.a
>>> referenced by tc_encap_actions.c
>>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_tc_netevent_event) in archive vmlinux.a

Fixes: a1e82162af0b8 ("sfc: generate encap headers for TC offload")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/sfc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Simon Horman June 16, 2023, 10:06 a.m. UTC | #1
On Fri, Jun 16, 2023 at 11:08:19AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The driver now fails to link when CONFIG_INET is disabled, so
> add an explicit Kconfig dependency:
> 
> ld.lld: error: undefined symbol: ip_route_output_flow
> >>> referenced by tc_encap_actions.c
> >>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_tc_flower_create_encap_md) in archive vmlinux.a
> 
> ld.lld: error: undefined symbol: ip_send_check
> >>> referenced by tc_encap_actions.c
> >>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_gen_encap_header) in archive vmlinux.a
> >>> referenced by tc_encap_actions.c
> >>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_gen_encap_header) in archive vmlinux.a
> 
> ld.lld: error: undefined symbol: arp_tbl
> >>> referenced by tc_encap_actions.c
> >>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_tc_netevent_event) in archive vmlinux.a
> >>> referenced by tc_encap_actions.c
> >>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_tc_netevent_event) in archive vmlinux.a
> 
> Fixes: a1e82162af0b8 ("sfc: generate encap headers for TC offload")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Simon Horman <simon.horman@corigine.com>
  
Edward Cree June 16, 2023, 11:39 a.m. UTC | #2
On 16/06/2023 10:08, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The driver now fails to link when CONFIG_INET is disabled, so
> add an explicit Kconfig dependency:
> 
> ld.lld: error: undefined symbol: ip_route_output_flow
>>>> referenced by tc_encap_actions.c
>>>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_tc_flower_create_encap_md) in archive vmlinux.a
> 
> ld.lld: error: undefined symbol: ip_send_check
>>>> referenced by tc_encap_actions.c
>>>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_gen_encap_header) in archive vmlinux.a
>>>> referenced by tc_encap_actions.c
>>>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_gen_encap_header) in archive vmlinux.a
> 
> ld.lld: error: undefined symbol: arp_tbl
>>>> referenced by tc_encap_actions.c
>>>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_tc_netevent_event) in archive vmlinux.a
>>>> referenced by tc_encap_actions.c
>>>>               drivers/net/ethernet/sfc/tc_encap_actions.o:(efx_tc_netevent_event) in archive vmlinux.a
> 
> Fixes: a1e82162af0b8 ("sfc: generate encap headers for TC offload")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
 and I think you also need
Fixes: 7e5e7d800011 ("sfc: neighbour lookup for TC encap action offload")
 since that added the references to ip_route_output_flow and arp_tbl (the
 commit in your Fixes: added the ip_send_check reference on top of that).

You also might want to add the Closes: tag from [1], I don't know how
 that works but I assume it'll make someone's regression-bot happy.

-ed

[1] https://lore.kernel.org/oe-kbuild-all/202306151656.yttECVTP-lkp@intel.com/

> ---
>  drivers/net/ethernet/sfc/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/sfc/Kconfig b/drivers/net/ethernet/sfc/Kconfig
> index 4af36ba8906ba..3eb55dcfa8a61 100644
> --- a/drivers/net/ethernet/sfc/Kconfig
> +++ b/drivers/net/ethernet/sfc/Kconfig
> @@ -50,6 +50,7 @@ config SFC_MCDI_MON
>  config SFC_SRIOV
>  	bool "Solarflare SFC9100-family SR-IOV support"
>  	depends on SFC && PCI_IOV
> +	depends on INET
>  	default y
>  	help
>  	  This enables support for the Single Root I/O Virtualization
>
  
Linux regression tracking (Thorsten Leemhuis) June 16, 2023, 1:45 p.m. UTC | #3
On 16.06.23 13:39, Edward Cree wrote:
> On 16/06/2023 10:08, Arnd Bergmann wrote:
>>
>> Fixes: a1e82162af0b8 ("sfc: generate encap headers for TC offload")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
>  and I think you also need
> Fixes: 7e5e7d800011 ("sfc: neighbour lookup for TC encap action offload")
>  since that added the references to ip_route_output_flow and arp_tbl (the
>  commit in your Fixes: added the ip_send_check reference on top of that).
> 
> You also might want to add the Closes: tag from [1], I don't know how
>  that works but I assume it'll make someone's regression-bot happy.
>
> [1] https://lore.kernel.org/oe-kbuild-all/202306151656.yttECVTP-lkp@intel.com/

FWIW, yes, regression tracking relies on them (for now Link: and the
newly introduced Closes: work; the latter came up totally independent of
regression tracking). And I have no problem with being the bad guy here. :-D

But for completeness, in case anyone cares:

It's Linus that for many years already wants these links. He a while ago
mentioned that in a few posts I bookmarked:

https://lore.kernel.org/all/CAHk-=wjMmSZzMJ3Xnskdg4+GGz=5p5p+GSYyFBTh0f-DgvdBWg@mail.gmail.com/
https://lore.kernel.org/all/CAHk-=wgs38ZrfPvy=nOwVkVzjpM3VFU1zobP37Fwd_h9iAD5JQ@mail.gmail.com/
https://lore.kernel.org/all/CAHk-=wjxzafG-=J8oT30s7upn4RhBs6TX-uVFZ5rME+L5_DoJA@mail.gmail.com/

But that's nothing new: Documentation/process/submitting-patches.rst
explained this usage for many years already (I just made this more
explicit a while a go).

Ciao, Thorsten
  

Patch

diff --git a/drivers/net/ethernet/sfc/Kconfig b/drivers/net/ethernet/sfc/Kconfig
index 4af36ba8906ba..3eb55dcfa8a61 100644
--- a/drivers/net/ethernet/sfc/Kconfig
+++ b/drivers/net/ethernet/sfc/Kconfig
@@ -50,6 +50,7 @@  config SFC_MCDI_MON
 config SFC_SRIOV
 	bool "Solarflare SFC9100-family SR-IOV support"
 	depends on SFC && PCI_IOV
+	depends on INET
 	default y
 	help
 	  This enables support for the Single Root I/O Virtualization