HomeFreeBSD

hyperv/hn: Reorganize TX csum offloading

Description

hyperv/hn: Reorganize TX csum offloading

  • For non-TSO offloading, we don't need to access mbuf to know which csum offloading is requested, we can just use the CSUM_{IP,TCP,UDP} in the csum_flags.
  • For TSO offloading, we still can depend on CSUM_{TSO4,TSO6} in the csum_flags to tell whether the TSO packet is an IPv4 TSO packet or an IPv6 TSO packet.

This streamlines csum offloading handling (remove the two goto)
and allows us the nuke the unnecessary get_transport_proto_type().

Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5098

Details

Provenance
sepheAuthored on
Reviewer
adrian
Differential Revision
D5098: hyperv/hn: Reorganize TX csum offloading
Parents
rS295296: hyperv/hn: Avoid duplicate csum features settings
Branches
Unknown
Tags
Unknown