> 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Paul Durrant [Tue, 5 Nov 2013 15:02:13 +0000 (15:02 +0000)]
Add barriers to transmitter locking functions.
We hit a bug that could only be explained by a barriering (fence or
code re-ordering) issue so I've added KeMemoryBarrier() calls to
handle both cases.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Tue, 5 Nov 2013 14:01:38 +0000 (14:01 +0000)]
Add barriers to transmitter locking functions.
We hit a bug that could only be explained by a barriering (fence or
code re-ordering) issue so I've added KeMemoryBarrier() calls to
handle both cases.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Thu, 26 Sep 2013 12:09:22 +0000 (13:09 +0100)]
Add a DWORD value "NeedReboot" to the service key if a PDO fails
to start because either the EMULATED interface is not available, or
an alias has yet to be unplugged.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Mon, 9 Sep 2013 14:00:12 +0000 (15:00 +0100)]
Re-work location where we store aliasing device
The device hardware key doesn't seem to be available in the pre-install
phase of co-installer invocation so we have to use the xenvif service
key instead.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Thu, 29 Aug 2013 15:41:41 +0000 (16:41 +0100)]
Make all other basic changes.
The driver is now test signed, names its PDOs correnctly, exposes permanent
MAC addresses in the registry so XENNET's co-installer can pick them up - to
find aliasing emulated devices - and checks for aliasing network interfaces
before allowing the PDO to come online.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Fri, 16 Aug 2013 08:52:10 +0000 (09:52 +0100)]
IRP IoStatus.Status and handler returned status should always match.
When the guts of the handler for IRP_MN_QUERY_RESOURCE_REQUIREMENTS were
ripped out the remaining code unconditionally returned STATUS_SUCCESS whilst
the IRP was almost certainly preloaded with STATUS_NOT_SUPPORTED. To fix,
simply stop handling that IRP and the dispatcher default clause DTRT.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Tue, 13 Aug 2013 08:53:19 +0000 (09:53 +0100)]
Ignore attempts to remove device usage types that were not added.
ASSERTing on this condition is not particularly helpful as other buggy
software causes BSODs. We should be able to safely ignore and succeed
such IRPs.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
We don't need to allocate resources, and IPHelper is only used to
know to update the host when IP addresses change. Both cause problems
under Windows PE
Signed-off-by: Ben Chalmers <Ben.Chalmers@citrix.com>