linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] net/intel: fix link-time undefined reference errors
@ 2023-09-20 18:07 Alexander Lobakin
  2023-09-20 18:07 ` [PATCH net-next 1/3] ice: fix undefined references to ice_is_*() when !CONFIG_PTP_1588_CLOCK Alexander Lobakin
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Alexander Lobakin @ 2023-09-20 18:07 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Alexander Lobakin, Tony Nguyen, Richard Cochran,
	Arkadiusz Kubalewski, Michal Michalik, Milena Olech,
	intel-wired-lan, netdev, linux-kernel

Recently, several link-time issues were spotted in the ethernet/intel/
folder thanks to Kbuild bots and linux-next.
The fixes are pretty straightforward, just some stubs and CONFIG_*
guards, so resolve all of them in one shot and unbreak randconfig
builds.

Alexander Lobakin (3):
  ice: fix undefined references to ice_is_*() when
    !CONFIG_PTP_1588_CLOCK
  ice: fix undefined references from DPLL code when
    !CONFIG_PTP_1588_CLOCK
  idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET

 drivers/net/ethernet/intel/ice/Makefile     |  5 ++---
 drivers/net/ethernet/intel/ice/ice_main.c   |  8 ++++---
 drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 25 ++++++++++++++++++++-
 drivers/net/ethernet/intel/idpf/idpf_txrx.c |  3 +++
 4 files changed, 34 insertions(+), 7 deletions(-)

---
Directly to netdev/net-next, build bots are not happy and the next
linux-next is approaching :s
-- 
2.41.0


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

* [PATCH net-next 1/3] ice: fix undefined references to ice_is_*() when !CONFIG_PTP_1588_CLOCK
  2023-09-20 18:07 [PATCH net-next 0/3] net/intel: fix link-time undefined reference errors Alexander Lobakin
@ 2023-09-20 18:07 ` Alexander Lobakin
  2023-09-20 18:07 ` [PATCH net-next 2/3] ice: fix undefined references from DPLL code " Alexander Lobakin
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 16+ messages in thread
From: Alexander Lobakin @ 2023-09-20 18:07 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Alexander Lobakin, Tony Nguyen, Richard Cochran,
	Arkadiusz Kubalewski, Michal Michalik, Milena Olech,
	intel-wired-lan, netdev, linux-kernel, kernel test robot

Starting the cited commit, ice_lib.c unconditionally refers to three
functions compiled only when CONFIG_PTP_1588_CLOCK is set (as they're
located in ice_ptp_hw.c):

ERROR: modpost: "ice_is_clock_mux_present_e810t"
[drivers/net/ethernet/intel/ice/ice.ko] undefined!
ERROR: modpost: "ice_is_phy_rclk_present"
[drivers/net/ethernet/intel/ice/ice.ko] undefined!
ERROR: modpost: "ice_is_cgu_present"
[drivers/net/ethernet/intel/ice/ice.ko] undefined!

These three are HW feature tests and it is safe to stub them as
`return false` when PTP support is disabled.

Fixes: 8a3a565ff210 ("ice: add admin commands to access cgu configuration")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309181001.G72eBLpj-lkp@intel.com
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 25 ++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
index 6f277e7b06b9..405a72864dc7 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
+++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
@@ -271,10 +271,33 @@ int ice_read_sma_ctrl_e810t(struct ice_hw *hw, u8 *data);
 int ice_write_sma_ctrl_e810t(struct ice_hw *hw, u8 data);
 int ice_read_pca9575_reg_e810t(struct ice_hw *hw, u8 offset, u8 *data);
 bool ice_is_pca9575_present(struct ice_hw *hw);
+
+#if IS_ENABLED(CONFIG_PTP_1588_CLOCK)
+
 bool ice_is_phy_rclk_present(struct ice_hw *hw);
 bool ice_is_clock_mux_present_e810t(struct ice_hw *hw);
-int ice_get_pf_c827_idx(struct ice_hw *hw, u8 *idx);
 bool ice_is_cgu_present(struct ice_hw *hw);
+
+#else /* !CONFIG_PTP_1588_CLOCK */
+
+static inline bool ice_is_phy_rclk_present(const struct ice_hw *hw)
+{
+	return false;
+}
+
+static inline bool ice_is_clock_mux_present_e810t(const struct ice_hw *hw)
+{
+	return false;
+}
+
+static inline bool ice_is_cgu_present(const struct ice_hw *hw)
+{
+	return false;
+}
+
+#endif /* !CONFIG_PTP_1588_CLOCK */
+
+int ice_get_pf_c827_idx(struct ice_hw *hw, u8 *idx);
 enum dpll_pin_type ice_cgu_get_pin_type(struct ice_hw *hw, u8 pin, bool input);
 struct dpll_pin_frequency *
 ice_cgu_get_pin_freq_supp(struct ice_hw *hw, u8 pin, bool input, u8 *num);
-- 
2.41.0


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

* [PATCH net-next 2/3] ice: fix undefined references from DPLL code when !CONFIG_PTP_1588_CLOCK
  2023-09-20 18:07 [PATCH net-next 0/3] net/intel: fix link-time undefined reference errors Alexander Lobakin
  2023-09-20 18:07 ` [PATCH net-next 1/3] ice: fix undefined references to ice_is_*() when !CONFIG_PTP_1588_CLOCK Alexander Lobakin
