From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Jakub Kicinski <kuba@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Larysa Zaremba <larysa.zaremba@intel.com>,
Piotr Raczynski <piotr.raczynski@intel.com>,
Amritha Nambiar <amritha.nambiar@intel.com>,
Alexei Starovoitov <ast@kernel.org>,
<intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ice: fix building withouto XDP
Date: Wed, 3 Jan 2024 11:54:37 +0100 [thread overview]
Message-ID: <ZZU87SZcE/6i8lyo@boxer> (raw)
In-Reply-To: <20240103102458.3687963-1-arnd@kernel.org>
On Wed, Jan 03, 2024 at 11:24:45AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The newly added function fails to build when struct xsk_cb_desc is
> not defined:
>
> drivers/net/ethernet/intel/ice/ice_base.c: In function 'ice_xsk_pool_fill_cb':
> drivers/net/ethernet/intel/ice/ice_base.c:525:16: error: variable 'desc' has initializer but incomplete type
>
> Hide this part in the same #ifdef that controls the structure definition.
Hey Arnd,
this has been fixed by Vladimir:
https://lore.kernel.org/netdev/20231219110205.1289506-1-vladimir.oltean@nxp.com/
in a way that we don't have to wrap driver code with ifdefs.
Thanks!
>
> Fixes: d68d707dcbbf ("ice: Support XDP hints in AF_XDP ZC mode")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/net/ethernet/intel/ice/ice_base.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_base.c b/drivers/net/ethernet/intel/ice/ice_base.c
> index 6e3694145f59..0d1aeb7ca108 100644
> --- a/drivers/net/ethernet/intel/ice/ice_base.c
> +++ b/drivers/net/ethernet/intel/ice/ice_base.c
> @@ -521,6 +521,7 @@ static int ice_setup_rx_ctx(struct ice_rx_ring *ring)
>
> static void ice_xsk_pool_fill_cb(struct ice_rx_ring *ring)
> {
> +#ifdef CONFIG_XDP_SOCKETS
> void *ctx_ptr = &ring->pkt_ctx;
> struct xsk_cb_desc desc = {};
>
> @@ -530,6 +531,7 @@ static void ice_xsk_pool_fill_cb(struct ice_rx_ring *ring)
> sizeof(struct xdp_buff);
> desc.bytes = sizeof(ctx_ptr);
> xsk_pool_fill_cb(ring->xsk_pool, &desc);
> +#endif
> }
>
> /**
> --
> 2.39.2
>
next prev parent reply other threads:[~2024-01-03 10:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 10:24 [PATCH] ice: fix building withouto XDP Arnd Bergmann
2024-01-03 10:54 ` Maciej Fijalkowski [this message]
2024-01-03 11:19 ` Arnd Bergmann
2024-01-03 16:02 ` [Intel-wired-lan] " Paul Menzel
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=ZZU87SZcE/6i8lyo@boxer \
--to=maciej.fijalkowski@intel.com \
--cc=amritha.nambiar@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=piotr.raczynski@intel.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;
as well as URLs for NNTP newsgroup(s).