ixgbe_vf.h revision 1.11 1 1.11 msaitoh /* $NetBSD: ixgbe_vf.h,v 1.11 2017/12/06 04:08:50 msaitoh Exp $ */
2 1.9 msaitoh
3 1.1 dyoung /******************************************************************************
4 1.11 msaitoh SPDX-License-Identifier: BSD-3-Clause
5 1.1 dyoung
6 1.9 msaitoh Copyright (c) 2001-2017, Intel Corporation
7 1.1 dyoung All rights reserved.
8 1.1 dyoung
9 1.1 dyoung Redistribution and use in source and binary forms, with or without
10 1.1 dyoung modification, are permitted provided that the following conditions are met:
11 1.1 dyoung
12 1.1 dyoung 1. Redistributions of source code must retain the above copyright notice,
13 1.1 dyoung this list of conditions and the following disclaimer.
14 1.1 dyoung
15 1.1 dyoung 2. Redistributions in binary form must reproduce the above copyright
16 1.1 dyoung notice, this list of conditions and the following disclaimer in the
17 1.1 dyoung documentation and/or other materials provided with the distribution.
18 1.1 dyoung
19 1.1 dyoung 3. Neither the name of the Intel Corporation nor the names of its
20 1.1 dyoung contributors may be used to endorse or promote products derived from
21 1.1 dyoung this software without specific prior written permission.
22 1.1 dyoung
23 1.1 dyoung THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 1.1 dyoung AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 1.1 dyoung IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 1.1 dyoung ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27 1.1 dyoung LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 1.1 dyoung CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 1.1 dyoung SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 1.1 dyoung INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 1.1 dyoung CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 1.1 dyoung ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 1.1 dyoung POSSIBILITY OF SUCH DAMAGE.
34 1.1 dyoung
35 1.1 dyoung ******************************************************************************/
36 1.9 msaitoh /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_vf.h 320688 2017-07-05 17:27:03Z erj $*/
37 1.1 dyoung
38 1.9 msaitoh #ifndef _IXGBE_VF_H_
39 1.9 msaitoh #define _IXGBE_VF_H_
40 1.1 dyoung
41 1.3 msaitoh #define IXGBE_VF_IRQ_CLEAR_MASK 7
42 1.3 msaitoh #define IXGBE_VF_MAX_TX_QUEUES 8
43 1.3 msaitoh #define IXGBE_VF_MAX_RX_QUEUES 8
44 1.3 msaitoh
45 1.5 msaitoh /* DCB define */
46 1.5 msaitoh #define IXGBE_VF_MAX_TRAFFIC_CLASS 8
47 1.5 msaitoh
48 1.3 msaitoh #define IXGBE_VFCTRL 0x00000
49 1.3 msaitoh #define IXGBE_VFSTATUS 0x00008
50 1.3 msaitoh #define IXGBE_VFLINKS 0x00010
51 1.3 msaitoh #define IXGBE_VFFRTIMER 0x00048
52 1.3 msaitoh #define IXGBE_VFRXMEMWRAP 0x03190
53 1.3 msaitoh #define IXGBE_VTEICR 0x00100
54 1.3 msaitoh #define IXGBE_VTEICS 0x00104
55 1.3 msaitoh #define IXGBE_VTEIMS 0x00108
56 1.3 msaitoh #define IXGBE_VTEIMC 0x0010C
57 1.3 msaitoh #define IXGBE_VTEIAC 0x00110
58 1.3 msaitoh #define IXGBE_VTEIAM 0x00114
59 1.3 msaitoh #define IXGBE_VTEITR(x) (0x00820 + (4 * (x)))
60 1.3 msaitoh #define IXGBE_VTIVAR(x) (0x00120 + (4 * (x)))
61 1.3 msaitoh #define IXGBE_VTIVAR_MISC 0x00140
62 1.3 msaitoh #define IXGBE_VTRSCINT(x) (0x00180 + (4 * (x)))
63 1.1 dyoung /* define IXGBE_VFPBACL still says TBD in EAS */
64 1.3 msaitoh #define IXGBE_VFRDBAL(x) (0x01000 + (0x40 * (x)))
65 1.3 msaitoh #define IXGBE_VFRDBAH(x) (0x01004 + (0x40 * (x)))
66 1.3 msaitoh #define IXGBE_VFRDLEN(x) (0x01008 + (0x40 * (x)))
67 1.3 msaitoh #define IXGBE_VFRDH(x) (0x01010 + (0x40 * (x)))
68 1.3 msaitoh #define IXGBE_VFRDT(x) (0x01018 + (0x40 * (x)))
69 1.3 msaitoh #define IXGBE_VFRXDCTL(x) (0x01028 + (0x40 * (x)))
70 1.3 msaitoh #define IXGBE_VFSRRCTL(x) (0x01014 + (0x40 * (x)))
71 1.3 msaitoh #define IXGBE_VFRSCCTL(x) (0x0102C + (0x40 * (x)))
72 1.3 msaitoh #define IXGBE_VFPSRTYPE 0x00300
73 1.3 msaitoh #define IXGBE_VFTDBAL(x) (0x02000 + (0x40 * (x)))
74 1.3 msaitoh #define IXGBE_VFTDBAH(x) (0x02004 + (0x40 * (x)))
75 1.3 msaitoh #define IXGBE_VFTDLEN(x) (0x02008 + (0x40 * (x)))
76 1.3 msaitoh #define IXGBE_VFTDH(x) (0x02010 + (0x40 * (x)))
77 1.3 msaitoh #define IXGBE_VFTDT(x) (0x02018 + (0x40 * (x)))
78 1.3 msaitoh #define IXGBE_VFTXDCTL(x) (0x02028 + (0x40 * (x)))
79 1.3 msaitoh #define IXGBE_VFTDWBAL(x) (0x02038 + (0x40 * (x)))
80 1.3 msaitoh #define IXGBE_VFTDWBAH(x) (0x0203C + (0x40 * (x)))
81 1.3 msaitoh #define IXGBE_VFDCA_RXCTRL(x) (0x0100C + (0x40 * (x)))
82 1.3 msaitoh #define IXGBE_VFDCA_TXCTRL(x) (0x0200c + (0x40 * (x)))
83 1.3 msaitoh #define IXGBE_VFGPRC 0x0101C
84 1.3 msaitoh #define IXGBE_VFGPTC 0x0201C
85 1.3 msaitoh #define IXGBE_VFGORC_LSB 0x01020
86 1.3 msaitoh #define IXGBE_VFGORC_MSB 0x01024
87 1.3 msaitoh #define IXGBE_VFGOTC_LSB 0x02020
88 1.3 msaitoh #define IXGBE_VFGOTC_MSB 0x02024
89 1.3 msaitoh #define IXGBE_VFMPRC 0x01034
90 1.6 msaitoh #define IXGBE_VFMRQC 0x3000
91 1.6 msaitoh #define IXGBE_VFRSSRK(x) (0x3100 + ((x) * 4))
92 1.6 msaitoh #define IXGBE_VFRETA(x) (0x3200 + ((x) * 4))
93 1.1 dyoung
94 1.1 dyoung
95 1.1 dyoung struct ixgbevf_hw_stats {
96 1.8 msaitoh char namebuf[32];
97 1.10 msaitoh struct evcnt ipcs;
98 1.10 msaitoh struct evcnt ipcs_bad;
99 1.10 msaitoh struct evcnt l4cs;
100 1.10 msaitoh struct evcnt l4cs_bad;
101 1.10 msaitoh
102 1.1 dyoung u64 base_vfgprc;
103 1.1 dyoung u64 base_vfgptc;
104 1.1 dyoung u64 base_vfgorc;
105 1.1 dyoung u64 base_vfgotc;
106 1.1 dyoung u64 base_vfmprc;
107 1.1 dyoung
108 1.1 dyoung u64 last_vfgprc;
109 1.1 dyoung u64 last_vfgptc;
110 1.1 dyoung u64 last_vfgorc;
111 1.1 dyoung u64 last_vfgotc;
112 1.1 dyoung u64 last_vfmprc;
113 1.1 dyoung
114 1.6 msaitoh struct evcnt vfgprc;
115 1.6 msaitoh struct evcnt vfgptc;
116 1.6 msaitoh struct evcnt vfgorc;
117 1.6 msaitoh struct evcnt vfgotc;
118 1.6 msaitoh struct evcnt vfmprc;
119 1.1 dyoung
120 1.1 dyoung u64 saved_reset_vfgprc;
121 1.1 dyoung u64 saved_reset_vfgptc;
122 1.1 dyoung u64 saved_reset_vfgorc;
123 1.1 dyoung u64 saved_reset_vfgotc;
124 1.1 dyoung u64 saved_reset_vfmprc;
125 1.1 dyoung };
126 1.1 dyoung
127 1.9 msaitoh s32 ixgbe_init_ops_vf(struct ixgbe_hw *hw);
128 1.3 msaitoh s32 ixgbe_init_hw_vf(struct ixgbe_hw *hw);
129 1.3 msaitoh s32 ixgbe_start_hw_vf(struct ixgbe_hw *hw);
130 1.3 msaitoh s32 ixgbe_reset_hw_vf(struct ixgbe_hw *hw);
131 1.3 msaitoh s32 ixgbe_stop_adapter_vf(struct ixgbe_hw *hw);
132 1.3 msaitoh u32 ixgbe_get_num_of_tx_queues_vf(struct ixgbe_hw *hw);
133 1.3 msaitoh u32 ixgbe_get_num_of_rx_queues_vf(struct ixgbe_hw *hw);
134 1.3 msaitoh s32 ixgbe_get_mac_addr_vf(struct ixgbe_hw *hw, u8 *mac_addr);
135 1.3 msaitoh s32 ixgbe_setup_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed speed,
136 1.5 msaitoh bool autoneg_wait_to_complete);
137 1.3 msaitoh s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
138 1.3 msaitoh bool *link_up, bool autoneg_wait_to_complete);
139 1.3 msaitoh s32 ixgbe_set_rar_vf(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
140 1.3 msaitoh u32 enable_addr);
141 1.3 msaitoh s32 ixgbevf_set_uc_addr_vf(struct ixgbe_hw *hw, u32 index, u8 *addr);
142 1.3 msaitoh s32 ixgbe_update_mc_addr_list_vf(struct ixgbe_hw *hw, u8 *mc_addr_list,
143 1.3 msaitoh u32 mc_addr_count, ixgbe_mc_addr_itr,
144 1.3 msaitoh bool clear);
145 1.9 msaitoh s32 ixgbevf_update_xcast_mode(struct ixgbe_hw *hw, int xcast_mode);
146 1.9 msaitoh s32 ixgbe_set_vfta_vf(struct ixgbe_hw *hw, u32 vlan, u32 vind,
147 1.9 msaitoh bool vlan_on, bool vlvf_bypass);
148 1.9 msaitoh s32 ixgbevf_rlpml_set_vf(struct ixgbe_hw *hw, u16 max_size);
149 1.5 msaitoh int ixgbevf_negotiate_api_version(struct ixgbe_hw *hw, int api);
150 1.5 msaitoh int ixgbevf_get_queues(struct ixgbe_hw *hw, unsigned int *num_tcs,
151 1.5 msaitoh unsigned int *default_tc);
152 1.3 msaitoh
153 1.1 dyoung #endif /* __IXGBE_VF_H__ */
154