]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/log
pvdrivers/win/xenvif.git
10 years agoRelease lower bus interface before passing removal IRP to PDO
Paul Durrant [Fri, 27 Feb 2015 17:47:04 +0000 (17:47 +0000)]
Release lower bus interface before passing removal IRP to PDO

If the PDO is surprised removed then the FDO tries to retain its
reference to the PDO's bus interface byond its destruction. This will
cause an assertion failure in checked builds of XENBUS and may cause
memory corruption.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUpdate to EVTCHN version 3
Paul Durrant [Tue, 3 Feb 2015 14:02:02 +0000 (14:02 +0000)]
Update to EVTCHN version 3

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoA single queue to the backend should imply and index of 0
Paul Durrant [Tue, 3 Feb 2015 10:20:55 +0000 (10:20 +0000)]
A single queue to the backend should imply and index of 0

There is no need to test for both so change the extra test into an
assertion.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoFix type mismatch
Paul Durrant [Mon, 26 Jan 2015 16:15:24 +0000 (16:15 +0000)]
Fix type mismatch

The size of PWCHAR and the size of ULONG are the same for 32-bit
installations so this bug only affects 64-bit installations, but the
symptom is a crash on PDO destruction due to a corrupted heap.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoFix memory leak in __LinkGetImageBase()
Kostas Ladopoulos [Thu, 22 Jan 2015 15:16:48 +0000 (15:16 +0000)]
Fix memory leak in __LinkGetImageBase()

The in-function allocated QueryInfo object was correctly freed for all error
cases, but not the successful one.

Signed-off-by: Kostas Ladopoulos <konstantinos.ladopoulos@citrix.com>
10 years agoUse correct location when multi-queues are not used.
Owen Smith [Mon, 19 Jan 2015 16:23:39 +0000 (16:23 +0000)]
Use correct location when multi-queues are not used.

When the backend does not support multi-queues, or the frontend has
explicitly disallowed multi-queues, the frontend needs to write
event-channel and ring-references to the non-queued (old) locations,
not under device/vif/<id>/queue-<index>

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoReflect interface versions in PDO description
Paul Durrant [Mon, 12 Jan 2015 17:35:43 +0000 (17:35 +0000)]
Reflect interface versions in PDO description

For convenience add a string containing the latest versions of all the
interfaces exported by the driver into the PDO description. This can be
seen in Device Manager as the 'Bus reported device description' detail.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMove interface subscription code into co-installer
Paul Durrant [Mon, 12 Jan 2015 14:37:32 +0000 (14:37 +0000)]
Move interface subscription code into co-installer

Interface subscription is better handled at package installation time and
therefore the co-installer is the right place for it to live.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoImplement multiple queues
Owen Smith [Thu, 18 Dec 2014 14:28:24 +0000 (14:28 +0000)]
Implement multiple queues

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoImplement VIF Interface v2
Owen Smith [Thu, 18 Dec 2014 14:28:23 +0000 (14:28 +0000)]
Implement VIF Interface v2

Use VIF v2 structures internally, and add translation layer
for VIF v1 calls.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUpdate to VIF Interface v2
Owen Smith [Thu, 18 Dec 2014 14:28:22 +0000 (14:28 +0000)]
Update to VIF Interface v2

Renames XENVIF_TRANSMITTER_PACKET to XENVIF_TRANSMITTER_PACKET_V1 and
adds XENVIF_TRANSMITTER_PACKET_V2 for future patches.
VIF v2 will be implemented in another patch.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRemove notifier object
Owen Smith [Thu, 18 Dec 2014 14:28:21 +0000 (14:28 +0000)]
Remove notifier object

Fold event channels into transmitter/receiver ring objects.
Receiver ring object takes over single event channel case and passes
notifications to transmitter object, tagged with ring index (so that
only the specified ring is executed).
Split notifications are handled independently by each ring object.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMove to receiver ring pointer array
Owen Smith [Thu, 18 Dec 2014 14:28:20 +0000 (14:28 +0000)]
Move to receiver ring pointer array

