Thread (10 messages) flat view 10 messages, 2 authors, 2d ago

RE: [PATCH iwl-next 1/8] e1000e: add jumbo Rx CRC stripping

From: Loktionov, Aleksandr <hidden>
Date: 2026-08-31 05:55:09
Also in: intel-wired-lan, linux-doc, lkml

-----Original Message-----
From: Matt Vollrath <redacted>
Sent: Monday, August 31, 2026 1:22 AM
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org; Nguyen, Anthony L
[off-list ref]; Kitszel, Przemyslaw
[off-list ref]; Lobakin, Aleksander
[off-list ref]; Andrew Lunn [off-list ref];
David S . Miller [off-list ref]; Eric Dumazet
[off-list ref]; Jakub Kicinski [off-list ref]; Paolo Abeni
[off-list ref]; Simon Horman [off-list ref]; Jonathan Corbet
[off-list ref]; Shuah Khan [off-list ref]; linux-
doc@vger.kernel.org; linux-kernel@vger.kernel.org; Matt Vollrath
[off-list ref]
Subject: [PATCH iwl-next 1/8] e1000e: add jumbo Rx CRC stripping

When the hardware is configured to not strip the FCS (CrcStripping=0),
the jumbo Rx path would deliver frames with the FCS still attached.
Follow the standard path's convention by stripping the FCS at EOP and
leaving it out of the byte count.

The jumbo path was omitted when the CrcStripping feature was added.
Since v3.3[1], the jumbo path has only been used where the page size
is over 16K, which practically rules out LOMs, BMC sideband, and the
need to leave FCS on frames. The bug is only reachable only by setting
"only" is duplicated

Reviewed-by: Aleksandr Loktionov <redacted>
quoted hunk ↗ jump to hunk
CrcStripping=0 on a platform with nothing that needs it.

This change prepares for convergence of Rx onto the jumbo path in
following patches. The set of h/w routed through this path will expand
to include LOMs.

[1] Commit 79d4e9087a6e ("e1000e: disable Early Receive DMA on ICH
LOMs")

Signed-off-by: Matt Vollrath <redacted>
Fixes: eb7c3adb1ca9 ("e1000e: fix IPMI traffic")
Assisted-by: Claude:claude-5-fable
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c
b/drivers/net/ethernet/intel/e1000e/netdev.c
index 844f31ab37ad..599600ad695c 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1631,13 +1631,23 @@ static bool e1000_clean_jumbo_rx_irq(struct
e1000_ring *rx_ring, int *work_done,
 			}
 		}

+		/* strip the Ethernet CRC; it may span fragments */
+		if (!(adapter->flags2 & FLAG2_CRC_STRIPPING) &&
+		    !(netdev->features & NETIF_F_RXFCS))
+			pskb_trim(skb, skb->len - 4);
+
 		/* Receive Checksum Offload */
 		e1000_rx_checksum(adapter, staterr, skb);

 		e1000_rx_hash(netdev, rx_desc->wb.lower.hi_dword.rss,
skb);

-		/* probably a little skewed due to removing CRC */
 		total_rx_bytes += skb->len;
+		/* If configured to store CRC, keep the FCS bytes out of
the
+		 * total_rx_bytes counter
+		 */
+		if (!(adapter->flags2 & FLAG2_CRC_STRIPPING) &&
+		    (netdev->features & NETIF_F_RXFCS))
+			total_rx_bytes -= 4;
 		total_rx_packets++;

 		/* eth type trans needs skb->data to point to something
*/
--
2.43.0
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help