#define E1000_FC_PAUSE_TIME 0xFFFF /* pause for the max or until send xon */
/* How many Tx Descriptors do we need to call netif_wake_queue ? */ #define E1000_TX_QUEUE_WAKE 16 /* How many Rx Buffers do we bundle into one write to the hardware ? */ #define E1000_RX_BUFFER_WRITE 16 /* Must be power of 2 */
/* wrapper around a pointer to a socket buffer, * so a DMA handle can be stored along with the buffer
*/ struct e1000_tx_buffer { struct sk_buff *skb;
dma_addr_t dma; unsignedlong time_stamp;
u16 length;
u16 next_to_watch; bool mapped_as_page; unsignedshort segs; unsignedint bytecount;
};
struct e1000_tx_ring { /* pointer to the descriptor ring memory */ void *desc; /* physical address of the descriptor ring */
dma_addr_t dma; /* length of descriptor ring in bytes */ unsignedint size; /* number of descriptors in the ring */ unsignedint count; /* next descriptor to associate a buffer with */ unsignedint next_to_use; /* next descriptor to check for DD status bit */ unsignedint next_to_clean; /* array of buffer information structs */ struct e1000_tx_buffer *buffer_info;
u16 tdh;
u16 tdt; bool last_tx_tso;
};
struct e1000_rx_ring { /* pointer to the descriptor ring memory */ void *desc; /* physical address of the descriptor ring */
dma_addr_t dma; /* length of descriptor ring in bytes */ unsignedint size; /* number of descriptors in the ring */ unsignedint count; /* next descriptor to associate a buffer with */ unsignedint next_to_use; /* next descriptor to check for DD status bit */ unsignedint next_to_clean; /* array of buffer information structs */ struct e1000_rx_buffer *buffer_info; struct sk_buff *rx_skb_top;
/* cpu for rx queue */ int cpu;
u16 rdh;
u16 rdt;
};
#define E1000_DESC_UNUSED(R) \
({ \ unsignedint clean = smp_load_acquire(&(R)->next_to_clean); \ unsignedint use = READ_ONCE((R)->next_to_use); \
(clean > use ? 0 : (R)->count) + clean - use - 1; \
})
#define E1000_RX_DESC_EXT(R, i) \
(&(((union e1000_rx_desc_extended *)((R).desc))[i])) #define E1000_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i])) #define E1000_RX_DESC(R, i) E1000_GET_DESC(R, i, e1000_rx_desc) #define E1000_TX_DESC(R, i) E1000_GET_DESC(R, i, e1000_tx_desc) #define E1000_CONTEXT_DESC(R, i) E1000_GET_DESC(R, i, e1000_context_desc)
/* to not mess up cache alignment, always add to the bottom */ bool tso_force; bool smart_power_down; /* phy smart power down */ bool quad_port_a; unsignedlong flags;
u32 eeprom_wol;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.