FreeBSD kernel IXGBE device code
|
Go to the source code of this file.
Data Structures | |
struct | ixgbevf_hw_stats |
Macros | |
#define | IXGBE_VF_IRQ_CLEAR_MASK 7 |
#define | IXGBE_VF_MAX_TX_QUEUES 8 |
#define | IXGBE_VF_MAX_RX_QUEUES 8 |
#define | IXGBE_VF_MAX_TRAFFIC_CLASS 8 |
#define | IXGBE_VFCTRL 0x00000 |
#define | IXGBE_VFSTATUS 0x00008 |
#define | IXGBE_VFLINKS 0x00010 |
#define | IXGBE_VFFRTIMER 0x00048 |
#define | IXGBE_VFRXMEMWRAP 0x03190 |
#define | IXGBE_VTEICR 0x00100 |
#define | IXGBE_VTEICS 0x00104 |
#define | IXGBE_VTEIMS 0x00108 |
#define | IXGBE_VTEIMC 0x0010C |
#define | IXGBE_VTEIAC 0x00110 |
#define | IXGBE_VTEIAM 0x00114 |
#define | IXGBE_VTEITR(x) (0x00820 + (4 * (x))) |
#define | IXGBE_VTIVAR(x) (0x00120 + (4 * (x))) |
#define | IXGBE_VTIVAR_MISC 0x00140 |
#define | IXGBE_VTRSCINT(x) (0x00180 + (4 * (x))) |
#define | IXGBE_VFRDBAL(x) (0x01000 + (0x40 * (x))) |
#define | IXGBE_VFRDBAH(x) (0x01004 + (0x40 * (x))) |
#define | IXGBE_VFRDLEN(x) (0x01008 + (0x40 * (x))) |
#define | IXGBE_VFRDH(x) (0x01010 + (0x40 * (x))) |
#define | IXGBE_VFRDT(x) (0x01018 + (0x40 * (x))) |
#define | IXGBE_VFRXDCTL(x) (0x01028 + (0x40 * (x))) |
#define | IXGBE_VFSRRCTL(x) (0x01014 + (0x40 * (x))) |
#define | IXGBE_VFRSCCTL(x) (0x0102C + (0x40 * (x))) |
#define | IXGBE_VFPSRTYPE 0x00300 |
#define | IXGBE_VFTDBAL(x) (0x02000 + (0x40 * (x))) |
#define | IXGBE_VFTDBAH(x) (0x02004 + (0x40 * (x))) |
#define | IXGBE_VFTDLEN(x) (0x02008 + (0x40 * (x))) |
#define | IXGBE_VFTDH(x) (0x02010 + (0x40 * (x))) |
#define | IXGBE_VFTDT(x) (0x02018 + (0x40 * (x))) |
#define | IXGBE_VFTXDCTL(x) (0x02028 + (0x40 * (x))) |
#define | IXGBE_VFTDWBAL(x) (0x02038 + (0x40 * (x))) |
#define | IXGBE_VFTDWBAH(x) (0x0203C + (0x40 * (x))) |
#define | IXGBE_VFDCA_RXCTRL(x) (0x0100C + (0x40 * (x))) |
#define | IXGBE_VFDCA_TXCTRL(x) (0x0200c + (0x40 * (x))) |
#define | IXGBE_VFGPRC 0x0101C |
#define | IXGBE_VFGPTC 0x0201C |
#define | IXGBE_VFGORC_LSB 0x01020 |
#define | IXGBE_VFGORC_MSB 0x01024 |
#define | IXGBE_VFGOTC_LSB 0x02020 |
#define | IXGBE_VFGOTC_MSB 0x02024 |
#define | IXGBE_VFMPRC 0x01034 |
#define | IXGBE_VFMRQC 0x3000 |
#define | IXGBE_VFRSSRK(x) (0x3100 + ((x) * 4)) |
#define | IXGBE_VFRETA(x) (0x3200 + ((x) * 4)) |
#define IXGBE_VF_IRQ_CLEAR_MASK 7 |
Definition at line 39 of file ixgbe_vf.h.
#define IXGBE_VF_MAX_RX_QUEUES 8 |
Definition at line 41 of file ixgbe_vf.h.
#define IXGBE_VF_MAX_TRAFFIC_CLASS 8 |
Definition at line 44 of file ixgbe_vf.h.
#define IXGBE_VF_MAX_TX_QUEUES 8 |
Definition at line 40 of file ixgbe_vf.h.
#define IXGBE_VFCTRL 0x00000 |
Definition at line 46 of file ixgbe_vf.h.
#define IXGBE_VFDCA_RXCTRL | ( | x | ) | (0x0100C + (0x40 * (x))) |
Definition at line 79 of file ixgbe_vf.h.
#define IXGBE_VFDCA_TXCTRL | ( | x | ) | (0x0200c + (0x40 * (x))) |
Definition at line 80 of file ixgbe_vf.h.
#define IXGBE_VFFRTIMER 0x00048 |
Definition at line 49 of file ixgbe_vf.h.
#define IXGBE_VFGORC_LSB 0x01020 |
Definition at line 83 of file ixgbe_vf.h.
#define IXGBE_VFGORC_MSB 0x01024 |
Definition at line 84 of file ixgbe_vf.h.
#define IXGBE_VFGOTC_LSB 0x02020 |
Definition at line 85 of file ixgbe_vf.h.
#define IXGBE_VFGOTC_MSB 0x02024 |
Definition at line 86 of file ixgbe_vf.h.
#define IXGBE_VFGPRC 0x0101C |
Definition at line 81 of file ixgbe_vf.h.
#define IXGBE_VFGPTC 0x0201C |
Definition at line 82 of file ixgbe_vf.h.
#define IXGBE_VFLINKS 0x00010 |
Definition at line 48 of file ixgbe_vf.h.
#define IXGBE_VFMPRC 0x01034 |
Definition at line 87 of file ixgbe_vf.h.
#define IXGBE_VFMRQC 0x3000 |
Definition at line 88 of file ixgbe_vf.h.
#define IXGBE_VFPSRTYPE 0x00300 |
Definition at line 70 of file ixgbe_vf.h.
#define IXGBE_VFRDBAH | ( | x | ) | (0x01004 + (0x40 * (x))) |
Definition at line 63 of file ixgbe_vf.h.
#define IXGBE_VFRDBAL | ( | x | ) | (0x01000 + (0x40 * (x))) |
Definition at line 62 of file ixgbe_vf.h.
#define IXGBE_VFRDH | ( | x | ) | (0x01010 + (0x40 * (x))) |
Definition at line 65 of file ixgbe_vf.h.
#define IXGBE_VFRDLEN | ( | x | ) | (0x01008 + (0x40 * (x))) |
Definition at line 64 of file ixgbe_vf.h.
#define IXGBE_VFRDT | ( | x | ) | (0x01018 + (0x40 * (x))) |
Definition at line 66 of file ixgbe_vf.h.
#define IXGBE_VFRETA | ( | x | ) | (0x3200 + ((x) * 4)) |
Definition at line 90 of file ixgbe_vf.h.
#define IXGBE_VFRSCCTL | ( | x | ) | (0x0102C + (0x40 * (x))) |
Definition at line 69 of file ixgbe_vf.h.
#define IXGBE_VFRSSRK | ( | x | ) | (0x3100 + ((x) * 4)) |
Definition at line 89 of file ixgbe_vf.h.
#define IXGBE_VFRXDCTL | ( | x | ) | (0x01028 + (0x40 * (x))) |
Definition at line 67 of file ixgbe_vf.h.
#define IXGBE_VFRXMEMWRAP 0x03190 |
Definition at line 50 of file ixgbe_vf.h.
#define IXGBE_VFSRRCTL | ( | x | ) | (0x01014 + (0x40 * (x))) |
Definition at line 68 of file ixgbe_vf.h.
#define IXGBE_VFSTATUS 0x00008 |
Definition at line 47 of file ixgbe_vf.h.
#define IXGBE_VFTDBAH | ( | x | ) | (0x02004 + (0x40 * (x))) |
Definition at line 72 of file ixgbe_vf.h.
#define IXGBE_VFTDBAL | ( | x | ) | (0x02000 + (0x40 * (x))) |
Definition at line 71 of file ixgbe_vf.h.
#define IXGBE_VFTDH | ( | x | ) | (0x02010 + (0x40 * (x))) |
Definition at line 74 of file ixgbe_vf.h.
#define IXGBE_VFTDLEN | ( | x | ) | (0x02008 + (0x40 * (x))) |
Definition at line 73 of file ixgbe_vf.h.
#define IXGBE_VFTDT | ( | x | ) | (0x02018 + (0x40 * (x))) |
Definition at line 75 of file ixgbe_vf.h.
#define IXGBE_VFTDWBAH | ( | x | ) | (0x0203C + (0x40 * (x))) |
Definition at line 78 of file ixgbe_vf.h.
#define IXGBE_VFTDWBAL | ( | x | ) | (0x02038 + (0x40 * (x))) |
Definition at line 77 of file ixgbe_vf.h.
#define IXGBE_VFTXDCTL | ( | x | ) | (0x02028 + (0x40 * (x))) |
Definition at line 76 of file ixgbe_vf.h.
#define IXGBE_VTEIAC 0x00110 |
Definition at line 55 of file ixgbe_vf.h.
#define IXGBE_VTEIAM 0x00114 |
Definition at line 56 of file ixgbe_vf.h.
#define IXGBE_VTEICR 0x00100 |
Definition at line 51 of file ixgbe_vf.h.
#define IXGBE_VTEICS 0x00104 |
Definition at line 52 of file ixgbe_vf.h.
#define IXGBE_VTEIMC 0x0010C |
Definition at line 54 of file ixgbe_vf.h.
#define IXGBE_VTEIMS 0x00108 |
Definition at line 53 of file ixgbe_vf.h.
#define IXGBE_VTEITR | ( | x | ) | (0x00820 + (4 * (x))) |
Definition at line 57 of file ixgbe_vf.h.
#define IXGBE_VTIVAR | ( | x | ) | (0x00120 + (4 * (x))) |
Definition at line 58 of file ixgbe_vf.h.
#define IXGBE_VTIVAR_MISC 0x00140 |
Definition at line 59 of file ixgbe_vf.h.
#define IXGBE_VTRSCINT | ( | x | ) | (0x00180 + (4 * (x))) |
Definition at line 60 of file ixgbe_vf.h.
s32 ixgbe_check_mac_link_vf | ( | struct ixgbe_hw * | hw, |
ixgbe_link_speed * | speed, | ||
bool * | link_up, | ||
bool | autoneg_wait_to_complete | ||
) |
ixgbe_check_mac_link_vf - Get link/speed status @hw: pointer to hardware structure @speed: pointer to link speed @link_up: true is link is up, false otherwise @autoneg_wait_to_complete: true when waiting for completion is needed
Reads the links register to determine if link is up and the current speed
Definition at line 606 of file ixgbe_vf.c.
References ixgbe_mbx_operations::check_for_rst, ixgbe_mac_info::get_link_status, IXGBE_LINK_SPEED_100_FULL, IXGBE_LINK_SPEED_10_FULL, IXGBE_LINK_SPEED_10GB_FULL, IXGBE_LINK_SPEED_1GB_FULL, IXGBE_LINK_SPEED_2_5GB_FULL, IXGBE_LINK_SPEED_5GB_FULL, IXGBE_LINK_SPEED_UNKNOWN, IXGBE_LINKS_SPEED_100_82599, IXGBE_LINKS_SPEED_10_X550EM_A, IXGBE_LINKS_SPEED_10G_82599, IXGBE_LINKS_SPEED_1G_82599, IXGBE_LINKS_SPEED_82599, IXGBE_LINKS_SPEED_NON_STD, IXGBE_LINKS_UP, ixgbe_mac_82599_vf, ixgbe_mac_X550, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_VFLINKS, IXGBE_VT_MSGTYPE_CTS, IXGBE_VT_MSGTYPE_NACK, ixgbe_hw::mac, ixgbe_hw::mbx, ixgbe_mbx_info::ops, ixgbe_mbx_operations::read, ixgbe_mbx_info::timeout, ixgbe_mac_info::type, UNREFERENCED_1PARAMETER, and usec_delay.
Referenced by ixgbe_init_ops_vf().
ixgbe_get_link_state_vf - Get VF link state from PF @hw: pointer to the HW structure @link_state: link state storage
Returns state of the operation error or success.
Definition at line 463 of file ixgbe_vf.c.
References IXGBE_ERR_MBX, IXGBE_SUCCESS, IXGBE_VF_GET_LINK_STATE, IXGBE_VT_MSGTYPE_NACK, and ixgbevf_write_msg_read_ack().
Referenced by ixgbe_init_ops_vf().
ixgbe_get_mac_addr_vf - Read device MAC address @hw: pointer to the HW structure @mac_addr: the MAC address
Definition at line 542 of file ixgbe_vf.c.
References IXGBE_ETH_LENGTH_OF_ADDRESS, IXGBE_SUCCESS, ixgbe_hw::mac, and ixgbe_mac_info::perm_addr.
Referenced by ixgbe_init_ops_vf(), and ixgbe_set_rar_vf().
ixgbe_get_num_of_rx_queues_vf - Get number of RX queues @hw: pointer to hardware structure
Returns the number of receive queues for the given adapter.
Definition at line 531 of file ixgbe_vf.c.
References IXGBE_VF_MAX_RX_QUEUES, and UNREFERENCED_1PARAMETER.
ixgbe_get_num_of_tx_queues_vf - Get number of TX queues @hw: pointer to hardware structure
Returns the number of transmit queues for the given adapter.
Definition at line 519 of file ixgbe_vf.c.
References IXGBE_VF_MAX_TX_QUEUES, and UNREFERENCED_1PARAMETER.
ixgbe_init_hw_vf - virtual function hardware initialization @hw: pointer to hardware structure
Initialize the hardware by resetting the hardware and then starting the hardware
Definition at line 158 of file ixgbe_vf.c.
References ixgbe_mac_info::addr, ixgbe_mac_operations::get_mac_addr, ixgbe_hw::mac, ixgbe_mac_info::ops, and ixgbe_mac_operations::start_hw.
Referenced by ixgbe_init_ops_vf().
ixgbe_init_ops_vf - Initialize the pointers for vf @hw: pointer to hardware structure
This will assign function pointers, adapter-specific functions can override the assignment of generic function pointers by assigning their own adapter-specific function pointers. Does not touch the hardware.
Definition at line 51 of file ixgbe_vf.c.
ixgbe_reset_hw_vf - Performs hardware reset @hw: pointer to hardware structure
Resets the hardware by resetting the transmit and receive units, masks and clears all interrupts.
Definition at line 174 of file ixgbe_vf.c.
References ixgbe_hw::api_version, ixgbe_mbx_operations::check_for_rst, DEBUGFUNC, DEBUGOUT, IXGBE_CTRL_RST, IXGBE_ERR_INVALID_MAC_ADDR, IXGBE_ERR_RESET_FAILED, IXGBE_ETH_LENGTH_OF_ADDRESS, ixgbe_mbox_api_10, IXGBE_VF_INIT_TIMEOUT, IXGBE_VF_MBX_INIT_TIMEOUT, IXGBE_VF_MC_TYPE_WORD, IXGBE_VF_PERMADDR_MSG_LEN, IXGBE_VF_RESET, IXGBE_VFCTRL, IXGBE_VFWRITE_REG, ixgbe_virt_clr_reg(), IXGBE_VT_MSGTYPE_ACK, IXGBE_VT_MSGTYPE_NACK, IXGBE_WRITE_FLUSH, ixgbe_hw::mac, ixgbe_hw::mbx, ixgbe_mac_info::mc_filter_type, msec_delay, ixgbe_mac_info::ops, ixgbe_mbx_info::ops, ixgbe_mac_info::perm_addr, ixgbe_mbx_operations::read_posted, ixgbe_mac_operations::stop_adapter, ixgbe_mbx_info::timeout, usec_delay, and ixgbe_mbx_operations::write_posted.
Referenced by ixgbe_init_ops_vf().
ixgbe_set_rar_vf - set device MAC address @hw: pointer to hardware structure @index: Receive address register to write @addr: Address to put into receive address register @vmdq: VMDq "set" or "pool" index @enable_addr: set flag that address is active
Definition at line 345 of file ixgbe_vf.c.
References ixgbe_mac_info::addr, IXGBE_ERR_MBX, ixgbe_get_mac_addr_vf(), IXGBE_VF_SET_MAC_ADDR, IXGBE_VT_MSGTYPE_NACK, ixgbevf_write_msg_read_ack(), ixgbe_hw::mac, and UNREFERENCED_3PARAMETER.
Referenced by ixgbe_init_ops_vf().
ixgbe_set_vfta_vf - Set/Unset vlan filter table address @hw: pointer to the HW structure @vlan: 12 bit VLAN ID @vind: unused by VF drivers @vlan_on: if true then set bit, else clear bit @vlvf_bypass: boolean flag indicating updating default pool is okay
Turn on/off specified VLAN in the VLAN filter table.
Definition at line 494 of file ixgbe_vf.c.
References IXGBE_SUCCESS, IXGBE_VF_SET_VLAN, IXGBE_VT_MSGINFO_SHIFT, IXGBE_VT_MSGTYPE_ACK, IXGBE_VT_MSGTYPE_NACK, ixgbevf_write_msg_read_ack(), and UNREFERENCED_2PARAMETER.
Referenced by ixgbe_init_ops_vf().
s32 ixgbe_setup_mac_link_vf | ( | struct ixgbe_hw * | hw, |
ixgbe_link_speed | speed, | ||
bool | autoneg_wait_to_complete | ||
) |
ixgbe_setup_mac_link_vf - Setup MAC link settings @hw: pointer to hardware structure @speed: new link speed @autoneg_wait_to_complete: true when waiting for completion is needed
Set the link speed in the AUTOC register and restarts link.
Definition at line 590 of file ixgbe_vf.c.
References IXGBE_SUCCESS, and UNREFERENCED_3PARAMETER.
Referenced by ixgbe_init_ops_vf().
ixgbe_start_hw_vf - Prepare hardware for Tx/Rx @hw: pointer to hardware structure
Starts the hardware by filling the bus info structure and media type, clears all on chip counters, initializes receive address registers, multicast table, VLAN filter table, calls routine to set up link and flow control settings, and leaves transmit and receive units disabled and uninitialized
Definition at line 143 of file ixgbe_vf.c.
References ixgbe_hw::adapter_stopped, and IXGBE_SUCCESS.
Referenced by ixgbe_init_ops_vf().
ixgbe_stop_adapter_vf - Generic stop Tx/Rx units @hw: pointer to hardware structure
Sets the adapter_stopped flag within ixgbe_hw struct. Clears interrupts, disables transmit and receive units. The adapter_stopped flag is used by the shared code and drivers to determine if the adapter is in a stopped state and should not touch the hardware.
Definition at line 248 of file ixgbe_vf.c.
References ixgbe_hw::adapter_stopped, IXGBE_SUCCESS, IXGBE_TXDCTL_SWFLSH, IXGBE_VF_IRQ_CLEAR_MASK, IXGBE_VFPSRTYPE, IXGBE_VFREAD_REG, IXGBE_VFRXDCTL, IXGBE_VFTXDCTL, IXGBE_VFWRITE_REG, IXGBE_VTEICR, IXGBE_VTEIMC, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::max_rx_queues, ixgbe_mac_info::max_tx_queues, and msec_delay.
Referenced by ixgbe_init_ops_vf().
s32 ixgbe_update_mc_addr_list_vf | ( | struct ixgbe_hw * | hw, |
u8 * | mc_addr_list, | ||
u32 | mc_addr_count, | ||
ixgbe_mc_addr_itr | next, | ||
bool | clear | ||
) |
ixgbe_update_mc_addr_list_vf - Update Multicast addresses @hw: pointer to the HW structure @mc_addr_list: array of multicast addresses to program @mc_addr_count: number of multicast addresses to program @next: caller supplied function to return next address in list @clear: unused
Updates the Multicast Table Array.
Definition at line 380 of file ixgbe_vf.c.
References DEBUGFUNC, DEBUGOUT1, ixgbe_mta_vector(), IXGBE_VF_SET_MULTICAST, IXGBE_VFMAILBOX_SIZE, IXGBE_VT_MSGINFO_SHIFT, ixgbe_hw::mbx, ixgbe_mbx_info::ops, UNREFERENCED_1PARAMETER, and ixgbe_mbx_operations::write_posted.
Referenced by ixgbe_init_ops_vf().
int ixgbevf_get_queues | ( | struct ixgbe_hw * | hw, |
unsigned int * | num_tcs, | ||
unsigned int * | default_tc | ||
) |
Definition at line 754 of file ixgbe_vf.c.
References ixgbe_hw::api_version, IXGBE_ERR_MBX, ixgbe_mbox_api_11, ixgbe_mbox_api_12, ixgbe_mbox_api_13, IXGBE_VF_DEF_QUEUE, IXGBE_VF_GET_QUEUES, IXGBE_VF_MAX_RX_QUEUES, IXGBE_VF_MAX_TX_QUEUES, IXGBE_VF_RX_QUEUES, IXGBE_VF_TRANS_VLAN, IXGBE_VF_TX_QUEUES, IXGBE_VT_MSGTYPE_ACK, ixgbevf_write_msg_read_ack(), ixgbe_hw::mac, ixgbe_mac_info::max_rx_queues, and ixgbe_mac_info::max_tx_queues.
int ixgbevf_negotiate_api_version | ( | struct ixgbe_hw * | hw, |
int | api | ||
) |
ixgbevf_negotiate_api_version - Negotiate supported API version @hw: pointer to the HW structure @api: integer containing requested API version
Definition at line 728 of file ixgbe_vf.c.
References ixgbe_hw::api_version, IXGBE_ERR_INVALID_ARGUMENT, IXGBE_VF_API_NEGOTIATE, IXGBE_VT_MSGTYPE_ACK, and ixgbevf_write_msg_read_ack().
Referenced by ixgbe_init_ops_vf(), and ixv_negotiate_api().
ixgbevf_rlpml_set_vf - Set the maximum receive packet length @hw: pointer to the HW structure @max_size: value to assign to max frame size
Definition at line 705 of file ixgbe_vf.c.
References IXGBE_ERR_MBX, IXGBE_VF_SET_LPE, IXGBE_VT_MSGTYPE_NACK, and ixgbevf_write_msg_read_ack().
Referenced by ixgbe_init_ops_vf(), and ixv_initialize_receive_units().
Definition at line 552 of file ixgbe_vf.c.
References IXGBE_ERR_OUT_OF_MEM, IXGBE_VF_SET_MACVLAN, IXGBE_VT_MSGINFO_SHIFT, IXGBE_VT_MSGTYPE_NACK, and ixgbevf_write_msg_read_ack().
Referenced by ixgbe_init_ops_vf().
ixgbevf_update_xcast_mode - Update Multicast mode @hw: pointer to the HW structure @xcast_mode: new multicast mode
Updates the Multicast Mode of VF.
Definition at line 426 of file ixgbe_vf.c.
References ixgbe_hw::api_version, IXGBE_ERR_FEATURE_NOT_SUPPORTED, ixgbe_mbox_api_12, ixgbe_mbox_api_13, IXGBE_SUCCESS, IXGBE_VF_UPDATE_XCAST_MODE, IXGBE_VT_MSGTYPE_NACK, ixgbevf_write_msg_read_ack(), and IXGBEVF_XCAST_MODE_ALLMULTI.
Referenced by ixgbe_init_ops_vf().