FreeBSD kernel IXGBE device code
ixgbe_vf.h
Go to the documentation of this file.
1/******************************************************************************
2 SPDX-License-Identifier: BSD-3-Clause
3
4 Copyright (c) 2001-2020, Intel Corporation
5 All rights reserved.
6
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions are met:
9
10 1. Redistributions of source code must retain the above copyright notice,
11 this list of conditions and the following disclaimer.
12
13 2. Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
16
17 3. Neither the name of the Intel Corporation nor the names of its
18 contributors may be used to endorse or promote products derived from
19 this software without specific prior written permission.
20
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 POSSIBILITY OF SUCH DAMAGE.
32
33******************************************************************************/
34/*$FreeBSD$*/
35
36#ifndef _IXGBE_VF_H_
37#define _IXGBE_VF_H_
38
39#define IXGBE_VF_IRQ_CLEAR_MASK 7
40#define IXGBE_VF_MAX_TX_QUEUES 8
41#define IXGBE_VF_MAX_RX_QUEUES 8
42
43/* DCB define */
44#define IXGBE_VF_MAX_TRAFFIC_CLASS 8
45
46#define IXGBE_VFCTRL 0x00000
47#define IXGBE_VFSTATUS 0x00008
48#define IXGBE_VFLINKS 0x00010
49#define IXGBE_VFFRTIMER 0x00048
50#define IXGBE_VFRXMEMWRAP 0x03190
51#define IXGBE_VTEICR 0x00100
52#define IXGBE_VTEICS 0x00104
53#define IXGBE_VTEIMS 0x00108
54#define IXGBE_VTEIMC 0x0010C
55#define IXGBE_VTEIAC 0x00110
56#define IXGBE_VTEIAM 0x00114
57#define IXGBE_VTEITR(x) (0x00820 + (4 * (x)))
58#define IXGBE_VTIVAR(x) (0x00120 + (4 * (x)))
59#define IXGBE_VTIVAR_MISC 0x00140
60#define IXGBE_VTRSCINT(x) (0x00180 + (4 * (x)))
61/* define IXGBE_VFPBACL still says TBD in EAS */
62#define IXGBE_VFRDBAL(x) (0x01000 + (0x40 * (x)))
63#define IXGBE_VFRDBAH(x) (0x01004 + (0x40 * (x)))
64#define IXGBE_VFRDLEN(x) (0x01008 + (0x40 * (x)))
65#define IXGBE_VFRDH(x) (0x01010 + (0x40 * (x)))
66#define IXGBE_VFRDT(x) (0x01018 + (0x40 * (x)))
67#define IXGBE_VFRXDCTL(x) (0x01028 + (0x40 * (x)))
68#define IXGBE_VFSRRCTL(x) (0x01014 + (0x40 * (x)))
69#define IXGBE_VFRSCCTL(x) (0x0102C + (0x40 * (x)))
70#define IXGBE_VFPSRTYPE 0x00300
71#define IXGBE_VFTDBAL(x) (0x02000 + (0x40 * (x)))
72#define IXGBE_VFTDBAH(x) (0x02004 + (0x40 * (x)))
73#define IXGBE_VFTDLEN(x) (0x02008 + (0x40 * (x)))
74#define IXGBE_VFTDH(x) (0x02010 + (0x40 * (x)))
75#define IXGBE_VFTDT(x) (0x02018 + (0x40 * (x)))
76#define IXGBE_VFTXDCTL(x) (0x02028 + (0x40 * (x)))
77#define IXGBE_VFTDWBAL(x) (0x02038 + (0x40 * (x)))
78#define IXGBE_VFTDWBAH(x) (0x0203C + (0x40 * (x)))
79#define IXGBE_VFDCA_RXCTRL(x) (0x0100C + (0x40 * (x)))
80#define IXGBE_VFDCA_TXCTRL(x) (0x0200c + (0x40 * (x)))
81#define IXGBE_VFGPRC 0x0101C
82#define IXGBE_VFGPTC 0x0201C
83#define IXGBE_VFGORC_LSB 0x01020
84#define IXGBE_VFGORC_MSB 0x01024
85#define IXGBE_VFGOTC_LSB 0x02020
86#define IXGBE_VFGOTC_MSB 0x02024
87#define IXGBE_VFMPRC 0x01034
88#define IXGBE_VFMRQC 0x3000
89#define IXGBE_VFRSSRK(x) (0x3100 + ((x) * 4))
90#define IXGBE_VFRETA(x) (0x3200 + ((x) * 4))
91
92
99
105
111
117};
118
119s32 ixgbe_init_ops_vf(struct ixgbe_hw *hw);
120s32 ixgbe_init_hw_vf(struct ixgbe_hw *hw);
121s32 ixgbe_start_hw_vf(struct ixgbe_hw *hw);
122s32 ixgbe_reset_hw_vf(struct ixgbe_hw *hw);
126s32 ixgbe_get_mac_addr_vf(struct ixgbe_hw *hw, u8 *mac_addr);
128 bool autoneg_wait_to_complete);
130 bool *link_up, bool autoneg_wait_to_complete);
131s32 ixgbe_set_rar_vf(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
132 u32 enable_addr);
133s32 ixgbevf_set_uc_addr_vf(struct ixgbe_hw *hw, u32 index, u8 *addr);
134s32 ixgbe_update_mc_addr_list_vf(struct ixgbe_hw *hw, u8 *mc_addr_list,
135 u32 mc_addr_count, ixgbe_mc_addr_itr,
136 bool clear);
137s32 ixgbevf_update_xcast_mode(struct ixgbe_hw *hw, int xcast_mode);
138s32 ixgbe_get_link_state_vf(struct ixgbe_hw *hw, bool *link_state);
139s32 ixgbe_set_vfta_vf(struct ixgbe_hw *hw, u32 vlan, u32 vind,
140 bool vlan_on, bool vlvf_bypass);
141s32 ixgbevf_rlpml_set_vf(struct ixgbe_hw *hw, u16 max_size);
142int ixgbevf_negotiate_api_version(struct ixgbe_hw *hw, int api);
143int ixgbevf_get_queues(struct ixgbe_hw *hw, unsigned int *num_tcs,
144 unsigned int *default_tc);
145
146#endif /* __IXGBE_VF_H__ */
uint64_t u64
Definition: ixgbe_osdep.h:149
uint8_t u8
Definition: ixgbe_osdep.h:143
uint16_t u16
Definition: ixgbe_osdep.h:145
int32_t s32
Definition: ixgbe_osdep.h:148
uint32_t u32
Definition: ixgbe_osdep.h:147
u32 ixgbe_link_speed
Definition: ixgbe_type.h:3443
u8 *(* ixgbe_mc_addr_itr)(struct ixgbe_hw *hw, u8 **mc_addr_ptr, u32 *vmdq)
Definition: ixgbe_type.h:3933
s32 ixgbe_get_link_state_vf(struct ixgbe_hw *hw, bool *link_state)
Definition: ixgbe_vf.c:463
int ixgbevf_negotiate_api_version(struct ixgbe_hw *hw, int api)
Definition: ixgbe_vf.c:728
int ixgbevf_get_queues(struct ixgbe_hw *hw, unsigned int *num_tcs, unsigned int *default_tc)
Definition: ixgbe_vf.c:754
u32 ixgbe_get_num_of_rx_queues_vf(struct ixgbe_hw *hw)
Definition: ixgbe_vf.c:531
s32 ixgbevf_rlpml_set_vf(struct ixgbe_hw *hw, u16 max_size)
Definition: ixgbe_vf.c:705
s32 ixgbe_start_hw_vf(struct ixgbe_hw *hw)
Definition: ixgbe_vf.c:143
s32 ixgbe_set_vfta_vf(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on, bool vlvf_bypass)
Definition: ixgbe_vf.c:494
s32 ixgbevf_update_xcast_mode(struct ixgbe_hw *hw, int xcast_mode)
Definition: ixgbe_vf.c:426
s32 ixgbe_stop_adapter_vf(struct ixgbe_hw *hw)
Definition: ixgbe_vf.c:248
s32 ixgbe_get_mac_addr_vf(struct ixgbe_hw *hw, u8 *mac_addr)
Definition: ixgbe_vf.c:542
s32 ixgbe_update_mc_addr_list_vf(struct ixgbe_hw *hw, u8 *mc_addr_list, u32 mc_addr_count, ixgbe_mc_addr_itr, bool clear)
Definition: ixgbe_vf.c:380
s32 ixgbe_set_rar_vf(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, u32 enable_addr)
Definition: ixgbe_vf.c:345
s32 ixgbe_init_hw_vf(struct ixgbe_hw *hw)
Definition: ixgbe_vf.c:158
u32 ixgbe_get_num_of_tx_queues_vf(struct ixgbe_hw *hw)
Definition: ixgbe_vf.c:519
s32 ixgbe_setup_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed speed, bool autoneg_wait_to_complete)
Definition: ixgbe_vf.c:590
s32 ixgbevf_set_uc_addr_vf(struct ixgbe_hw *hw, u32 index, u8 *addr)
Definition: ixgbe_vf.c:552
s32 ixgbe_reset_hw_vf(struct ixgbe_hw *hw)
Definition: ixgbe_vf.c:174
s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed, bool *link_up, bool autoneg_wait_to_complete)
Definition: ixgbe_vf.c:606
s32 ixgbe_init_ops_vf(struct ixgbe_hw *hw)
Definition: ixgbe_vf.c:51
u64 saved_reset_vfgptc
Definition: ixgbe_vf.h:113
u64 saved_reset_vfgprc
Definition: ixgbe_vf.h:112
u64 saved_reset_vfgotc
Definition: ixgbe_vf.h:115
u64 saved_reset_vfgorc
Definition: ixgbe_vf.h:114
u64 saved_reset_vfmprc
Definition: ixgbe_vf.h:116