Add parameter to ParaNdis_ProtocolUnregisterAdapter to make
optional the unregistration of protocol on removal of the
last adapter. In 'Halt' flow we need to unregister the protocol
when there are no more adapters. In future we'll add flow
when we need to keep the protocol registered.
Signed-off-by: Yuri Benditovich <[email protected]>
In case the teaming support is not relevant (which is
the case on most of setups), we'd like to minimize to
performance loss due to the fact that we need to check
presense of the teaming on each packet transmit or
packet return. For that we prepare two possibilities:
1) use indication that there is at least one adapter bound
to the protocol.
2) use acked 'standby' feature
Currently first option is used.
Signed-off-by: Yuri Benditovich <[email protected]>
When the adapter is found, OnAdapterFound checks the compatibility
of two adapters and if ok sets m_BoundAdapter.
If the VFIO adapter is in operational state, it also calls
OnAdapterAttached to start state machines and set m_Started.
Otherwise: later when the protocol binding receives state
indication that the VFIO adapter entered operational state
it spawns work item which finally calls OnAdapterAttached.
Signed-off-by: Yuri Benditovich <[email protected]>
This is preparation patch, this work item will be spawned
when VFIO adapter enters its operational state.
Signed-off-by: Yuri Benditovich <[email protected]>
OnAdapterAttach is splitted to:
OnAdapterFound sets m_BoundAdapter
OnAdapterAttached sets m_Started flag and starts state
machines of packets redirection.
Signed-off-by: Yuri Benditovich <[email protected]>