Files
freebsd/sys/dev/hyperv
Kevin Bowling 31896115b5 hn: Forward capability changes to transparent VFs
The transparent VF capability handler ignored the requested change and
only copied the VF's enabled capabilities.  Forward SIOCSIFCAP to the VF
and return its result.  Preserve VF capabilities which hn does not expose.

Limit advertised capabilities to those supported by the transparent
packet path and VLAN relay.  Do not inherit VF services such as send tags
or the extended capability ioctl when hn has no corresponding methods.
At handoff, adopt the VF's enabled offloads without reconfiguring it.

Mark the datapath as switching while the VF applies a capability change,
since its ioctl may reinitialize the device.  If the association is still
ready and unchanged afterwards, synchronize hn with the actual VF state
even on error and restrict checksum assistance to the forwarded offloads.
Republish link state suppressed during the transition when the VF is
still ready.  Refresh VLAN child capabilities after adoption and when
restoring the synthetic path.

Run the VF capability ioctl without hn_lock to avoid reversing the VLAN
configuration lock order.  Hold an ifnet reference, serialize capability
changes and VF initialization, and make detach wait with hn_lock released.
Revalidate the VF association before publishing the result.  Defer
VLAN-child capability notifications to the existing VF taskqueue so they
also run without hn_lock, and drain that work before ifnet teardown.

MFC after:	2 weeks
Sponsored by:	BBOX.io
2026-09-16 17:12:07 -07:00
..
2026-09-16 17:12:07 +03:00
2026-09-16 17:12:07 +03:00
2026-09-16 17:12:07 +03:00