New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failover rework #933
Merged
Merged
Failover rework #933
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
|
|
@annie-li Hi Annie, adding you for the awareness. Your review is welcomed. |
YanVugenfirer
requested changes
Jun 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the comments int he commits.
Control device lifecycle follows one of failover protocol, i.e. created with first virtio-net device and deleted with the removal of the last one. User-mode component can use device IO controls to access it. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
When the OS tries to bind the netkvm adapter to VIOPROT the driver rejects the binding, but a memory leak happens. Current commit solves it. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
If the bound VF adapter reports a packet with RESOURCES flag the protocol handler must never return it and also NDIS never returns it, the VF driver retains the ownership. Fix the counting for such packets. We can see sometimes such packets at least with I350 VF. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
The protocol part (VF binding) is changed to change it's state when required to do so by the protocol service. Only VF removal changes the state of binding/netkvm adapter without external request. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Add several helper classes and extend the service class for later use. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Add logic to the user-mode protocol service to replace and extend the functionality of the notification object: - install VIOPROT for all the network adapters - disable all other protocols for relevant VF only when needed - enable all the protocols on netkvm disable - enable all the protocol on VIOPROT uninstall - ... (see in the source code) Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
netkvmp i/u installs and uninstalls the protocol. The goal is to avoid additional batch files. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Add scan for INF files and uninstall of the protocol's INF file. Now the uninstall script is not needed, just "netkvmp u". Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Make it exactly as in the Microsoft example. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Indicate stopped state only after the thread is finished. Otherwise the structures in the memory might be unpredictably modified. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
We'll reuse it later. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Add several useful binding settings (bind VIOPROT only, other only, all, disable/enable tcpip). Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
The goal is to keep full functionality after protocol uninstall in several major cases: - VF present and the failover pair works After uninstall the virtio-net should become link off (suppressed) and the VF should obtain the IP address correctly - VF not present and the virtio-net works After uninstall the virtio-net should become link off (suppressed) The flag 'NoRestoreOnStop' is for future possibility to stop/start the service without protocol uninstall. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
The notification is not needed now, the logic of the operation is changed and implemented in the protocol service. To avoid changes in packaging we do not change the set of files but the DLL does not service the protocol anymore. Future plan is to remove also protocol binary from the protocol installation and move it to the installation of netkvm. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Earlier commit 42b1e51 has changed the configuration of ProtocolService from Release to Win10Release but did not it in the postbuild of NotifyObject. Fixing it Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
The signing is optional and used only during development build. Fixed signing command to satisfy signtool of WDK 22000. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
"netkvmp i" must have vioprot.inf (and CAT) in the current directory. To avoid misunderstandings, add a check for the INF file in the current directory. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
"netkvmp e" - for internal purposes Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
When network devices come to enabled/disabled state or added/removed - process the change immediately and not only via periodical polling Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
This flag was used to determine whether we need to restore functional state of adapters on service stop. The proper way to do that is to check whether the VIOPROT is installed. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Now the protocol service works correctly in both uninstall and temporary service stop flows. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Running the application without admin priviliges is meaningless. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Currently in the statistics reported by the netkvm adapter does not include the packets transmitted via VF and received from VF. The commit fixes it: it maintains the VF statistics and on each call adds the difference of first call it saves the statistics of VF, on further calls if updates netkvm statistics. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
DOC file format is hardly readable without specially installed tools. The Logo requirement to have network adapter configuration utility manual in DOC file is gone. We move the text from the DOC file to readme.md and add to the MD also documentation regarding failover feature. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Populate readme.md in the installation package instead if readme.doc. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Make it exactly as described in the decumentation: 'i' or 'install', 'u' or 'uninstall' add usage for not recognized parameters. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
YanVugenfirer
approved these changes
Jul 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.