Replace the list of rings with a maximally sized array of pointers.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoMove to transmitter ring pointer array
Owen Smith [Thu, 18 Dec 2014 14:28:19 +0000 (14:28 +0000)]
Move to transmitter ring pointer array

Replace the list of rings with a maximally sized array of pointers.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoMake interface exposure explicit
Owen Smith [Thu, 18 Dec 2014 14:28:18 +0000 (14:28 +0000)]
Make interface exposure explicit

Add pass-through query for XenBus's Cache interface and
account for interface versions when determining the revision(s).
Do not pass through any other queries, as the revision is not
accounted for.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoFix line endings
Paul Durrant [Fri, 19 Dec 2014 16:27:56 +0000 (16:27 +0000)]
Fix line endings

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMake sure INF gets re-built each time
Paul Durrant [Fri, 19 Dec 2014 15:42:10 +0000 (15:42 +0000)]
Make sure INF gets re-built each time

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMake sure version header gets re-built each time
Paul Durrant [Fri, 19 Dec 2014 12:04:11 +0000 (12:04 +0000)]
Make sure version header gets re-built each time

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoSquash buffer overlow error messages in transmit
Paul Durrant [Fri, 19 Dec 2014 11:59:05 +0000 (11:59 +0000)]
Squash buffer overlow error messages in transmit

Occasionally packets are too fragmented to fit into the maximum number of
requests allowed by the netif protocol. In this case the packet preparation
function will fail with STATUS_BUFFER_OVERFLOW and the alternative copy-
coalesce prepation function will be called. These error messages are
therefore un-interesting (since the number of packets directly granted vs.
those that were copied is available in the statistics dump initiated by the
debug VIRQ).
This patch squashes the error messages to avoid filling logs.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUpdate to latest XENBUS interfaces
Paul Durrant [Fri, 7 Nov 2014 17:18:53 +0000 (17:18 +0000)]
Update to latest XENBUS interfaces

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoAvoid incorrecly extending checksum accumulator
Paul Durrant [Fri, 7 Nov 2014 16:46:24 +0000 (16:46 +0000)]
Avoid incorrecly extending checksum accumulator

It was noticed that checksums were occasionally being incorrectly verified.
The reason for this turned out to be that the value passed to
ChecksumVerify as a USHORT was being extended to ULONG prior to being
inverted, thus leaving bits 16-31 set and thus an overflow from the lower
bits was not being correctly folded.

Signed-off-by: Ben Chalmers <ben.chalmers@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoSet correct payload offset when processing checksums
Paul Durrant [Fri, 7 Nov 2014 16:39:37 +0000 (16:39 +0000)]
Set correct payload offset when processing checksums

The receiver code was not accounting for a non-zero packet offset when
processing checksums. This lead to inbound packets being corrupted.

Signed-off-by: Ben Chalmers <ben.chalmers@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoFix a stupid if-then-else
Paul Durrant [Fri, 7 Nov 2014 16:37:43 +0000 (16:37 +0000)]
Fix a stupid if-then-else

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoReduce spam from build.py
Paul Durrant [Thu, 25 Sep 2014 15:17:01 +0000 (16:17 +0100)]
Reduce spam from build.py

We don't the verbose prints when deciding whether we're using vs2012 or 2013.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoDon't use universal_newlines=True in subprocess.Popen()
Paul Durrant [Thu, 25 Sep 2014 14:06:31 +0000 (15:06 +0100)]
Don't use universal_newlines=True in subprocess.Popen()

For some versions of python this appears to cause corruption of the
output byte string by forcibly decoding with the wrong encoding.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoCope with unexpected initial backend states
Paul Durrant [Mon, 22 Sep 2014 11:02:44 +0000 (12:02 +0100)]
Cope with unexpected initial backend states

If the OS is booted via iSCSI, then the backend will already be in the
Connected state when the xenvif driver loads.  The backend is stable
in this state, so __FrontendPrepare() eventually times out waiting for
the backend state to change.

