HomeFreeBSD

hyperv/hn: Avoid duplicate csum features settings

Description

hyperv/hn: Avoid duplicate csum features settings

  • Record csum features in softc, so we don't need to duplicate the logic from attach path to ioctl path.
  • Protect if_capenable and if_hwassist changes by main lock.
  • Prefer turn on/off bits in if_hwassist explicitly instead of using XOR.

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/D5085

Details

Provenance
sepheAuthored on
Reviewer
adrian
Differential Revision
D5085: hyperv/hn: Avoid duplicate csum features settings
Parents
rS295295: hyperv/stor: Fix the NULL pointer dereference
Branches
Unknown
Tags
Unknown