Skip to content
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 36 commits into from Jul 2, 2023
Merged

Failover rework #933

merged 36 commits into from Jul 2, 2023

Conversation

ybendito
Copy link
Collaborator

No description provided.

@ybendito
Copy link
Collaborator Author

@YanVugenfirer @kostyanf14

  1. Strict property validation test failed on 2022 - is it something known?
  2. Unexplainable crash in PacketFilters test on 2019, not related to the commit, I suppose, happened also on previous one, requires investigation.
  3. Additional 2019 test is running - till now 0 failures.
    Let's wait until all the test finish then decide whether we need to merge it.

@YanVugenfirer
Copy link
Collaborator

@ybendito

  1. Know issue. Images should be update to new version of the test.
  2. Please open Jira
  3. Sure. Reviewing for now.

@YanVugenfirer
Copy link
Collaborator

@annie-li Hi Annie, adding you for the awareness. Your review is welcomed.

Copy link
Collaborator

@YanVugenfirer YanVugenfirer left a 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 YanVugenfirer merged commit a3739ee into virtio-win:master Jul 2, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants