|
iPXE
|
#include <stddef.h>#include <stdint.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <unistd.h>#include <byteswap.h>#include <errno.h>#include <ipxe/pci.h>#include <ipxe/malloc.h>#include <ipxe/if_ether.h>#include <ipxe/io.h>#include <ipxe/ethernet.h>#include <ipxe/iobuf.h>#include <ipxe/netdevice.h>#include "igbvf_osdep.h"#include "igbvf_regs.h"#include "igbvf_defines.h"#include "igbvf_mbx.h"Go to the source code of this file.
Data Structures | |
| union | e1000_adv_rx_desc |
| union | e1000_adv_tx_desc |
| struct | e1000_adv_tx_context_desc |
| struct | e1000_vf_stats |
| struct | e1000_mac_operations |
| struct | e1000_mac_info |
| struct | e1000_bus_info |
| struct | e1000_mbx_operations |
| struct | e1000_mbx_stats |
| struct | e1000_mbx_info |
| struct | e1000_dev_spec_vf |
| struct | e1000_hw |
Macros | |
| #define | _IGBVF_VF_H_ |
| #define | E1000_DEV_ID_82576_VF 0x10CA |
| #define | E1000_DEV_ID_I350_VF 0x1520 |
| #define | E1000_VF_INIT_TIMEOUT 200 /* Number of retries to clear RSTI */ |
| #define | E1000_TXDCTL_QUEUE_ENABLE 0x02000000 /* Enable specific Tx Queue */ |
| #define | E1000_RXDCTL_QUEUE_ENABLE 0x02000000 /* Enable specific Rx Queue */ |
| #define | E1000_SRRCTL_BSIZEPKT_SHIFT 10 /* Shift _right_ */ |
| #define | E1000_SRRCTL_BSIZEHDRSIZE_MASK 0x00000F00 |
| #define | E1000_SRRCTL_BSIZEHDRSIZE_SHIFT 2 /* Shift _left_ */ |
| #define | E1000_SRRCTL_DESCTYPE_LEGACY 0x00000000 |
| #define | E1000_SRRCTL_DESCTYPE_ADV_ONEBUF 0x02000000 |
| #define | E1000_SRRCTL_DESCTYPE_HDR_SPLIT 0x04000000 |
| #define | E1000_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS 0x0A000000 |
| #define | E1000_SRRCTL_DESCTYPE_HDR_REPLICATION 0x06000000 |
| #define | E1000_SRRCTL_DESCTYPE_HDR_REPLICATION_LARGE_PKT 0x08000000 |
| #define | E1000_SRRCTL_DESCTYPE_MASK 0x0E000000 |
| #define | E1000_SRRCTL_DROP_EN 0x80000000 |
| #define | E1000_SRRCTL_BSIZEPKT_MASK 0x0000007F |
| #define | E1000_SRRCTL_BSIZEHDR_MASK 0x00003F00 |
| #define | E1000_EICR 0x01580 /* Ext. Interrupt Cause Read - R/clr */ |
| #define | E1000_EITR(_n) (0x01680 + ((_n) << 2)) |
| #define | E1000_EICS 0x01520 /* Ext. Interrupt Cause Set - W0 */ |
| #define | E1000_EIMS 0x01524 /* Ext. Interrupt Mask Set/Read - RW */ |
| #define | E1000_EIMC 0x01528 /* Ext. Interrupt Mask Clear - WO */ |
| #define | E1000_EIAC 0x0152C /* Ext. Interrupt Auto Clear - RW */ |
| #define | E1000_EIAM 0x01530 /* Ext. Interrupt Ack Auto Clear Mask - RW */ |
| #define | E1000_IVAR0 0x01700 /* Interrupt Vector Allocation (array) - RW */ |
| #define | E1000_IVAR_MISC 0x01740 /* IVAR for "other" causes - RW */ |
| #define | E1000_IVAR_VALID 0x80 |
| #define | E1000_RXDADV_HDRBUFLEN_MASK 0x7FE0 |
| #define | E1000_RXDADV_HDRBUFLEN_SHIFT 5 |
| #define | E1000_ADVTXD_DTYP_CTXT 0x00200000 /* Advanced Context Descriptor */ |
| #define | E1000_ADVTXD_DTYP_DATA 0x00300000 /* Advanced Data Descriptor */ |
| #define | E1000_ADVTXD_DCMD_EOP 0x01000000 /* End of Packet */ |
| #define | E1000_ADVTXD_DCMD_IFCS 0x02000000 /* Insert FCS (Ethernet CRC) */ |
| #define | E1000_ADVTXD_DCMD_RS 0x08000000 /* Report Status */ |
| #define | E1000_ADVTXD_DCMD_DEXT 0x20000000 /* Descriptor extension (1=Adv) */ |
| #define | E1000_ADVTXD_DCMD_VLE 0x40000000 /* VLAN pkt enable */ |
| #define | E1000_ADVTXD_DCMD_TSE 0x80000000 /* TCP Seg enable */ |
| #define | E1000_ADVTXD_PAYLEN_SHIFT 14 /* Adv desc PAYLEN shift */ |
| #define | E1000_ADVTXD_MACLEN_SHIFT 9 /* Adv ctxt desc mac len shift */ |
| #define | E1000_ADVTXD_TUCMD_IPV4 0x00000400 /* IP Packet Type: 1=IPv4 */ |
| #define | E1000_ADVTXD_TUCMD_L4T_TCP 0x00000800 /* L4 Packet TYPE of TCP */ |
| #define | E1000_ADVTXD_L4LEN_SHIFT 8 /* Adv ctxt L4LEN shift */ |
| #define | E1000_ADVTXD_MSS_SHIFT 16 /* Adv ctxt MSS shift */ |
Functions | |
| FILE_LICENCE (GPL2_ONLY) | |
| s32 | igbvf_read_pcie_cap_reg (struct e1000_hw *hw, u32 reg, u16 *value) |
| void | igbvf_vfta_set_vf (struct e1000_hw *, u16, bool) |
| igbvf_vfta_set_vf - Set/Unset vlan filter table address @hw: pointer to the HW structure @vid: determines the vfta register and bit to set/unset @set: if true then set bit, else clear bit More... | |
| void | igbvf_rlpml_set_vf (struct e1000_hw *, u16) |
| igbvf_rlpml_set_vf - Set the maximum receive packet length @hw: pointer to the HW structure @max_size: value to assign to max frame size More... | |
| s32 | igbvf_promisc_set_vf (struct e1000_hw *, enum e1000_promisc_type) |
| igbvf_promisc_set_vf - Set flags for Unicast or Multicast promisc @hw: pointer to the HW structure @uni: boolean indicating unicast promisc status @multi: boolean indicating multicast promisc status More... | |
| #define _IGBVF_VF_H_ |
Definition at line 32 of file igbvf_vf.h.
| #define E1000_DEV_ID_82576_VF 0x10CA |
Definition at line 56 of file igbvf_vf.h.
| #define E1000_DEV_ID_I350_VF 0x1520 |
Definition at line 57 of file igbvf_vf.h.
| #define E1000_VF_INIT_TIMEOUT 200 /* Number of retries to clear RSTI */ |
Definition at line 59 of file igbvf_vf.h.
| #define E1000_TXDCTL_QUEUE_ENABLE 0x02000000 /* Enable specific Tx Queue */ |
Definition at line 62 of file igbvf_vf.h.
| #define E1000_RXDCTL_QUEUE_ENABLE 0x02000000 /* Enable specific Rx Queue */ |
Definition at line 63 of file igbvf_vf.h.
| #define E1000_SRRCTL_BSIZEPKT_SHIFT 10 /* Shift _right_ */ |
Definition at line 66 of file igbvf_vf.h.
| #define E1000_SRRCTL_BSIZEHDRSIZE_MASK 0x00000F00 |
Definition at line 67 of file igbvf_vf.h.
| #define E1000_SRRCTL_BSIZEHDRSIZE_SHIFT 2 /* Shift _left_ */ |
Definition at line 68 of file igbvf_vf.h.
| #define E1000_SRRCTL_DESCTYPE_LEGACY 0x00000000 |
Definition at line 69 of file igbvf_vf.h.
| #define E1000_SRRCTL_DESCTYPE_ADV_ONEBUF 0x02000000 |
Definition at line 70 of file igbvf_vf.h.
| #define E1000_SRRCTL_DESCTYPE_HDR_SPLIT 0x04000000 |
Definition at line 71 of file igbvf_vf.h.
| #define E1000_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS 0x0A000000 |
Definition at line 72 of file igbvf_vf.h.
| #define E1000_SRRCTL_DESCTYPE_HDR_REPLICATION 0x06000000 |
Definition at line 73 of file igbvf_vf.h.
| #define E1000_SRRCTL_DESCTYPE_HDR_REPLICATION_LARGE_PKT 0x08000000 |
Definition at line 74 of file igbvf_vf.h.
| #define E1000_SRRCTL_DESCTYPE_MASK 0x0E000000 |
Definition at line 75 of file igbvf_vf.h.
| #define E1000_SRRCTL_DROP_EN 0x80000000 |
Definition at line 76 of file igbvf_vf.h.
| #define E1000_SRRCTL_BSIZEPKT_MASK 0x0000007F |
Definition at line 78 of file igbvf_vf.h.
| #define E1000_SRRCTL_BSIZEHDR_MASK 0x00003F00 |
Definition at line 79 of file igbvf_vf.h.
| #define E1000_EICR 0x01580 /* Ext. Interrupt Cause Read - R/clr */ |
Definition at line 82 of file igbvf_vf.h.
| #define E1000_EITR | ( | _n | ) | (0x01680 + ((_n) << 2)) |
Definition at line 83 of file igbvf_vf.h.
| #define E1000_EICS 0x01520 /* Ext. Interrupt Cause Set - W0 */ |
Definition at line 84 of file igbvf_vf.h.
| #define E1000_EIMS 0x01524 /* Ext. Interrupt Mask Set/Read - RW */ |
Definition at line 85 of file igbvf_vf.h.
| #define E1000_EIMC 0x01528 /* Ext. Interrupt Mask Clear - WO */ |
Definition at line 86 of file igbvf_vf.h.
| #define E1000_EIAC 0x0152C /* Ext. Interrupt Auto Clear - RW */ |
Definition at line 87 of file igbvf_vf.h.
| #define E1000_EIAM 0x01530 /* Ext. Interrupt Ack Auto Clear Mask - RW */ |
Definition at line 88 of file igbvf_vf.h.
| #define E1000_IVAR0 0x01700 /* Interrupt Vector Allocation (array) - RW */ |
Definition at line 89 of file igbvf_vf.h.
| #define E1000_IVAR_MISC 0x01740 /* IVAR for "other" causes - RW */ |
Definition at line 90 of file igbvf_vf.h.
| #define E1000_IVAR_VALID 0x80 |
Definition at line 91 of file igbvf_vf.h.
| #define E1000_RXDADV_HDRBUFLEN_MASK 0x7FE0 |
Definition at line 125 of file igbvf_vf.h.
| #define E1000_RXDADV_HDRBUFLEN_SHIFT 5 |
Definition at line 126 of file igbvf_vf.h.
| #define E1000_ADVTXD_DTYP_CTXT 0x00200000 /* Advanced Context Descriptor */ |
Definition at line 143 of file igbvf_vf.h.
| #define E1000_ADVTXD_DTYP_DATA 0x00300000 /* Advanced Data Descriptor */ |
Definition at line 144 of file igbvf_vf.h.
| #define E1000_ADVTXD_DCMD_EOP 0x01000000 /* End of Packet */ |
Definition at line 145 of file igbvf_vf.h.
| #define E1000_ADVTXD_DCMD_IFCS 0x02000000 /* Insert FCS (Ethernet CRC) */ |
Definition at line 146 of file igbvf_vf.h.
| #define E1000_ADVTXD_DCMD_RS 0x08000000 /* Report Status */ |
Definition at line 147 of file igbvf_vf.h.
| #define E1000_ADVTXD_DCMD_DEXT 0x20000000 /* Descriptor extension (1=Adv) */ |
Definition at line 148 of file igbvf_vf.h.
| #define E1000_ADVTXD_DCMD_VLE 0x40000000 /* VLAN pkt enable */ |
Definition at line 149 of file igbvf_vf.h.
| #define E1000_ADVTXD_DCMD_TSE 0x80000000 /* TCP Seg enable */ |
Definition at line 150 of file igbvf_vf.h.
| #define E1000_ADVTXD_PAYLEN_SHIFT 14 /* Adv desc PAYLEN shift */ |
Definition at line 151 of file igbvf_vf.h.
Definition at line 161 of file igbvf_vf.h.
| #define E1000_ADVTXD_TUCMD_IPV4 0x00000400 /* IP Packet Type: 1=IPv4 */ |
Definition at line 162 of file igbvf_vf.h.
| #define E1000_ADVTXD_TUCMD_L4T_TCP 0x00000800 /* L4 Packet TYPE of TCP */ |
Definition at line 163 of file igbvf_vf.h.
| #define E1000_ADVTXD_L4LEN_SHIFT 8 /* Adv ctxt L4LEN shift */ |
Definition at line 164 of file igbvf_vf.h.
| #define E1000_ADVTXD_MSS_SHIFT 16 /* Adv ctxt MSS shift */ |
Definition at line 165 of file igbvf_vf.h.
| enum e1000_mac_type |
| Enumerator | |
|---|---|
| e1000_undefined | |
| e1000_vfadapt | |
| e1000_num_macs | |
Definition at line 167 of file igbvf_vf.h.
| enum e1000_bus_type |
| Enumerator | |
|---|---|
| e1000_bus_type_unknown | |
| e1000_bus_type_pci | |
| e1000_bus_type_pcix | |
| e1000_bus_type_pci_express | |
| e1000_bus_type_reserved | |
Definition at line 237 of file igbvf_vf.h.
| enum e1000_bus_speed |
| Enumerator | |
|---|---|
| e1000_bus_speed_unknown | |
| e1000_bus_speed_33 | |
| e1000_bus_speed_66 | |
| e1000_bus_speed_100 | |
| e1000_bus_speed_120 | |
| e1000_bus_speed_133 | |
| e1000_bus_speed_2500 | |
| e1000_bus_speed_5000 | |
| e1000_bus_speed_reserved | |
Definition at line 245 of file igbvf_vf.h.
| enum e1000_bus_width |
| Enumerator | |
|---|---|
| e1000_bus_width_unknown | |
| e1000_bus_width_pcie_x1 | |
| e1000_bus_width_pcie_x2 | |
| e1000_bus_width_pcie_x4 | |
| e1000_bus_width_pcie_x8 | |
| e1000_bus_width_32 | |
| e1000_bus_width_64 | |
| e1000_bus_width_reserved | |
Definition at line 257 of file igbvf_vf.h.
| enum e1000_promisc_type |
| Enumerator | |
|---|---|
| e1000_promisc_disabled | |
| e1000_promisc_unicast | |
| e1000_promisc_multicast | |
| e1000_promisc_enabled | |
| e1000_num_promisc_types | |
Definition at line 333 of file igbvf_vf.h.
| FILE_LICENCE | ( | GPL2_ONLY | ) |
igbvf_vfta_set_vf - Set/Unset vlan filter table address @hw: pointer to the HW structure @vid: determines the vfta register and bit to set/unset @set: if true then set bit, else clear bit
Definition at line 313 of file igbvf_vf.c.
References E1000_VF_SET_VLAN, E1000_VF_SET_VLAN_ADD, e1000_mbx_info::ops, set, and e1000_mbx_operations::write_posted.
igbvf_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 331 of file igbvf_vf.c.
References E1000_VF_SET_LPE, e1000_mbx_info::ops, and e1000_mbx_operations::write_posted.
Referenced by igbvf_configure_rx().
igbvf_promisc_set_vf - Set flags for Unicast or Multicast promisc @hw: pointer to the HW structure @uni: boolean indicating unicast promisc status @multi: boolean indicating multicast promisc status
Definition at line 348 of file igbvf_vf.c.
References E1000_ERR_MAC_INIT, e1000_promisc_disabled, e1000_promisc_enabled, e1000_promisc_multicast, e1000_promisc_unicast, E1000_VF_SET_PROMISC, E1000_VF_SET_PROMISC_MULTICAST, E1000_VF_SET_PROMISC_UNICAST, E1000_VT_MSGTYPE_ACK, e1000_mbx_info::ops, e1000_mbx_operations::read_posted, type, and e1000_mbx_operations::write_posted.
1.8.15