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 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]>
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]>
SDV is modern mode fails without any information if there
are source files with '-' sign in the name. This is
preparation change for further work with modern SDV.
Signed-off-by: Yuri Benditovich <[email protected]>