summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixgbe/ixgbe.h
diff options
context:
space:
mode:
authorjfv <jfv@FreeBSD.org>2010-03-27 00:21:40 +0000
committerjfv <jfv@FreeBSD.org>2010-03-27 00:21:40 +0000
commit8918ac92eb689cbcb11b62d022055dc35be8307c (patch)
tree56ba93eba1abadf72b500969032db51e45f29957 /sys/dev/ixgbe/ixgbe.h
parentfad010c73280e52d3a801acaf764cba507a95a66 (diff)
downloadFreeBSD-src-8918ac92eb689cbcb11b62d022055dc35be8307c.zip
FreeBSD-src-8918ac92eb689cbcb11b62d022055dc35be8307c.tar.gz
Update the driver to Intel version 2.1.6
- add some new hardware support for 82599 - Big change to interrupt architecture, it now uses a queue which contains an RX/TX pair as the recipient of the interrupt. This will reduce overall system interrupts/msix usage. - Improved RX mbuf handling: the old get_buf routine is no longer synchronized with rxeof, this allows the elimination of packet discards due to mbuf allocation failure. - Much simplified and improved AIM code, it now happens in the queue interrupt context and takes into account both the traffic on the RX AND TX side. - variety of small tweaks, like ring size, that have been seen as performance improvements. - Thanks to those that provided feedback or suggested changes, I hope I've caught all of them.
Diffstat (limited to 'sys/dev/ixgbe/ixgbe.h')
-rw-r--r--sys/dev/ixgbe/ixgbe.h164
1 files changed, 85 insertions, 79 deletions
diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h
index d52eed3..008d2c8 100644
--- a/sys/dev/ixgbe/ixgbe.h
+++ b/sys/dev/ixgbe/ixgbe.h
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2009, Intel Corporation
+ Copyright (c) 2001-2010, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -176,7 +176,7 @@
#define MSIX_82599_BAR 4
#define IXGBE_TSO_SIZE 65535
#define IXGBE_TX_BUFFER_SIZE ((u32) 1514)
-#define IXGBE_RX_HDR 256
+#define IXGBE_RX_HDR 128
#define IXGBE_VFTA_SIZE 128
#define IXGBE_BR_SIZE 4096
#define CSUM_OFFLOAD 7 /* Bits in csum flags */
@@ -231,6 +231,7 @@ struct ixgbe_tx_buf {
struct ixgbe_rx_buf {
struct mbuf *m_head;
struct mbuf *m_pack;
+ struct mbuf *fmp;
bus_dmamap_t map;
};
@@ -248,20 +249,34 @@ struct ixgbe_dma_alloc {
};
/*
- * The transmit ring, one per tx queue
+** Driver queue struct: this is the interrupt container
+** for the associated tx and rx ring.
+*/
+struct ix_queue {
+ struct adapter *adapter;
+ u32 msix; /* This queue's MSIX vector */
+ u32 eims; /* This queue's EIMS bit */
+ u32 eitr_setting;
+ struct resource *res;
+ void *tag;
+ struct tx_ring *txr;
+ struct rx_ring *rxr;
+ struct task que_task;
+ struct taskqueue *tq;
+ u64 irqs;
+};
+
+/*
+ * The transmit ring, one per queue
*/
struct tx_ring {
struct adapter *adapter;
struct mtx tx_mtx;
u32 me;
- u32 msix;
bool watchdog_check;
int watchdog_time;
union ixgbe_adv_tx_desc *tx_base;
- volatile u32 tx_hwb;
struct ixgbe_dma_alloc txdma;
- struct task tx_task;
- struct taskqueue *tq;
u32 next_avail_desc;
u32 next_to_clean;
struct ixgbe_tx_buf *tx_buffers;
@@ -272,17 +287,14 @@ struct tx_ring {
#if __FreeBSD_version >= 800000
struct buf_ring *br;
#endif
- /* Interrupt resources */
- void *tag;
- struct resource *res;
#ifdef IXGBE_FDIR
u16 atr_sample;
u16 atr_count;
#endif
+ u32 bytes; /* used for AIM */
+ u32 packets;
/* Soft Stats */
- u32 no_tx_desc_avail;
- u32 no_tx_desc_late;
- u64 tx_irq;
+ u64 no_desc_avail;
u64 total_packets;
};
@@ -294,35 +306,29 @@ struct rx_ring {
struct adapter *adapter;
struct mtx rx_mtx;
u32 me;
- u32 msix;
- u32 payload;
- struct task rx_task;
- struct taskqueue *tq;
union ixgbe_adv_rx_desc *rx_base;
struct ixgbe_dma_alloc rxdma;
struct lro_ctrl lro;
bool lro_enabled;
bool hdr_split;
bool hw_rsc;
- unsigned int last_refreshed;
- unsigned int next_to_check;
+ bool discard;
+ u32 next_to_refresh;
+ u32 next_to_check;
+ char mtx_name[16];
struct ixgbe_rx_buf *rx_buffers;
bus_dma_tag_t rxtag;
bus_dmamap_t spare_map;
- char mtx_name[16];
u32 bytes; /* Used for AIM calc */
- u32 eitr_setting;
-
- /* Interrupt resources */
- void *tag;
- struct resource *res;
+ u32 packets;
/* Soft stats */
u64 rx_irq;
u64 rx_split_packets;
u64 rx_packets;
u64 rx_bytes;
+ u64 rx_discarded;
u64 rsc_num;
#ifdef IXGBE_FDIR
u64 flm;
@@ -331,52 +337,52 @@ struct rx_ring {
/* Our adapter structure */
struct adapter {
- struct ifnet *ifp;
- struct ixgbe_hw hw;
+ struct ifnet *ifp;
+ struct ixgbe_hw hw;
struct ixgbe_osdep osdep;
- struct device *dev;
+ struct device *dev;
- struct resource *pci_mem;
- struct resource *msix_mem;
+ struct resource *pci_mem;
+ struct resource *msix_mem;
/*
* Interrupt resources: this set is
* either used for legacy, or for Link
* when doing MSIX
*/
- void *tag;
- struct resource *res;
+ void *tag;
+ struct resource *res;
- struct ifmedia media;
- struct callout timer;
- int msix;
- int if_flags;
+ struct ifmedia media;
+ struct callout timer;
+ int msix;
+ int if_flags;
- struct mtx core_mtx;
+ struct mtx core_mtx;
- eventhandler_tag vlan_attach;
- eventhandler_tag vlan_detach;
+ eventhandler_tag vlan_attach;
+ eventhandler_tag vlan_detach;
- u16 num_vlans;
- u16 num_queues;
+ u16 num_vlans;
+ u16 num_queues;
/* Info about the board itself */
- u32 optics;
- bool link_active;
- u16 max_frame_size;
- u32 link_speed;
- bool link_up;
- u32 linkvec;
+ u32 optics;
+ bool link_active;
+ u16 max_frame_size;
+ u32 link_speed;
+ bool link_up;
+ u32 linkvec;
/* Mbuf cluster size */
- u32 rx_mbuf_sz;
+ u32 rx_mbuf_sz;
/* Support for pluggable optics */
- bool sfp_probe;
- struct task link_task; /* Link tasklet */
- struct task mod_task; /* SFP tasklet */
- struct task msf_task; /* Multispeed Fiber tasklet */
+ bool sfp_probe;
+ struct task link_task; /* Link tasklet */
+ struct task mod_task; /* SFP tasklet */
+ struct task msf_task; /* Multispeed Fiber */
#ifdef IXGBE_FDIR
int fdir_reinit;
struct task fdir_task;
@@ -384,41 +390,41 @@ struct adapter {
struct taskqueue *tq;
/*
+ ** Queues:
+ ** This is the irq holder, it has
+ ** and RX/TX pair or rings associated
+ ** with it.
+ */
+ struct ix_queue *queues;
+
+ /*
* Transmit rings:
* Allocated at run time, an array of rings.
*/
- struct tx_ring *tx_rings;
- int num_tx_desc;
+ struct tx_ring *tx_rings;
+ int num_tx_desc;
/*
* Receive rings:
* Allocated at run time, an array of rings.
*/
- struct rx_ring *rx_rings;
- int num_rx_desc;
- u64 rx_mask;
- u32 rx_process_limit;
-
-#ifdef IXGBE_IEEE1588
- /* IEEE 1588 precision time support */
- struct cyclecounter cycles;
- struct nettimer clock;
- struct nettime_compare compare;
- struct hwtstamp_ctrl hwtstamp;
-#endif
+ struct rx_ring *rx_rings;
+ int num_rx_desc;
+ u64 que_mask;
+ u32 rx_process_limit;
/* Misc stats maintained by the driver */
- unsigned long dropped_pkts;
- unsigned long mbuf_defrag_failed;
- unsigned long mbuf_header_failed;
- unsigned long mbuf_packet_failed;
- unsigned long no_tx_map_avail;
- unsigned long no_tx_dma_setup;
- unsigned long watchdog_events;
- unsigned long tso_tx;
- unsigned long link_irq;
-
- struct ixgbe_hw_stats stats;
+ unsigned long dropped_pkts;
+ unsigned long mbuf_defrag_failed;
+ unsigned long mbuf_header_failed;
+ unsigned long mbuf_packet_failed;
+ unsigned long no_tx_map_avail;
+ unsigned long no_tx_dma_setup;
+ unsigned long watchdog_events;
+ unsigned long tso_tx;
+ unsigned long link_irq;
+
+ struct ixgbe_hw_stats stats;
};
/* Precision Time Sync (IEEE 1588) defines */
@@ -452,8 +458,8 @@ ixgbe_is_sfp(struct ixgbe_hw *hw)
case ixgbe_phy_sfp_ftl:
case ixgbe_phy_sfp_intel:
case ixgbe_phy_sfp_unknown:
- case ixgbe_phy_tw_tyco:
- case ixgbe_phy_tw_unknown:
+ case ixgbe_phy_sfp_passive_tyco:
+ case ixgbe_phy_sfp_passive_unknown:
return TRUE;
default:
return FALSE;
OpenPOWER on IntegriCloud