Skip to contentSkip to conversation

ice: implement configurable header split for regular Rx

PATCH In review Alexander Lobakin 5 participants 7 messages Oct 6, 2025 – Oct 31, 2025 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ice: implement configurable header split for regular Rx

Add second page_pool for header buffers to each Rx queue and ability to toggle the header split on/off using Ethtool (default to off to match the current behaviour).
Unlike idpf, all HW backed up by ice doesn't require any W/As and correctly splits all types of packets as configured: after L4 headers for TCP/UDP/SCTP, after L3 headers for other IPv4/IPv6 frames, after the Ethernet header otherwise (in case of tunneling, same as above, but after innermost headers).
This doesn't affect the XSk path as there are no benefits of having it there.

---
Applies on top of Tony's next-queue, depends on Michał's Page Pool conversion series.

Sending for review and validation purposes.

Testing hints: traffic testing with and without header split enabled. The header split can be turned on/off using Ethtool:

sudo ethtool -G <iface> tcp-data-split on (or off)

---
 drivers/net/ethernet/intel/ice/ice.h          |  1 +
 .../net/ethernet/intel/ice/ice_lan_tx_rx.h    |  3 +
 drivers/net/ethernet/intel/ice/ice_txrx.h     |  7 ++
 drivers/net/ethernet/intel/ice/ice_base.c     | 89 +++++++++++++++----
 drivers/net/ethernet/intel/ice/ice_ethtool.c  | 15 +++-
 drivers/net/ethernet/intel/ice/ice_txrx.c     | 89 +++++++++++++++----
 6 files changed, 168 insertions(+), 36 deletions(-)
