Skip to contentSkip to conversation

net: update the usage of CHECKSUM_UNNECESSARY

PATCH Applied Yi Zou 5 participants 7 messages Mar 19, 2012 – May 10, 2012 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Yi Zou

author
#0 lore raw

PATCH 1/1 net: update the usage of CHECKSUM_UNNECESSARY

As suggested by Ben, this adds the clarification on the usage of CHECKSUM_UNNECESSARY on the outgoing patch. Also add the usage description of NETIF_F_FCOE_CRC and CHECKSUM_UNNECESSARY for the kernel FCoE protocol driver.

This is a follow-up to the following:
http://patchwork.ozlabs.org/patch/147315/

Cc Ben Hutchings <[email protected]>
Cc Jeff Kirsher <[email protected]>
Cc www.Open-FCoE.org <[email protected]>

---

 include/linux/skbuff.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
include/linux/skbuff.h +7 -0
index 8dc8257..a2b9953 100644
@@ -94,6 +94,13 @@
  *			  about CHECKSUM_UNNECESSARY. 8)
  *	NETIF_F_IPV6_CSUM about as dumb as the last one but does IPv6 instead.
  *
+ *	UNNECESSARY: device will do per protocol specific csum. Protocol drivers
+ *	that do not want net to perform the checksum calculation should use
+ *	this flag in their outgoing skbs.
+ *	NETIF_F_FCOE_CRC  this indicates the device can do FCoE FC CRC
+ *			  offload. Correspondingly, the FCoE protocol driver
+ *			  stack should use CHECKSUM_UNNECESSARY.
+ *
  *	Any questions? No questions, good. 		--ANK
  */
 
maintainer Applied
#1 lore raw

From: Yi Zou <[email protected]>
Date: Mon, 19 Mar 2012 14:12:41 -0700

Quoted 5 lines

As suggested by Ben, this adds the clarification on the usage of CHECKSUM_UNNECESSARY on the outgoing patch. Also add the usage description of NETIF_F_FCOE_CRC and CHECKSUM_UNNECESSARY for the kernel FCoE protocol driver.

Quoted 7 lines

This is a follow-up to the following:
http://patchwork.ozlabs.org/patch/147315/

Cc Ben Hutchings <[email protected]>
Cc Jeff Kirsher <[email protected]>
Cc www.Open-FCoE.org <[email protected]>

Applied.

#2 lore raw
In reply to Yi Zou
Quoted 25 lines · Yi Zou

As suggested by Ben, this adds the clarification on the usage of CHECKSUM_UNNECESSARY on the outgoing patch. Also add the usage description of NETIF_F_FCOE_CRC and CHECKSUM_UNNECESSARY for the kernel FCoE protocol driver.

This is a follow-up to the following:
http://patchwork.ozlabs.org/patch/147315/

Cc Ben Hutchings <[email protected]>
Cc Jeff Kirsher <[email protected]>
Cc www.Open-FCoE.org <[email protected]>

---

 include/linux/skbuff.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
include/linux/skbuff.h +0 -0
index 8dc8257..a2b9953 100644
@@ -94,6 +94,13 @@
  *			  about CHECKSUM_UNNECESSARY. 8)
  *	NETIF_F_IPV6_CSUM about as dumb as the last one but does IPv6 instead.
  *

include/linux/skbuff.h line 106

Quoted 10 lines
include/linux/skbuff.h +7 -0
+ *	UNNECESSARY: device will do per protocol specific csum. Protocol drivers
+ *	that do not want net to perform the checksum calculation should use
+ *	this flag in their outgoing skbs.
+ *	NETIF_F_FCOE_CRC  this indicates the device can do FCoE FC CRC
+ *			  offload. Correspondingly, the FCoE protocol driver
+ *			  stack should use CHECKSUM_UNNECESSARY.
+ *
  *	Any questions? No questions, good. 		--ANK
  */
 

So just to make sure I understand, you never get UNNECESSARY packets on tx unless you declared NETIF_F_FCOE_CRC?

Maybe the comment says this somehow but could not figure it out.

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 40 lines · Michael S. Tsirkin
Quoted 25 lines · Yi Zou

As suggested by Ben, this adds the clarification on the usage of CHECKSUM_UNNECESSARY on the outgoing patch. Also add the usage description of NETIF_F_FCOE_CRC and CHECKSUM_UNNECESSARY for the kernel FCoE protocol driver.

This is a follow-up to the following:
http://patchwork.ozlabs.org/patch/147315/