Fix by leading the backend through the Closing and Closed states if we
find it initially in the Connected (or Closing) states.

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
Forward ported.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUpdate documentation
Paul Durrant [Wed, 17 Sep 2014 14:04:54 +0000 (15:04 +0100)]
Update documentation

Improve build documentation and add doxygen configuration and tags to build
documentation for the VIF interface.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoAdd support for Visual Studio 2013 & WDK 8.1
Ben Chalmers [Wed, 27 Aug 2014 14:39:02 +0000 (15:39 +0100)]
Add support for Visual Studio 2013 & WDK 8.1

Signed-off-by: Ben Chalmers <ben.chalmers@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoChange pointer assignment to intended structure assignment
Paul Durrant [Thu, 14 Aug 2014 16:44:49 +0000 (17:44 +0100)]
Change pointer assignment to intended structure assignment

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoAdd missing API versioning text to README.md
Paul Durrant [Thu, 14 Aug 2014 14:18:43 +0000 (15:18 +0100)]
Add missing API versioning text to README.md

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUpdate branding
Paul Durrant [Thu, 14 Aug 2014 10:34:22 +0000 (11:34 +0100)]
Update branding

Remove the use of the 'XenServer' product name except where it is
still appropriate.
Remove use of 'Citrix' from all places except source file
copyrights.
Allow company and product name to be set at build time.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoImplement new API version scheme
Paul Durrant [Thu, 14 Aug 2014 10:12:36 +0000 (11:12 +0100)]
Implement new API version scheme

This patch changes the way APIs work in an incompatible way. (See README.md
for details).
The patch also includes a *lot* of code tidying and movement and as such
is not really suitable for review as a patch; the resulting code should
itself be reviewed.
Given the scale of the change, the major version number has been revised to
8 and other version numbers reset to zero.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMerge pull request #35 from pauldu/xop-577
Paul Durrant [Fri, 8 Aug 2014 09:11:27 +0000 (10:11 +0100)]
Merge pull request #35 from pauldu/xop-577

Treat a missing Aliases value as an empty one

10 years agoTreat a missing Aliases value as an empty one
Paul Durrant [Fri, 8 Aug 2014 09:04:57 +0000 (10:04 +0100)]
Treat a missing Aliases value as an empty one

There are certain cases when xennet's co-installer may not have run so
we end up trying to (safely) start PDOs without even an empty alias.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMerge pull request #34 from pauldu/ca-140184
Ben Chalmers [Thu, 31 Jul 2014 07:43:43 +0000 (08:43 +0100)]
Merge pull request #34 from pauldu/ca-140184

[CA-140184]

Revert previous commits that add use of XENBUS's CACHE interface to XENVIF (and then modify cache lifecycle to avoid a crash during hibernation).
The reversions undid a couple of other fixes which are re-applied by the third patch.

Approved-By: Ben.Chalmers@citrix.com
10 years agoRe-fix issues uncovered by previous reversions.
Paul Durrant [Wed, 30 Jul 2014 17:09:34 +0000 (18:09 +0100)]
Re-fix issues uncovered by previous reversions.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRevert commit 80ace57b353764c9165673e021c2a6cf7616a3bb
Paul Durrant [Wed, 30 Jul 2014 15:29:43 +0000 (16:29 +0100)]
Revert commit 80ace57b353764c9165673e021c2a6cf7616a3bb

>    Use new XENBUS CACHE interface rather than local pool code
>
>    Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRevert commit 3714613096b1bb7b7a76e9d360106ea19208f243
Paul Durrant [Wed, 30 Jul 2014 15:25:49 +0000 (16:25 +0100)]
Revert commit 3714613096b1bb7b7a76e9d360106ea19208f243

>    Change Cache lifecycle to match ring lifecycle.
>    Ensure caches are destroyed when device transitions to D3 to prevent
>    assertion failure in xenbus.
>
>    Signed-off-by: Owen Smith <owen.smith@citrix.com>

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMerge pull request #33 from OwenSmith/master
Paul Durrant [Tue, 10 Jun 2014 13:36:24 +0000 (14:36 +0100)]
Merge pull request #33 from OwenSmith/master

