FreeBSD kernel IXGBE device code
|
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf_ring.h>
#include <sys/mbuf.h>
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/sockio.h>
#include <sys/eventhandler.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_arp.h>
#include <net/bpf.h>
#include <net/ethernet.h>
#include <net/if_dl.h>
#include <net/if_media.h>
#include <net/if_types.h>
#include <net/if_vlan_var.h>
#include <net/iflib.h>
#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
#include <machine/resource.h>
#include <vm/vm.h>
#include <vm/pmap.h>
#include <machine/clock.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/endian.h>
#include <sys/gtaskqueue.h>
#include <sys/pcpu.h>
#include <sys/smp.h>
#include <machine/smp.h>
#include <sys/sbuf.h>
#include "ixgbe_api.h"
#include "ixgbe_common.h"
#include "ixgbe_phy.h"
#include "ixgbe_vf.h"
#include "ixgbe_features.h"
#include "ixgbe_bypass.h"
#include "ixgbe_fdir.h"
#include "ixgbe_rss.h"
Go to the source code of this file.
Data Structures | |
struct | _ixgbe_vendor_info_t |
struct | ixgbe_bp_data |
struct | ixgbe_dma_alloc |
struct | ixgbe_mc_addr |
struct | tx_ring |
struct | rx_ring |
struct | ix_rx_queue |
struct | ix_tx_queue |
struct | ixgbe_vf |
struct | ixgbe_softc |
Macros | |
#define | DEFAULT_TXD 2048 |
#define | PERFORM_TXD 2048 |
#define | MAX_TXD 4096 |
#define | MIN_TXD 64 |
#define | DEFAULT_RXD 2048 |
#define | PERFORM_RXD 2048 |
#define | MAX_RXD 4096 |
#define | MIN_RXD 64 |
#define | DBA_ALIGN 128 |
#define | IXGBE_WATCHDOG (10 * hz) |
#define | IXGBE_TX_CLEANUP_THRESHOLD(_a) ((_a)->num_tx_desc / 8) |
#define | IXGBE_TX_OP_THRESHOLD(_a) ((_a)->num_tx_desc / 32) |
#define | IXGBE_MAX_FRAME_SIZE 9728 |
#define | IXGBE_MTU_HDR (ETHER_HDR_LEN + ETHER_CRC_LEN) |
#define | IXGBE_MTU_HDR_VLAN |
#define | IXGBE_MAX_MTU (IXGBE_MAX_FRAME_SIZE - IXGBE_MTU_HDR) |
#define | IXGBE_MAX_MTU_VLAN (IXGBE_MAX_FRAME_SIZE - IXGBE_MTU_HDR_VLAN) |
#define | IXGBE_FC_PAUSE 0xFFFF |
#define | IXGBE_FC_HI 0x20000 |
#define | IXGBE_FC_LO 0x10000 |
#define | IXGBE_MPKTHSIZE (sizeof(struct m_hdr) + sizeof(struct pkthdr)) |
#define | IXGBE_RX_COPY_HDR_PADDED ((((IXGBE_MPKTHSIZE - 1) / 32) + 1) * 32) |
#define | IXGBE_RX_COPY_LEN (MSIZE - IXGBE_RX_COPY_HDR_PADDED) |
#define | IXGBE_RX_COPY_ALIGN (IXGBE_RX_COPY_HDR_PADDED - IXGBE_MPKTHSIZE) |
#define | DEBUG_INIT 0 |
#define | DEBUG_IOCTL 0 |
#define | DEBUG_HW 0 |
#define | INIT_DEBUGOUT(S) if (DEBUG_INIT) printf(S "\n") |
#define | INIT_DEBUGOUT1(S, A) if (DEBUG_INIT) printf(S "\n", A) |
#define | INIT_DEBUGOUT2(S, A, B) if (DEBUG_INIT) printf(S "\n", A, B) |
#define | IOCTL_DEBUGOUT(S) if (DEBUG_IOCTL) printf(S "\n") |
#define | IOCTL_DEBUGOUT1(S, A) if (DEBUG_IOCTL) printf(S "\n", A) |
#define | IOCTL_DEBUGOUT2(S, A, B) if (DEBUG_IOCTL) printf(S "\n", A, B) |
#define | HW_DEBUGOUT(S) if (DEBUG_HW) printf(S "\n") |
#define | HW_DEBUGOUT1(S, A) if (DEBUG_HW) printf(S "\n", A) |
#define | HW_DEBUGOUT2(S, A, B) if (DEBUG_HW) printf(S "\n", A, B) |
#define | MAX_NUM_MULTICAST_ADDRESSES 128 |
#define | IXGBE_82598_SCATTER 100 |
#define | IXGBE_82599_SCATTER 32 |
#define | IXGBE_TSO_SIZE 262140 |
#define | IXGBE_RX_HDR 128 |
#define | IXGBE_VFTA_SIZE 128 |
#define | IXGBE_BR_SIZE 4096 |
#define | IXGBE_QUEUE_MIN_FREE 32 |
#define | IXGBE_MAX_TX_BUSY 10 |
#define | IXGBE_QUEUE_HUNG 0x80000000 |
#define | IXGBE_EITR_DEFAULT 128 |
#define | CSUM_OFFLOAD |
#define | IXGBE_CAPS |
#define | DEVMETHOD_END { NULL, NULL } |
#define | IXGBE_LOW_LATENCY 128 |
#define | IXGBE_AVE_LATENCY 400 |
#define | IXGBE_BULK_LATENCY 1200 |
#define | IXGBE_LINK_ITR_QUANTA 0x1FF |
#define | IXGBE_LINK_ITR |
#define | IXGBE_MAX_VF_MC 30 /* Max number of multicast entries */ |
#define | num_tx_queues shared->isc_ntxqsets |
#define | num_rx_queues shared->isc_nrxqsets |
#define | max_frame_size shared->isc_max_frame_size |
#define | intr_type shared->isc_intr |
#define | ETHERTYPE_IEEE1588 0x88F7 |
#define | PICOSECS_PER_TICK 20833 |
#define | TSYNC_UDP_PORT 319 /* UDP port for the protocol */ |
#define | IXGBE_ADVTXD_TSTAMP 0x00080000 |
#define | IXGBE_SET_IPACKETS(sc, count) (sc)->ipackets = (count) |
#define | IXGBE_SET_IERRORS(sc, count) (sc)->ierrors = (count) |
#define | IXGBE_SET_OPACKETS(sc, count) (sc)->opackets = (count) |
#define | IXGBE_SET_OERRORS(sc, count) (sc)->oerrors = (count) |
#define | IXGBE_SET_COLLISIONS(sc, count) |
#define | IXGBE_SET_IBYTES(sc, count) (sc)->ibytes = (count) |
#define | IXGBE_SET_OBYTES(sc, count) (sc)->obytes = (count) |
#define | IXGBE_SET_IMCASTS(sc, count) (sc)->imcasts = (count) |
#define | IXGBE_SET_OMCASTS(sc, count) (sc)->omcasts = (count) |
#define | IXGBE_SET_IQDROPS(sc, count) (sc)->iqdrops = (count) |
#define | IXGBE_PHY_CURRENT_TEMP 0xC820 |
#define | IXGBE_PHY_OVERTEMP_STATUS 0xC830 |
#define | IXGBE_SYSCTL_DESC_ADV_SPEED |
#define | IXGBE_SYSCTL_DESC_SET_FC |
#define | IXGBE_SYSCTL_DESC_RX_ERRS |
Typedefs | |
typedef struct _ixgbe_vendor_info_t | ixgbe_vendor_info_t |
Functions | |
static bool | ixv_check_ether_addr (u8 *addr) |
int | ixgbe_allocate_queues (struct ixgbe_softc *) |
int | ixgbe_setup_transmit_structures (struct ixgbe_softc *) |
void | ixgbe_free_transmit_structures (struct ixgbe_softc *) |
int | ixgbe_setup_receive_structures (struct ixgbe_softc *) |
void | ixgbe_free_receive_structures (struct ixgbe_softc *) |
int | ixgbe_get_regs (SYSCTL_HANDLER_ARGS) |
#define CSUM_OFFLOAD |
#define HW_DEBUGOUT1 | ( | S, | |
A | |||
) | if (DEBUG_HW) printf(S "\n", A) |
#define HW_DEBUGOUT2 | ( | S, | |
A, | |||
B | |||
) | if (DEBUG_HW) printf(S "\n", A, B) |
#define INIT_DEBUGOUT | ( | S | ) | if (DEBUG_INIT) printf(S "\n") |
#define INIT_DEBUGOUT1 | ( | S, | |
A | |||
) | if (DEBUG_INIT) printf(S "\n", A) |
#define INIT_DEBUGOUT2 | ( | S, | |
A, | |||
B | |||
) | if (DEBUG_INIT) printf(S "\n", A, B) |
#define IOCTL_DEBUGOUT | ( | S | ) | if (DEBUG_IOCTL) printf(S "\n") |
#define IOCTL_DEBUGOUT1 | ( | S, | |
A | |||
) | if (DEBUG_IOCTL) printf(S "\n", A) |
#define IOCTL_DEBUGOUT2 | ( | S, | |
A, | |||
B | |||
) | if (DEBUG_IOCTL) printf(S "\n", A, B) |
#define IXGBE_CAPS |
#define IXGBE_LINK_ITR |
#define IXGBE_MAX_MTU (IXGBE_MAX_FRAME_SIZE - IXGBE_MTU_HDR) |
#define IXGBE_MAX_MTU_VLAN (IXGBE_MAX_FRAME_SIZE - IXGBE_MTU_HDR_VLAN) |
#define IXGBE_MAX_VF_MC 30 /* Max number of multicast entries */ |
#define IXGBE_MPKTHSIZE (sizeof(struct m_hdr) + sizeof(struct pkthdr)) |
#define IXGBE_MTU_HDR_VLAN |
#define IXGBE_RX_COPY_ALIGN (IXGBE_RX_COPY_HDR_PADDED - IXGBE_MPKTHSIZE) |
#define IXGBE_RX_COPY_HDR_PADDED ((((IXGBE_MPKTHSIZE - 1) / 32) + 1) * 32) |
#define IXGBE_RX_COPY_LEN (MSIZE - IXGBE_RX_COPY_HDR_PADDED) |
#define IXGBE_SET_IBYTES | ( | sc, | |
count | |||
) | (sc)->ibytes = (count) |
#define IXGBE_SET_IERRORS | ( | sc, | |
count | |||
) | (sc)->ierrors = (count) |
#define IXGBE_SET_IMCASTS | ( | sc, | |
count | |||
) | (sc)->imcasts = (count) |
#define IXGBE_SET_IPACKETS | ( | sc, | |
count | |||
) | (sc)->ipackets = (count) |
#define IXGBE_SET_IQDROPS | ( | sc, | |
count | |||
) | (sc)->iqdrops = (count) |
#define IXGBE_SET_OBYTES | ( | sc, | |
count | |||
) | (sc)->obytes = (count) |
#define IXGBE_SET_OERRORS | ( | sc, | |
count | |||
) | (sc)->oerrors = (count) |
#define IXGBE_SET_OMCASTS | ( | sc, | |
count | |||
) | (sc)->omcasts = (count) |
#define IXGBE_SET_OPACKETS | ( | sc, | |
count | |||
) | (sc)->opackets = (count) |
#define IXGBE_SYSCTL_DESC_ADV_SPEED |
#define IXGBE_SYSCTL_DESC_RX_ERRS |
#define IXGBE_SYSCTL_DESC_SET_FC |
#define IXGBE_TX_CLEANUP_THRESHOLD | ( | _a | ) | ((_a)->num_tx_desc / 8) |
#define IXGBE_TX_OP_THRESHOLD | ( | _a | ) | ((_a)->num_tx_desc / 32) |
typedef struct _ixgbe_vendor_info_t ixgbe_vendor_info_t |
int ixgbe_allocate_queues | ( | struct ixgbe_softc * | ) |
void ixgbe_free_receive_structures | ( | struct ixgbe_softc * | ) |
void ixgbe_free_transmit_structures | ( | struct ixgbe_softc * | ) |
int ixgbe_get_regs | ( | SYSCTL_HANDLER_ARGS | ) |
int ixgbe_setup_receive_structures | ( | struct ixgbe_softc * | ) |
int ixgbe_setup_transmit_structures | ( | struct ixgbe_softc * | ) |
Definition at line 523 of file ixgbe.h.
Referenced by ixv_if_attach_pre().