Commit Graph
34 Commits
Author SHA1 Message Date
Yuri Benditovich 6fa4db059d netkvm: define VIRTIO_NET_F_HASH_REPORT and ack it
When this feature is acked this changes the layout of
virtio header. It contains additional 8 bytes where
the device reports hash and hash type.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-05-04 16:41:00 +03:00
Yuri Benditovich 6ce66b5625 netkvm: maintain adapter context in RSS parameters struct
This is useful in any kind of debugging and further development.
Procedures that receive RSS parameters as the parameter should
be able to access easily the fields of the adapter.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-05-04 16:41:00 +03:00
Yuri Benditovich 0e3f42e61d netkvm: introduce control of device RSS support
Add a procedure to disable device RSS support for
engineering tests and comparison.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-05-04 16:41:00 +03:00
Yuri Benditovich ae355c516d netkvm: report device RSS capabilities to NDIS
If the device supports RSS the driver will report
device RSS capabilities (supported hash types) to
NDIS instead of software RSS impementation capabilities.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-05-04 16:41:00 +03:00
Yuri Benditovich 167fe5f00a netkvm: split lines in table printout
For case of non-WPP loggin.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-05-04 16:41:00 +03:00
Yuri Benditovich 9763430366 netkvm: configure device RSS on RSS OIDs
When RSS configuration OID received, send respective command
to the device, if the device supports RSS

Signed-off-by: Yuri Benditovich <[email protected]>
2020-05-04 16:41:00 +03:00
Yuri Benditovich cf0adde098 netkvm: use device RSS command for MQ if available
For initial MQ configuration use proper command:
use RSS command with RSS off and proper number of
queues if available. Otherwise use old MQ command.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-05-04 16:41:00 +03:00
Yuri Benditovich 7ab7bd4b2c netkvm: set DefaultProcessorNumber.Reserved to zero
NDIS_RECEIVE_SCALE_PARAMETERS.DefaultProcessorNumber may
have its 'Reserved' not zeroed, that makes the value
unusable for any practical purpose.
Zeroing this field before using the value.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-05-04 16:41:00 +03:00
Yuri Benditovich 8006de4e6e netkvm: maintain DefaultQueue for NDIS 6.80+
NDIS_RECEIVE_SCALE_PARAMETERS v3 contains DefaultProcessor
field that actually sets default queue to use for unclassified
packets. Adding code to maintain default queue and processor
in internal RSS parameters.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-05-04 16:41:00 +03:00
Yuri Benditovich ee74beb077 netkvm: extend PARANDIS_SCALING_SETTINGS struct
Add DefaultQueue and DefaultProcessor to the structure.
Currently DefaultQueue=PARANDIS_RECEIVE_UNCLASSIFIED_PACKET,
so DefaultProcessor does not matter. In future these field
might be changed by SetRSSParameters on NDIS 6.80+.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-05-04 16:41:00 +03:00
Yuri Benditovich 1630af3a0c netkvm: add procedures for UDP hash calculation
Calculate hash on UDP packets if requested by RSS setting.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-05-04 16:41:00 +03:00
Yuri Benditovich bebd6fd26a netkvm: use correct size of NDIS_RECEIVE_SCALE_PARAMETERS
This is preparation commit.
In further build with 6.80 support we may receive different
revisions of NDIS_RECEIVE_SCALE_PARAMETERS, so the check
with sizeof() will be incorrect.
Determine minimal size of the structure according to revision
of the structure and check the size before accessing it.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-05-04 16:41:00 +03:00
Yuri Benditovich 600224e615 netkvm: Prepare to report UDP hash capability
This is preparation commit.
In future case of run-time NDIS 6.80 we will be able to report
UDP hash capability and receive UDP hash enabled.

Signed-off-by: Yuri Benditovich <[email protected]>
2020-05-04 16:41:00 +03:00
Yuri Benditovich 0c03b85fdd netkvm: make ParaNdis_SetupRSSQueueMap static
The procedure now used only inside RSS, make it static.

Signed-off-by: Yuri Benditovich <[email protected]>
2019-12-23 09:57:33 +02:00
Yuri Benditovich 0b9b61923c netkvm: simplify AllocateCPUMappingArray
Reuse existing memory allocation procedure instead of
using explicit memory allocation call.

Signed-off-by: Yuri Benditovich <[email protected]>
2019-12-23 09:57:33 +02:00
Yuri Benditovich b03f55b722 netkvm: encapsulate ParaNdis6_RSSSetParameters
The procedure now does everything needed, including RW lock,
resetting of classification and RSS queue mapping.