@ 2023-09-20 18:07 ` Alexander Lobakin
  2023-09-21 23:58   ` Vadim Fedorenko
  2023-09-20 18:07 ` [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET Alexander Lobakin
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 16+ messages in thread
From: Alexander Lobakin @ 2023-09-20 18:07 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Alexander Lobakin, Tony Nguyen, Richard Cochran,
	Arkadiusz Kubalewski, Michal Michalik, Milena Olech,
	intel-wired-lan, netdev, linux-kernel, kernel test robot

DPLL code in ice unconditionally calls several PTP functions which are
only built when CONFIG_PTP_1588_CLOCK is set. This throws a good bunch
of link errors:

ERROR: modpost: "ice_cgu_get_pin_name"
[drivers/net/ethernet/intel/ice/ice.ko] undefined!
ERROR: modpost: "ice_get_cgu_state"
[drivers/net/ethernet/intel/ice/ice.ko] undefined!
OR: modpost: "ice_is_cgu_present"
[drivers/net/ethernet/intel/ice/ice.ko] undefined!
ERROR: modpost: "ice_get_cgu_rclk_pin_info"
[drivers/net/ethernet/intel/ice/ice.ko] undefined!
ERROR: modpost: "ice_cgu_get_pin_type"
[drivers/net/ethernet/intel/ice/ice.ko] undefined!
ERROR: modpost: "ice_cgu_get_pin_freq_supp"
[drivers/net/ethernet/intel/ice/ice.ko] undefined!

ice_dpll_{,de}init() can be only called at runtime when the
corresponding feature flags are set, which is not the case when PTP
support is not compiled. However, the linker has no clue about this.
Compile DPLL code only when CONFIG_PTP_1588_CLOCK is enabled and guard
the mentioned init/deinit function calls, so that ice_dpll.o is only
referred when it gets compiled.

Note that ideally ice_is_feature_supported() needs to check for
compile-time flags first to be able to handle this without any
additional call guards, and we may want to do that in the future.

Fixes: d7999f5ea64b ("ice: implement dpll interface to control cgu")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309191214.TaYEct4H-lkp@intel.com
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
---
 drivers/net/ethernet/intel/ice/Makefile   | 5 ++---
 drivers/net/ethernet/intel/ice/ice_main.c | 8 +++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/Makefile b/drivers/net/ethernet/intel/ice/Makefile
index 00806ddf5bf0..16f96d5210d8 100644
--- a/drivers/net/ethernet/intel/ice/Makefile
+++ b/drivers/net/ethernet/intel/ice/Makefile
@@ -34,8 +34,7 @@ ice-y := ice_main.o	\
 	 ice_lag.o	\
 	 ice_ethtool.o  \
 	 ice_repr.o	\
-	 ice_tc_lib.o	\
-	 ice_dpll.o
+	 ice_tc_lib.o
 ice-$(CONFIG_PCI_IOV) +=	\
 	ice_sriov.o		\
 	ice_virtchnl.o		\
@@ -44,7 +43,7 @@ ice-$(CONFIG_PCI_IOV) +=	\
 	ice_vf_mbx.o		\
 	ice_vf_vsi_vlan_ops.o	\
 	ice_vf_lib.o
-ice-$(CONFIG_PTP_1588_CLOCK) += ice_ptp.o ice_ptp_hw.o
+ice-$(CONFIG_PTP_1588_CLOCK) += ice_dpll.o ice_ptp.o ice_ptp_hw.o
 ice-$(CONFIG_DCB) += ice_dcb.o ice_dcb_nl.o ice_dcb_lib.o
 ice-$(CONFIG_RFS_ACCEL) += ice_arfs.o
 ice-$(CONFIG_XDP_SOCKETS) += ice_xsk.o
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index e22f41fea8db..9b48918dcdb7 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -4665,8 +4665,9 @@ static void ice_init_features(struct ice_pf *pf)
 	if (ice_is_feature_supported(pf, ICE_F_GNSS))
 		ice_gnss_init(pf);
 
-	if (ice_is_feature_supported(pf, ICE_F_CGU) ||
-	    ice_is_feature_supported(pf, ICE_F_PHY_RCLK))
+	if (IS_ENABLED(CONFIG_PTP_1588_CLOCK) &&
+	    (ice_is_feature_supported(pf, ICE_F_CGU) ||
+	     ice_is_feature_supported(pf, ICE_F_PHY_RCLK)))
 		ice_dpll_init(pf);
 
 	/* Note: Flow director init failure is non-fatal to load */
@@ -4695,7 +4696,8 @@ static void ice_deinit_features(struct ice_pf *pf)
 		ice_gnss_exit(pf);
 	if (test_bit(ICE_FLAG_PTP_SUPPORTED, pf->flags))
 		ice_ptp_release(pf);
-	if (test_bit(ICE_FLAG_DPLL, pf->flags))
+	if (IS_ENABLED(CONFIG_PTP_1588_CLOCK) &&
+	    test_bit(ICE_FLAG_DPLL, pf->flags))
 		ice_dpll_deinit(pf);
 }
 
-- 
2.41.0


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

* [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET
  2023-09-20 18:07 [PATCH net-next 0/3] net/intel: fix link-time undefined reference errors Alexander Lobakin
  2023-09-20 18:07 ` [PATCH net-next 1/3] ice: fix undefined references to ice_is_*() when !CONFIG_PTP_1588_CLOCK Alexander Lobakin
  2023-09-20 18:07 ` [PATCH net-next 2/3] ice: fix undefined references from DPLL code " Alexander Lobakin
@ 2023-09-20 18:07 ` Alexander Lobakin
  2023-09-20 21:30   ` Randy Dunlap
  2023-09-21  8:52 ` [Intel-wired-lan] [PATCH net-next 0/3] net/intel: fix link-time undefined reference errors Przemek Kitszel
       [not found] ` <f05c2a5b-d434-5edc-828f-4b87049d01fe@intel.com>
  4 siblings, 1 reply; 16+ messages in thread
From: Alexander Lobakin @ 2023-09-20 18:07 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Alexander Lobakin, Tony Nguyen, Richard Cochran,
	Arkadiusz Kubalewski, Michal Michalik, Milena Olech,
	intel-wired-lan, netdev, linux-kernel, Randy Dunlap

When CONFIG_INET is not set, tcp_gro_complete is not compiled, although
the drivers using it may still be compiled (spotted by Randy):

aarch64-linux-ld: drivers/net/ethernet/intel/idpf/idpf_txrx.o:
in function `idpf_rx_rsc.isra.0':
drivers/net/ethernet/intel/idpf/idpf_txrx.c:2909:(.text+0x40cc):
undefined reference to `tcp_gro_complete'

The drivers need to guard the calls to it manually.
Return early from the RSC completion function if !CONFIG_INET, it won't
work properly either way. This effectively makes it be compiled-out
almost entirely on such builds.

Fixes: 3a8845af66ed ("idpf: add RX splitq napi poll support")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Closes: https://lore.kernel.org/linux-next/4c84eb7b-3dec-467b-934b-8a0240f7fb12@infradead.org
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
---
 drivers/net/ethernet/intel/idpf/idpf_txrx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
index 6fa79898c42c..aa45afeb6496 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
@@ -2876,6 +2876,9 @@ static int idpf_rx_rsc(struct idpf_queue *rxq, struct sk_buff *skb,
 	if (unlikely(!(ipv4 ^ ipv6)))
 		return -EINVAL;
 
+	if (!IS_ENABLED(CONFIG_INET))
+		return 0;
+
 	rsc_segments = DIV_ROUND_UP(skb->data_len, rsc_seg_len);
 	if (unlikely(rsc_segments == 1))
 		return 0;
-- 
2.41.0


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

* Re: [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET
  2023-09-20 18:07 ` [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET Alexander Lobakin
@ 2023-09-20 21:30   ` Randy Dunlap
  2023-09-21  0:04     ` [Intel-wired-lan] " Jacob Keller
  0 siblings, 1 reply; 16+ messages in thread
From: Randy Dunlap @ 2023-09-20 21:30 UTC (permalink / raw)
  To: Alexander Lobakin, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: Tony Nguyen, Richard Cochran, Arkadiusz Kubalewski,
	Michal Michalik, Milena Olech, intel-wired-lan, netdev,
	linux-kernel



On 9/20/23 11:07, Alexander Lobakin wrote:
> When CONFIG_INET is not set, tcp_gro_complete is not compiled, although
> the drivers using it may still be compiled (spotted by Randy):
> 
> aarch64-linux-ld: drivers/net/ethernet/intel/idpf/idpf_txrx.o:
> in function `idpf_rx_rsc.isra.0':
> drivers/net/ethernet/intel/idpf/idpf_txrx.c:2909:(.text+0x40cc):
> undefined reference to `tcp_gro_complete'
> 
> The drivers need to guard the calls to it manually.
> Return early from the RSC completion function if !CONFIG_INET, it won't
> work properly either way. This effectively makes it be compiled-out
> almost entirely on such builds.
> 
> Fixes: 3a8845af66ed ("idpf: add RX splitq napi poll support")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Closes: https://lore.kernel.org/linux-next/4c84eb7b-3dec-467b-934b-8a0240f7fb12@infradead.org
> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>

That builds for me.  Thanks.

Tested-by: Randy Dunlap <rdunlap@infradead.org>

I hope that these patches can be merged into the v6.6 instead of
v6.7 kernel at some point (i.e., [PATCH net] instead of net-next).


> ---
>  drivers/net/ethernet/intel/idpf/idpf_txrx.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> index 6fa79898c42c..aa45afeb6496 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> @@ -2876,6 +2876,9 @@ static int idpf_rx_rsc(struct idpf_queue *rxq, struct sk_buff *skb,
>  	if (unlikely(!(ipv4 ^ ipv6)))
>  		return -EINVAL;
>  
> +	if (!IS_ENABLED(CONFIG_INET))
> +		return 0;
> +
>  	rsc_segments = DIV_ROUND_UP(skb->data_len, rsc_seg_len);
>  	if (unlikely(rsc_segments == 1))
>  		return 0;

-- 
~Randy

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

* Re: [Intel-wired-lan] [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET
  2023-09-20 21:30   ` Randy Dunlap
@ 2023-09-21  0:04     ` Jacob Keller
  2023-09-21  1:30       ` Randy Dunlap
  0 siblings, 1 reply; 16+ messages in thread
From: Jacob Keller @ 2023-09-21  0:04 UTC (permalink / raw)
  To: Randy Dunlap, Alexander Lobakin, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Michal Michalik, netdev, Richard Cochran, linux-kernel,
	Arkadiusz Kubalewski, intel-wired-lan, Tony Nguyen, Milena Olech



On 9/20/2023 2:30 PM, Randy Dunlap wrote:
> 
> 
> On 9/20/23 11:07, Alexander Lobakin wrote:
>> When CONFIG_INET is not set, tcp_gro_complete is not compiled, although
>> the drivers using it may still be compiled (spotted by Randy):
>>
>> aarch64-linux-ld: drivers/net/ethernet/intel/idpf/idpf_txrx.o:
>> in function `idpf_rx_rsc.isra.0':
>> drivers/net/ethernet/intel/idpf/idpf_txrx.c:2909:(.text+0x40cc):
>> undefined reference to `tcp_gro_complete'
>>
>> The drivers need to guard the calls to it manually.
>> Return early from the RSC completion function if !CONFIG_INET, it won't
>> work properly either way. This effectively makes it be compiled-out
>> almost entirely on such builds.
>>
>> Fixes: 3a8845af66ed ("idpf: add RX splitq napi poll support")
>> Reported-by: Randy Dunlap <rdunlap@infradead.org>
>> Closes: https://lore.kernel.org/linux-next/4c84eb7b-3dec-467b-934b-8a0240f7fb12@infradead.org
>> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> 
> That builds for me.  Thanks.
> 
> Tested-by: Randy Dunlap <rdunlap@infradead.org>
> 
> I hope that these patches can be merged into the v6.6 instead of
> v6.7 kernel at some point (i.e., [PATCH net] instead of net-next).
> 

Did any of the offending code make it into 6.6? I thought all of this
was from recent merges after 6.6 closed.

Thanks,
Jake

> 
>> ---
>>  drivers/net/ethernet/intel/idpf/idpf_txrx.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
>> index 6fa79898c42c..aa45afeb6496 100644
>> --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
>> +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
>> @@ -2876,6 +2876,9 @@ static int idpf_rx_rsc(struct idpf_queue *rxq, struct sk_buff *skb,
>>  	if (unlikely(!(ipv4 ^ ipv6)))
>>  		return -EINVAL;
>>  
>> +	if (!IS_ENABLED(CONFIG_INET))
>> +		return 0;
>> +
>>  	rsc_segments = DIV_ROUND_UP(skb->data_len, rsc_seg_len);
>>  	if (unlikely(rsc_segments == 1))
>>  		return 0;
> 

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

* Re: [Intel-wired-lan] [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET
  2023-09-21  0:04     ` [Intel-wired-lan] " Jacob Keller
@ 2023-09-21  1:30       ` Randy Dunlap
  2023-10-12 15:47         ` Randy Dunlap
  0 siblings, 1 reply; 16+ messages in thread
From: Randy Dunlap @ 2023-09-21  1:30 UTC (permalink / raw)
  To: Jacob Keller, Alexander Lobakin, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Michal Michalik, netdev, Richard Cochran, linux-kernel,
	Arkadiusz Kubalewski, intel-wired-lan, Tony Nguyen, Milena Olech



On 9/20/23 17:04, Jacob Keller wrote:
> 
> 
> On 9/20/2023 2:30 PM, Randy Dunlap wrote:
>>
>>
>> On 9/20/23 11:07, Alexander Lobakin wrote:
>>> When CONFIG_INET is not set, tcp_gro_complete is not compiled, although
>>> the drivers using it may still be compiled (spotted by Randy):
>>>
>>> aarch64-linux-ld: drivers/net/ethernet/intel/idpf/idpf_txrx.o:
>>> in function `idpf_rx_rsc.isra.0':
>>> drivers/net/ethernet/intel/idpf/idpf_txrx.c:2909:(.text+0x40cc):
>>> undefined reference to `tcp_gro_complete'
>>>
>>> The drivers need to guard the calls to it manually.
>>> Return early from the RSC completion function if !CONFIG_INET, it won't
>>> work properly either way. This effectively makes it be compiled-out
>>> almost entirely on such builds.
>>>
>>> Fixes: 3a8845af66ed ("idpf: add RX splitq napi poll support")
>>> Reported-by: Randy Dunlap <rdunlap@infradead.org>
>>> Closes: https://lore.kernel.org/linux-next/4c84eb7b-3dec-467b-934b-8a0240f7fb12@infradead.org
>>> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
>>
>> That builds for me.  Thanks.
>>
>> Tested-by: Randy Dunlap <rdunlap@infradead.org>
>>
>> I hope that these patches can be merged into the v6.6 instead of
>> v6.7 kernel at some point (i.e., [PATCH net] instead of net-next).
>>
> 
> Did any of the offending code make it into 6.6? I thought all of this
> was from recent merges after 6.6 closed.
> 
> Thanks,
> Jake

Oh, I think that you are correct. Sorry about my comment.
Thanks.

> 
>>
>>> ---
>>>  drivers/net/ethernet/intel/idpf/idpf_txrx.c | 3 +++
>>>  1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
>>> index 6fa79898c42c..aa45afeb6496 100644
>>> --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
>>> +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
>>> @@ -2876,6 +2876,9 @@ static int idpf_rx_rsc(struct idpf_queue *rxq, struct sk_buff *skb,
>>>  	if (unlikely(!(ipv4 ^ ipv6)))
>>>  		return -EINVAL;
>>>  
>>> +	if (!IS_ENABLED(CONFIG_INET))
>>> +		return 0;
>>> +
>>>  	rsc_segments = DIV_ROUND_UP(skb->data_len, rsc_seg_len);
>>>  	if (unlikely(rsc_segments == 1))
>>>  		return 0;
>>

-- 
~Randy

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

* Re: [Intel-wired-lan] [PATCH net-next 0/3] net/intel: fix link-time undefined reference errors
  2023-09-20 18:07 [PATCH net-next 0/3] net/intel: fix link-time undefined reference errors Alexander Lobakin
                   ` (2 preceding siblings ...)
  2023-09-20 18:07 ` [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET Alexander Lobakin
@ 2023-09-21  8:52 ` Przemek Kitszel
       [not found] ` <f05c2a5b-d434-5edc-828f-4b87049d01fe@intel.com>
  4 siblings, 0 replies; 16+ messages in thread
From: Przemek Kitszel @ 2023-09-21  8:52 UTC (permalink / raw)
  To: Alexander Lobakin, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: Michal Michalik, netdev, Richard Cochran, linux-kernel,
	Arkadiusz Kubalewski, Tony Nguyen, intel-wired-lan, Milena Olech

On 9/20/23 20:07, Alexander Lobakin wrote:
> Recently, several link-time issues were spotted in the ethernet/intel/
> folder thanks to Kbuild bots and linux-next.
> The fixes are pretty straightforward, just some stubs and CONFIG_*
> guards, so resolve all of them in one shot and unbreak randconfig
> builds.
> 
> Alexander Lobakin (3):
>    ice: fix undefined references to ice_is_*() when
>      !CONFIG_PTP_1588_CLOCK
>    ice: fix undefined references from DPLL code when
>      !CONFIG_PTP_1588_CLOCK
>    idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET
> 
>   drivers/net/ethernet/intel/ice/Makefile     |  5 ++---
>   drivers/net/ethernet/intel/ice/ice_main.c   |  8 ++++---
>   drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 25 ++++++++++++++++++++-
>   drivers/net/ethernet/intel/idpf/idpf_txrx.c |  3 +++
>   4 files changed, 34 insertions(+), 7 deletions(-)
> 
> ---
> Directly to netdev/net-next, build bots are not happy and the next
> linux-next is approaching :s

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>

I like the `if (IS_ENABLED(xxx))` approach more than stubs :)

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

* Re: [Intel-wired-lan] [PATCH net-next 0/3] net/intel: fix link-time undefined reference errors
       [not found] ` <f05c2a5b-d434-5edc-828f-4b87049d01fe@intel.com>
@ 2023-09-21 13:04   ` Alexander Lobakin
  0 siblings, 0 replies; 16+ messages in thread
From: Alexander Lobakin @ 2023-09-21 13:04 UTC (permalink / raw)
  To: Jacob Keller
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Tony Nguyen, Richard Cochran, Arkadiusz Kubalewski,
	Michal Michalik, Milena Olech, intel-wired-lan, netdev,
	linux-kernel

From: Jacob Keller <jacob.e.keller@intel.com>
Date: Wed, 20 Sep 2023 16:31:27 -0700

> 
> 
> On 9/20/2023 11:07 AM, Alexander Lobakin wrote:
>> Recently, several link-time issues were spotted in the ethernet/intel/
>> folder thanks to Kbuild bots and linux-next.
>> The fixes are pretty straightforward, just some stubs and CONFIG_*
>> guards, so resolve all of them in one shot and unbreak randconfig
>> builds.
>>
>> Alexander Lobakin (3):
>>   ice: fix undefined references to ice_is_*() when
>>     !CONFIG_PTP_1588_CLOCK
>>   ice: fix undefined references from DPLL code when
>>     !CONFIG_PTP_1588_CLOCK
>>   idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET
>>
>>  drivers/net/ethernet/intel/ice/Makefile     |  5 ++---
>>  drivers/net/ethernet/intel/ice/ice_main.c   |  8 ++++---
>>  drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 25 ++++++++++++++++++++-
>>  drivers/net/ethernet/intel/idpf/idpf_txrx.c |  3 +++
>>  4 files changed, 34 insertions(+), 7 deletions(-)
>>
>> ---
>> Directly to netdev/net-next, build bots are not happy and the next
>> linux-next is approaching :s
> 
> I had alternative fixes for ice at:
> 
> https://lore.kernel.org/intel-wired-lan/20230919233435.518620-1-jacob.e.keller@intel.com/
> 
> that are slightly more invasive but bring things in line with changes I
> had proposed earlier before the DPLL code got merged. See:
> 
> https://lore.kernel.org/intel-wired-lan/20230919233435.518620-1-jacob.e.keller@intel.com/
> 
> I'd obviously prefer my version of the ice changes, but I understand if
> we prefer a simple more 'obvious' fix be merged now. I can spin my
> changes again to cleanup/refactor in a follow up if necessary.

Go forth with yours. You can take some of my pieces if you like them
more if you want. I just spotted both idpf and ice reports at the same
time and was ignorant enough to not look at our MLs (internal and IWL)
first.
I'm respinning IDPF solely.

> 
> Thanks,
> Jake

Thanks,
Olek

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

* Re: [PATCH net-next 2/3] ice: fix undefined references from DPLL code when !CONFIG_PTP_1588_CLOCK
  2023-09-20 18:07 ` [PATCH net-next 2/3] ice: fix undefined references from DPLL code " Alexander Lobakin
@ 2023-09-21 23:58   ` Vadim Fedorenko
  2023-09-22 13:58     ` Alexander Lobakin
  0 siblings, 1 reply; 16+ messages in thread
From: Vadim Fedorenko @ 2023-09-21 23:58 UTC (permalink / raw)
  To: Alexander Lobakin, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Jacob Keller
  Cc: Tony Nguyen, Richard Cochran, Arkadiusz Kubalewski,
	Michal Michalik, Milena Olech, intel-wired-lan, netdev,
	linux-kernel, kernel test robot

On 20/09/2023 19:07, Alexander Lobakin wrote:
> DPLL code in ice unconditionally calls several PTP functions which are
> only built when CONFIG_PTP_1588_CLOCK is set. This throws a good bunch
> of link errors:
> 
> ERROR: modpost: "ice_cgu_get_pin_name"
> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_get_cgu_state"
> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> OR: modpost: "ice_is_cgu_present"
> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_get_cgu_rclk_pin_info"
> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_cgu_get_pin_type"
> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_cgu_get_pin_freq_supp"
> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> 
> ice_dpll_{,de}init() can be only called at runtime when the
> corresponding feature flags are set, which is not the case when PTP
> support is not compiled. However, the linker has no clue about this.
> Compile DPLL code only when CONFIG_PTP_1588_CLOCK is enabled and guard
> the mentioned init/deinit function calls, so that ice_dpll.o is only
> referred when it gets compiled.
> 
> Note that ideally ice_is_feature_supported() needs to check for
> compile-time flags first to be able to handle this without any
> additional call guards, and we may want to do that in the future.
> 

There is another fix under review [1], which came from Jacob.
It converts the code a bit more, and will create conflicts.
I would suggest to drop this patch until another series is fully
reviewed.

[1] 
https://lore.kernel.org/netdev/20230921000633.1238097-1-jacob.e.keller@intel.com/

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

* Re: [PATCH net-next 2/3] ice: fix undefined references from DPLL code when !CONFIG_PTP_1588_CLOCK
  2023-09-21 23:58   ` Vadim Fedorenko
@ 2023-09-22 13:58     ` Alexander Lobakin
  0 siblings, 0 replies; 16+ messages in thread
From: Alexander Lobakin @ 2023-09-22 13:58 UTC (permalink / raw)
  To: Vadim Fedorenko
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Jacob Keller, Tony Nguyen, Richard Cochran, Arkadiusz Kubalewski,
	Michal Michalik, Milena Olech, intel-wired-lan, netdev,
	linux-kernel, kernel test robot

From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Date: Fri, 22 Sep 2023 00:58:04 +0100

> On 20/09/2023 19:07, Alexander Lobakin wrote:
>> DPLL code in ice unconditionally calls several PTP functions which are
>> only built when CONFIG_PTP_1588_CLOCK is set. This throws a good bunch
>> of link errors:
>>
>> ERROR: modpost: "ice_cgu_get_pin_name"
>> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
>> ERROR: modpost: "ice_get_cgu_state"
>> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
>> OR: modpost: "ice_is_cgu_present"
>> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
>> ERROR: modpost: "ice_get_cgu_rclk_pin_info"
>> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
>> ERROR: modpost: "ice_cgu_get_pin_type"
>> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
>> ERROR: modpost: "ice_cgu_get_pin_freq_supp"
>> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
>>
>> ice_dpll_{,de}init() can be only called at runtime when the
>> corresponding feature flags are set, which is not the case when PTP
>> support is not compiled. However, the linker has no clue about this.
>> Compile DPLL code only when CONFIG_PTP_1588_CLOCK is enabled and guard
>> the mentioned init/deinit function calls, so that ice_dpll.o is only
>> referred when it gets compiled.
>>
>> Note that ideally ice_is_feature_supported() needs to check for
>> compile-time flags first to be able to handle this without any
>> additional call guards, and we may want to do that in the future.
>>
> 
> There is another fix under review [1], which came from Jacob.
> It converts the code a bit more, and will create conflicts.
> I would suggest to drop this patch until another series is fully
> reviewed.

I know, I already explained earlier in this topic that I sent the IDPF
fix separately and that series can be dropped.

> 
> [1]
> https://lore.kernel.org/netdev/20230921000633.1238097-1-jacob.e.keller@intel.com/

Thanks,
Olek

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

* Re: [Intel-wired-lan] [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET
  2023-09-21  1:30       ` Randy Dunlap
@ 2023-10-12 15:47         ` Randy Dunlap
  2023-10-12 16:13           ` Alexander Lobakin
  2023-10-12 18:34           ` Keller, Jacob E
  0 siblings, 2 replies; 16+ messages in thread
From: Randy Dunlap @ 2023-10-12 15:47 UTC (permalink / raw)
  To: Jacob Keller, Alexander Lobakin, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Michal Michalik, netdev, Richard Cochran, linux-kernel,
	Arkadiusz Kubalewski, intel-wired-lan, Tony Nguyen, Milena Olech

Hi,

On 9/20/23 18:30, Randy Dunlap wrote:
> 
> 
> On 9/20/23 17:04, Jacob Keller wrote:
>>
>>
>> On 9/20/2023 2:30 PM, Randy Dunlap wrote:
>>>
>>>
>>> On 9/20/23 11:07, Alexander Lobakin wrote:
>>>> When CONFIG_INET is not set, tcp_gro_complete is not compiled, although
>>>> the drivers using it may still be compiled (spotted by Randy):
>>>>
>>>> aarch64-linux-ld: drivers/net/ethernet/intel/idpf/idpf_txrx.o:
>>>> in function `idpf_rx_rsc.isra.0':
>>>> drivers/net/ethernet/intel/idpf/idpf_txrx.c:2909:(.text+0x40cc):
>>>> undefined reference to `tcp_gro_complete'
>>>>
>>>> The drivers need to guard the calls to it manually.
>>>> Return early from the RSC completion function if !CONFIG_INET, it won't
>>>> work properly either way. This effectively makes it be compiled-out
>>>> almost entirely on such builds.
>>>>
>>>> Fixes: 3a8845af66ed ("idpf: add RX splitq napi poll support")
>>>> Reported-by: Randy Dunlap <rdunlap@infradead.org>
>>>> Closes: https://lore.kernel.org/linux-next/4c84eb7b-3dec-467b-934b-8a0240f7fb12@infradead.org
>>>> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
>>>
>>> That builds for me.  Thanks.
>>>
>>> Tested-by: Randy Dunlap <rdunlap@infradead.org>
>>>
>>> I hope that these patches can be merged into the v6.6 instead of
>>> v6.7 kernel at some point (i.e., [PATCH net] instead of net-next).
>>>
>>
>> Did any of the offending code make it into 6.6? I thought all of this
>> was from recent merges after 6.6 closed.
>>
>> Thanks,
>> Jake
> 
> Oh, I think that you are correct. Sorry about my comment.
> Thanks.
> 

Even if this is just > v6.6 kernels (i.e., linux-next),
it would be very good to get a fix merged for these build errors.
I keep getting build errors in linux-next....

>>
>>>
>>>> ---
>>>>  drivers/net/ethernet/intel/idpf/idpf_txrx.c | 3 +++
>>>>  1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
>>>> index 6fa79898c42c..aa45afeb6496 100644
>>>> --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
>>>> +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
>>>> @@ -2876,6 +2876,9 @@ static int idpf_rx_rsc(struct idpf_queue *rxq, struct sk_buff *skb,
>>>>  	if (unlikely(!(ipv4 ^ ipv6)))
>>>>  		return -EINVAL;
>>>>  
>>>> +	if (!IS_ENABLED(CONFIG_INET))
>>>> +		return 0;
>>>> +
>>>>  	rsc_segments = DIV_ROUND_UP(skb->data_len, rsc_seg_len);
>>>>  	if (unlikely(rsc_segments == 1))
>>>>  		return 0;
>>>
> 

Thanks.
-- 
~Randy

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

* Re: [Intel-wired-lan] [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET
  2023-10-12 15:47         ` Randy Dunlap
@ 2023-10-12 16:13           ` Alexander Lobakin
  2023-10-12 18:34           ` Keller, Jacob E
  1 sibling, 0 replies; 16+ messages in thread
From: Alexander Lobakin @ 2023-10-12 16:13 UTC (permalink / raw)
  To: Randy Dunlap, Tony Nguyen
  Cc: Jacob Keller, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Michal Michalik, netdev, Richard Cochran,
	linux-kernel, Arkadiusz Kubalewski, intel-wired-lan,
	Milena Olech

From: Randy Dunlap <rdunlap@infradead.org>
Date: Thu, 12 Oct 2023 08:47:12 -0700

> Hi,
> 
> On 9/20/23 18:30, Randy Dunlap wrote:
>>
>>
>> On 9/20/23 17:04, Jacob Keller wrote:
>>>
>>>
>>> On 9/20/2023 2:30 PM, Randy Dunlap wrote:
>>>>
>>>>
>>>> On 9/20/23 11:07, Alexander Lobakin wrote:
>>>>> When CONFIG_INET is not set, tcp_gro_complete is not compiled, although
>>>>> the drivers using it may still be compiled (spotted by Randy):
>>>>>
>>>>> aarch64-linux-ld: drivers/net/ethernet/intel/idpf/idpf_txrx.o:
>>>>> in function `idpf_rx_rsc.isra.0':
>>>>> drivers/net/ethernet/intel/idpf/idpf_txrx.c:2909:(.text+0x40cc):
>>>>> undefined reference to `tcp_gro_complete'
>>>>>
>>>>> The drivers need to guard the calls to it manually.
>>>>> Return early from the RSC completion function if !CONFIG_INET, it won't
>>>>> work properly either way. This effectively makes it be compiled-out
>>>>> almost entirely on such builds.
>>>>>
>>>>> Fixes: 3a8845af66ed ("idpf: add RX splitq napi poll support")
>>>>> Reported-by: Randy Dunlap <rdunlap@infradead.org>
>>>>> Closes: https://lore.kernel.org/linux-next/4c84eb7b-3dec-467b-934b-8a0240f7fb12@infradead.org
>>>>> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
>>>>
>>>> That builds for me.  Thanks.
>>>>
>>>> Tested-by: Randy Dunlap <rdunlap@infradead.org>
>>>>
>>>> I hope that these patches can be merged into the v6.6 instead of
>>>> v6.7 kernel at some point (i.e., [PATCH net] instead of net-next).
>>>>
>>>
>>> Did any of the offending code make it into 6.6? I thought all of this
>>> was from recent merges after 6.6 closed.
>>>
>>> Thanks,
>>> Jake
>>
>> Oh, I think that you are correct. Sorry about my comment.
>> Thanks.
>>
> 
> Even if this is just > v6.6 kernels (i.e., linux-next),
> it would be very good to get a fix merged for these build errors.
> I keep getting build errors in linux-next....

I don't know what happened, Tony dropped this commit from his tree due
to that we agreed yours (which optimizes out IPv6 code if it's not
enabled) is better, then Tony asked the netdev maintainers whether it
can be taken directly, but no updates since then.
I also asked Tony why he took my patch into his tree while I wrote under
the commit message that it should've been taken directly, also no replies :D
And all that for the bug that breaks linux-next build, meh.

> 
>>>
>>>>
>>>>> ---
>>>>>  drivers/net/ethernet/intel/idpf/idpf_txrx.c | 3 +++
>>>>>  1 file changed, 3 insertions(+)
>>>>>
>>>>> diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
>>>>> index 6fa79898c42c..aa45afeb6496 100644
>>>>> --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
>>>>> +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
>>>>> @@ -2876,6 +2876,9 @@ static int idpf_rx_rsc(struct idpf_queue *rxq, struct sk_buff *skb,
>>>>>  	if (unlikely(!(ipv4 ^ ipv6)))
>>>>>  		return -EINVAL;
>>>>>  
>>>>> +	if (!IS_ENABLED(CONFIG_INET))
>>>>> +		return 0;
>>>>> +
>>>>>  	rsc_segments = DIV_ROUND_UP(skb->data_len, rsc_seg_len);
>>>>>  	if (unlikely(rsc_segments == 1))
>>>>>  		return 0;
>>>>
>>
> 
> Thanks.

Thanks,
Olek

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

* RE: [Intel-wired-lan] [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET
  2023-10-12 15:47         ` Randy Dunlap
  2023-10-12 16:13           ` Alexander Lobakin
@ 2023-10-12 18:34           ` Keller, Jacob E
  2023-10-12 23:31             ` Jakub Kicinski
  1 sibling, 1 reply; 16+ messages in thread
From: Keller, Jacob E @ 2023-10-12 18:34 UTC (permalink / raw)
  To: Randy Dunlap, Lobakin, Aleksander, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Michalik, Michal, netdev, Richard Cochran, linux-kernel,
	Kubalewski, Arkadiusz, intel-wired-lan, Nguyen, Anthony L, Olech,
	Milena



> -----Original Message-----
> From: Randy Dunlap <rdunlap@infradead.org>
> Sent: Thursday, October 12, 2023 8:47 AM
> To: Keller, Jacob E <jacob.e.keller@intel.com>; Lobakin, Aleksander
> <aleksander.lobakin@intel.com>; David S. Miller <davem@davemloft.net>; Eric
> Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo
> Abeni <pabeni@redhat.com>
> Cc: Michalik, Michal <michal.michalik@intel.com>; netdev@vger.kernel.org;
> Richard Cochran <richardcochran@gmail.com>; linux-kernel@vger.kernel.org;
> Kubalewski, Arkadiusz <arkadiusz.kubalewski@intel.com>; intel-wired-
> lan@lists.osuosl.org; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Olech,
> Milena <milena.olech@intel.com>
> Subject: Re: [Intel-wired-lan] [PATCH net-next 3/3] idpf: fix undefined reference to
> tcp_gro_complete() when !CONFIG_INET
> 
> Hi,
> 
> On 9/20/23 18:30, Randy Dunlap wrote:
> >
> >
> > On 9/20/23 17:04, Jacob Keller wrote:
> >>
> >>
> >> On 9/20/2023 2:30 PM, Randy Dunlap wrote:
> >>>
> >>>
> >>> On 9/20/23 11:07, Alexander Lobakin wrote:
> >>>> When CONFIG_INET is not set, tcp_gro_complete is not compiled, although
> >>>> the drivers using it may still be compiled (spotted by Randy):
> >>>>
> >>>> aarch64-linux-ld: drivers/net/ethernet/intel/idpf/idpf_txrx.o:
> >>>> in function `idpf_rx_rsc.isra.0':
> >>>> drivers/net/ethernet/intel/idpf/idpf_txrx.c:2909:(.text+0x40cc):
> >>>> undefined reference to `tcp_gro_complete'
> >>>>
> >>>> The drivers need to guard the calls to it manually.
> >>>> Return early from the RSC completion function if !CONFIG_INET, it won't
> >>>> work properly either way. This effectively makes it be compiled-out
> >>>> almost entirely on such builds.
> >>>>
> >>>> Fixes: 3a8845af66ed ("idpf: add RX splitq napi poll support")
> >>>> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> >>>> Closes: https://lore.kernel.org/linux-next/4c84eb7b-3dec-467b-934b-
> 8a0240f7fb12@infradead.org
> >>>> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> >>>
> >>> That builds for me.  Thanks.
> >>>
> >>> Tested-by: Randy Dunlap <rdunlap@infradead.org>
> >>>
> >>> I hope that these patches can be merged into the v6.6 instead of
> >>> v6.7 kernel at some point (i.e., [PATCH net] instead of net-next).
> >>>
> >>
> >> Did any of the offending code make it into 6.6? I thought all of this
> >> was from recent merges after 6.6 closed.
> >>
> >> Thanks,
> >> Jake
> >
> > Oh, I think that you are correct. Sorry about my comment.
> > Thanks.
> >
> 
> Even if this is just > v6.6 kernels (i.e., linux-next),
> it would be very good to get a fix merged for these build errors.
> I keep getting build errors in linux-next....
> 

A standalone version for the idpf driver fix was posted at [1], and another alternative fix was posted at [2]

Fixes for the ice driver have already merged.

[1]: https://lore.kernel.org/netdev/20230921125936.1621191-1-aleksander.lobakin@intel.com/
[2]: https://lore.kernel.org/netdev/20230925155858.651425-1-arnd@kernel.org/

The fix from Arnd got approval from Olek, but it seems like it stalled out after asking about stubs. I'm fine with either approach but would  also like to see a fix merge soon.

Thanks,
Jake

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

* Re: [Intel-wired-lan] [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET
  2023-10-12 18:34           ` Keller, Jacob E
@ 2023-10-12 23:31             ` Jakub Kicinski
  2023-10-13 17:16               ` Jacob Keller
  0 siblings, 1 reply; 16+ messages in thread
From: Jakub Kicinski @ 2023-10-12 23:31 UTC (permalink / raw)
  To: Keller, Jacob E
  Cc: Randy Dunlap, Lobakin, Aleksander, David S. Miller, Eric Dumazet,
	Paolo Abeni, Michalik, Michal, netdev, Richard Cochran,
	linux-kernel, Kubalewski, Arkadiusz, intel-wired-lan, Nguyen,
	Anthony L, Olech, Milena, Arnd Bergmann

On Thu, 12 Oct 2023 18:34:00 +0000 Keller, Jacob E wrote:
> > Even if this is just > v6.6 kernels (i.e., linux-next),
> > it would be very good to get a fix merged for these build errors.
> > I keep getting build errors in linux-next....
> 
> A standalone version for the idpf driver fix was posted at [1], and
> another alternative fix was posted at [2]
> 
> Fixes for the ice driver have already merged.
> 
> [1]:
> https://lore.kernel.org/netdev/20230921125936.1621191-1-aleksander.lobakin@intel.com/
> [2]:
> https://lore.kernel.org/netdev/20230925155858.651425-1-arnd@kernel.org/
> 
> The fix from Arnd got approval from Olek, but it seems like it
> stalled out after asking about stubs. I'm fine with either approach
> but would  also like to see a fix merge soon.

The suggestion of making NET == INET is quite tempting but requires
extra consideration. Since nobody seems to have the cycles, let's
go with the stubs?

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

* Re: [Intel-wired-lan] [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET
  2023-10-12 23:31             ` Jakub Kicinski
@ 2023-10-13 17:16               ` Jacob Keller
  0 siblings, 0 replies; 16+ messages in thread
From: Jacob Keller @ 2023-10-13 17:16 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Randy Dunlap, Lobakin, Aleksander, David S. Miller, Eric Dumazet,
	Paolo Abeni, Michalik, Michal, netdev, Richard Cochran,
	linux-kernel, Kubalewski, Arkadiusz, intel-wired-lan, Nguyen,
	Anthony L, Olech, Milena, Arnd Bergmann



On 10/12/2023 4:31 PM, Jakub Kicinski wrote:
> On Thu, 12 Oct 2023 18:34:00 +0000 Keller, Jacob E wrote:
>>> Even if this is just > v6.6 kernels (i.e., linux-next),
>>> it would be very good to get a fix merged for these build errors.
>>> I keep getting build errors in linux-next....
>>
>> A standalone version for the idpf driver fix was posted at [1], and
>> another alternative fix was posted at [2]
>>
>> Fixes for the ice driver have already merged.
>>
>> [1]:
>> https://lore.kernel.org/netdev/20230921125936.1621191-1-aleksander.lobakin@intel.com/
>> [2]:
>> https://lore.kernel.org/netdev/20230925155858.651425-1-arnd@kernel.org/
>>
>> The fix from Arnd got approval from Olek, but it seems like it
>> stalled out after asking about stubs. I'm fine with either approach
>> but would  also like to see a fix merge soon.
> 
> The suggestion of making NET == INET is quite tempting but requires
> extra consideration. Since nobody seems to have the cycles, let's
> go with the stubs?
> 

Yea. I think NET == INET would cause a bit more challenge in the
immediate term. Its possibly worth exploring but it would be nice to get
the build bots happy first.

I can take the time this morning to work on a version that implements
the stub, and post it.

Thanks,
Jake

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

end of thread, other threads:[~2023-10-13 17:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-20 18:07 [PATCH net-next 0/3] net/intel: fix link-time undefined reference errors Alexander Lobakin
2023-09-20 18:07 ` [PATCH net-next 1/3] ice: fix undefined references to ice_is_*() when !CONFIG_PTP_1588_CLOCK Alexander Lobakin
2023-09-20 18:07 ` [PATCH net-next 2/3] ice: fix undefined references from DPLL code " Alexander Lobakin
2023-09-21 23:58   ` Vadim Fedorenko
2023-09-22 13:58     ` Alexander Lobakin
2023-09-20 18:07 ` [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET Alexander Lobakin
2023-09-20 21:30   ` Randy Dunlap
2023-09-21  0:04     ` [Intel-wired-lan] " Jacob Keller
2023-09-21  1:30       ` Randy Dunlap
2023-10-12 15:47         ` Randy Dunlap
2023-10-12 16:13           ` Alexander Lobakin
2023-10-12 18:34           ` Keller, Jacob E
2023-10-12 23:31             ` Jakub Kicinski
2023-10-13 17:16               ` Jacob Keller
2023-09-21  8:52 ` [Intel-wired-lan] [PATCH net-next 0/3] net/intel: fix link-time undefined reference errors Przemek Kitszel
     [not found] ` <f05c2a5b-d434-5edc-828f-4b87049d01fe@intel.com>
2023-09-21 13:04   ` Alexander Lobakin

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).