Cc Ben Hutchings <bhutchings-s/n/[email protected]>
Cc Jeff Kirsher <[email protected]>
Cc www.Open-FCoE.org <[email protected]>

---

 include/linux/skbuff.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
include/linux/skbuff.h +0 -0
index 8dc8257..a2b9953 100644
@@ -94,6 +94,13 @@
  *			  about CHECKSUM_UNNECESSARY. 8)
  *	NETIF_F_IPV6_CSUM about as dumb as the last one but does IPv6 instead.
  *

include/linux/skbuff.h line 106

Quoted 10 lines
include/linux/skbuff.h +7 -0
+ *	UNNECESSARY: device will do per protocol specific csum. Protocol drivers
+ *	that do not want net to perform the checksum calculation should use
+ *	this flag in their outgoing skbs.
+ *	NETIF_F_FCOE_CRC  this indicates the device can do FCoE FC CRC
+ *			  offload. Correspondingly, the FCoE protocol driver
+ *			  stack should use CHECKSUM_UNNECESSARY.
+ *
  *	Any questions? No questions, good. 		--ANK
  */
 

So just to make sure I understand, you never get UNNECESSARY packets on tx unless you declared NETIF_F_FCOE_CRC?

Quoted 1 line

Maybe the comment says this somehow but could not figure it out.

That's what should happen now. In future CHECKSUM_UNNECESSARY could be used on output by other protocols which don't use TCP/IP-style checksums, but always dependent on the output device supporting the relevant offload feature.

Ben.

Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
#5 lore raw
Quoted 41 lines · Ben Hutchings
Quoted 40 lines · Michael S. Tsirkin
Quoted 25 lines · Yi Zou

As suggested by Ben, this adds the clarification on the usage of CHECKSUM_UNNECESSARY on the outgoing patch. Also add the usage description of NETIF_F_FCOE_CRC and CHECKSUM_UNNECESSARY for the kernel FCoE protocol driver.

This is a follow-up to the following:
http://patchwork.ozlabs.org/patch/147315/

Cc Ben Hutchings <[email protected]>
Cc Jeff Kirsher <[email protected]>
Cc www.Open-FCoE.org <[email protected]>

---

 include/linux/skbuff.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
include/linux/skbuff.h +0 -0
index 8dc8257..a2b9953 100644
@@ -94,6 +94,13 @@
  *			  about CHECKSUM_UNNECESSARY. 8)
  *	NETIF_F_IPV6_CSUM about as dumb as the last one but does IPv6 instead.
  *

include/linux/skbuff.h line 106

Quoted 10 lines
include/linux/skbuff.h +7 -0
+ *	UNNECESSARY: device will do per protocol specific csum. Protocol drivers
+ *	that do not want net to perform the checksum calculation should use
+ *	this flag in their outgoing skbs.
+ *	NETIF_F_FCOE_CRC  this indicates the device can do FCoE FC CRC
+ *			  offload. Correspondingly, the FCoE protocol driver
+ *			  stack should use CHECKSUM_UNNECESSARY.
+ *
  *	Any questions? No questions, good. 		--ANK
  */
 

So just to make sure I understand, you never get UNNECESSARY packets on tx unless you declared NETIF_F_FCOE_CRC?

Quoted 8 lines
Quoted 1 line

Maybe the comment says this somehow but could not figure it out.

That's what should happen now. In future CHECKSUM_UNNECESSARY could be used on output by other protocols which don't use TCP/IP-style checksums, but always dependent on the output device supporting the relevant offload feature.

Ben.

Isn't there another case: a device passes UNNECESSARY in on rx, and the skb is forwarded to another device?
For example it is handled this way by tun, giving a nice performance boost for VMs, see 10a8d94a95742bb15b4e617ee9884bb4381362be

Quoted 4 lines
Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
#6 lore raw
Quoted 49 lines · Michael S. Tsirkin
Quoted 48 lines · Ben Hutchings
Quoted 40 lines · Michael S. Tsirkin
Quoted 25 lines · Yi Zou

As suggested by Ben, this adds the clarification on the usage of CHECKSUM_UNNECESSARY on the outgoing patch. Also add the usage description of NETIF_F_FCOE_CRC and CHECKSUM_UNNECESSARY for the kernel FCoE protocol driver.

This is a follow-up to the following:
http://patchwork.ozlabs.org/patch/147315/

Cc Ben Hutchings <[email protected]>
Cc Jeff Kirsher <[email protected]>
Cc www.Open-FCoE.org <[email protected]>

---

 include/linux/skbuff.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
