Commit Graph
43 Commits
Author SHA1 Message Date
Sameeh Jubran ce2fac65f3 NetKVM: SM: Register paths for notifications
Signed-off-by: Sameeh Jubran <[email protected]>
2018-04-26 10:32:20 +03:00
Sameeh Jubran 2cc38bac81 NetKVM: Integrate WPP Tracing
This commit integrates wpp tracing into builds higher than Vista as
Windows Vista requires much more configuration for wpp integration,
however, this integration may be introduced in the future.

The old style of Dprintf is still preserved by this commit and can be
enabled by disabling WPP tracing. This can be accomplished by commenting
the following line in WPPTrace.h:

Signed-off-by: Sameeh Jubran <[email protected]>
2017-12-12 21:53:43 +02:00
Sameeh Jubran 699a3c6d1c NetKVM: DPrintf: Use variadic arguments and fmt
This should be the appropriate for handling variadic arguments in a
MACRO.

Signed-off-by: Sameeh Jubran <[email protected]>
2017-12-12 21:53:43 +02:00
Ladi Prosek b90465a268 netkvm/NDIS6: Remove all uses of virtio_set_queue_event_suppression()
The function has no effect and will be removed.

Also deleting the defunct "PublishIndices" config entry.

Signed-off-by: Ladi Prosek <[email protected]>
2017-12-04 09:56:59 +01:00
Sameeh Jubran 6976f63c92 NetKVM: Use Ndis DPC level spinlock functions
The NdisDprAcquireSpinLock and NdisDprReleaseSpinLock are an optimized
version of the Ndis Acquire and Release functions that should be called
only at Dispatch level.

Signed-off-by: Sameeh Jubran <[email protected]>
2017-12-03 10:30:44 +02:00
Ladi Prosek fe0314a33b netkvm: Spelling fixes 2017-01-20 21:08:17 +11:00
Sameeh Jubran a49c33a255 Fix RX kick timing
According to the virtio spec the RX ring should not be kicked before DRIVER_OK
status is set.

Signed-off-by: Sameeh Jubran <[email protected]>
2017-01-15 14:17:11 +11:00
Ladi Prosek 12956368b5 netkvm: Use fewer virtio receive SG descriptors
NdisMAllocateSharedMemory allocates physically contiguous memory
so it is not necessary to create the receive scatter-gather list
from single-page blocks.

With this fix, the typical number of SG descriptors is reduced from
~18 to 2, speeding up recive processing both on the guest and host
side.
2016-12-15 14:08:28 +11:00
Ladi Prosek 1a8181ed5f netkvm: Tweak physical memory allocation routines
ParaNdis_InitialAllocatePhysicalMemory gets a new ulSize parameter
which makes pAddresses pure output now. Also, references to a non-existent
ParaNdis_RuntimeRequestToAllocatePhysicalMemory are removed.
2016-12-15 14:08:28 +11:00
Ladi Prosek a2e7045330 netkvm: Switch NDIS6 over to virtio 1.0 API
This commit switches the NDIS6 driver over to the new VirtioLib
API which enables virtio 1.0 support.
2016-07-17 20:35:29 +10:00
Dmitry Fleytman 2d2df86803 NetKVM: Fix unclassified packets out of order on RX
When working with 1 queue MQ or without MQ RX path
may be processed by a few CPUs running DPC routine
in parallel.

In this case only one of those should do the real
processing.

Signed-off-by: Dmitry Fleytman <[email protected]>
2016-06-21 22:00:20 +10:00
Dmitry Fleytman d765266971 NetKVM: Clean up synchronize with interrupt logic
Signed-off-by: Dmitry Fleytman <[email protected]>
2016-06-21 21:06:33 +10:00
Dmitry Fleytman e1de11fd36 NetKVM: Restore CVirtQueue encapsulation and clean code duplication
This patch is cleanup and does not change code behaviour.

Signed-off-by: Dmitry Fleytman <[email protected]>
2016-06-21 21:06:33 +10:00
Dmitry Fleytman bf139f40f2 NetKVM: Drop old receive state tracking and logic
Signed-off-by: Dmitry Fleytman <[email protected]>
2016-05-30 19:17:08 +10:00
Yan Vugenfirer 675ff81327 NetKVM: Refactoring ndis56common.h
Removing debug history and debug initialization functions from
ndis56common.h

