X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/blobdiff_plain/8d6600da2e7c12e87dad5af3e05951441025f8fc..b56e8196ddfdb1f6e5d0204b93e2be28fb17a7a3:/sys/dev/netif/igb/if_igb.h diff --git a/sys/dev/netif/igb/if_igb.h b/sys/dev/netif/igb/if_igb.h index 5bab34aeb5..792a413657 100644 --- a/sys/dev/netif/igb/if_igb.h +++ b/sys/dev/netif/igb/if_igb.h @@ -42,6 +42,7 @@ #define IGB_MAX_RING_82580 8 #define IGB_MAX_RING_82576 16 #define IGB_MIN_RING 1 +#define IGB_MIN_RING_RSS 2 /* * Max TX/RX interrupt bits @@ -52,6 +53,14 @@ #define IGB_MAX_TXRXINT_82576 16 #define IGB_MIN_TXRXINT 2 /* XXX VF? */ +/* + * Max IVAR count + */ +#define IGB_MAX_IVAR_I350 4 +#define IGB_MAX_IVAR_82580 4 +#define IGB_MAX_IVAR_82576 8 +#define IGB_MAX_IVAR_VF 1 + /* * IGB_TXD: Maximum number of Transmit Descriptors * @@ -78,7 +87,7 @@ * (num_tx_desc * sizeof(struct e1000_tx_desc)) % 128 == 0 */ #define IGB_MIN_RXD 256 -#define IGB_DEFAULT_RXD 1024 +#define IGB_DEFAULT_RXD 512 #define IGB_MAX_RXD 4096 /* @@ -135,7 +144,9 @@ #define MAX_NUM_MULTICAST_ADDRESSES 128 #define IGB_FC_PAUSE_TIME 0x0680 -#define IGB_INTR_RATE 10000 +#define IGB_INTR_RATE 6000 +#define IGB_MSIX_RX_RATE 6000 +#define IGB_MSIX_TX_RATE 4000 /* * TDBA/RDBA should be aligned on 16 byte boundary. But TDLEN/RDLEN should be @@ -149,9 +160,8 @@ #define IGB_MAX_SCATTER 64 #define IGB_VFTA_SIZE 128 -#define IGB_TSO_SIZE (65535 + \ +#define IGB_TSO_SIZE (IP_MAXPACKET + \ sizeof(struct ether_vlan_header)) -#define IGB_TSO_SEG_SIZE 4096 /* Max dma segment size */ #define IGB_HDR_BUF 128 #define IGB_PKTTYPE_MASK 0x0000FFF0 @@ -164,7 +174,7 @@ #define IGB_TX_RESERVED 3 /* Large enough for 64K TSO */ -#define IGB_TX_SPARE 32 +#define IGB_TX_SPARE 33 #define IGB_TX_OACTIVE_MAX 64 @@ -183,6 +193,9 @@ #define IGB_RETA_SHIFT 0 #define IGB_RETA_SHIFT_82575 6 +#define IGB_EITR_INTVL_MASK 0x7ffc +#define IGB_EITR_INTVL_SHIFT 2 + struct igb_softc; /* @@ -202,10 +215,6 @@ struct igb_tx_ring { struct lwkt_serialize tx_serialize; struct igb_softc *sc; uint32_t me; - struct igb_dma txdma; - bus_dma_tag_t tx_hdr_dtag; - bus_dmamap_t tx_hdr_dmap; - bus_addr_t tx_hdr_paddr; struct e1000_tx_desc *tx_base; int num_tx_desc; uint32_t next_avail_desc; @@ -219,20 +228,19 @@ struct igb_tx_ring { int oact_lo_desc; int oact_hi_desc; int intr_nsegs; + int wreg_nsegs; int tx_intr_bit; uint32_t tx_intr_mask; + /* Soft stats */ u_long no_desc_avail; u_long tx_packets; - u_long ctx_try_pullup; - u_long ctx_drop1; - u_long ctx_drop2; - u_long ctx_pullup1; - u_long ctx_pullup1_failed; - u_long ctx_pullup2; - u_long ctx_pullup2_failed; -}; + struct igb_dma txdma; + bus_dma_tag_t tx_hdr_dtag; + bus_dmamap_t tx_hdr_dmap; + bus_addr_t tx_hdr_paddr; +} __cachealign; /* * Receive ring: one per queue @@ -241,7 +249,6 @@ struct igb_rx_ring { struct lwkt_serialize rx_serialize; struct igb_softc *sc; uint32_t me; - struct igb_dma rxdma; union e1000_adv_rx_desc *rx_base; boolean_t discard; int num_rx_desc; @@ -258,10 +265,34 @@ struct igb_rx_ring { */ struct mbuf *fmp; struct mbuf *lmp; + int rx_wreg; /* Soft stats */ u_long rx_packets; -}; + + struct igb_dma rxdma; +} __cachealign; + +struct igb_msix_data { + struct lwkt_serialize *msix_serialize; + struct lwkt_serialize msix_serialize0; + struct igb_softc *msix_sc; + uint32_t msix_mask; + struct igb_rx_ring *msix_rx; + struct igb_tx_ring *msix_tx; + + driver_intr_t *msix_func; + void *msix_arg; + + int msix_cpuid; + char msix_desc[32]; + int msix_rid; + struct resource *msix_res; + void *msix_handle; + u_int msix_vector; + int msix_rate; + char msix_rate_desc[32]; +} __cachealign; struct igb_softc { struct arpcom arpcom; @@ -272,6 +303,7 @@ struct igb_softc { uint32_t flags; #define IGB_FLAG_SHARED_INTR 0x1 #define IGB_FLAG_HAS_MGMT 0x2 +#define IGB_FLAG_TSO_IPLEN0 0x4 bus_dma_tag_t parent_tag; @@ -280,6 +312,7 @@ struct igb_softc { struct ifmedia media; struct callout timer; + int timer_cpuid; int intr_type; int intr_rid; @@ -304,6 +337,8 @@ struct igb_softc { /* Multicast array pointer */ uint8_t *mta; + int rx_npoll_off; + int tx_npoll_off; int serialize_cnt; int tx_serialize; int rx_serialize; @@ -312,6 +347,8 @@ struct igb_softc { int intr_rate; uint32_t intr_mask; + int sts_intr_bit; + uint32_t sts_intr_mask; /* * Transmit rings @@ -324,6 +361,8 @@ struct igb_softc { */ int rss_debug; int rx_ring_cnt; + int rx_ring_msix; + int rx_ring_inuse; struct igb_rx_ring *rx_rings; /* Misc stats maintained by the driver */ @@ -344,6 +383,12 @@ struct igb_softc { struct sysctl_oid *sysctl_tree; void *stats; + + int msix_tx_cpuid; + int msix_mem_rid; + struct resource *msix_mem_res; + int msix_cnt; + struct igb_msix_data *msix_data; }; #define IGB_ENABLE_HWRSS(sc) ((sc)->rx_ring_cnt > 1)