Page MenuHomeFreeBSD

hyperv: Add VF bringup scripts and devd rules.
ClosedPublic

Authored by sepherosa_gmail.com on Jul 18 2017, 7:04 AM.

Details

Summary
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.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

royger edited edge metadata.Jul 24 2017, 10:03 AM

Sorry for jumping out of the blue, but I don't understand what this is all about. You seem to use lagg together with VFs (I assume PCI Virtual Functions), yet there's no commit message at all explaining what's going on, I think you should add a proper commit message describing how this is supposed to work.

Sorry for jumping out of the blue, but I don't understand what this is all about. You seem to use lagg together with VFs (I assume PCI Virtual Functions), yet there's no commit message at all explaining what's going on, I think you should add a proper commit message describing how this is supposed to work.

Yeah, sure. I will also add more detailed explanation about how it works to hyperv.conf.

sepherosa_gmail.com edited the summary of this revision. (Show Details)

Add comment about the network VF and hn(4) work together

This revision was automatically updated to reflect the committed changes.