include/linux/skbuff.h +0 -0
index 8dc8257..a2b9953 100644
@@ -94,6 +94,13 @@
  *			  about CHECKSUM_UNNECESSARY. 8)
  *	NETIF_F_IPV6_CSUM about as dumb as the last one but does IPv6 instead.
  *

include/linux/skbuff.h line 106

Quoted 10 lines
include/linux/skbuff.h +7 -0
+ *	UNNECESSARY: device will do per protocol specific csum. Protocol drivers
+ *	that do not want net to perform the checksum calculation should use
+ *	this flag in their outgoing skbs.
+ *	NETIF_F_FCOE_CRC  this indicates the device can do FCoE FC CRC
+ *			  offload. Correspondingly, the FCoE protocol driver
+ *			  stack should use CHECKSUM_UNNECESSARY.
+ *
  *	Any questions? No questions, good. 		--ANK
  */
 

So just to make sure I understand, you never get UNNECESSARY packets on tx unless you declared NETIF_F_FCOE_CRC?

Quoted 1 line

Maybe the comment says this somehow but could not figure it out.

That's what should happen now. In future CHECKSUM_UNNECESSARY could be used on output by other protocols which don't use TCP/IP-style checksums, but always dependent on the output device supporting the relevant offload feature.

Quoted 6 lines
Quoted 1 line

Ben.

Isn't there another case: a device passes UNNECESSARY in on rx, and the skb is forwarded to another device?
For example it is handled this way by tun, giving a nice performance boost for VMs, see 10a8d94a95742bb15b4e617ee9884bb4381362be

Hmm... I thought UNNECESSARY was supposed to be replaced by NONE on output, but I don't see where that would happen. Which would mean we had an undocumented case here, and now we have ambiguity. :-(

Ben.

Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
#7 lore raw
Quoted 57 lines · Ben Hutchings
Quoted 49 lines · Michael S. Tsirkin
Quoted 48 lines · Ben Hutchings
Quoted 40 lines · Michael S. Tsirkin
Quoted 25 lines · Yi Zou

As suggested by Ben, this adds the clarification on the usage of CHECKSUM_UNNECESSARY on the outgoing patch. Also add the usage description of NETIF_F_FCOE_CRC and CHECKSUM_UNNECESSARY for the kernel FCoE protocol driver.

This is a follow-up to the following:
http://patchwork.ozlabs.org/patch/147315/

Cc Ben Hutchings <[email protected]>
Cc Jeff Kirsher <[email protected]>
Cc www.Open-FCoE.org <[email protected]>

---

 include/linux/skbuff.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
include/linux/skbuff.h +0 -0
index 8dc8257..a2b9953 100644
@@ -94,6 +94,13 @@
  *			  about CHECKSUM_UNNECESSARY. 8)
  *	NETIF_F_IPV6_CSUM about as dumb as the last one but does IPv6 instead.
  *

include/linux/skbuff.h line 106

Quoted 10 lines
include/linux/skbuff.h +7 -0
+ *	UNNECESSARY: device will do per protocol specific csum. Protocol drivers
+ *	that do not want net to perform the checksum calculation should use
+ *	this flag in their outgoing skbs.
+ *	NETIF_F_FCOE_CRC  this indicates the device can do FCoE FC CRC
+ *			  offload. Correspondingly, the FCoE protocol driver
+ *			  stack should use CHECKSUM_UNNECESSARY.
+ *
  *	Any questions? No questions, good. 		--ANK
  */
 

So just to make sure I understand, you never get UNNECESSARY packets on tx unless you declared NETIF_F_FCOE_CRC?

Quoted 1 line

Maybe the comment says this somehow but could not figure it out.

That's what should happen now. In future CHECKSUM_UNNECESSARY could be used on output by other protocols which don't use TCP/IP-style checksums, but always dependent on the output device supporting the relevant offload feature.

Quoted 6 lines
Quoted 1 line

Ben.

Isn't there another case: a device passes UNNECESSARY in on rx, and the skb is forwarded to another device?
For example it is handled this way by tun, giving a nice performance boost for VMs, see 10a8d94a95742bb15b4e617ee9884bb4381362be

Quoted 5 lines

Hmm... I thought UNNECESSARY was supposed to be replaced by NONE on output, but I don't see where that would happen. Which would mean we had an undocumented case here, and now we have ambiguity. :-(

Ben.

Ambiguity with FCoE? Why doesn't that use PARTIAL btw? Simply to avoid teaching net core about that protocol and NETIF_F_FCOE_CRC?

Quoted 4 lines
Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.