Skip to content

Commit 8dc4c41

Browse files
vladimirolteankuba-moo
authored andcommitted
xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS
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: d68d707 ("ice: Support XDP hints in AF_XDP ZC mode") Closes: https://lore.kernel.org/netdev/[email protected]/ Signed-off-by: Vladimir Oltean <[email protected]> Acked-by: Larysa Zaremba <[email protected]> Reviewed-by: Maciej Fijalkowski <[email protected]> Acked-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> # build-tested Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 3e64db3 commit 8dc4c41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/net/xdp_sock_drv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
#define XDP_UMEM_MIN_CHUNK_SHIFT 11
1313
#define XDP_UMEM_MIN_CHUNK_SIZE (1 << XDP_UMEM_MIN_CHUNK_SHIFT)
1414

15-
#ifdef CONFIG_XDP_SOCKETS
16-
1715
struct xsk_cb_desc {
1816
void *src;
1917
u8 off;
2018
u8 bytes;
2119
};
2220

21+
#ifdef CONFIG_XDP_SOCKETS
22+
2323
void xsk_tx_completed(struct xsk_buff_pool *pool, u32 nb_entries);
2424
bool xsk_tx_peek_desc(struct xsk_buff_pool *pool, struct xdp_desc *desc);
2525
u32 xsk_tx_peek_release_desc_batch(struct xsk_buff_pool *pool, u32 max);

0 commit comments

Comments
 (0)