* [PATCH] ice: fix building withouto XDP
@ 2024-01-03 10:24 Arnd Bergmann
2024-01-03 10:54 ` Maciej Fijalkowski
2024-01-03 16:02 ` [Intel-wired-lan] " Paul Menzel
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2024-01-03 10:24 UTC (permalink / raw)
To: Jesse Brandeburg, Tony Nguyen, Jakub Kicinski
Cc: Arnd Bergmann, David S. Miller, Eric Dumazet, Paolo Abeni,
Maciej Fijalkowski, Simon Horman, Daniel Borkmann, Larysa Zaremba,
Piotr Raczynski, Amritha Nambiar, Alexei Starovoitov,
intel-wired-lan, netdev, linux-kernel
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.
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ice: fix building withouto XDP
2024-01-03 10:24 [PATCH] ice: fix building withouto XDP Arnd Bergmann
@ 2024-01-03 10:54 ` Maciej Fijalkowski
2024-01-03 11:19 ` Arnd Bergmann
2024-01-03 16:02 ` [Intel-wired-lan] " Paul Menzel
1 sibling, 1 reply; 4+ messages in thread
From: Maciej Fijalkowski @ 2024-01-03 10:54 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jesse Brandeburg, Tony Nguyen, Jakub Kicinski, Arnd Bergmann,
David S. Miller, Eric Dumazet, Paolo Abeni, Simon Horman,
Daniel Borkmann, Larysa Zaremba, Piotr Raczynski, Amritha Nambiar,
Alexei Starovoitov, intel-wired-lan, netdev, linux-kernel
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ice: fix building withouto XDP
2024-01-03 10:54 ` Maciej Fijalkowski
@ 2024-01-03 11:19 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2024-01-03 11:19 UTC (permalink / raw)
To: Maciej Fijalkowski, Arnd Bergmann
Cc: Jesse Brandeburg, Anthony L Nguyen, Jakub Kicinski,
David S . Miller, Eric Dumazet, Paolo Abeni, Simon Horman,
Daniel Borkmann, Larysa Zaremba, Piotr Raczynski, Amritha Nambiar,
Alexei Starovoitov, intel-wired-lan@lists.osuosl.org, Netdev,
linux-kernel
On Wed, Jan 3, 2024, at 11:54, Maciej Fijalkowski wrote:
> 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.
Ok, sounds good.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Intel-wired-lan] [PATCH] ice: fix building withouto XDP
2024-01-03 10:24 [PATCH] ice: fix building withouto XDP Arnd Bergmann
2024-01-03 10:54 ` Maciej Fijalkowski
@ 2024-01-03 16:02 ` Paul Menzel
1 sibling, 0 replies; 4+ messages in thread
From: Paul Menzel @ 2024-01-03 16:02 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jesse Brandeburg, Tony Nguyen, Jakub Kicinski, Maciej Fijalkowski,
Daniel Borkmann, Arnd Bergmann, Larysa Zaremba, netdev,
Alexei Starovoitov, Amritha Nambiar, Eric Dumazet,
intel-wired-lan, Simon Horman, Paolo Abeni, Piotr Raczynski,
David S. Miller, linux-kernel
Dear Arnd,
Thank you for your patch. There is a small typo in the commit message
summary: withouto → without
Kind regards,
Paul
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-03 16:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03 10:24 [PATCH] ice: fix building withouto XDP Arnd Bergmann
2024-01-03 10:54 ` Maciej Fijalkowski
2024-01-03 11:19 ` Arnd Bergmann
2024-01-03 16:02 ` [Intel-wired-lan] " Paul Menzel
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).