win-pvdrivers

view xennet/xennet.h @ 42:5dc3e004cf94

xennet: implement tx ring cleanup on xen interrupt
author Andy Grover <andy.grover@oracle.com>
date Wed Dec 05 14:56:01 2007 -0800 (2007-12-05)
parents d5df0038627d
children 06b4321b7068
line source
1 /*
2 PV Drivers for Windows Xen HVM Domains
3 Copyright (C) 2007 James Harper
4 Copyright (C) 2007 Andrew Grover <andy.grover@oracle.com>
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
21 #pragma warning(disable: 4201)
22 #pragma warning(disable: 4214)
24 #include <wdm.h>
25 #include <wdf.h>
26 #include <wdfminiport.h>
27 #include <initguid.h>
28 #define NDIS_MINIPORT_DRIVER
29 #define NDIS51_MINIPORT 1
30 #include <ndis.h>
31 #define NDIS_MAJOR_VER 5
32 #define NDIS_MINOR_VER 1
34 #define NTSTRSAFE_LIB
35 #include <ntstrsafe.h>
37 #include <xen_windows.h>
38 #include <memory.h>
39 #include <grant_table.h>
40 #include <event_channel.h>
41 #include <hvm/params.h>
42 #include <hvm/hvm_op.h>
43 #include <evtchn_public.h>
44 #include <xenbus_public.h>
45 #include <xen_public.h>
46 #include <gnttbl_public.h>
47 #include <io/ring.h>
48 #include <io/netif.h>
49 #define __DRIVER_NAME "XenNet"
50 #define XENNET_POOL_TAG (ULONG) 'XenN'
52 #define NAME_SIZE 64
54 #define ETH_ALEN 6
56 /* TODO: crank this up if we support higher mtus? */
57 #define XN_DATA_SIZE 1500
58 #define XN_HDR_SIZE 14
59 #define XN_MIN_PKT_SIZE 60
60 #define XN_MAX_PKT_SIZE (XN_HDR_SIZE + XN_DATA_SIZE)
62 #define XN_MAX_SEND_PKTS 16
64 #define XENSOURCE_MAC_HDR 0x00163E
65 #define XN_VENDOR_DESC "Xensource"