Change Cache lifecycle to match ring lifecycle.

10 years agoChange Cache lifecycle to match ring lifecycle.
Owen Smith [Tue, 10 Jun 2014 12:34:25 +0000 (13:34 +0100)]
Change Cache lifecycle to match ring lifecycle.
Ensure caches are destroyed when device transitions to D3 to prevent
assertion failure in xenbus.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoMerge pull request #32 from pauldu/gnttab
Owen Smith [Mon, 2 Jun 2014 13:11:04 +0000 (14:11 +0100)]
Merge pull request #32 from pauldu/gnttab

Updated GNTTAB interface

10 years agoUse new GNTTAB interface
Paul Durrant [Fri, 30 May 2014 08:58:11 +0000 (09:58 +0100)]
Use new GNTTAB interface

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRemove much code duplication
Paul Durrant [Thu, 29 May 2014 15:09:22 +0000 (16:09 +0100)]
Remove much code duplication

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUse new XENBUS CACHE interface rather than local pool code
Paul Durrant [Thu, 29 May 2014 14:51:48 +0000 (15:51 +0100)]
Use new XENBUS CACHE interface rather than local pool code

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMerge pull request #30 from pauldu/master
Owen Smith [Thu, 29 May 2014 08:35:35 +0000 (09:35 +0100)]
Merge pull request #30 from pauldu/master

Avoid duplicate entries in the IP address table

10 years agoAvoid duplicate entries in the IP address table
Paul Durrant [Wed, 28 May 2014 16:56:06 +0000 (17:56 +0100)]
Avoid duplicate entries in the IP address table

Duplicates are useless and actually cause problems overflowing xenstore's
quota. Also, we should not bother looking at the MIB address table unless
the frontend is CONNECTED or ENABLED since our NetLuid is not necessarily
valid unless we are in one of those states.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMerge pull request #29 from OwenSmith/master
Paul Durrant [Thu, 22 May 2014 13:04:41 +0000 (14:04 +0100)]
Merge pull request #29 from OwenSmith/master

Protect Netio imports with a mutex.

10 years agoProtect Netio imports with a mutex.
Owen Smith [Thu, 22 May 2014 12:57:34 +0000 (13:57 +0100)]
Protect Netio imports with a mutex.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
11 years agoMerge pull request #27 from pauldu/master
Ben Chalmers [Thu, 1 May 2014 08:21:31 +0000 (09:21 +0100)]
Merge pull request #27 from pauldu/master

Re-try AuxKlibQueryModuleInformation() if buffer was too small

Approved-By: Ben Chalmers <ben.chalmers@citrix.com>
11 years agoRe-try AuxKlibQueryModuleInformation() if buffer was too small
Paul Durrant [Thu, 1 May 2014 08:16:56 +0000 (09:16 +0100)]
Re-try AuxKlibQueryModuleInformation() if buffer was too small

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoRemove some debug spew on grant table allocation failures
Paul Durrant [Tue, 29 Apr 2014 14:52:29 +0000 (15:52 +0100)]
Remove some debug spew on grant table allocation failures

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoFix stupid typo (and add an error warning)
Paul Durrant [Tue, 29 Apr 2014 10:09:34 +0000 (11:09 +0100)]
Fix stupid typo (and add an error warning)

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoCope with GranterPermitAccess() failing
Paul Durrant [Fri, 25 Apr 2014 15:46:44 +0000 (16:46 +0100)]
Cope with GranterPermitAccess() failing

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #26 from pauldu/master
Paul Durrant [Thu, 24 Apr 2014 17:02:36 +0000 (18:02 +0100)]
Merge pull request #26 from pauldu/master

Implement proper reference counting in the NETIO interface, and

11 years agoTrack eject request state in PDO
Paul Durrant [Thu, 24 Apr 2014 16:57:53 +0000 (17:57 +0100)]
Track eject request state in PDO

Tracking the state of the eject request in the frontend was sub-optimal
as:

