/* * Copyright (c) 2005 Cisco Systems. 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.
*/
/** * struct srp_rdma_ch * @comp_vector: Completion vector used by this RDMA channel. * @max_it_iu_len: Maximum initiator-to-target information unit length. * @max_ti_iu_len: Maximum target-to-initiator information unit length.
*/ struct srp_rdma_ch { /* These are RW in the hot path, and commonly used together */ struct list_head free_tx;
spinlock_t lock;
s32 req_lim;
/* These are read-only in the hot path */ struct srp_target_port *target ____cacheline_aligned_in_smp; struct ib_cq *send_cq; struct ib_cq *recv_cq; struct ib_qp *qp; struct srp_fr_pool *fr_pool;
uint32_t max_it_iu_len;
uint32_t max_ti_iu_len;
u8 max_imm_sge; bool use_imm_data;
/* Everything above this point is used in the hot path of * command processing. Try to keep them packed into cachelines.
*/
/** * struct srp_target_port - RDMA port in the SRP target system * @comp_vector: Completion vector used by the first RDMA channel created for * this target port.
*/ struct srp_target_port { /* read and written in the hot path */
spinlock_t lock;
/* read only in the hot path */
u32 global_rkey; struct srp_rdma_ch *ch; struct net *net;
u32 ch_count;
u32 lkey; enum srp_target_state state;
uint32_t max_it_iu_size; unsignedint cmd_sg_cnt; unsignedint indirect_size; bool allow_ext_sg;
/* other member variables */ union ib_gid sgid;
__be64 id_ext;
__be64 ioc_guid;
__be64 initiator_ext;
u16 io_class; struct srp_host *srp_host; struct Scsi_Host *scsi_host; struct srp_rport *rport; char target_name[32]; unsignedint scsi_id; unsignedint sg_tablesize; unsignedint target_can_queue; int mr_pool_size; int mr_per_cmd; int queue_size; int comp_vector; int tl_retry_count;
/** * struct srp_fr_desc - fast registration work request arguments * @entry: Entry in srp_fr_pool.free_list. * @mr: Memory region. * @frpl: Fast registration page list.
*/ struct srp_fr_desc { struct list_head entry; struct ib_mr *mr;
};
/** * struct srp_fr_pool - pool of fast registration descriptors * * An entry is available for allocation if and only if it occurs in @free_list. * * @size: Number of descriptors in this pool. * @max_page_list_len: Maximum fast registration work request page list length. * @lock: Protects free_list. * @free_list: List of free descriptors. * @desc: Fast registration descriptor pool.
*/ struct srp_fr_pool { int size; int max_page_list_len;
spinlock_t lock; struct list_head free_list; struct srp_fr_desc desc[] __counted_by(size);
};
/** * struct srp_map_state - per-request DMA memory mapping state * @desc: Pointer to the element of the SRP buffer descriptor array * that is being filled in. * @pages: Array with DMA addresses of pages being considered for * memory registration. * @base_dma_addr: DMA address of the first page that has not yet been mapped. * @dma_len: Number of bytes that will be registered with the next FR * memory registration call. * @total_len: Total number of bytes in the sg-list being mapped. * @npages: Number of page addresses in the pages[] array. * @nmdesc: Number of FR memory descriptors used for mapping. * @ndesc: Number of SRP buffer descriptors that have been filled in.
*/ struct srp_map_state { union { struct { struct srp_fr_desc **next; struct srp_fr_desc **end;
} fr; struct { void **next; void **end;
} gen;
}; struct srp_direct_buf *desc; union {
u64 *pages; struct scatterlist *sg;
};
dma_addr_t base_dma_addr;
u32 dma_len;
u32 total_len; unsignedint npages; unsignedint nmdesc; unsignedint ndesc;
};
#endif/* IB_SRP_H */
Messung V0.5
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet)
¤
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.