Skip to contentSkip to conversation

net: NETIF_F_HW_CSUM does not imply FCoE CRC offload

PATCH Applied Ben Hutchings 2 participants 2 messages Oct 22, 2010 – Oct 27, 2010

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

PATCH 1/1 net: NETIF_F_HW_CSUM does not imply FCoE CRC offload

NETIF_F_HW_CSUM indicates the ability to update an TCP/IP-style 16-bit checksum with the checksum of an arbitrary part of the packet data, whereas the FCoE CRC is something entirely different.

---
 net/core/dev.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
net/core/dev.c +3 -3
index a698252..8ab61de 100644
@@ -1683,10 +1683,10 @@ EXPORT_SYMBOL(netif_device_attach);
 
 static bool can_checksum_protocol(unsigned long features, __be16 protocol)
 {
-	return ((features & NETIF_F_GEN_CSUM) ||
-		((features & NETIF_F_IP_CSUM) &&
+	return ((features & NETIF_F_NO_CSUM) ||
+		((features & NETIF_F_V4_CSUM) &&
 		 protocol == htons(ETH_P_IP)) ||
-		((features & NETIF_F_IPV6_CSUM) &&
+		((features & NETIF_F_V6_CSUM) &&
 		 protocol == htons(ETH_P_IPV6)) ||
 		((features & NETIF_F_FCOE_CRC) &&
 		 protocol == htons(ETH_P_FCOE)));
Signature · 7 lines
1.7.2.1


-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
maintainer Applied
#1 lore raw

From: Ben Hutchings <[email protected]>
Date: Fri, 22 Oct 2010 15:38:26 +0100

Quoted 6 lines

NETIF_F_HW_CSUM indicates the ability to update an TCP/IP-style 16-bit checksum with the checksum of an arbitrary part of the packet data, whereas the FCoE CRC is something entirely different.

Applied, thanks a lot Ben.