a) The lifetime of the frontend is not quite the same as the PDO.
b) It was possible for the FDO scan to race with eject and make it
   look like the device had just disappeared.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoImplement proper reference counting in the NETIO interface, and
Paul Durrant [Thu, 24 Apr 2014 15:52:20 +0000 (16:52 +0100)]
Implement proper reference counting in the NETIO interface, and
fix some other problems with VIF eject.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoUse a timer rather than a thread for pool reap
Paul Durrant [Wed, 23 Apr 2014 09:51:51 +0000 (10:51 +0100)]
Use a timer rather than a thread for pool reap

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoImprove the way that assertions are handled for free builds
Paul Durrant [Wed, 23 Apr 2014 09:50:55 +0000 (10:50 +0100)]
Improve the way that assertions are handled for free builds

In line with the changes to XENBUS.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoFix SDV
Paul Durrant [Tue, 22 Apr 2014 08:36:59 +0000 (09:36 +0100)]
Fix SDV

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoRemove erroneous #if 0s
Paul Durrant [Thu, 17 Apr 2014 11:59:22 +0000 (12:59 +0100)]
Remove erroneous #if 0s

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoRe-order refine because it vapourizes the SDV summary log
Paul Durrant [Tue, 15 Apr 2014 16:33:22 +0000 (17:33 +0100)]
Re-order refine because it vapourizes the SDV summary log

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #25 from pauldu/netio
Paul Durrant [Tue, 15 Apr 2014 16:04:09 +0000 (17:04 +0100)]
Merge pull request #25 from pauldu/netio

Handle SDV scan and refine

11 years agoHandle SDV scan and refine
Paul Durrant [Tue, 15 Apr 2014 16:01:31 +0000 (17:01 +0100)]
Handle SDV scan and refine

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #24 from pauldu/netio
Paul Durrant [Tue, 15 Apr 2014 16:02:18 +0000 (17:02 +0100)]
Merge pull request #24 from pauldu/netio

Get SDV working

11 years agoAdd SDV to normal driver build
Paul Durrant [Mon, 14 Apr 2014 14:53:00 +0000 (15:53 +0100)]
Add SDV to normal driver build

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoRemove IP helper linkage (and hence dependency on netio.sys)
Paul Durrant [Mon, 14 Apr 2014 12:15:04 +0000 (13:15 +0100)]
Remove IP helper linkage (and hence dependency on netio.sys)

The linkage dependency on netio.sys prevents SDV from working. Since we need
the IP helper functionality there's no choice other than to remove the
linkage and replace it with run-time function lookup. Alas this is not as
simple as using MmGetSystemRoutineAddress() as that only works for kernel and
hal functions. We need to actually parse the netio.sys module export table
directly and then create thunks to jump into the code.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #20 from pauldu/gnttab2
Owen Smith [Mon, 14 Apr 2014 15:16:18 +0000 (16:16 +0100)]
Merge pull request #20 from pauldu/gnttab2

Granter abstraction and switch to new GNTTAB interface

11 years agoSwitch to new GNTTAB interface.
Paul Durrant [Fri, 11 Apr 2014 14:53:37 +0000 (15:53 +0100)]
Switch to new GNTTAB interface.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoAdd missing argument to GranterGetReference().
Paul Durrant [Fri, 11 Apr 2014 14:44:27 +0000 (15:44 +0100)]
Add missing argument to GranterGetReference().

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoAllocate grant references as needed rather than up-front.
Paul Durrant [Fri, 11 Apr 2014 14:35:59 +0000 (15:35 +0100)]
Allocate grant references as needed rather than up-front.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoIntroduce granter abstraction
Paul Durrant [Fri, 11 Apr 2014 14:00:28 +0000 (15:00 +0100)]
Introduce granter abstraction

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #19 from pauldu/ca-127851
Ben Chalmers [Wed, 5 Mar 2014 16:49:47 +0000 (16:49 +0000)]
Merge pull request #19 from pauldu/ca-127851

Implement checksum verification as recommended in RFC1071.

