From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Arnd Bergmann <arnd@kernel.org>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
"Lobakin, Alexandr" <alexandr.lobakin@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
Alan Brady <alan.brady@intel.com>,
"Sridhar Samudrala" <sridhar.samudrala@intel.com>,
Willem de Bruijn <willemb@google.com>,
Phani Burra <phani.r.burra@intel.com>,
Joshua Hay <joshua.a.hay@intel.com>,
Pavan Kumar Linga <pavan.kumar.linga@intel.com>,
Madhu Chittim <madhu.chittim@intel.com>,
<intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] idpf: fix building without IPv4
Date: Mon, 25 Sep 2023 10:05:03 -0700 [thread overview]
Message-ID: <1430f3d3-4e84-b0ec-acd9-8a51db178f73@intel.com> (raw)
In-Reply-To: <20230925155858.651425-1-arnd@kernel.org>
On 9/25/2023 8:58 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.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@intel.com>
> Fixes: 3a8845af66edb ("idpf: add RX splitq napi poll support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.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/
next prev parent reply other threads:[~2023-09-25 17:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-25 15:58 [PATCH] idpf: fix building without IPv4 Arnd Bergmann
2023-09-25 17:05 ` Tony Nguyen [this message]
2023-10-03 22:43 ` Jakub Kicinski
2023-10-04 8:25 ` Arnd Bergmann
2023-10-04 8:50 ` Alexander Lobakin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430f3d3-4e84-b0ec-acd9-8a51db178f73@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=alan.brady@intel.com \
--cc=alexandr.lobakin@intel.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=joshua.a.hay@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=madhu.chittim@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.kumar.linga@intel.com \
--cc=phani.r.burra@intel.com \
--cc=sridhar.samudrala@intel.com \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox