diff mbox series

[net-next,3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET

Message ID 20230920180745.1607563-4-aleksander.lobakin@intel.com (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series net/intel: fix link-time undefined reference errors | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1340 this patch: 1340
netdev/cc_maintainers fail 4 blamed authors not CCed: pavan.kumar.linga@intel.com joshua.a.hay@intel.com alan.brady@intel.com sridhar.samudrala@intel.com; 5 maintainers not CCed: alan.brady@intel.com joshua.a.hay@intel.com jesse.brandeburg@intel.com pavan.kumar.linga@intel.com sridhar.samudrala@intel.com
netdev/build_clang success Errors and warnings before: 1363 this patch: 1363
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 1363 this patch: 1363
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Alexander Lobakin Sept. 20, 2023, 6:07 p.m. UTC
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(+)

Comments

Randy Dunlap Sept. 20, 2023, 9:30 p.m. UTC | #1
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;
Jacob Keller Sept. 21, 2023, 12:04 a.m. UTC | #2
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;
>
Randy Dunlap Sept. 21, 2023, 1:30 a.m. UTC | #3
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 Dunlap Oct. 12, 2023, 3:47 p.m. UTC | #4
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.
Alexander Lobakin Oct. 12, 2023, 4:13 p.m. UTC | #5
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
Jacob Keller Oct. 12, 2023, 6:34 p.m. UTC | #6
> -----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
Jakub Kicinski Oct. 12, 2023, 11:31 p.m. UTC | #7
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?
Jacob Keller Oct. 13, 2023, 5:16 p.m. UTC | #8
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
diff mbox series

Patch

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;