Signed-off-by: Yan Vugenfirer <[email protected]>
2015-06-23 20:51:42 +10:00
Yan Vugenfirer eb06694f9e NetKVM: Refactoring ndis56common.h: to enable removal of kdebugprint.h dependency
Part of the effort to simplify ndis56common.h. This is the first step in
removing kdebugprint.h from ndis56common.h, adding include where needed and
moving some functions implementation from class definitions files.

Signed-off-by: Yan Vugenfirer <[email protected]>
2015-06-23 20:51:42 +10:00
Joseph Hindin d328395de0 NetKVM: BZ#1190960: Vista compilation fix
The logic of dispatching the packet toward different ReceiveQueues
depending on scaling data, was placed under #ifdef. In case
of no RSS support, all packets goes to the same receive queue.

In order to avoid #ifdef duplication, declarations of variables
used only for RSS-related computations, were moved under same
 ifdef - with varaibels not ifdef'd, compiler complains
on unreferenced variables.

Also, parameter 'nCurrCpuReceiveQueue' is used only for RSS
computation, so in the absence of RSS, 'unused parameter' warning
was disabled with UNREFERENCED_PARAMETER macro.

Signed-off-by: Joseph Hindin <[email protected]>
2015-05-03 12:34:55 +10:00
Joseph Hindin 51375abb69 NetKVM: BZ#1190960: Global receive queue eliminated
Before the patch 'Routing unclassified packets through RX path's receive
queue', unclassified packets were routed through per-context receive queue,
placed into ReceiveQueues array at index 0. The patch 'Routing
unclassified packets through RX path's receive queue' changes
unclassified packets routing so that they are placed into a dedicated
receive queue, one per virtqueue/CParaNdisRX instance. This patch
completes the change by removing per-context receive queue; first
element in ReceiveQueues array has not special meaning and the
constant 'PARANDIS_RECEIVE_QUEUE_UNCLASSIFIED'  was split
into 'PARANDIS_RECEIVE_UNCLASSIFIED_PACKET' and
'PARANDIS_RECEIVE_NO_QUEUE', depending on context.

Signed-off-by: Joseph Hindin <[email protected]>
2015-04-30 11:12:41 +10:00
Joseph Hindin ff01baa9f2 NetKVM: BZ#1190960: Routing unclassified packets through RX path's receive queue; processing RX paths's receive queue on release and RSS reclassification
Signed-off-by: Joseph Hindin <[email protected]>
2015-04-30 11:12:41 +10:00
Joseph Hindin b4d62b00e5 NetKVM: BZ#1190960: ReceiveQueue per virtqueue for unclassified packets
Signed-off-by: Joseph Hindin <[email protected]>
2015-04-30 11:12:41 +10:00
Joseph Hindin 396aeff3a2 NetKVM: BZ#1190968: comment on receive packet counter
Signed-off-by: Joseph Hindin <[email protected]>
2015-03-20 10:06:05 +11:00
Joseph Hindin 3f6805e7b7 NetKVM: BZ#1190968: counter renamed in more concise way
Signed-off-by: Joseph Hindin <[email protected]>
2015-03-20 10:06:05 +11:00
Joseph Hindin a3b30138b5 NetKVM: BZ#1190968: superfluos test removed
Signed-off-by: Joseph Hindin <[email protected]>
2015-03-20 10:06:05 +11:00
Joseph Hindin 371c68ed14 NetKVM: BZ#1188790: Removing/inserting buffer in list depending of the RX path state
Signed-off-by: Joseph Hindin <[email protected]>
2015-02-24 10:15:54 +11:00
Joseph Hindin 1c882c9f6b NetKVM: BZ#1188790: Removing ReuseRegular flag from the context
Signed-off-by: Joseph Hindin <[email protected]>
2015-02-24 10:15:54 +11:00
Joseph Hindin 0f738a9c0c NetKVM: BZ#1188790: Pausing state changes to be reverted
The refactoring considered too deep, instead code is stabilized with
incremental changes and refactoring postponed

