Split tx,rx and rss statistics
Add property for [initial] configuration data
Make reset of statistics selective and explicit
Add metrics for:
- minimal number of rx buffers
- indications with 'resource' flag
- amount of allocated shared memory
Signed-off-by: Yuri Benditovich <[email protected]>
Implemented a workaround for rx packet loss encountered with TCP_NODELAY. By default,
this feature is turned off to minimize the impact on CPU performance and network bandwidth.
To activate the feature, go to the network card properties and set the MinRxBufferPercent
to a value above 0. A good starting point is to set MinRxBufferPercent to 25% and then monitor
for any packet loss. If packet loss continues, incrementally adjust the value to 50%, then 75%,
and if necessary, up to the maximum of 100%.
In extreme cases, it may be required to not only adjust the MinRxBufferPercent but also to increase
the number of queues and the size of each queue (queue_size).
It is important to note that this feature is only applicable to rx packet loss.
For more details, see [this thread](https://github.com/virtio-win/kvm-guest-drivers-windows/issues/1012).
Signed-off-by: junjiehua <[email protected]>
Removal of redundant/unneded lines from the .vcxproj
They also caused by IDE warning on loading of any project
including netkvmco.
Signed-off-by: Yuri Benditovich <[email protected]>
https://issues.redhat.com/browse/RHEL-19430
The number of buffers is always limited by queue size,
so with the default QEMU setting (256) the driver will do
the same. If QEMU is configured in command-line to have
bigger queue (it allows up to 1024), the previous driver
required to change also driver property to really use
full size of QEMU RX queue. Now this will not be required
(up to 1024 buffers).
Signed-off-by: Yuri Benditovich <[email protected]>
This commit updates the CNB::BindToDescriptor method signature, changing
the return type from a boolean to the newly introduced NBMappingStatus
enum. The updated method now returns one of the following statuses:
NBMappingStatus::SUCCESS
NBMappingStatus::NO_RESOURCE
NBMappingStatus::FAILURE
This change allows for more detailed reporting of the binding operation
outcome, enabling the caller to distinguish between different failure
reasons beyond the previous binary success/failure indication. The
NBMappingStatus enum provides a clearer, more expressive way to handle
the results of the binding process.
Signed-off-by: Zhang JianMing <[email protected]>
This commit introduces the CopyFromMdlChain function to the CNB class. The function is responsible for copying data from a Memory Descriptor List (MDL) chain to a specified destination buffer. A special focus has been given to ensuring the function handles the traversal of the MDL chain correctly, updating the Source MDL pointer and the Offset within the current MDL as it progresses through the chain.
Signed-off-by: Zhang JianMing <[email protected]>
This commit introduces the MAX_FRAGMENTS_IN_ONE_NB macro, which
defines the maximum number of fragments in a single NET_BUFFER. It
is used to constrain the SGTableCapacity value, ensuring it does
not exceed the meaningful limit set by MAX_FRAGMENTS_IN_ONE_NB.
Signed-off-by: Zhang JianMing <[email protected]>
This commit introduces extra pages within the TXManager module,
which are intended to support the copy mechanism that will be
implemented in subsequent updates. The addition of these pages lays
the groundwork for the new functionality and ensures that the
TXManager is prepared for the enhancements.
Signed-off-by: Zhang JianMing <[email protected]>
https://issues.redhat.com/browse/RHEL-20575
Currently the driver get RX descriptor from the rx virtQ,
analyses it (L2/L3), calculates hash and delivers to the
proper RSS queue. Later it extract the packet from the RSS
queue and checks whether it passes RX filters.
Now we move the filtering to the earliest stage - just after
basic analysis.
Note that in case of vhost there are no receive filters
configured by the host and typically the host does not work
in promiscuous mode, so it is redundant to calculate the hash
and trigger the RSS queue for packets that should be dropped.
Signed-off-by: Yuri Benditovich <[email protected]>
https://issues.redhat.com/browse/RHEL-19833
Commit e8f319fdc0 in part of NBL cancellation was wrong.
NBLs not matching the CancelId are lost, they will not be
neither sent nor completed. Leave the cancellation path
not implemented (as it is optional).
Signed-off-by: Yuri Benditovich <[email protected]>
https://issues.redhat.com/browse/RHEL-19441
The response to the query is calculated incorrectly.
We can make it correct but I think that support for this
OID is not required, it is not in the list of mandatory
OIDs. In general the NDIS has the same knowledge about
how many packets are queued by the miniport.
Signed-off-by: Yuri Benditovich <[email protected]>
Adding statistics for failed TX packets
(ones that can't be mapped using available indirect area) and
minimal available TX descriptors (if one or more TX virtqueues
were completely filled by packets this field will be read as 0)
These statistics fields are printed on disable and also available
at run-time via WMI.
Signed-off-by: Yuri Benditovich <[email protected]>
The assignment of m_FreeHWBuffers etc is wrong. If one of
TX descriptors is not allocated we need to take this in
account.
Signed-off-by: Yuri Benditovich <[email protected]>
https://issues.redhat.com/browse/RHEL-19317
Virtio spec 1.2 says in
"2.7.5.3.1 Driver Requirements: Indirect Descriptors":
"A driver MUST NOT create a descriptor chain longer than the Queue Size
of the device."
In case the device reports TX queue size shorter than 256 the driver
still can create a chain of up to 256 descriptors in the _indirect_
area. This commit limits the usage of indirect area by the actual
number of the TX descriptors created for the queue.
Note that QEMU of the day is able to retrieve up to 1024 descriptors
regardless the TX queue size and also does not allow to configure
the TX queue size to less than 256, but not required to do so.
Signed-off-by: Yuri Benditovich <[email protected]>
The library reads all the network adapter enums as strings.
If due to some reason the value is DWORD (Intel Wi-Fi), the
application gets exception and does not report anything at
all. Re-read the value is such case and avoid fatal error.
Signed-off-by: Yuri Benditovich <[email protected]>
netkvmco.h becomes interface file between static lib and the
application that uses it. The application should call start
and stop procedures of the helper and resolve missing
procedures that previously were in netsh.lib
Signed-off-by: Yuri Benditovich <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>