8261245b7b429a7982983f00a255878b4c3beabd
[dpdk.git] / lib / librte_pmd_ixgbe / ixgbe / ixgbe_vf.h
1 /*******************************************************************************
2
3 Copyright (c) 2001-2012, Intel Corporation
4 All rights reserved.
5
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met:
8
9  1. Redistributions of source code must retain the above copyright notice,
10     this list of conditions and the following disclaimer.
11
12  2. Redistributions in binary form must reproduce the above copyright
13     notice, this list of conditions and the following disclaimer in the
14     documentation and/or other materials provided with the distribution.
15
16  3. Neither the name of the Intel Corporation nor the names of its
17     contributors may be used to endorse or promote products derived from
18     this software without specific prior written permission.
19
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 POSSIBILITY OF SUCH DAMAGE.
31
32 ***************************************************************************/
33
34 #ifndef __IXGBE_VF_H__
35 #define __IXGBE_VF_H__
36
37 #define IXGBE_VF_IRQ_CLEAR_MASK     7
38 #define IXGBE_VF_MAX_TX_QUEUES      8
39 #define IXGBE_VF_MAX_RX_QUEUES      8
40
41 #define IXGBE_VFCTRL           0x00000
42 #define IXGBE_VFSTATUS         0x00008
43 #define IXGBE_VFLINKS          0x00010
44 #define IXGBE_VFFRTIMER        0x00048
45 #define IXGBE_VFRXMEMWRAP      0x03190
46 #define IXGBE_VTEICR           0x00100
47 #define IXGBE_VTEICS           0x00104
48 #define IXGBE_VTEIMS           0x00108
49 #define IXGBE_VTEIMC           0x0010C
50 #define IXGBE_VTEIAC           0x00110
51 #define IXGBE_VTEIAM           0x00114
52 #define IXGBE_VTEITR(x)        (0x00820 + (4 * x))
53 #define IXGBE_VTIVAR(x)        (0x00120 + (4 * x))
54 #define IXGBE_VTIVAR_MISC      0x00140
55 #define IXGBE_VTRSCINT(x)      (0x00180 + (4 * x))
56 /* define IXGBE_VFPBACL  still says TBD in EAS */
57 #define IXGBE_VFRDBAL(x)       (0x01000 + (0x40 * x))
58 #define IXGBE_VFRDBAH(x)       (0x01004 + (0x40 * x))
59 #define IXGBE_VFRDLEN(x)       (0x01008 + (0x40 * x))
60 #define IXGBE_VFRDH(x)         (0x01010 + (0x40 * x))
61 #define IXGBE_VFRDT(x)         (0x01018 + (0x40 * x))
62 #define IXGBE_VFRXDCTL(x)      (0x01028 + (0x40 * x))
63 #define IXGBE_VFSRRCTL(x)      (0x01014 + (0x40 * x))
64 #define IXGBE_VFRSCCTL(x)      (0x0102C + (0x40 * x))
65 #define IXGBE_VFPSRTYPE        0x00300
66 #define IXGBE_VFTDBAL(x)       (0x02000 + (0x40 * x))
67 #define IXGBE_VFTDBAH(x)       (0x02004 + (0x40 * x))
68 #define IXGBE_VFTDLEN(x)       (0x02008 + (0x40 * x))
69 #define IXGBE_VFTDH(x)         (0x02010 + (0x40 * x))
70 #define IXGBE_VFTDT(x)         (0x02018 + (0x40 * x))
71 #define IXGBE_VFTXDCTL(x)      (0x02028 + (0x40 * x))
72 #define IXGBE_VFTDWBAL(x)      (0x02038 + (0x40 * x))
73 #define IXGBE_VFTDWBAH(x)      (0x0203C + (0x40 * x))
74 #define IXGBE_VFDCA_RXCTRL(x)  (0x0100C + (0x40 * x))
75 #define IXGBE_VFDCA_TXCTRL(x)  (0x0200c + (0x40 * x))
76 #define IXGBE_VFGPRC           0x0101C
77 #define IXGBE_VFGPTC           0x0201C
78 #define IXGBE_VFGORC_LSB       0x01020
79 #define IXGBE_VFGORC_MSB       0x01024
80 #define IXGBE_VFGOTC_LSB       0x02020
81 #define IXGBE_VFGOTC_MSB       0x02024
82 #define IXGBE_VFMPRC           0x01034
83
84
85 struct ixgbevf_hw_stats {
86         u64 base_vfgprc;
87         u64 base_vfgptc;
88         u64 base_vfgorc;
89         u64 base_vfgotc;
90         u64 base_vfmprc;
91
92         u64 last_vfgprc;
93         u64 last_vfgptc;
94         u64 last_vfgorc;
95         u64 last_vfgotc;
96         u64 last_vfmprc;
97
98         u64 vfgprc;
99         u64 vfgptc;
100         u64 vfgorc;
101         u64 vfgotc;
102         u64 vfmprc;
103
104         u64 saved_reset_vfgprc;
105         u64 saved_reset_vfgptc;
106         u64 saved_reset_vfgorc;
107         u64 saved_reset_vfgotc;
108         u64 saved_reset_vfmprc;
109 };
110
111 #endif /* __IXGBE_VF_H__ */
112