Signed-off-by: Yuri Benditovich <[email protected]>
2019-12-23 09:57:33 +02:00
Yuri Benditovich a962e48f8c netkvm: encapsulate ParaNdis6_RSSSetReceiveHash
The procedure now does everything needed, including
reset of classification.

Signed-off-by: Yuri Benditovich <[email protected]>
2019-12-23 09:57:33 +02:00
Yuri Benditovich 27c1a66374 netkvm: change prototype of ParaNdis6_RSSSetReceiveHash
Pass the adapter context instead of passing its fields.
This is a preparation for further encapsulation.

Signed-off-by: Yuri Benditovich <[email protected]>
2019-12-23 09:57:33 +02:00
Yuri Benditovich 6fb4f979fc netkvm: change prototype of ParaNdis6_RSSSetParameters
Pass adapter context instead of passing its fields.
This is a preparation for further encapsulation.

Signed-off-by: Yuri Benditovich <[email protected]>
2019-12-23 09:57:33 +02:00
Yuri Benditovich 1f29c5c4ee netkvm: move ParaNdis_SetupRSSQueueMap to RSS scope
Due to historical reasons the procedure was placed
in common scope. Moving it to RSS area.

Signed-off-by: Yuri Benditovich <[email protected]>
2019-12-23 09:57:33 +02:00
Yuri Benditovich d07c893ae7 netkvm: fix IOCTL processing of RSS disable
In case of RSS disable IOCTL the driver rejects the
command due to 'invalid length' although the length of
of the received structure is correct. The structure does
not include any extensions as they are not required for
case of RSS disable. Current commit moves checks that
expect extended length of received structure to the
case when the IOCTL does not disable RSS. It also adds
printouts for each case the driver fails the IOCTL due
to wrong length.
For example, such IOCTL comes during driver disable.

Signed-off-by: Yuri Benditovich <[email protected]>
2019-02-27 15:29:17 +02: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
Yuri Benditovich eb44a9018d netkvm: Unification and small optimization in RSS code
Use single call to OS without redundant temporary variables
when obtaining current CPU index.

Signed-off-by: Yuri Benditovich <[email protected]>
2017-01-31 13:32:36 +11:00
Ladi Prosek fe0314a33b netkvm: Spelling fixes 2017-01-20 21:08:17 +11:00
Yuri Benditovich 6c63dd6ede netkvm: Fix race of changing of RSS parameters and TX
TX uses RSS2QueueMap vector to place TX packet into
one of TX queues according to hash. This vector is a
product of received RSS settings. If OS/NDIS sends
update of RSS settings simultaneously with packet
processing, the RSS2QueueMap may be wrong or even
invalid. The solution is protecting of TX packet
processing and change of RSS settings by read-write
lock (read on TX packet, write on RSS change).

Signed-off-by: Yuri Benditovich <[email protected]>
2016-11-22 20:35:12 +11:00
Dmitry Fleytman 978bdca459 NetKVM: Make ASSERT macros produce BSOD in debug builds
Signed-off-by: Dmitry Fleytman <[email protected]>
2016-05-30 19:17:08 +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 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 ccebcec964 NetKVM: BZ#1206279: RSS tables printout
Signed-off-by: Joseph Hindin <[email protected]>
2015-04-30 11:12:41 +10:00
Joseph Hindin 5bbaa2f250 NetKVM: BZ#1206279: fixes for CPU/Queue assignment and unclassified packets
Signed-off-by: Joseph Hindin <[email protected]>
2015-04-30 11:12:41 +10:00
Joseph Hindin dcecfea752 NetKVM: BZ#1154419: Under RSS unclassified packets dispatched to the first queue
Signed-off-by: Joseph Hindin <[email protected]>
2014-12-26 18:05:22 +11:00
Joseph Hindin d0a1c4f1e7 NetKVM: BZ#1096505: RW lock insetad of spinlock in RSS parameters
Signed-off-by: Joseph Hindin <[email protected]>
2014-07-02 17:25:26 +10:00
Dmitry Fleytman 53b6380af4 NetKVM: BZ1096505 Separate transmit path data from device context
This commit is a preparation for multiqueue implementation.
It itroduces changes driver's TX code structure the way
needed to allow creation of multiple independent transmit pathes.

Signed-off-by: Dmitry Fleytman <[email protected]>
2014-05-12 18:20:53 +10:00