Prepare the code to support NDIS 6.83 if such define will
be provided in a build (currently it is not).
Signed-off-by: Yuri Benditovich <[email protected]>
Win2022 HLK (NICStrictPropertyValidation) requires NumRssQueues
parameter default value to be 16 for 10Gbps adapters with
MSI-X support.
Signed-off-by: Viktor Prutyanov <[email protected]>
NetKVM treats VLAN ID = 4095 as well as IDs from 1-4094, that is frames
with ID = 4095 pass and others don't. According to IEEE 802.1Q, 4095
can't be valid VLAN ID. Also, Win2022 HLK assumes that NDIS accepts
ID <= 4094.
Signed-off-by: Viktor Prutyanov <[email protected]>
Rename IsSendPossible to IsTxRxPossible and use fCurrentLinkState
instead of bConnected. Reuse this procedure in Rx path also, the
condition is the same for both directions.
Signed-off-by: Yuri Benditovich <[email protected]>
Reuse ReadLinkState to obtain the link status from the device
and set properly fCurrentLinkState. When reporting the link
status on driver initialization we can't rely on bConnected
anymore as there is a possibility that we should hide the
link until VF is attached.
Signed-off-by: Yuri Benditovich <[email protected]>
If the device reports standby feature but the protocol is not
installed yet or VF not present suppress the link-up indication
until the VF comes first time. After that the link-up follows
link status of the device until the driver is disabled.
Set packet filter (effectively enable the RX from the VF) after
the link-up is indicated.
Signed-off-by: Yuri Benditovich <[email protected]>
Instead of calling destructor of CGuestAnnouncePackets
out of the blue, introduce Clear procedure and use it
from the destructor of the adapter context.
Signed-off-by: Yuri Benditovich <[email protected]>
Allocate RW lock in the constructor, if failed we will fail
the context initialization.
Free allocated CPU maps in the destructor, if allocated.
No need in "IsRSSinitialized" anymore.
Signed-off-by: Yuri Benditovich <[email protected]>
Automatic call to destructor frees resources allocated
by the object (memory block for control commands).
If virtqueue was created it is also deleted by this call or
earlier implicitly by Shutdown().
Signed-off-by: Yuri Benditovich <[email protected]>
Delete all the explicit initialization of receive queues
and the variable that indicates whether they are initialized.
Signed-off-by: Yuri Benditovich <[email protected]>
Change creation/deletion from alloc/free to new/destroy.
Remove some of explicit calls to constructors/destructors
of embedded objects.
Signed-off-by: Yuri Benditovich <[email protected]>
*JamboPacket provides the same control over MTU.
The difference is that *JumboPacket includes ethernet header
size while the previous MTU does not.
Signed-off-by: Yuri Benditovich <[email protected]>
NdisMAllocateSharedMemory maps memory as non cacheable on Arm Windows,
Given that Windows on Arm does not support unaligned accesses on uncached memory,
this behavior does result in crashes.
As such, use MmAllocateContiguousMemorySpecifyCache for the Arm64 architecture.
This choice is safe.
It's also to be noted that NdisMAllocateSharedMemory
ignores the isCached attribute anyway, and always
maps as cached on amd64.
This also allows us to remove the need for the Rx bounce buffer.
With this fix, networking w/ netkvm for Windows on Arm works fine.
(tested with QEMU emulator version 5.0.50 (v5.0.0-1065-g9f1f264edb))
Signed-off-by: Mohamed Mediouni <[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]>