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>
Ben Chalmers [Fri, 21 Jun 2013 14:17:15 +0000 (15:17 +0100)]
Resync to internal repository
c:\work\almosteast\buildenv.hg\xenbus>hg log --limit 15
changeset: 305:e377a99e8721
tag: tip
user: Paul Durrant <paul.durrant@citrix.com>
date: Fri Jun 21 13:19:15 2013 +0100
summary: [CA-109475] Handle __RangeSetAdd failure.
changeset: 304:7818aaf86215
parent: 303:37f03f68abf5
parent: 302:b576d67847cb
user: Paul Durrant <paul.durrant@citrix.com>
date: Fri Jun 21 09:58:03 2013 +0100
summary: Merge
changeset: 303:37f03f68abf5
parent: 299:f17689532d11
user: Paul Durrant <paul.durrant@citrix.com>
date: Fri Jun 21 09:57:04 2013 +0100
summary: * * *
changeset: 302:b576d67847cb
user: Ben Chalmers <ben.chalmers@citrix.com>
date: Wed Jun 19 10:30:32 2013 +0100
summary: [CP-4195] Add README.md and associated files to xenbus
changeset: 301:407589c56880
user: Owen Smith <owen.smith@citrix.com>
date: Thu Jun 13 16:07:04 2013 +0100
summary: Fix/suppress SDV warnings
changeset: 300:966e06420ce5
user: Owen Smith <owen.smith@citrix.com>
date: Wed Jun 12 16:48:22 2013 +0100
summary: [CA-86240] Update sdv.py and vcxprojs to build targetting Vista, an
d attempt to produce sdv logs
changeset: 299:f17689532d11
user: Owen Smith <owen.smith@citrix.com>
date: Thu Jun 06 12:47:30 2013 +0100
summary: Backed out merge changeset: b35edbab18ee
changeset: 298:b35edbab18ee
parent: 297:0675b68b3e8d
parent: 296:5aefe3d5985a
user: Owen Smith <owen.smith@citrix.com>
date: Tue Jun 04 12:18:12 2013 +0100
summary: Merge
changeset: 297:0675b68b3e8d
parent: 294:28a400f3d92a
user: Owen Smith <owen.smith@citrix.com>
date: Tue Jun 04 12:17:26 2013 +0100
summary: [CA-86240] Generate SDV logs with sdv.py script
changeset: 296:5aefe3d5985a
parent: 295:0fad50b631e3
parent: 294:28a400f3d92a
user: Paul Durrant <paul.durrant@citrix.com>
date: Mon Jun 03 17:49:00 2013 +0100
summary: Merge
changeset: 295:0fad50b631e3
parent: 293:5c23adc1aa58
user: Paul Durrant <paul.durrant@citrix.com>
date: Mon Jun 03 17:48:06 2013 +0100
summary: Fix line endings
changeset: 294:28a400f3d92a
user: Ben Chalmers <ben.chalmers@citrix.com>
date: Wed May 29 14:57:17 2013 +0100
summary: [CP-4685] Add BSD licence header to inf file
changeset: 293:5c23adc1aa58
user: Owen Smith <owen.smith@citrix.com>
date: Tue May 21 10:50:25 2013 +0100
summary: Use glob.glob to list sys files instead of ls
changeset: 292:c5aee7d7773e
user: Owen Smith <owen.smith@citrix.com>
date: Mon May 20 15:46:35 2013 +0100
summary: Add kdfiles.py
changeset: 291:2b19a67891a0
user: Owen Smith <owen.smith@citrix.com>
date: Mon May 20 14:11:58 2013 +0100
summary: [CP-4685] Update copyright info for all files
c:\work\almosteast\buildenv.hg>.\xenvif
'.\xenvif' is not recognized as an internal or external command,
operable program or batch file.
c:\work\almosteast\buildenv.hg>cd .\xenvif
c:\work\almosteast\buildenv.hg\xenvif>hg pull
pulling from ssh://xenhg@hg.uk.xensource.com/closed/windows/xenvif.hg
searching for changes
no changes found
c:\work\almosteast\buildenv.hg\xenvif>hg log --limit 10
changeset: 215:9447731628de
tag: tip
user: Ben Chalmers <ben.chalmers@citrix.com>
date: Wed Jun 19 13:39:26 2013 +0100
summary: [CP-4195] Add README.md and associated files to xenvif
changeset: 214:8e316a0e1eba
user: Owen Smith <owen.smith@citrix.com>
date: Wed Jun 12 17:02:13 2013 +0100
summary: remove duplicate ASSERTs
changeset: 213:757760d5a166
user: Owen Smith <owen.smith@citrix.com>
date: Wed Jun 12 14:29:25 2013 +0100
summary: Add ASSERTs and initializations to pass sdv build phase
changeset: 212:8d1ec101f0cf
user: Owen Smith <owen.smith@citrix.com>
date: Wed Jun 12 14:15:45 2013 +0100
summary: [CP-86240] re-add the sdv code, modify the project files to build t
argeting Vista
changeset: 211:b421ffcabf89
user: Paul Durrant <paul.durrant@citrix.com>
date: Wed Jun 12 12:01:09 2013 +0100
summary: Add an option to always pull a packet up into a single* fragment.
changeset: 210:e7e202dab8f4
user: Paul Durrant <paul.durrant@citrix.com>
date: Wed Jun 12 11:29:40 2013 +0100
summary: Revert SDV changes. Yields unusable driver.
changeset: 209:bc1515248eac
user: Owen Smith <owen.smith@citrix.com>
date: Thu Jun 06 16:31:40 2013 +0100
summary: Get SDV to build. Insert ASSERTs around MmGetSystemAddressForMdlSaf
e and disable 4711 'Function has been selected for inlining' warning
changeset: 208:b2a6aa0d6314
user: Owen Smith <owen.smith@citrix.com>
date: Thu Jun 06 16:15:30 2013 +0100
summary: [CA-86240] modify scripts/vcxprojs to allow building of sdv logs
changeset: 207:99cfb2489b62
user: Paul Durrant <paul.durrant@citrix.com>
date: Thu Jun 06 12:55:29 2013 +0100
summary: Fix line endings
changeset: 206:6f2bcb8f6d01
parent: 205:880f2c92db73
parent: 204:6393c3b1806a
user: Paul Durrant <paul.durrant@citrix.com>
date: Thu Jun 06 12:45:41 2013 +0100
summary: Merge
c:\work\almosteast\buildenv.hg\xenvif>hg log --limit 15
changeset: 215:9447731628de
tag: tip
user: Ben Chalmers <ben.chalmers@citrix.com>
date: Wed Jun 19 13:39:26 2013 +0100
summary: [CP-4195] Add README.md and associated files to xenvif
changeset: 214:8e316a0e1eba
user: Owen Smith <owen.smith@citrix.com>
date: Wed Jun 12 17:02:13 2013 +0100
summary: remove duplicate ASSERTs
changeset: 213:757760d5a166
user: Owen Smith <owen.smith@citrix.com>
date: Wed Jun 12 14:29:25 2013 +0100
summary: Add ASSERTs and initializations to pass sdv build phase
changeset: 212:8d1ec101f0cf
user: Owen Smith <owen.smith@citrix.com>
date: Wed Jun 12 14:15:45 2013 +0100
summary: [CP-86240] re-add the sdv code, modify the project files to build t
argeting Vista
changeset: 211:b421ffcabf89
user: Paul Durrant <paul.durrant@citrix.com>
date: Wed Jun 12 12:01:09 2013 +0100
summary: Add an option to always pull a packet up into a single* fragment.
changeset: 210:e7e202dab8f4
user: Paul Durrant <paul.durrant@citrix.com>
date: Wed Jun 12 11:29:40 2013 +0100
summary: Revert SDV changes. Yields unusable driver.
changeset: 209:bc1515248eac
user: Owen Smith <owen.smith@citrix.com>
date: Thu Jun 06 16:31:40 2013 +0100
summary: Get SDV to build. Insert ASSERTs around MmGetSystemAddressForMdlSaf
e and disable 4711 'Function has been selected for inlining' warning
changeset: 208:b2a6aa0d6314
user: Owen Smith <owen.smith@citrix.com>
date: Thu Jun 06 16:15:30 2013 +0100
summary: [CA-86240] modify scripts/vcxprojs to allow building of sdv logs
changeset: 207:99cfb2489b62
user: Paul Durrant <paul.durrant@citrix.com>
date: Thu Jun 06 12:55:29 2013 +0100
summary: Fix line endings
changeset: 206:6f2bcb8f6d01
parent: 205:880f2c92db73
parent: 204:6393c3b1806a
user: Paul Durrant <paul.durrant@citrix.com>
date: Thu Jun 06 12:45:41 2013 +0100
summary: Merge
changeset: 205:880f2c92db73
parent: 197:8d32360ebdd7
user: Paul Durrant <paul.durrant@citrix.com>
date: Thu Jun 06 12:41:34 2013 +0100
summary: [CA-101635] Assume network infrastucture won't bin MTU + 18 packets
changeset: 204:6393c3b1806a
user: Paul Durrant <paul.durrant@citrix.com>
date: Thu Jun 06 12:44:52 2013 +0100
summary: Revert last check-in; needs more work
changeset: 203:1fbae0d3f587
user: Owen Smith <owen.smith@citrix.com>
date: Mon Jun 03 10:18:50 2013 +0100
summary: [CA-86240] Add script to generate SDV/DVL logs
changeset: 202:f16abda665a5
user: Ben Chalmers <ben.chalmers@citrix.com>
date: Thu May 30 08:29:52 2013 +0100
summary: [CP-4690] Add BSD licence header to inf files