HomeFreeBSD

hyperv/hn: Suspend and resume the backend properly upon MTU change.

Description

hyperv/hn: Suspend and resume the backend properly upon MTU change.

Suspend:

  • Prevent the backend from being touched on TX path.
  • Clear the RNDIS RX filter, and wait for RX to drain.
  • Make sure that NVS see the chimney sending buffer and RXBUF disconnection, before unlink these buffers from the channel.

Resume:

  • Reconfigure the RNDIS filter.
  • Allow TX path to work on the backend.
  • Kick start the TX eof task, in case the OACTIVE is set.

This fixes various panics, when the interface has traffic and MTU
is being changed.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8046