Commit Graph
11 Commits
Author SHA1 Message Date
Yuri Benditovich b5089f0602 netkvm: solve code analysis warnings
Signed-off-by: Yuri Benditovich <[email protected]>
2020-07-07 17:53:39 +03:00
Yuri Benditovich f1aaabe3c1 netkvm: optional unregistration of protocol
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]>
2020-07-07 17:53:39 +03:00
Yuri Benditovich e2ffc1d229 netkvm: pass original return flags to VF adapter
If the VF driver uses this information it might be
helpful for it to optimize the RX return flow.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-07-07 17:53:39 +03:00
Yuri Benditovich 2c4c214c7d netkvm: add printouts of mac addresses
Signed-off-by: Yuri Benditovich <[email protected]>
2020-07-07 17:53:39 +03:00
Yuri Benditovich 2f8279563b netkvm: minimize impact of teaming support on performance
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]>
2020-07-07 17:53:39 +03:00
Yuri Benditovich 2b1ead2ad3 netkvm: implement adapter attach in 2 steps
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]>
2020-07-07 17:53:39 +03:00
Yuri Benditovich 504ae45254 netkvm: introduce work item to finish adapter attach
This is preparation patch, this work item will be spawned
when VFIO adapter enters its operational state.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-07-07 17:53:39 +03:00
Yuri Benditovich c817475a45 netkvm: split OnAdapterAttach procedure
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]>
2020-07-07 17:53:39 +03:00
Yuri Benditovich 368135b0ac netkvm: collect SRIOV adapter info when binding to it
Signed-off-by: Yuri Benditovich <[email protected]>
2020-07-07 17:53:39 +03:00
Yuri Benditovich 80cdd34f92 netkvm: reduce verbosity of the protocol part
Signed-off-by: Yuri Benditovich <[email protected]>
2020-07-07 17:53:39 +03:00
Yuri Benditovich bb4899ec46 netkvm: initial implementation of teaming protocol driver
Signed-off-by: Annie Li <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
2020-07-07 17:53:39 +03:00