* [PATCH net-next] xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS
@ 2023-12-19 11:02 Vladimir Oltean
2023-12-19 11:26 ` Larysa Zaremba
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Vladimir Oltean @ 2023-12-19 11:02 UTC (permalink / raw)
To: netdev
Cc: bpf, linux-kernel, Randy Dunlap, Tony Nguyen,
Björn Töpel, Magnus Karlsson, Maciej Fijalkowski,
Jonathan Lemon, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
Jesper Dangaard Brouer, John Fastabend, Larysa Zaremba
The ice driver fails to build when CONFIG_XDP_SOCKETS is disabled.
drivers/net/ethernet/intel/ice/ice_base.c:533:21: error:
variable has incomplete type 'struct xsk_cb_desc'
struct xsk_cb_desc desc = {};
^
include/net/xsk_buff_pool.h:15:8: note:
forward declaration of 'struct xsk_cb_desc'
struct xsk_cb_desc;
^
Fixes: d68d707dcbbf ("ice: Support XDP hints in AF_XDP ZC mode")
Closes: https://lore.kernel.org/netdev/8b76dad3-8847-475b-aa17-613c9c978f7a@infradead.org/
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
Posting to net-next since this tree is broken at this stage, not only
bpf-next.
include/net/xdp_sock_drv.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/net/xdp_sock_drv.h b/include/net/xdp_sock_drv.h
index b62bb8525a5f..526c1e7f505e 100644
--- a/include/net/xdp_sock_drv.h
+++ b/include/net/xdp_sock_drv.h
@@ -12,14 +12,14 @@
#define XDP_UMEM_MIN_CHUNK_SHIFT 11
#define XDP_UMEM_MIN_CHUNK_SIZE (1 << XDP_UMEM_MIN_CHUNK_SHIFT)
-#ifdef CONFIG_XDP_SOCKETS
-
struct xsk_cb_desc {
void *src;
u8 off;
u8 bytes;
};
+#ifdef CONFIG_XDP_SOCKETS
+
void xsk_tx_completed(struct xsk_buff_pool *pool, u32 nb_entries);
bool xsk_tx_peek_desc(struct xsk_buff_pool *pool, struct xdp_desc *desc);
u32 xsk_tx_peek_release_desc_batch(struct xsk_buff_pool *pool, u32 max);
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS
2023-12-19 11:02 [PATCH net-next] xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS Vladimir Oltean
@ 2023-12-19 11:26 ` Larysa Zaremba
2023-12-19 11:47 ` Vladimir Oltean
2023-12-19 16:47 ` Maciej Fijalkowski
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Larysa Zaremba @ 2023-12-19 11:26 UTC (permalink / raw)
To: Vladimir Oltean
Cc: netdev, bpf, linux-kernel, Randy Dunlap, Tony Nguyen,
Björn Töpel, Magnus Karlsson, Maciej Fijalkowski,
Jonathan Lemon, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
Jesper Dangaard Brouer, John Fastabend
On Tue, Dec 19, 2023 at 01:02:05PM +0200, Vladimir Oltean wrote:
> The ice driver fails to build when CONFIG_XDP_SOCKETS is disabled.
>
> drivers/net/ethernet/intel/ice/ice_base.c:533:21: error:
> variable has incomplete type 'struct xsk_cb_desc'
> struct xsk_cb_desc desc = {};
> ^
> include/net/xsk_buff_pool.h:15:8: note:
> forward declaration of 'struct xsk_cb_desc'
> struct xsk_cb_desc;
> ^
>
> Fixes: d68d707dcbbf ("ice: Support XDP hints in AF_XDP ZC mode")
> Closes: https://lore.kernel.org/netdev/8b76dad3-8847-475b-aa17-613c9c978f7a@infradead.org/
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
This probably should go through bpf-next. Other than that, fix looks fine:
Acked-by: Larysa Zaremba <larysa.zaremba@intel.com>
> ---
> Posting to net-next since this tree is broken at this stage, not only
> bpf-next.
>
> include/net/xdp_sock_drv.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/net/xdp_sock_drv.h b/include/net/xdp_sock_drv.h
> index b62bb8525a5f..526c1e7f505e 100644
> --- a/include/net/xdp_sock_drv.h
> +++ b/include/net/xdp_sock_drv.h
> @@ -12,14 +12,14 @@
> #define XDP_UMEM_MIN_CHUNK_SHIFT 11
> #define XDP_UMEM_MIN_CHUNK_SIZE (1 << XDP_UMEM_MIN_CHUNK_SHIFT)
>
> -#ifdef CONFIG_XDP_SOCKETS
> -
> struct xsk_cb_desc {
> void *src;
> u8 off;
> u8 bytes;
> };
>
> +#ifdef CONFIG_XDP_SOCKETS
> +
> void xsk_tx_completed(struct xsk_buff_pool *pool, u32 nb_entries);
> bool xsk_tx_peek_desc(struct xsk_buff_pool *pool, struct xdp_desc *desc);
> u32 xsk_tx_peek_release_desc_batch(struct xsk_buff_pool *pool, u32 max);
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS
2023-12-19 11:26 ` Larysa Zaremba
@ 2023-12-19 11:47 ` Vladimir Oltean
0 siblings, 0 replies; 6+ messages in thread
From: Vladimir Oltean @ 2023-12-19 11:47 UTC (permalink / raw)
To: Larysa Zaremba
Cc: netdev, bpf, linux-kernel, Randy Dunlap, Tony Nguyen,
Björn Töpel, Magnus Karlsson, Maciej Fijalkowski,
Jonathan Lemon, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
Jesper Dangaard Brouer, John Fastabend
On Tue, Dec 19, 2023 at 12:26:50PM +0100, Larysa Zaremba wrote:
> On Tue, Dec 19, 2023 at 01:02:05PM +0200, Vladimir Oltean wrote:
> > The ice driver fails to build when CONFIG_XDP_SOCKETS is disabled.
> >
> > drivers/net/ethernet/intel/ice/ice_base.c:533:21: error:
> > variable has incomplete type 'struct xsk_cb_desc'
> > struct xsk_cb_desc desc = {};
> > ^
> > include/net/xsk_buff_pool.h:15:8: note:
> > forward declaration of 'struct xsk_cb_desc'
> > struct xsk_cb_desc;
> > ^
> >
> > Fixes: d68d707dcbbf ("ice: Support XDP hints in AF_XDP ZC mode")
> > Closes: https://lore.kernel.org/netdev/8b76dad3-8847-475b-aa17-613c9c978f7a@infradead.org/
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
>
> This probably should go through bpf-next. Other than that, fix looks fine:
>
> Acked-by: Larysa Zaremba <larysa.zaremba@intel.com>
>
> > ---
> > Posting to net-next since this tree is broken at this stage, not only
> > bpf-next.
It was a conscious decision. Build fixes are more time critical than
most other patches, and net-next is more likely to suffer from a failure
with CONFIG_XDP_SOCKETS disabled than bpf-next is. But, sure, it's up to
maintainers to figure out how to deal with it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS
2023-12-19 11:02 [PATCH net-next] xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS Vladimir Oltean
2023-12-19 11:26 ` Larysa Zaremba
@ 2023-12-19 16:47 ` Maciej Fijalkowski
2023-12-19 22:57 ` Randy Dunlap
2024-01-02 23:40 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 6+ messages in thread
From: Maciej Fijalkowski @ 2023-12-19 16:47 UTC (permalink / raw)
To: Vladimir Oltean
Cc: netdev, bpf, linux-kernel, Randy Dunlap, Tony Nguyen,
Björn Töpel, Magnus Karlsson, Jonathan Lemon,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
John Fastabend, Larysa Zaremba
On Tue, Dec 19, 2023 at 01:02:05PM +0200, Vladimir Oltean wrote:
> The ice driver fails to build when CONFIG_XDP_SOCKETS is disabled.
>
> drivers/net/ethernet/intel/ice/ice_base.c:533:21: error:
> variable has incomplete type 'struct xsk_cb_desc'
> struct xsk_cb_desc desc = {};
> ^
> include/net/xsk_buff_pool.h:15:8: note:
> forward declaration of 'struct xsk_cb_desc'
> struct xsk_cb_desc;
> ^
>
> Fixes: d68d707dcbbf ("ice: Support XDP hints in AF_XDP ZC mode")
> Closes: https://lore.kernel.org/netdev/8b76dad3-8847-475b-aa17-613c9c978f7a@infradead.org/
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Thanks Vladimir for acting upon this. Later on let us think about moving
this definition to xdp_sock.h maybe.
> ---
> Posting to net-next since this tree is broken at this stage, not only
> bpf-next.
>
> include/net/xdp_sock_drv.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/net/xdp_sock_drv.h b/include/net/xdp_sock_drv.h
> index b62bb8525a5f..526c1e7f505e 100644
> --- a/include/net/xdp_sock_drv.h
> +++ b/include/net/xdp_sock_drv.h
> @@ -12,14 +12,14 @@
> #define XDP_UMEM_MIN_CHUNK_SHIFT 11
> #define XDP_UMEM_MIN_CHUNK_SIZE (1 << XDP_UMEM_MIN_CHUNK_SHIFT)
>
> -#ifdef CONFIG_XDP_SOCKETS
> -
> struct xsk_cb_desc {
> void *src;
> u8 off;
> u8 bytes;
> };
>
> +#ifdef CONFIG_XDP_SOCKETS
> +
> void xsk_tx_completed(struct xsk_buff_pool *pool, u32 nb_entries);
> bool xsk_tx_peek_desc(struct xsk_buff_pool *pool, struct xdp_desc *desc);
> u32 xsk_tx_peek_release_desc_batch(struct xsk_buff_pool *pool, u32 max);
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS
2023-12-19 11:02 [PATCH net-next] xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS Vladimir Oltean
2023-12-19 11:26 ` Larysa Zaremba
2023-12-19 16:47 ` Maciej Fijalkowski
@ 2023-12-19 22:57 ` Randy Dunlap
2024-01-02 23:40 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2023-12-19 22:57 UTC (permalink / raw)
To: Vladimir Oltean, netdev
Cc: bpf, linux-kernel, Tony Nguyen, Björn Töpel,
Magnus Karlsson, Maciej Fijalkowski, Jonathan Lemon,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
John Fastabend, Larysa Zaremba
On 12/19/23 03:02, Vladimir Oltean wrote:
> The ice driver fails to build when CONFIG_XDP_SOCKETS is disabled.
>
> drivers/net/ethernet/intel/ice/ice_base.c:533:21: error:
> variable has incomplete type 'struct xsk_cb_desc'
> struct xsk_cb_desc desc = {};
> ^
> include/net/xsk_buff_pool.h:15:8: note:
> forward declaration of 'struct xsk_cb_desc'
> struct xsk_cb_desc;
> ^
>
> Fixes: d68d707dcbbf ("ice: Support XDP hints in AF_XDP ZC mode")
> Closes: https://lore.kernel.org/netdev/8b76dad3-8847-475b-aa17-613c9c978f7a@infradead.org/
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Thanks.
> ---
> Posting to net-next since this tree is broken at this stage, not only
> bpf-next.
>
> include/net/xdp_sock_drv.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/net/xdp_sock_drv.h b/include/net/xdp_sock_drv.h
> index b62bb8525a5f..526c1e7f505e 100644
> --- a/include/net/xdp_sock_drv.h
> +++ b/include/net/xdp_sock_drv.h
> @@ -12,14 +12,14 @@
> #define XDP_UMEM_MIN_CHUNK_SHIFT 11
> #define XDP_UMEM_MIN_CHUNK_SIZE (1 << XDP_UMEM_MIN_CHUNK_SHIFT)
>
> -#ifdef CONFIG_XDP_SOCKETS
> -
> struct xsk_cb_desc {
> void *src;
> u8 off;
> u8 bytes;
> };
>
> +#ifdef CONFIG_XDP_SOCKETS
> +
> void xsk_tx_completed(struct xsk_buff_pool *pool, u32 nb_entries);
> bool xsk_tx_peek_desc(struct xsk_buff_pool *pool, struct xdp_desc *desc);
> u32 xsk_tx_peek_release_desc_batch(struct xsk_buff_pool *pool, u32 max);
--
#Randy
https://people.kernel.org/tglx/notes-about-netiquette
https://subspace.kernel.org/etiquette.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS
2023-12-19 11:02 [PATCH net-next] xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS Vladimir Oltean
` (2 preceding siblings ...)
2023-12-19 22:57 ` Randy Dunlap
@ 2024-01-02 23:40 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-01-02 23:40 UTC (permalink / raw)
To: Vladimir Oltean
Cc: netdev, bpf, linux-kernel, rdunlap, anthony.l.nguyen, bjorn,
magnus.karlsson, maciej.fijalkowski, jonathan.lemon, davem,
edumazet, kuba, pabeni, ast, daniel, hawk, john.fastabend,
larysa.zaremba
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 19 Dec 2023 13:02:05 +0200 you wrote:
> The ice driver fails to build when CONFIG_XDP_SOCKETS is disabled.
>
> drivers/net/ethernet/intel/ice/ice_base.c:533:21: error:
> variable has incomplete type 'struct xsk_cb_desc'
> struct xsk_cb_desc desc = {};
> ^
> include/net/xsk_buff_pool.h:15:8: note:
> forward declaration of 'struct xsk_cb_desc'
> struct xsk_cb_desc;
> ^
>
> [...]
Here is the summary with links:
- [net-next] xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS
https://git.kernel.org/netdev/net-next/c/8dc4c4100065
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-01-02 23:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-19 11:02 [PATCH net-next] xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS Vladimir Oltean
2023-12-19 11:26 ` Larysa Zaremba
2023-12-19 11:47 ` Vladimir Oltean
2023-12-19 16:47 ` Maciej Fijalkowski
2023-12-19 22:57 ` Randy Dunlap
2024-01-02 23:40 ` patchwork-bot+netdevbpf
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).