Approved-By: Ben Chalmers <ben.chalmers@citrix.com>
11 years agoImplement checksum verification as recommended in RFC1071.
Paul Durrant [Tue, 4 Mar 2014 17:00:43 +0000 (17:00 +0000)]
Implement checksum verification as recommended in RFC1071.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoAdd a magic number to the frontend structure that can be checked
Paul Durrant [Fri, 31 Jan 2014 17:44:53 +0000 (17:44 +0000)]
Add a magic number to the frontend structure that can be checked
for in the mib callback. There's a suspicion that the callback may be
occuring after xenvif has unloaded.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge branch 'master' of github.com:xenserver/win-xenvif
Paul Durrant [Thu, 16 Jan 2014 17:14:02 +0000 (17:14 +0000)]
Merge branch 'master' of github.com:xenserver/win-xenvif

11 years agoDodgy patch for speculative SCTX fix
Paul Durrant [Thu, 16 Jan 2014 17:12:46 +0000 (17:12 +0000)]
Dodgy patch for speculative SCTX fix

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #18 from pauldu/master
Paul Durrant [Fri, 10 Jan 2014 12:26:58 +0000 (04:26 -0800)]
Merge pull request #18 from pauldu/master

Couple of patches

11 years agoMake transmitter stats 64-bits wide.
Paul Durrant [Fri, 10 Jan 2014 10:42:46 +0000 (10:42 +0000)]
Make transmitter stats 64-bits wide.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoLengthen watchdog timers and poll rings directly.
Paul Durrant [Thu, 9 Jan 2014 17:35:54 +0000 (17:35 +0000)]
Lengthen watchdog timers and poll rings directly.

The mpe-ethernet test was causing too many watchdog warnings. I
think the watchdog code could still be improved but this should
stop the log spew.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #17 from pauldu/ca-122017
Paul Durrant [Mon, 23 Dec 2013 15:49:04 +0000 (07:49 -0800)]
Merge pull request #17 from pauldu/ca-122017

Alias is now a fully qualified hardware registry key

11 years agoAlias is now a fully qualified hardware registry key
Paul Durrant [Mon, 23 Dec 2013 15:46:32 +0000 (15:46 +0000)]
Alias is now a fully qualified hardware registry key

There is no need to try to find the device and instance from the alias
software key as it is trivial to parse it out of the hardware key. This
means less work here and more work in the xennet co-installer, which is
the right place for it.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #16 from pauldu/ca-122017
Ben Chalmers [Thu, 19 Dec 2013 16:32:48 +0000 (08:32 -0800)]
Merge pull request #16 from pauldu/ca-122017

CA-122017: Bail from DumpAddressTable if we get an error

Approved-By: Ben Chalmers <ben.chalmers@citrix.com>
11 years agoCA-122017: Bail from DumpAddressTable if we get an error
Paul Durrant [Thu, 19 Dec 2013 16:11:00 +0000 (16:11 +0000)]
CA-122017: Bail from DumpAddressTable if we get an error

   Also wrap the address table update in a transaction and
   abort it if we bail. This should mean that, if we get an
   EQUOTA, we abort the transaction and we go back to our
   old pre-EQUOTA state.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #15 from pauldu/master
Ben Chalmers [Thu, 19 Dec 2013 10:14:32 +0000 (02:14 -0800)]
Merge pull request #15 from pauldu/master

WHQL fix and watchdog work

Approved-By: Ben Chalmers <been.chalmer@citrix.com>
11 years agoAdd receiver watchdog that will move things along if the backend fails to
Paul Durrant [Thu, 19 Dec 2013 10:06:22 +0000 (10:06 +0000)]
Add receiver watchdog that will move things along if the backend fails to
send receive events. Also tighten up the transmit watchdog - 30s seems a
bit too long.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoFix WHQL AddressChange test
Paul Durrant [Thu, 19 Dec 2013 10:05:55 +0000 (10:05 +0000)]
Fix WHQL AddressChange test

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #14 from pauldu/master
Ben Chalmers [Fri, 13 Dec 2013 14:05:25 +0000 (06:05 -0800)]
Merge pull request #14 from pauldu/master

