Re: [net-next,v2,6/8] net: macb: make macb_tx_skb generic
From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-02-24 00:08:59
This is an AI-generated review of your patch. The human sending this email has considered the AI review valid, or at least plausible. For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html --- net: macb: make macb_tx_skb generic The macb_tx_skb structure is renamed to macb_tx_buff with no functional changes. This is a preparatory step for adding xdp xmit support.
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h index 33a963b6dd4d..4e3cc0e9ea87 100644 --- a/drivers/net/ethernet/cadence/macb.h +++ b/drivers/net/ethernet/cadence/macb.h@@ -959,7 +959,7 @@ struct macb_dma_desc_ptp { /* Scaled PPM fraction */ #define PPM_FRACTION 16 -/* struct macb_tx_skb - data about an skb which is being transmitted +/* struct macb_tx_buff - data about an skb which is being transmitted * @skb: skb currently being transmitted, only set for the last buffer * of the frame
The comment documentation still describes this structure exclusively in
terms of sk_buff ('data about an skb which is being transmitted' and 'skb
currently being transmitted'), but the field type is being changed from
'struct sk_buff *' to 'void *' to support future XDP buffers.
Should the documentation be updated to reflect the generic purpose? For
example, indicating that the field can hold either an sk_buff pointer or an
XDP buffer pointer, which aligns with the intent stated in the commit
message about preparing for XDP xmit support.
quoted hunk ↗ jump to hunk
* @mapping: DMA address of the skb's fragment buffer@@ -967,8 +967,8 @@ struct macb_dma_desc_ptp { * @mapped_as_page: true when buffer was mapped with skb_frag_dma_map(), * false when buffer was mapped with dma_map_single() */ -struct macb_tx_skb { - struct sk_buff *skb; +struct macb_tx_buff { + void *skb; dma_addr_t mapping; size_t size; bool mapped_as_page;
[ ... ]