Signed-off-by: Joseph Hindin <[email protected]>
2015-02-24 10:15:54 +11:00
Joseph Hindin 42622a9cd4 NetKVM: BZ#1188790: Reusing buffer streamlined
Signed-off-by: Joseph Hindin <[email protected]>
2015-02-09 18:13:14 +11:00
Joseph Hindin efe5607f11 NetKVM: BZ#1188790: pending packet manipulations on entry and return
Signed-off-by: Joseph Hindin <[email protected]>
2015-02-09 18:13:14 +11:00
Joseph Hindin 5f0fbd7608 NetKVM: BZ#1188790: Rename pending packets counter
Signed-off-by: Joseph Hindin <[email protected]>
2015-02-09 18:13:14 +11:00
Joseph Hindin 6072abdc4b NetKVM: BZ#1147239: Testing the pause state in explicit function, outside of lock
Signed-off-by: Joseph Hindin <[email protected]>
2014-12-11 22:35:17 +11:00
Joseph Hindin 1e4c959e34 NetKVM: BZ#1147239: Indicating outside of ProcessReceiveQueue function
Signed-off-by: Joseph Hindin <[email protected]>
2014-12-11 22:35:08 +11:00
Joseph Hindin 021a9142f4 NetKVM: BZ#1147202: Avoid deadlock in RXQueue operations upon error
Signed-off-by: Joseph Hindin <[email protected]>
2014-10-08 20:38:48 +11:00
Joseph Hindin 878eb55e2c NetKVM: BZ#1096505: IO device allocated and reallocated depending on pathes's number
Signed-off-by: Joseph Hindin <[email protected]>
2014-09-02 09:17:17 +10:00
Joseph Hindin d6f960efc7 NetKVM: BZ#1096505: Interrupp handling prepared for multiqueue
Signed-off-by: Joseph Hindin <[email protected]>
2014-09-02 09:17:16 +10:00
Joseph Hindin 1b35b80966 NetKVM: BZ#1096505: Message indices removed from context, stored only in path's instances
Signed-off-by: Joseph Hindin <[email protected]>
2014-09-02 09:17:16 +10:00
Joseph Hindin 3c9df083a9 NetKVM: BZ#1096505: Queue amd message indices field in AbstractPath
Signed-off-by: Joseph Hindin <[email protected]>
2014-09-02 09:17:16 +10:00
Joseph Hindin 5179505b76 NetKVM: BZ#1096505: RXPath and TXPath allocated as array of size 1
Signed-off-by: Joseph Hindin <[email protected]>
2014-09-02 09:17:16 +10:00
Joseph Hindin 4691ccd3e0 NetKVM: BZ#1096505: pRXBuffer contains pointer to queue where it belongs; reused through pointer
Signed-off-by: Joseph Hindin <[email protected]>
2014-09-02 09:17:16 +10:00
Joseph Hindin d164a970c1 NetKVM: BZ#1096505: Introducing AbstractPath, common superclass for all NetKBM pathes
Signed-off-by: Joseph Hindin <[email protected]>
2014-09-02 09:17:16 +10:00
Joseph Hindin d82b6ce691 NetKVM: BZ#1096505: Control queue placed in a separate class
Signed-off-by: Joseph Hindin <[email protected]>
2014-09-02 09:17:16 +10:00
Joseph Hindin 3c2af7247e NetKVM: BZ#1096505: context upper-layer pending packet counter
Signed-off-by: Joseph Hindin <[email protected]>
2014-09-02 09:17:16 +10:00
Joseph Hindin 16501a8300 NetKVM: BZ#1096505: Cosmetic fixes: alignment, double semicolon, file location in the project
Signed-off-by: Joseph Hindin <[email protected]>
2014-09-02 09:17:16 +10:00
Joseph Hindin cfd9fdb0e8 NetKVM: BZ#1096505: Moving receive queue logic in a separate class CParaNdisRXPath
Signed-off-by: Joseph Hindin <[email protected]>
2014-09-02 09:17:16 +10:00