[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1430f3d3-4e84-b0ec-acd9-8a51db178f73@intel.com>
Date: Mon, 25 Sep 2023 10:05:03 -0700
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: Arnd Bergmann <arnd@...nel.org>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
"Lobakin, Alexandr" <alexandr.lobakin@...el.com>
CC: Arnd Bergmann <arnd@...db.de>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
"Paolo Abeni" <pabeni@...hat.com>,
Alan Brady <alan.brady@...el.com>,
"Sridhar Samudrala" <sridhar.samudrala@...el.com>,
Willem de Bruijn <willemb@...gle.com>,
Phani Burra <phani.r.burra@...el.com>,
Joshua Hay <joshua.a.hay@...el.com>,
Pavan Kumar Linga <pavan.kumar.linga@...el.com>,
Madhu Chittim <madhu.chittim@...el.com>,
<intel-wired-lan@...ts.osuosl.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] idpf: fix building without IPv4
On 9/25/2023 8:58 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> The newly added offload code fails to link when IPv4 networking is disabled:
>
> arm-linux-gnueabi-ld: drivers/net/ethernet/intel/idpf/idpf_txrx.o: in function `idpf_vport_splitq_napi_poll':
> idpf_txrx.c:(.text+0x7a20): undefined reference to `tcp_gro_complete'
>
> Add complile-time checks for both CONFIG_INET (ipv4) and CONFIG_IPV6
> in order to drop the corresponding code when the features are unavailable.
> This should also help produce slightly better output for IPv4-only
> kernel builds, if anyone still uses those.
Hi Arnd,
Also, a pending patch for this [1], however, this does look a bit more
efficient. Adding Olek as he's author on the other patch.
netdev maintainers,
If this is the version that does get picked up, did you want to take it
directly to close out the compile issues?
Acked-by: Tony Nguyen <anthony.l.nguyen@...el.com>
> Fixes: 3a8845af66edb ("idpf: add RX splitq napi poll support")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> drivers/net/ethernet/intel/idpf/idpf_txrx.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> index 6fa79898c42c5..140c1ad3e0679 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> @@ -2770,8 +2770,10 @@ static void idpf_rx_csum(struct idpf_queue *rxq, struct sk_buff *skb,
> if (!(csum_bits->l3l4p))
> return;
>
> - ipv4 = IDPF_RX_PTYPE_TO_IPV(decoded, IDPF_RX_PTYPE_OUTER_IPV4);
> - ipv6 = IDPF_RX_PTYPE_TO_IPV(decoded, IDPF_RX_PTYPE_OUTER_IPV6);
> + ipv4 = IS_ENABLED(CONFIG_INET) &&
> + IDPF_RX_PTYPE_TO_IPV(decoded, IDPF_RX_PTYPE_OUTER_IPV4);
> + ipv6 = IS_ENABLED(CONFIG_IPV6) &&
> + IDPF_RX_PTYPE_TO_IPV(decoded, IDPF_RX_PTYPE_OUTER_IPV6);
>
> if (ipv4 && (csum_bits->ipe || csum_bits->eipe))
> goto checksum_fail;
> @@ -2870,8 +2872,10 @@ static int idpf_rx_rsc(struct idpf_queue *rxq, struct sk_buff *skb,
> if (unlikely(!rsc_seg_len))
> return -EINVAL;
>
> - ipv4 = IDPF_RX_PTYPE_TO_IPV(decoded, IDPF_RX_PTYPE_OUTER_IPV4);
> - ipv6 = IDPF_RX_PTYPE_TO_IPV(decoded, IDPF_RX_PTYPE_OUTER_IPV6);
> + ipv4 = IS_ENABLED(CONFIG_INET) &&
> + IDPF_RX_PTYPE_TO_IPV(decoded, IDPF_RX_PTYPE_OUTER_IPV4);
> + ipv6 = IS_ENABLED(CONFIG_IPV6) &&
> + IDPF_RX_PTYPE_TO_IPV(decoded, IDPF_RX_PTYPE_OUTER_IPV6);
>
> if (unlikely(!(ipv4 ^ ipv6)))
> return -EINVAL;
[1]
https://lore.kernel.org/netdev/20230921125936.1621191-1-aleksander.lobakin@intel.com/
Powered by blists - more mailing lists