Skip to contentSkip to conversation

Should skb->csum include 8021Q header for CHECKSUM_COMPLETE && NETIF_F_HW_VLAN_CTAG_RX

RFC Thomas Graf 2 participants 2 messages Nov 29, 2013

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

Hi

Given CHECKSUM_COMPLETE, is skb->csum supposed to include the checksum of the VLAN header if the header was stripped by the NIC?

The answer is clear for non accelerated VLAN: it covers all of the packet without ethernet CRC.

For the accelerated path the answer is less clear after staring at drivers. The stack currently only fixes the csum for the software path.

We are seeing hw csum failure warnings for drivers like enic if OVS pops a VLAN header that was previously stripped in hardware. Should we force CHECKSUM_NONE like VXLAN does or are all drivers guaranteed to include VLAN bits for CHECK_COMPLETE regardless of acceleration?

Best,
Thomas

#1 lore raw
Quoted 19 lines · On Fri, 29 Nov 2013 13:28:19 +0000 Thomas Graf <[email protected]> wrote:

Hi

Given CHECKSUM_COMPLETE, is skb->csum supposed to include the checksum of the VLAN header if the header was stripped by the NIC?

The answer is clear for non accelerated VLAN: it covers all of the packet without ethernet CRC.

For the accelerated path the answer is less clear after staring at drivers. The stack currently only fixes the csum for the software path.

We are seeing hw csum failure warnings for drivers like enic if OVS pops a VLAN header that was previously stripped in hardware. Should we force CHECKSUM_NONE like VXLAN does or are all drivers guaranteed to include VLAN bits for CHECK_COMPLETE regardless of acceleration?

Quoted 6 lines

Best,
Thomas
--
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

Most hardware is smart enough that if it strips the VLAN header, it does not include it in the checksum.