HomeFreeBSD

Fix igb corrupting checksums with BPF and VLAN

Description

Fix igb corrupting checksums with BPF and VLAN

When using a vlan with igb and the vlanhwcsum option, any mbufs which
already had the TCP, UDP, or SCTP checksum calculated and therefore don't
have the CSUM_[IP|IP6]_[TCP|UDP|SCTP] bits set in the csum_flags field would
have the L4 checksum corrupted by the hardware.

This was caused by the driver setting E1000_TXD_POPTS_TXSM any time a
checksum bit was set OR a vlan tag was present.

The patched driver only sets E1000_TXD_POPTS_TXSM when an offload is
requested.

PR: 231416
Reported by: pi
Approved by: re (gjb)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D17404

Details

Provenance
shurdAuthored on
Differential Revision
D17393: Attempt to fix PR231416 (UDP BPF VLAN checksum errors)
Parents
rS339206: amd64: import updated kernel memset to libc
Branches
Unknown
Tags
Unknown