/* * Copyright (c) 2006-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.
*/ #ifndef _CXGB3_OFFLOAD_H #define _CXGB3_OFFLOAD_H
/* * Client registration. Users of T3 driver must register themselves. * The T3 driver will call the add function of every client for each T3 * adapter activated, passing up the t3cdev ptr. Each client fills out an * array of callback functions to process CPL messages.
*/
/* * Returns a pointer to the first byte of the CPL header in an sk_buff that * contains a CPL message.
*/ staticinlinevoid *cplhdr(struct sk_buff *skb)
{ return skb->data;
}
union listen_entry { struct t3c_tid_entry t3c_tid; union listen_entry *next;
};
union active_open_entry { struct t3c_tid_entry t3c_tid; union active_open_entry *next;
};
/* * Holds the size, base address, free list start, etc of the TID, server TID, * and active-open TID tables for a offload device. * The tables themselves are allocated dynamically.
*/ struct tid_info { struct t3c_tid_entry *tid_tab; unsignedint ntids;
atomic_t tids_in_use;
union listen_entry *stid_tab; unsignedint nstids; unsignedint stid_base;
union active_open_entry *atid_tab; unsignedint natids; unsignedint atid_base;
/* * The following members are accessed R/W so we put them in their own * cache lines. * * XXX We could combine the atid fields above with the lock here since * atids are use once (unlike other tids). OTOH the above fields are * usually in cache due to tid_tab.
*/
spinlock_t atid_lock ____cacheline_aligned_in_smp; union active_open_entry *afree; unsignedint atids_in_use;
spinlock_t stid_lock ____cacheline_aligned; union listen_entry *sfree; unsignedint stids_in_use;
};
struct t3c_data { struct list_head list_node; struct t3cdev *dev; unsignedint tx_max_chunk; /* max payload for TX_DATA */ unsignedint max_wrs; /* max in-flight WRs per connection */ unsignedint nmtus; constunsignedshort *mtus; struct tid_info tid_maps;
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.