Page MenuHomeFreeBSD

Fix issue with VXLAN-encapsulated rx h/w checksum

Authored by sbruno on Nov 6 2017, 4:21 PM.



The bnxt driver was using the "inner" IP and TCP/UDP
checksum fields when populating the mbuf's checksum
offload fields. That is fine when the inner frame
is an IP+TCP/UDP frame, since it is implied that
the inner checksum will only be examined if the "outer"
VXLAN checksums are Ok.

However, if the inner payload is not IP+TCP/UDP,
then the inner checksum won't be computed, and the mbuf won't
have any checksum information attached even though
the VXLAN UDP tunnel checksum is valid. This results
in the decapsulation code having to perform an
unnecessary s/w checksum.

Fix by checking both the inner and tunnel checksum
results. It isn't possible for the inner checksum
to pass if the outer one doesn't, so it's fine
to check both at one, which will cover both the
tunnel+non-IP and no-tunnel cases.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sbruno created this revision.Nov 6 2017, 4:21 PM
sbruno edited the summary of this revision. (Show Details)Nov 6 2017, 4:23 PM
sbruno edited the summary of this revision. (Show Details)Nov 7 2017, 8:19 PM
This revision is now accepted and ready to land.Nov 8 2017, 3:14 AM
grehan accepted this revision.Nov 8 2017, 3:26 AM
This revision was automatically updated to reflect the committed changes.