/* * Copyright (c) 2003-2008 Chelsio, Inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE.
*/
/* This file should not be included directly. Include common.h instead. */
struct sge_fl { /* SGE per free-buffer list state */ unsignedint buf_size; /* size of each Rx buffer */ unsignedint credits; /* # of available Rx buffers */ unsignedint pend_cred; /* new buffers since last FL DB ring */ unsignedint size; /* capacity of free list */ unsignedint cidx; /* consumer index */ unsignedint pidx; /* producer index */ unsignedint gen; /* free list generation */ struct fl_pg_chunk pg_chunk;/* page chunk cache */ unsignedint use_pages; /* whether FL uses pages or sk_buffs */ unsignedint order; /* order of page allocations */ unsignedint alloc_size; /* size of allocated buffer */ struct rx_desc *desc; /* address of HW Rx descriptor ring */ struct rx_sw_desc *sdesc; /* address of SW Rx descriptor ring */
dma_addr_t phys_addr; /* physical address of HW ring start */ unsignedint cntxt_id; /* SGE context id for the free list */ unsignedlong empty; /* # of times queue ran out of buffers */ unsignedlong alloc_failed; /* # of times buffer allocation failed */
};
/* * Bundle size for grouping offload RX packets for delivery to the stack. * Don't make this too big as we do prefetch on each packet in a bundle.
*/ # define RX_BUNDLE_SIZE 8
struct rsp_desc;
struct sge_rspq { /* state for an SGE response queue */ unsignedint credits; /* # of pending response credits */ unsignedint size; /* capacity of response queue */ unsignedint cidx; /* consumer index */ unsignedint gen; /* current generation bit */ unsignedint polling; /* is the queue serviced through NAPI? */ unsignedint holdoff_tmr; /* interrupt holdoff timer in 100ns */ unsignedint next_holdoff; /* holdoff time for next interrupt */ unsignedint rx_recycle_buf; /* whether recycling occurred
within current sop-eop */ struct rsp_desc *desc; /* address of HW response ring */
dma_addr_t phys_addr; /* physical address of the ring */ unsignedint cntxt_id; /* SGE context id for the response q */
spinlock_t lock; /* guards response processing */ struct sk_buff_head rx_queue; /* offload packet receive queue */ struct sk_buff *pg_skb; /* used to build frag list in napi handler */
unsignedlong offload_pkts; unsignedlong offload_bundles; unsignedlong eth_pkts; /* # of ethernet packets */ unsignedlong pure_rsps; /* # of pure (non-data) responses */ unsignedlong imm_data; /* responses with immediate data */ unsignedlong rx_drops; /* # of packets dropped due to no mem */ unsignedlong async_notif; /* # of asynchronous notification events */ unsignedlong empty; /* # of times queue ran out of credits */ unsignedlong nomem; /* # of responses deferred due to no mem */ unsignedlong unhandled_irqs; /* # of spurious intrs */ unsignedlong starved; unsignedlong restarted;
};
struct tx_desc; struct tx_sw_desc;
struct sge_txq { /* state for an SGE Tx queue */ unsignedlong flags; /* HW DMA fetch status */ unsignedint in_use; /* # of in-use Tx descriptors */ unsignedint size; /* # of descriptors */ unsignedint processed; /* total # of descs HW has processed */ unsignedint cleaned; /* total # of descs SW has reclaimed */ unsignedint stop_thres; /* SW TX queue suspend threshold */ unsignedint cidx; /* consumer index */ unsignedint pidx; /* producer index */ unsignedint gen; /* current value of generation bit */ unsignedint unacked; /* Tx descriptors used since last COMPL */ struct tx_desc *desc; /* address of HW Tx descriptor ring */ struct tx_sw_desc *sdesc; /* address of SW Tx descriptor ring */
spinlock_t lock; /* guards enqueueing of new packets */ unsignedint token; /* WR token */
dma_addr_t phys_addr; /* physical address of the ring */ struct sk_buff_head sendq; /* List of backpressured offload packets */ struct work_struct qresume_task; /* restarts the queue */ unsignedint cntxt_id; /* SGE context id for the Tx q */ unsignedlong stops; /* # of times q has been stopped */ unsignedlong restarts; /* # of queue restarts */
};
enum { /* per port SGE statistics */
SGE_PSTAT_TSO, /* # of TSO requests */
SGE_PSTAT_RX_CSUM_GOOD, /* # of successful RX csum offloads */
SGE_PSTAT_TX_CSUM, /* # of TX checksum offloads */
SGE_PSTAT_VLANEX, /* # of VLAN tag extractions */
SGE_PSTAT_VLANINS, /* # of VLAN tag insertions */
int t3_offload_tx(struct t3cdev *tdev, struct sk_buff *skb);
void t3_os_ext_intr_handler(struct adapter *adapter); void t3_os_link_changed(struct adapter *adapter, int port_id, int link_status, int speed, int duplex, int fc); void t3_os_phymod_changed(struct adapter *adap, int port_id); void t3_os_link_fault(struct adapter *adapter, int port_id, int state); void t3_os_link_fault_handler(struct adapter *adapter, int port_id);
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.