drivers/net/ethernet/intel/ice/ice.h +1 -0
index d46ff9c97c86..bef3d6d8d491 100644
@@ -351,6 +351,7 @@ struct ice_vsi {
 	u16 num_q_vectors;
 	/* tell if only dynamic irq allocation is allowed */
 	bool irq_dyn_alloc;
+	bool hsplit:1;
 
 	u16 vsi_num;			/* HW (absolute) index of this VSI */
 	u16 idx;			/* software index in pf->vsi[] */
drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h +3 -0
index 10c312d49e05..185672c7e17d 100644
@@ -342,6 +342,9 @@ enum ice_flg64_bits {
 /* for ice_32byte_rx_flex_desc.pkt_length member */
 #define ICE_RX_FLX_DESC_PKT_LEN_M	(0x3FFF) /* 14-bits */
 
+/* ice_32byte_rx_flex_desc::hdr_len_sph_flex_flags1 */
+#define ICE_RX_FLEX_DESC_HDR_LEN_M	GENMASK(10, 0)
+
 enum ice_rx_flex_desc_status_error_0_bits {
 	/* Note: These are predefined bit offsets */
 	ICE_RX_FLEX_DESC_STATUS0_DD_S = 0,
drivers/net/ethernet/intel/ice/ice_txrx.h +7 -0
index e97a38ef3fe7..e440c55d9e9f 100644
@@ -255,6 +255,9 @@ struct ice_rx_ring {
 	};
 
 	/* CL2 - 2nd cacheline starts here */
+	struct libeth_fqe *hdr_fqes;
+	struct page_pool *hdr_pp;
+
 	union {
 		struct libeth_xdp_buff_stash xdp;
 		struct libeth_xdp_buff *xsk;
@@ -273,6 +276,8 @@ struct ice_rx_ring {
 	/* used in interrupt processing */
 	u16 next_to_use;
 	u16 next_to_clean;
+
+	u32 hdr_truesize;
 	u32 truesize;
 
 	/* stats structs */
@@ -284,6 +289,7 @@ struct ice_rx_ring {
 	struct ice_tx_ring *xdp_ring;
 	struct ice_rx_ring *next;	/* pointer to next ring in q_vector */
 	struct xsk_buff_pool *xsk_pool;
+	u16 rx_hdr_len;
 	u16 rx_buf_len;
 	dma_addr_t dma;			/* physical address of ring */
 	u8 dcb_tc;			/* Traffic class of ring */
@@ -396,6 +402,7 @@ static inline unsigned int ice_rx_pg_order(struct ice_rx_ring *ring)
 union ice_32b_rx_flex_desc;
 
 void ice_init_ctrl_rx_descs(struct ice_rx_ring *rx_ring, u32 num_descs);
+void ice_rxq_pp_destroy(struct ice_rx_ring *rq);
 bool ice_alloc_rx_bufs(struct ice_rx_ring *rxr, unsigned int cleaned_count);
 netdev_tx_t ice_start_xmit(struct sk_buff *skb, struct net_device *netdev);
 u16
drivers/net/ethernet/intel/ice/ice_base.c +72 -17

122 lines not on this page · raw message

drivers/net/ethernet/intel/ice/ice_ethtool.c +14 -1
index 9204fa719a8e..b08a28dc5599 100644
@@ -3164,6 +3164,10 @@ ice_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring,
 	ring->rx_jumbo_max_pending = 0;
 	ring->rx_mini_pending = 0;
 	ring->rx_jumbo_pending = 0;
+
+	kernel_ring->tcp_data_split = vsi->hsplit ?
+				      ETHTOOL_TCP_DATA_SPLIT_ENABLED :
+				      ETHTOOL_TCP_DATA_SPLIT_DISABLED;
 }
 
 static int
@@ -3180,6 +3184,7 @@ ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring,
 	int i, timeout = 50, err = 0;
 	struct ice_hw *hw = &pf->hw;
 	u16 new_rx_cnt, new_tx_cnt;
+	bool hsplit;
 
 	if (ring->tx_pending > ICE_MAX_NUM_DESC_BY_MAC(hw) ||
 	    ring->tx_pending < ICE_MIN_NUM_DESC ||
@@ -3205,9 +3210,12 @@ ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring,
 		netdev_info(netdev, "Requested Rx descriptor count rounded up to %d\n",
 			    new_rx_cnt);
 
+	hsplit = kernel_ring->tcp_data_split == ETHTOOL_TCP_DATA_SPLIT_ENABLED;
+
 	/* if nothing to do return success */
 	if (new_tx_cnt == vsi->tx_rings[0]->count &&
-	    new_rx_cnt == vsi->rx_rings[0]->count) {
+	    new_rx_cnt == vsi->rx_rings[0]->count &&
+	    hsplit == vsi->hsplit) {
 		netdev_dbg(netdev, "Nothing to change, descriptor count is same as requested\n");
 		return 0;
 	}
@@ -3237,6 +3245,8 @@ ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring,
 				vsi->xdp_rings[i]->count = new_tx_cnt;
 		vsi->num_tx_desc = (u16)new_tx_cnt;
 		vsi->num_rx_desc = (u16)new_rx_cnt;
+		vsi->hsplit = hsplit;
+
 		netdev_dbg(netdev, "Link is down, descriptor count change happens when link is brought up\n");
 		goto done;
 	}
@@ -3343,6 +3353,8 @@ ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring,
 	}
 
 process_link:
+	vsi->hsplit = hsplit;
+
 	/* Bring interface down, copy in the new ring info, then restore the
 	 * interface. if VSI is up, bring it down and then back up
 	 */
@@ -4737,6 +4749,7 @@ static const struct ethtool_ops ice_ethtool_ops = {
 				     ETHTOOL_COALESCE_USE_ADAPTIVE |
 				     ETHTOOL_COALESCE_RX_USECS_HIGH,
 	.supported_input_xfrm	= RXH_XFRM_SYM_XOR,
+	.supported_ring_params	= ETHTOOL_RING_USE_TCP_DATA_SPLIT,
 	.get_link_ksettings	= ice_get_link_ksettings,
 	.set_link_ksettings	= ice_set_link_ksettings,
 	.get_fec_stats		= ice_get_fec_stats,
drivers/net/ethernet/intel/ice/ice_txrx.c +71 -18

146 lines not on this page · raw message

Signature · 1 line
2.51.0
Tested-by on v1 1/1
#1 lore raw
Quoted 23 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Alexander Lobakin
Sent: Monday, October 6, 2025 9:21 AM
To: [email protected]
Cc: Lobakin, Aleksander <[email protected]>; Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Simon Horman <[email protected]>; NXNE CNSE OSDT ITP Upstreaming <[email protected]>; [email protected]; [email protected]
Subject: [Intel-wired-lan] [PATCH iwl-next] ice: implement configurable header split for regular Rx

Add second page_pool for header buffers to each Rx queue and ability to toggle the header split on/off using Ethtool (default to off to match the current behaviour).
Unlike idpf, all HW backed up by ice doesn't require any W/As and correctly splits all types of packets as configured: after L4 headers for TCP/UDP/SCTP, after L3 headers for other IPv4/IPv6 frames, after the Ethernet header otherwise (in case of tunneling, same as above, but after innermost headers). This doesn't affect the XSk path as there are no benefits of having it there.

---
Applies on top of Tony's next-queue, depends on Michał's Page Pool conversion series.

Sending for review and validation purposes.

Testing hints: traffic testing with and without header split enabled. The header split can be turned on/off using Ethtool:

sudo ethtool -G <iface> tcp-data-split on (or off)

Quoted 8 lines
---
 drivers/net/ethernet/intel/ice/ice.h          |  1 +
 .../net/ethernet/intel/ice/ice_lan_tx_rx.h    |  3 +
 drivers/net/ethernet/intel/ice/ice_txrx.h     |  7 ++
 drivers/net/ethernet/intel/ice/ice_base.c     | 89 +++++++++++++++----
 drivers/net/ethernet/intel/ice/ice_ethtool.c  | 15 +++-
 drivers/net/ethernet/intel/ice/ice_txrx.c     | 89 +++++++++++++++----
 6 files changed, 168 insertions(+), 36 deletions(-)
reviewer
#2 lore raw
In reply to Alexander Lobakin
Quoted 16 lines · Alexander Lobakin

Add second page_pool for header buffers to each Rx queue and ability to toggle the header split on/off using Ethtool (default to off to match the current behaviour).
Unlike idpf, all HW backed up by ice doesn't require any W/As and correctly splits all types of packets as configured: after L4 headers for TCP/UDP/SCTP, after L3 headers for other IPv4/IPv6 frames, after the Ethernet header otherwise (in case of tunneling, same as above, but after innermost headers).
This doesn't affect the XSk path as there are no benefits of having it there.

---
Applies on top of Tony's next-queue, depends on Michał's Page Pool conversion series.

Quoted 6 lines

Sending for review and validation purposes.

Testing hints: traffic testing with and without header split enabled. The header split can be turned on/off using Ethtool:

sudo ethtool -G <iface> tcp-data-split on (or off)

Nice, I'm very pleased to see this feature in the pipeline for the ice driver.

...

Quoted 1 line
drivers/net/ethernet/intel/ice/ice_txrx.c +0 -0

...

Quoted 8 lines
drivers/net/ethernet/intel/ice/ice_txrx.c +4 -0
@@ -836,6 +858,20 @@ bool ice_alloc_rx_bufs(struct ice_rx_ring *rx_ring, unsigned int cleaned_count)
 		 */
 		rx_desc->read.pkt_addr = cpu_to_le64(addr);
 
+		if (!hdr_fq.pp)
+			goto next;
+
+		addr = libeth_rx_alloc(&hdr_fq, ntu);

drivers/net/ethernet/intel/ice/ice_txrx.c bool ice_alloc_rx_bufs(struct ice_rx_ring *rx_ring, unsigned int cleaned_count) · line 874

Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_txrx.c +10 -0
+		if (addr == DMA_MAPPING_ERROR) {
+			rx_ring->ring_stats->rx_stats.alloc_page_failed++;
+
+			libeth_rx_recycle_slow(fq.fqes[ntu].netmem);
+			break;
+		}
+
+		rx_desc->read.hdr_addr = cpu_to_le64(addr);
+
+next:

Is performance the reason that a goto is used here, rather than, say, putting the conditional code in an if condition? Likewise in ice_clean_rx_irq?

Quoted 12 lines
drivers/net/ethernet/intel/ice/ice_txrx.c +1 -0
 		rx_desc++;
 		ntu++;
 		if (unlikely(ntu == rx_ring->count)) {
@@ -933,14 +969,16 @@ static int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget)
 		unsigned int size;
 		u16 stat_err_bits;
 		u16 vlan_tci;
+		bool rxe;
 
 		/* get the Rx desc from Rx ring based on 'next_to_clean' */
 		rx_desc = ICE_RX_DESC(rx_ring, ntc);
 

drivers/net/ethernet/intel/ice/ice_txrx.c static int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget) · line 982

Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_txrx.c +5 -4
-		/* status_error_len will always be zero for unused descriptors
-		 * because it's cleared in cleanup, and overlaps with hdr_addr
-		 * which is always zero because packet split isn't used, if the
-		 * hardware wrote DD then it will be non-zero
+		/*
+		 * The DD bit will always be zero for unused descriptors
+		 * because it's cleared in cleanup or when setting the DMA
+		 * address of the header buffer, which never uses the DD bit.
+		 * If the hardware wrote the descriptor, it will be non-zero.
 		 */

The update to this comment feels like it could be a separate patch. (I know, I often say something like that...)

Quoted 37 lines
drivers/net/ethernet/intel/ice/ice_txrx.c +19 -4
 		stat_err_bits = BIT(ICE_RX_FLEX_DESC_STATUS0_DD_S);
 		if (!ice_test_staterr(rx_desc->wb.status_error0, stat_err_bits))
@@ -954,12 +992,27 @@ static int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget)
 
 		ice_trace(clean_rx_irq, rx_ring, rx_desc);
 
+		stat_err_bits = BIT(ICE_RX_FLEX_DESC_STATUS0_HBO_S) |
+				BIT(ICE_RX_FLEX_DESC_STATUS0_RXE_S);
+		rxe = ice_test_staterr(rx_desc->wb.status_error0,
+				       stat_err_bits);
+
+		if (!rx_ring->hdr_pp)
+			goto payload;
+
+		size = le16_get_bits(rx_desc->wb.hdr_len_sph_flex_flags1,
+				     ICE_RX_FLEX_DESC_HDR_LEN_M);
+		if (unlikely(rxe))
+			size = 0;
+
+		rx_buf = &rx_ring->hdr_fqes[ntc];
+		libeth_xdp_process_buff(xdp, rx_buf, size);
+		rx_buf->netmem = 0;
+
+payload:
 		size = le16_to_cpu(rx_desc->wb.pkt_len) &
 			ICE_RX_FLX_DESC_PKT_LEN_M;
-
-		stat_err_bits = BIT(ICE_RX_FLEX_DESC_STATUS0_RXE_S);
-		if (unlikely(ice_test_staterr(rx_desc->wb.status_error0,
-					      stat_err_bits)))
+		if (unlikely(rxe))
 			size = 0;
 
 		/* retrieve a buffer from the ring */
Signature · 1 line
2.51.0
#3 lore raw

From: Simon Horman <[email protected]>
Date: Mon, 27 Oct 2025 16:23:28 +0000

Quoted 17 lines · Alexander Lobakin
Quoted 16 lines

Add second page_pool for header buffers to each Rx queue and ability to toggle the header split on/off using Ethtool (default to off to match the current behaviour).
Unlike idpf, all HW backed up by ice doesn't require any W/As and correctly splits all types of packets as configured: after L4 headers for TCP/UDP/SCTP, after L3 headers for other IPv4/IPv6 frames, after the Ethernet header otherwise (in case of tunneling, same as above, but after innermost headers).
This doesn't affect the XSk path as there are no benefits of having it there.

---
Applies on top of Tony's next-queue, depends on Michał's Page Pool conversion series.

Quoted 8 lines
Quoted 6 lines

Sending for review and validation purposes.

Testing hints: traffic testing with and without header split enabled. The header split can be turned on/off using Ethtool:

sudo ethtool -G <iface> tcp-data-split on (or off)

Nice, I'm very pleased to see this feature in the pipeline for the ice driver.

This is a prereq for io_uring/devmem support in ice which I'm currently finishing :>

(I know it's a bit overdue already, but I couldn't find a free time slot
earlier to implement this)

Quoted 20 lines

...

Quoted 1 line
drivers/net/ethernet/intel/ice/ice_txrx.c +0 -0

...

Quoted 13 lines
drivers/net/ethernet/intel/ice/ice_txrx.c +9 -0
@@ -836,6 +858,20 @@ bool ice_alloc_rx_bufs(struct ice_rx_ring *rx_ring, unsigned int cleaned_count)
 		 */
 		rx_desc->read.pkt_addr = cpu_to_le64(addr);
 
+		if (!hdr_fq.pp)
+			goto next;
+
+		addr = libeth_rx_alloc(&hdr_fq, ntu);
+		if (addr == DMA_MAPPING_ERROR) {
+			rx_ring->ring_stats->rx_stats.alloc_page_failed++;
+
+			libeth_rx_recycle_slow(fq.fqes[ntu].netmem);
+			break;
Quoted 8 lines

drivers/net/ethernet/intel/ice/ice_txrx.c bool ice_alloc_rx_bufs(struct ice_rx_ring *rx_ring, unsigned int cleaned_count) · line 874

Quoted 5 lines
drivers/net/ethernet/intel/ice/ice_txrx.c +5 -0
+		}
+
+		rx_desc->read.hdr_addr = cpu_to_le64(addr);
+
+next:

Is performance the reason that a goto is used here, rather than, say, putting the conditional code in an if condition? Likewise in ice_clean_rx_irq?

Not the performance, but the thing that I can avoid introducing +1 indentation level for 9 lines. I don't like big if blocks. IIRC there's no strong rule regarding this?

(same for ice_clean_rx_irq)

Quoted 13 lines
Quoted 13 lines
drivers/net/ethernet/intel/ice/ice_txrx.c +1 -0
 		rx_desc++;
 		ntu++;
 		if (unlikely(ntu == rx_ring->count)) {
@@ -933,14 +969,16 @@ static int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget)
 		unsigned int size;
 		u16 stat_err_bits;
 		u16 vlan_tci;
+		bool rxe;
 
 		/* get the Rx desc from Rx ring based on 'next_to_clean' */
 		rx_desc = ICE_RX_DESC(rx_ring, ntc);
 
Quoted 13 lines

drivers/net/ethernet/intel/ice/ice_txrx.c static int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget) · line 982

Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_txrx.c +5 -4
-		/* status_error_len will always be zero for unused descriptors
-		 * because it's cleared in cleanup, and overlaps with hdr_addr
-		 * which is always zero because packet split isn't used, if the
-		 * hardware wrote DD then it will be non-zero
+		/*
+		 * The DD bit will always be zero for unused descriptors
+		 * because it's cleared in cleanup or when setting the DMA
+		 * address of the header buffer, which never uses the DD bit.
+		 * If the hardware wrote the descriptor, it will be non-zero.
 		 */

The update to this comment feels like it could be a separate patch. (I know, I often say something like that...)

But this update is tied closely to the header split itself. Before this patch, this update would make no sense as there are no header buffers. After this patch, this comment will be outdated already without this update :D

Thanks,
Olek

reviewer Reviewed-by
#4 lore raw
Quoted 27 lines · Alexander Lobakin

From: Simon Horman <[email protected]>
Date: Mon, 27 Oct 2025 16:23:28 +0000

Quoted 24 lines · Alexander Lobakin
Quoted 22 lines

Add second page_pool for header buffers to each Rx queue and ability to toggle the header split on/off using Ethtool (default to off to match the current behaviour).
Unlike idpf, all HW backed up by ice doesn't require any W/As and correctly splits all types of packets as configured: after L4 headers for TCP/UDP/SCTP, after L3 headers for other IPv4/IPv6 frames, after the Ethernet header otherwise (in case of tunneling, same as above, but after innermost headers).
This doesn't affect the XSk path as there are no benefits of having it there.

---
Applies on top of Tony's next-queue, depends on Michał's Page Pool conversion series.

Sending for review and validation purposes.

Testing hints: traffic testing with and without header split enabled. The header split can be turned on/off using Ethtool:

sudo ethtool -G <iface> tcp-data-split on (or off)

Quoted 7 lines
Quoted 1 line

Nice, I'm very pleased to see this feature in the pipeline for the ice driver.

This is a prereq for io_uring/devmem support in ice which I'm currently finishing :>

(I know it's a bit overdue already, but I couldn't find a free time slot
earlier to implement this)

Great, I'm very pleased to hear io_uring/devmem support is in the pipeline.

Quoted 30 lines
Quoted 21 lines

...

Quoted 1 line
drivers/net/ethernet/intel/ice/ice_txrx.c +0 -0

...

Quoted 13 lines
drivers/net/ethernet/intel/ice/ice_txrx.c +9 -0
@@ -836,6 +858,20 @@ bool ice_alloc_rx_bufs(struct ice_rx_ring *rx_ring, unsigned int cleaned_count)
 		 */
 		rx_desc->read.pkt_addr = cpu_to_le64(addr);
 
+		if (!hdr_fq.pp)
+			goto next;
+
+		addr = libeth_rx_alloc(&hdr_fq, ntu);
+		if (addr == DMA_MAPPING_ERROR) {
+			rx_ring->ring_stats->rx_stats.alloc_page_failed++;
+
+			libeth_rx_recycle_slow(fq.fqes[ntu].netmem);
+			break;
Quoted 8 lines

drivers/net/ethernet/intel/ice/ice_txrx.c bool ice_alloc_rx_bufs(struct ice_rx_ring *rx_ring, unsigned int cleaned_count) · line 874

Quoted 5 lines
drivers/net/ethernet/intel/ice/ice_txrx.c +5 -0
+		}
+
+		rx_desc->read.hdr_addr = cpu_to_le64(addr);
+
+next:

Is performance the reason that a goto is used here, rather than, say, putting the conditional code in an if condition? Likewise in ice_clean_rx_irq?

Quoted 5 lines

Not the performance, but the thing that I can avoid introducing +1 indentation level for 9 lines. I don't like big if blocks. IIRC there's no strong rule regarding this?

(same for ice_clean_rx_irq)

Ok. I'd lean towards an if condition. But I don't feel strongly about it.

Quoted 28 lines
Quoted 14 lines
Quoted 14 lines
drivers/net/ethernet/intel/ice/ice_txrx.c +1 -0
 		rx_desc++;
 		ntu++;
 		if (unlikely(ntu == rx_ring->count)) {
@@ -933,14 +969,16 @@ static int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget)
 		unsigned int size;
 		u16 stat_err_bits;
 		u16 vlan_tci;
+		bool rxe;
 
 		/* get the Rx desc from Rx ring based on 'next_to_clean' */
 		rx_desc = ICE_RX_DESC(rx_ring, ntc);
 
Quoted 13 lines

drivers/net/ethernet/intel/ice/ice_txrx.c static int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget) · line 982

Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_txrx.c +5 -4
-		/* status_error_len will always be zero for unused descriptors
-		 * because it's cleared in cleanup, and overlaps with hdr_addr
-		 * which is always zero because packet split isn't used, if the
-		 * hardware wrote DD then it will be non-zero
+		/*
+		 * The DD bit will always be zero for unused descriptors
+		 * because it's cleared in cleanup or when setting the DMA
+		 * address of the header buffer, which never uses the DD bit.
+		 * If the hardware wrote the descriptor, it will be non-zero.
 		 */

The update to this comment feels like it could be a separate patch. (I know, I often say something like that...)

Quoted 4 lines

But this update is tied closely to the header split itself. Before this patch, this update would make no sense as there are no header buffers. After this patch, this comment will be outdated already without this update :D

Thanks for the clarification, I was expecting you would say something like that.

I think everything I mentioned in my previous email was covered by your response. So feel free to add:

Reviewed-by on v1 1/1
#5 lore raw
In reply to Alexander Lobakin
Quoted 61 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Alexander Lobakin
Sent: Monday, October 6, 2025 6:21 PM
To: [email protected]
Cc: Lobakin, Aleksander <[email protected]>; Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Simon Horman <[email protected]>; NXNE CNSE OSDT ITP Upstreaming <[email protected]>; [email protected]; [email protected]
Subject: [Intel-wired-lan] [PATCH iwl-next] ice: implement configurable header split for regular Rx

Add second page_pool for header buffers to each Rx queue and ability to toggle the header split on/off using Ethtool (default to off to match the current behaviour).
Unlike idpf, all HW backed up by ice doesn't require any W/As and correctly splits all types of packets as configured: after L4 headers for TCP/UDP/SCTP, after L3 headers for other IPv4/IPv6 frames, after the Ethernet header otherwise (in case of tunneling, same as above, but after innermost headers).
This doesn't affect the XSk path as there are no benefits of having it there.

---
Applies on top of Tony's next-queue, depends on Michał's Page Pool conversion series.

Sending for review and validation purposes.

Testing hints: traffic testing with and without header split enabled. The header split can be turned on/off using Ethtool:

sudo ethtool -G <iface> tcp-data-split on (or off)

---
 drivers/net/ethernet/intel/ice/ice.h          |  1 +
 .../net/ethernet/intel/ice/ice_lan_tx_rx.h    |  3 +
 drivers/net/ethernet/intel/ice/ice_txrx.h     |  7 ++
 drivers/net/ethernet/intel/ice/ice_base.c     | 89 +++++++++++++++---
(quoted diff) +0 -2
-
 drivers/net/ethernet/intel/ice/ice_ethtool.c  | 15 +++-
 drivers/net/ethernet/intel/ice/ice_txrx.c     | 89 +++++++++++++++---
-
 6 files changed, 168 insertions(+), 36 deletions(-)
drivers/net/ethernet/intel/ice/ice.h +1 -0
index d46ff9c97c86..bef3d6d8d491 100644
@@ -351,6 +351,7 @@ struct ice_vsi {
 	u16 num_q_vectors;
 	/* tell if only dynamic irq allocation is allowed */
 	bool irq_dyn_alloc;
+	bool hsplit:1;

...

Quoted 2 lines

--
2.51.0

A message that is not in the archive (sent off-list or not yet received): PH0PR11MB50136C164F50663E363A7C6796F8A@PH0PR11MB5013.namprd11.prod.outlook.com

Tested-by
#7 lore raw
Quoted 20 lines

Add second page_pool for header buffers to each Rx queue and ability to toggle the header split on/off using Ethtool (default to off to match the current behaviour).
Unlike idpf, all HW backed up by ice doesn't require any W/As and correctly splits all types of packets as configured: after L4 headers for TCP/UDP/SCTP, after L3 headers for other IPv4/IPv6 frames, after the Ethernet header otherwise (in case of tunneling, same as above, but after innermost headers).
This doesn't affect the XSk path as there are no benefits of having it there.

---
Applies on top of Tony's next-queue, depends on Michał's Page Pool conversion series.

Sending for review and validation purposes.

Testing hints: traffic testing with and without header split enabled. The header split can be turned on/off using Ethtool:

sudo ethtool -G <iface> tcp-data-split on (or off)

Quoted 8 lines
---
 drivers/net/ethernet/intel/ice/ice.h          |  1 +
 .../net/ethernet/intel/ice/ice_lan_tx_rx.h    |  3 +
 drivers/net/ethernet/intel/ice/ice_txrx.h     |  7 ++
 drivers/net/ethernet/intel/ice/ice_base.c     | 89 +++++++++++++++----
 drivers/net/ethernet/intel/ice/ice_ethtool.c  | 15 +++-
 drivers/net/ethernet/intel/ice/ice_txrx.c     | 89 +++++++++++++++----
 6 files changed, 168 insertions(+), 36 deletions(-)