| #
b5519c44 |
| 15-Sep-2026 |
Kevin Bowling <kbowling@FreeBSD.org> |
hyperv: Configure IPv6 when setting up VF failover
The default VF-up script moves IPv4 configuration from the synthetic interface to a failover lagg, but leaves IPv6 unconfigured on the lagg. Adding
hyperv: Configure IPv6 when setting up VF failover
The default VF-up script moves IPv4 configuration from the synthetic interface to a failover lagg, but leaves IPv6 unconfigured on the lagg. Adding the synthetic interface as a member can remove its IPv6 addresses, so deleting the remaining member addresses is not sufficient.
Stop accepting router advertisements on the synthetic interface before adding it to the lagg. Leave its link-local address and IPv6 enable state in place for lagg's address, prefix and default-router cleanup, then disable IPv6 and explicitly remove any remaining addresses. This also covers members without a link-local address or with IPv6 already disabled.
Replay the synthetic interface's IPv6 rc.conf configuration on the lagg, including aliases, prefix-derived addresses and legacy configuration names. Remap the variables in a subshell and reuse network.subr's IPv6 helpers. For SLAAC, solicit fresh router advertisements rather than copying learned addresses as permanent ones. Configure IPv6 independently of the IPv4 DHCP/static choice, and leave existing laggs alone on repeated invocation. Custom DHCPv6 clients and interface-scoped static routes still require the per-interface setup hook.
Fixes: c68595695679 ("hyperv: Add VF bringup scripts and devd rules.") MFC after: 2 weeks Sponsored by: BBOX.io
show more ...
|
| #
90f7956f |
| 15-Sep-2026 |
Kevin Bowling <kbowling@FreeBSD.org> |
hyperv: Bound IPv4 address removal when configuring VF failover
The VF-up script repeatedly deletes the first IPv4 address from hn until ifconfig fails. Netlink-based ifconfig returns success when
hyperv: Bound IPv4 address removal when configuring VF failover
The VF-up script repeatedly deletes the first IPv4 address from hn until ifconfig fails. Netlink-based ifconfig returns success when no address remains, so the script can loop forever and block subsequent devd work.
Use ipv4_down() from the already-sourced network.subr to enumerate the addresses and delete each explicitly. This also handles multiple addresses without relying on the exit status of an empty deletion. The behavior depends on ifconfig, not the VF hardware, so no device-specific fallback is needed.
Fixes: c68595695679 ("hyperv: Add VF bringup scripts and devd rules.") MFC after: 2 weeks Sponsored by: BBOX.io
show more ...
|
| #
c6859569 |
| 31-Jul-2017 |
Sepherosa Ziehau <sephe@FreeBSD.org> |
hyperv: Add VF bringup scripts and devd rules.
How network VF works with hn(4) on Hyper-V in non-transparent mode:
- Each network VF has a cooresponding hn(4). - The network VF and the it's cooresp
hyperv: Add VF bringup scripts and devd rules.
How network VF works with hn(4) on Hyper-V in non-transparent mode:
- Each network VF has a cooresponding hn(4). - The network VF and the it's cooresponding hn(4) have the same hardware address. - Once the network VF is up, e.g. ifconfig VF up: o All of the transmission should go through the network VF. o Most of the reception goes through the network VF. o Small amount of reception may go through the cooresponding hn(4). This reception will happen, even if the the cooresponding hn(4) is down. The cooresponding hn(4) will change the reception interface to the network VF, so that network layer and application layer will be tricked into thinking that these packets were received by the network VF. o The cooresponding hn(4) pretends the physical link is down. - Once the network VF is down or detached: o All of the transmission should go through the cooresponding hn(4). o All of the reception goes through the cooresponding hn(4). o The cooresponding hn(4) fallbacks to the original physical link detection logic.
All these features are mainly used to help live migration, during which the network VF will be detached, while the network communication to the VM must not be cut off. In order to reach this level of live migration transparency, we use failover mode lagg(4) with the network VF and the cooresponding hn(4) attached to it.
To ease user configuration for both network VF and non-network VF, the lagg(4) will be created by the following rules, and the configuration of the cooresponding hn(4) will be applied to the lagg(4) automatically.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11635
show more ...
|