Useful code added while debugging WHQL issues:

Approved-By: Ben Chalmers <ben.chalmers@citrix.com>
11 years agoUseful code added while debugging WHQL issues:
Paul Durrant [Fri, 13 Dec 2013 09:32:05 +0000 (09:32 +0000)]
Useful code added while debugging WHQL issues:

- Tidied up receiver xenstore feature advertisement
- Added registry options to turn off GSO at the transmitter
- Added an 'always copy' option to the transmtter
- Added AH option parsing for IPv6
- Added code to drop oversize non-GSO packets at receiver
- Added some more error DbgPrints
- Added large packet stats to the receiver

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #13 from pauldu/master
Paul Durrant [Mon, 9 Dec 2013 17:09:23 +0000 (09:09 -0800)]
Merge pull request #13 from pauldu/master

XOP-440 fixes

11 years agoXOP-440 checksum corner cases.
Paul Durrant [Mon, 9 Dec 2013 17:03:03 +0000 (17:03 +0000)]
XOP-440 checksum corner cases.

Windows seems to take RFC 2460 a bit too far and replace zero TCP checksum
values with 0xFFFF. Thus we need to treat IPv6 TCP packets with an embedded
checksum of 0xFFFF as actually containing checksum 0.
I've also added code to allow IPv4 UDP packets with a checksum value of 0 to
be accepted, as this is the 'no checksum' option that only exists for IPv4
UDP. For IPv6 UDP we again translate 0xFFFF to 0 but insist on the checksum
matching after this translation.

When we calculate checksum for IPv6 UDP packets, I've also made sure we
insert 0xFFFF rather than 0 before passing the packet up the stack.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoRemove checksum verification code. It's become fairly useless now.
Paul Durrant [Mon, 9 Dec 2013 17:02:32 +0000 (17:02 +0000)]
Remove checksum verification code. It's become fairly useless now.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #12 from pauldu/split-event-channels
Ben Chalmers [Mon, 9 Dec 2013 13:17:59 +0000 (05:17 -0800)]
Merge pull request #12 from pauldu/split-event-channels

Latest updates

Approved-By: Ben Chalmers <ben.chalmers@citrix.com>
11 years agoUse split RX/TX event channels if the backend supports them.
Paul Durrant [Wed, 4 Dec 2013 16:16:22 +0000 (16:16 +0000)]
Use split RX/TX event channels if the backend supports them.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoTwo small refinements:
Paul Durrant [Mon, 25 Nov 2013 17:20:24 +0000 (17:20 +0000)]
Two small refinements:

- Add fragment flag to packet info and have the parser set it.
  ASSERT on this in the transmit patch if the stack tries to offload
  checksum for a fragment.
- Add registry values to allow actual IPv4 or IPv6 TSO to be disabled at
  the backend.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoAdd some more assertions concerning checksums and large packets.
Paul Durrant [Mon, 18 Nov 2013 15:37:53 +0000 (15:37 +0000)]
Add some more assertions concerning checksums and large packets.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoRe-work checksum code slightly to match reference code
Paul Durrant [Mon, 18 Nov 2013 14:03:57 +0000 (14:03 +0000)]
Re-work checksum code slightly to match reference code

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoFix formatting
Paul Durrant [Mon, 18 Nov 2013 14:03:31 +0000 (14:03 +0000)]
Fix formatting

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge branch 'master' into upstream2
Paul Durrant [Mon, 18 Nov 2013 11:16:21 +0000 (11:16 +0000)]
Merge branch 'master' into upstream2

11 years agoMerge pull request #11 from pauldu/sctx-1596
Ben Chalmers [Wed, 6 Nov 2013 14:20:18 +0000 (06:20 -0800)]
Merge pull request #11 from pauldu/sctx-1596

Change assertion to parsing error.

Approved-by: Ben Chalmers <ben.chalmers@citrix.com>
11 years agoChange assertion to parsing error.
Paul Durrant [Tue, 5 Nov 2013 15:46:37 +0000 (15:46 +0000)]
Change assertion to parsing error.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>