/*
*/
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
*
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _PSIF_HW_DATA_H_LE
#define _PSIF_HW_DATA_H_LE
/* CSR automated type for TSU_MMU_MMU_CONFIG */
/* MMU Static-Configuration and Status */
struct psif_csr_mmu_config {
/*
* Context used by tsu_mmu when performing address translation. The structure
* is follows: [63:56] st [55:55] no_snoop [54:53] tph [52:52] ro [51:12]
* table_ptr [11:11] th [10:8] translation_type [7:4] page_size [3:3]
* wr_access [2:0] table_level
*/
struct psif_mmu_cntx {
/*
* XXX: Should this be enumerated? XXX: Make sure description is added when
* encoding is decided...
*/
/* Set for write access. */
/* Different supported page sizes. */
/*
* Translation types supported by the PSIF MMU. The modes are:
* MMU_PASS_THROUGH MMU_GVA2GPA_MODE, MMU_EPSA_MODE, MMU_EPSC_MODE
*/
/* Indicates that the TPH field is valid for the PCIe request. */
/*
* This is bit [51:12] of the table pointer. The lower twelve bits are always
* set to zero. The pointer is pointing to a certain level in the page table
* structure. Only applicable if translation_type is set.
*/
/* PCIe relaxed ordering. */
/* PCIe TLP hints. */
/* PCIe no snoop. */
/* PCIe steering tag. */
/* Descriptor for hardware updated portion of XRC receive queue. */
/*
* If set to something greater than zero, event notification is armed. An
* Affiliated Synchronous Event will be sent when number of WQE are less than
* srq_lim.
*/
/*
* Hardware modified index pointing to the head of the receive queue. TSU is
* using this to find the address of the receive queue entry.
*/
/* This is the shift value to use to find start of the receive queue element. */
/* pd(24[0] bits)Protection domain. */
/* This is indicating how many scatter entries are valid. */
/* Reserved */
/* The shared receive queue is in error. */
/* This is a shared receive queue. This is always set for XRCSRQs. */
/*
* Do not evict this entry if this bit is set. There can only be a fixed
* number of descriptors with this bit set. XXX: Should this be used as a
* hint, or should it be fixed?
*/
/* Inlined rq : struct psif_rq_no_pad (256 bits) */
/* Base address for the receive queue in host memory. */
/* Completion queue to use for the incoming packet. */
/*
* XRC domain used to check if this descriptor can be used for the incoming
* packet.
*/
/* Reserved */
/* The desciptor is valid. */
/*
* Pre-fetch threshold (clog2) indicating when to read the software portion
* of the descriptor. If there are less entries than indicated by this
* threshold, the software portion of the descriptor must be read.
*/
/*
* Log2 size of the receive queue. Maximum number of entries in the receive
* queue. This is used for calculating when to wrap the head and tail
* indexes.
*/
/* Temp.definition of Shared receive queue content */
/* Content pt. not defined in ASIC XML */
struct psif_vlan_union_struct {
/* Reserved */
/* VLAN priority. */
/*
* Union between the CQ descriptor ID and VLAN pri. The CQ desc id is only
* used for privileged requests, and the vlan_pri is only used for EoIB
* offloading.
*/
union psif_cq_desc_vlan_pri {
/*
* This is only used for privileged requests. Completion queue descriptor
* index where completions for privileged requests end up. This index points
* to the completion queue to be used with this work request.
*/
/* VLAN priority. */
/*
* Generic header for work requests to PSIF. This is present for all packet
* types.
*/
struct psif_wr_common {
/*
* Send queue sequence number. Used to map request to a particular work
* request in the send queue.
*/
/* Length (number of bytes of valid data in the collect payload buffer). */
/*
* in the QP State. If it is unequal, the QP should be in error.
*/
/* Only applicable to UD. This is an indication that AHA should be used. */
/* Port number to use for QP0/1 packets. This field is ignored if not QP0/1. */
/*
* The TSL (Tsu SL) must be matched against the TSL in the QP State (XXX: or
* in the AHA?). If it is unequal, the QP should be put in error.
*/
/*
* QP sending this request. XXX: Should name be own_qp_num as defined in QP
* state?
*/
/* Indicates shat type of request this is. */
/* Union between VLAN priority and CQ descriptor ID. */
/* UF used for all EPS-C QP0/1 packets. This field is ignored otherwise. */
/* Fence indicator. */
/* Completion notification identifier. */
/*
* EPS tag - used by EPS to associate process and work request. This field is
* not used by non-EPS work requests.
*/
/* Reserved */
/* UF used for DR loopback packets. This field is ignored otherwise. */
/* Number of SGL entries are valid for this request. */
/* L4 checksum enabled when set. This is used for EoIB and IPoIB packets. */
/* L3 checksum enabled when set. This is used for EoIB and IPoIB packets. */
/* Dynamic MTU is enabled for this work request. */
/* Solicited event bit to be set in IB packet. */
/* Info: Edge padding added (for endian convert) */
/*
* Checksum used for data protection and consistency between work request and
* QP state.
*/
struct psif_wr_qp {
/* Q-Key for the remote node. */
/* QP number for the remote node. */
/* Reserved */
/* Local address structure. */
struct psif_wr_local {
/* Host address. */
/* This is the total length of the message. */
/* Local key used to validate the memory region this address is pointing to. */
struct psif_wr_addr {
/* Index into the Address Handle Array. */
/* Reserved */
/*
* This header is used for IB send operations. The header is a union and
* consists of either a connected mode header or a datagram mode header. The
* following opcodes are using this header: PSIF_WR_SEND PSIF_WR_SEND_IMM
* PSIF_WR_SPECIAL_QP_SEND PSIF_WR_QP0_SEND_DR_XMIT
* PSIF_WR_QP0_SEND_DR_LOOPBACK PSIF_WR_EPS_SPECIAL_QP_SEND
* PSIF_WR_EPS_QP0_SEND_DR_XMIT PSIF_WR_EPS_QP0_SEND_DR_LOOPBACK PSIF_WR_LSO
*/
struct psif_wr_send_header_ud {
/* Header used for IB send commands using UD mode. */
/* Inlined ud : struct psif_wr_ud_send (224 bits) */
/*
* Max segment size used for PSIF_WR_LSO. This field is not used for other
* operations.
*/
/* Reserved */
/*
* This header is used for IB send operations. The header is a union and
* consists of either a connected mode header or a datagram mode header. The
* following opcodes are using this header: PSIF_WR_SEND PSIF_WR_SEND_IMM
* PSIF_WR_SPECIAL_QP_SEND PSIF_WR_QP0_SEND_DR_XMIT
* PSIF_WR_QP0_SEND_DR_LOOPBACK PSIF_WR_EPS_SPECIAL_QP_SEND
* PSIF_WR_EPS_QP0_SEND_DR_XMIT PSIF_WR_EPS_QP0_SEND_DR_LOOPBACK PSIF_WR_LSO
*/
struct psif_wr_send_header_uc_rc_xrc {
/* Header used with IB send commands using connected mode. */
/* Inlined uc_rc_xrc : struct psif_wr_cm (224 bits) */
/*
* Reserved. XXX: FIX ME - calculation of this field based on constant, not
* psif_wr_local_address_header as it should.
*/
/*
* Max segment size used for PSIF_WR_LSO. This field is not used for other
* operations.
*/
/* Reserved */
/*
* This header is used for IB send operations. The header is a union and
* consists of either a connected mode header or a datagram mode header. The
* following opcodes are using this header: PSIF_WR_SEND PSIF_WR_SEND_IMM
* PSIF_WR_SPECIAL_QP_SEND PSIF_WR_QP0_SEND_DR_XMIT
* PSIF_WR_QP0_SEND_DR_LOOPBACK PSIF_WR_EPS_SPECIAL_QP_SEND
* PSIF_WR_EPS_QP0_SEND_DR_XMIT PSIF_WR_EPS_QP0_SEND_DR_LOOPBACK PSIF_WR_LSO
*/
union psif_wr_send_header {
/* Header used for IB send commands using UD mode. */
/* Header used with IB send commands using connected mode. */
/* Remote address structure. */
struct psif_wr_remote {
/* Address to the remote side. */
/* For RDMA and DM this is the length to add to dmalen in RETH of IB packet. */
/*
* Remote key used to validate the memory region the associated address is
* pointing to.
*/
/*
* This header is used for RDMA type operations. The following opcodes are
* using this header: PSIF_WR_RDMA_WR PSIF_WR_RDMA_WR_IMM PSIF_WR_RDMA_RD
* PSIF_WR_CMP_SWAP PSIF_WR_FETCH_ADD PSIF_WR_MASK_CMP_SWAP
* PSIF_WR_MASK_FETCH_ADD
*/
struct psif_wr_rdma {
/* Send completion ID. */
struct psif_send_completion_id {
/*
* This field is only valid for ring buffer send completions (proxy type send
* requests). In all other cases this field is ignored.
*/
/*
* Send queue sequence number. This is used to map the completion back to a
* request in the send queue.
*/
/*
* Completion queue sequence number for the completion queue being re-armed.
* This is going into the completion for the privileged request.
*/
/* Event completion ID. */
struct psif_event_completion_id {
/* Completion queue descriptor ID which is the source of the event. */
/* Reserved */
/* Union containing a send or receive completion ID. */
union psif_completion_wc_id {
/*
* Receive Queue completion ID. This is the receive queue entry ID found as
* part of receive queue entry.
*/
/*
* Send Queue completion ID. This contain the send queue sequence number. In
* ring buffer send completions this field also conatain a valid EPS tag.
*/
/* Completion queue descriptor ID which is the source of the event. */
/*
* Union used for descriptor types used when operations on the descriptors
* themselves are done, like invalidation, resizing etc. It can the take the
* follwing types: rq_id xrq_id cq_id target_qp
*/
union psif_descriptor_union {
/*
* Receive queue descriptor used for the following request:
* PSIF_WR_SET_SRQ_LIM: this is the receive queue to set the new limit for.
* PSIF_WR_INVALIDATE_RQ: this is the receive queue to invalidate/flush from
* the descriptor cache.
*/
/*
* XRCSRQ descriptor used for the following request: PSIF_WR_SET_XRCSRQ_LIM:
* this is the XRCSRQ to set the new limit for. PSIF_WR_INVALIDATE_XRCSRQ:
* this is the XRCSRQ to invalidate/flush from the descriptor cache.
*/
/*
* Completion queue descriptor ID used when operations are done on the CQ
* descriptor, no completion is sent to this CQ. This field is valid for
* PSIF_WR_INVALIDATE_CQ, PSIF_WR_RESIZE_CQ, PSIF_WR_REQ_CMPL_NOTIFY,
* PSIF_WR_CMPL_NOTIFY_RCVD, PSIF_WR_REARM_CMPL_EVENT.
*/
/*
* Target QP for PSIF_WR_INVALIDATE_SGL_CACHE command. This field is also
* valid for PSIF_WR_GENERATE_COMPLETION, then this is the QP number put in
* the completion.
*/
/*
* This header is used for privileged operations. The following opcodes are
* using this header: PSIF_WR_INVALIDATE_LKEY PSIF_WR_INVALIDATE_RKEY
* PSIF_WR_INVALIDATE_BOTH_KEYS PSIF_WR_INVALIDATE_TLB PSIF_WR_RESIZE_CQ
* PSIF_WR_SET_SRQ_LIM PSIF_WR_SET_XRCSRQ_LIM PSIF_WR_REQ_CMPL_NOTIFY
* PSIF_WR_CMPL_NOTIFY_RCVD PSIF_WR_REARM_CMPL_EVENT
* PSIF_WR_GENERATE_COMPLETION PSIF_WR_INVALIDATE_RQ PSIF_WR_INVALIDATE_CQ
* PSIF_WR_INVALIDATE_XRCSRQ PSIF_WR_INVALIDATE_SGL_CACHE
*/
struct psif_wr_su {
/* PSIF_WR_GENERATE_COMPLETION: This is the WC ID to put in the completion. */
/*
* PSIF_WR_INVALIDATE_TLB: this is the address vector to invalidate in the
* TLB. PSIF_WR_RESIZE_CQ: this is the new address of the CQ.
*/
/*
* PSIF_WR_INVALIDATE_TLB: this is the length for invalidate in the TLB. Only
* the lower 16 bits are valid for specifying length of TLB invalidation.
* PSIF_WR_RESIZE_CQ: this is the new length of the CQ.
*/
/*
* PSIF_WR_INVALIDATE_LKEY: key to invalidate/flush from the DMA VT cache.
* PSIF_WR_INVALIDATE_RKEY: key to invalidate/flush from the DMA VT cache.
* PSIF_WR_INVALIDATE_BOTH_KEYS: key to invalidate/flush from the DMA VT
* cache. PSIF_WR_INVALIDATE_TLB: this is the address vector to invalidate in
* the TLB.
*/
#if defined(__GNUC__)
#else
#endif
/*
* This field is valid for PSIF_WR_GENERATE_COMPLETION. This is the
* completion status to put in the completion.
*/
/*
* This field is valid for PSIF_WR_GENERATE_COMPLETION. This is the opcode
* going into the completion.
*/
/* Reserved */
/* This is used by the PSIF_WR_SET_SRQ_LIM request. */
/* SEND RDMA DM ATOMIC or PRIVILEGED data - depending on opcode. */
union psif_wr_details {
struct psif_wr_xrc {
/* Descriptor index for XRC SRQ. */
/* Reserved */
/* PSIF work request. */
/*
* Send queue sequence number. Used to map request to a particular work
* request in the send queue.
*/
/* Length (number of bytes of valid data in the collect payload buffer). */
/*
* in the QP State. If it is unequal, the QP should be in error.
*/
/* Only applicable to UD. This is an indication that AHA should be used. */
/* Port number to use for QP0/1 packets. This field is ignored if not QP0/1. */
/*
* The TSL (Tsu SL) must be matched against the TSL in the QP State (XXX: or
* in the AHA?). If it is unequal, the QP should be put in error.
*/
/*
* QP sending this request. XXX: Should name be own_qp_num as defined in QP
* state?
*/
/* Indicates shat type of request this is. */
/* Inlined common : struct psif_wr_common (192 bits) */
/* Union between VLAN priority and CQ descriptor ID. */
#if defined(__GNUC__)
#else
#endif
/* UF used for all EPS-C QP0/1 packets. This field is ignored otherwise. */
/* Fence indicator. */
/* Completion notification identifier. */
/*
* EPS tag - used by EPS to associate process and work request. This field is
* not used by non-EPS work requests.
*/
/* Reserved */
/* UF used for DR loopback packets. This field is ignored otherwise. */
/* Number of SGL entries are valid for this request. */
/* L4 checksum enabled when set. This is used for EoIB and IPoIB packets. */
/* L3 checksum enabled when set. This is used for EoIB and IPoIB packets. */
/* Dynamic MTU is enabled for this work request. */
/* Solicited event bit to be set in IB packet. */
/* Immediate data is only valid when indicated by the opcode. */
/*
* Checksum used for data protection and consistency between work request and
* QP state.
*/
/* Manually added spacing to pad out wr */
/** \brief Table of TSU SL and QoS mappings
* \details
* Driver queries EPS-C for mapping of privileged QP and Infinband SL to
* TSU SL and QoS. These values then need to be applied in QP and WR
* as well as selecting hi or low PCIe BAR VCB (tqos) to obtain PSIF TSU
* internal traffic separation.
*/
struct psif_tsl_map {
/* PSIF TSU QoS selection */
/* PSIF TSU SL assignmnet */
/* Inlined m0 : struct psif_tsl_map_entry (8 bits) */
/* PSIF TSU QoS selection */
/* PSIF TSU SL assignmnet */
/* Inlined m1 : struct psif_tsl_map_entry (8 bits) */
/* PSIF TSU QoS selection */
/* PSIF TSU SL assignmnet */
/* Inlined m2 : struct psif_tsl_map_entry (8 bits) */
/* PSIF TSU QoS selection */
/* PSIF TSU SL assignmnet */
/* Inlined m3 : struct psif_tsl_map_entry (8 bits) */
/* PSIF TSU QoS selection */
/* PSIF TSU SL assignmnet */
/* Inlined m4 : struct psif_tsl_map_entry (8 bits) */
/* PSIF TSU QoS selection */
/* PSIF TSU SL assignmnet */
/* Inlined m5 : struct psif_tsl_map_entry (8 bits) */
/* PSIF TSU QoS selection */
/* PSIF TSU SL assignmnet */
/* Inlined m6 : struct psif_tsl_map_entry (8 bits) */
/* PSIF TSU QoS selection */
/* PSIF TSU SL assignmnet */
/* Inlined m7 : struct psif_tsl_map_entry (8 bits) */
/* Hardware structure indicating what is the next QP. */
struct psif_next {
/*
* If all high, the next pointer is null. If next_null == 1, it is transport
* timer on evicted QP
*/
/* QP number for the next QP to be processed. */
/* Response (ACK) data structure used by the response queue descriptor. */
struct psif_rspq_ack_data {
/* ib_aeth_msn(24[0] bits)Message Sequence Number */
/* ib_aeth_syndrome(8[0] bits)Syndrome */
/* ib_bth_psn(24[0] bits)Packet Sequence Number */
/* Response descriptor structure used by the response queue descriptor. */
struct psif_rspq_rsp_descriptor {
/* ib_bth_psn(24[0] bits)Packet Sequence Number */
/* resp_sched_sched_ptr(5[0] bits) * Write pointer type to rdma read and atomic data stored in reqsponse queue
* descriptor. Every time an rdma read and atomic is performed, this pointer
* is incremented.
*/
/* QP and UF to be processed next. */
/* psn divided in two to mitigate for 64 bit bondary crossing */
/* Inlining rspq_ack_data_t tail_dup_ack_aeth due to bondary violation */
/* Reserved */
/* ib_bth_psn(24[0] bits)Packet Sequence Number */
/* resp_sched_sched_ptr(5[0] bits) * Write pointer type to rdma read and atomic data stored in reqsponse queue
* descriptor. Every time an rdma read and atomic is performed, this pointer
* is incremented.
*/
/* Reserved */
/*
* This bit is set through the doorbell. SW should initialize this bit to 0
* when the QP is setup and check this bit plus psif_next = null to ensure SW
* can own the RSPQ descriptor
*/
/* Reserved */
/* Reserved */
/* ib_aeth_msn(24[0] bits)Message Sequence Number */
/* ib_aeth_syndrome(8[0] bits)Syndrome */
/* Temp.definition of content */
struct psif_sq_tvl {
/* Content pt. not defined in ASIC XML */
/* This is the portion of the descriptor which is updated by software. */
/* Info: Edge padding added (for endian convert) */
/*
* Index to where elements are added to the send queue by SW. SW is
* responsibel for keeping track of how many entries there are in the send
* queue. I.e. SW needs to keep track of the head_index so it doesn't
* overwrite entries in the send queue which is not yet completed.
*/
/* Reserved */
/* Temp.definition of content */
struct psif_sq_rspq {
/* Content pt. not defined in ASIC XML */
/* Descriptor used by the send queue scheduler to operate on the send queue. */
/*
* Send queue sequence number used by the SQS to maintain ordering and keep
* track of where which send queue elements to fetch. This field is not in
* sync with the field in qp_t. This number is typically a little bit before
* the number in the qp_t as SQS has to fetch the elements from host memory.
* This is also used as tail_index when checking if there are more elements
* in the send queue.
*/
/* QP and UF to be processed next. */
/* Maximum inline data length supported by this send queue. */
/* Maximum number of SGEs supported by this send queue. */
/* Maximum number of SGEs supported by this send queue. */
/*
* The size between each work queue element in the send queue. This is the
* shift value to use in order to find the start of a work queue element.
*/
/*
* Indication if this QP is configured as a low latency or high throughput
* quality of service level.
*/
/*
* Timestamp qualifier. This bit is set when retry is entered to the queue
* and clear when the timestamp has expired.
*/
/*
* Done[0] is set when the last SQ WR is processed (sq_sequence_number ==
* tail_indx). When done[0] is set, SQS only process the SQ WR when
* sq_sequence_number != tail_index. Done[1] is set when done[0] is set and
* sq_sequence_number == tail_index.
*/
/*
* This bit is set through the doorbell. SW should check this bit plus
* psif_next = null to ensure SW can own the SQ descriptor.
*/
/* Reserved */
/* The base address to the send queue. */
/* The MMU context used to get the send queue. */
/* Temp.definition of Send queue content */
/* Content pt. not defined in ASIC XML */
/**
* SQS ring buffer entry
*/
struct psif_sq_ring {
/* Temp. definition of the send queue entry cache for the completion block.
* The only info used by the driver is the size of this struct,
* when allocating space for the cache in memory:
*/
struct psif_sq_cmpl {
/* Content pt. not defined in ASIC XML */
/* Recveive queue scatter entry. */
struct psif_rq_scatter {
/* Base address for this scatter element. */
/* L-Key to be used for this scatter element. */
/* Length of scatter element. */
/* Data type for TSU_RQH_QP_BASE_ADDR - rq scratch pad
* Layout as defined by struct psif_rq_entry
*/
struct psif_rqsp {
/*
* Receive queue entry ID. This is added to the receive completion using this
* receive queue entry.
*/
/* Scatter entries for this receive queue element. */
/* This is the part of the descriptor which is updated by SW (user space). */
/* Info: Edge padding added (for endian convert) */
/* Software modified index pointing to the tail reecive entry in host memory. */
/* Reserved */
/*
* If set to something greater than zero, event notification is armed. An
* Affiliated Synchronous Event will be sent when number of WQE are less than
* srq_lim.
*/
/*
* Hardware modified index pointing to the head of the receive queue. TSU is
* using this to find the address of the receive queue entry.
*/
/* This is the shift value to use to find start of the receive queue element. */
/* pd(24[0] bits)Protection domain. */
/* This is indicating how many scatter entries are valid. */
/* Reserved */
/* The shared receive queue is in error. */
/* This is a shared receive queue. This is always set for XRCSRQs. */
/*
* Do not evict this entry if this bit is set. There can only be a fixed
* number of descriptors with this bit set. XXX: Should this be used as a
* hint, or should it be fixed?
*/
/* Hardware updated portion of descriptor. */
/* Inlined hw_no_pad : struct psif_rq_no_pad (256 bits) */
/* Base address for the receive queue in host memory. */
/* Reserved */
/* The desciptor is valid. */
/*
* Pre-fetch threshold (clog2) indicating when to read the software portion
* of the descriptor. If there are less entries than indicated by this
* threshold, the software portion of the descriptor must be read.
*/
/*
* Log2 size of the receive queue. Maximum number of entries in the receive
* queue. This is used for calculating when to wrap the head and tail
* indexes.
*/
/* A receive queue entry structure contianing scatter entries. */
/*
* Receive queue entry ID. This is added to the receive completion using this
* receive queue entry.
*/
/* Scatter entries for this receive queue element. */
/* This is the portion of the descriptor which is updated by software. */
/* Info: Edge padding added (for endian convert) */
/* Index to ring buffer elements added by SW. */
/*
* Descriptor entry for a ring buffer. This entry is used to address into the
* ring buffer and write the correct entries. This structure is the hardware
* updateable part of the RB descriptor.
*/
/* Index to ring buffer elements to be consumed by HW. */
/*
* Log2 size of the ring buffer. The entries are specified as 64B entities.
* The number indicates when the tail_index should wrap. If one message is
* running over the edge, the message is stored in consecutive entries
* outside the ring buffer. max_message_size additional space is added to the
* edge of the buffer.
*/
/*
* Interrupt channel associated with the event queue. In the PSIF design the
* event queues are one to one with interrupt channel.
*/
/* Reserved */
/* rb_size_log2(5[0] bits)Log2 size of the ring buffer. */
/* The descriptor is valid. */
/*
* When this bit is set, the solicited bit is used in order to send events to
* event queues.
*/
/*
* This functionality is not valid unless armed is set. If set and incoming
* message has SE bit set, an event should be generated to the event queue
* indicated by eventq_dscr_id. If not set, an event is sent reqardless of
* the value of the SE bit in the incoming message.
*/
/* Do not evict this entry if this bit is set. */
/*
* VA or PA of the base of the completion queue. If PA the MMU context above
* will be a bypass context. Updated by software. The head and tail pointers
* can be calculated by the following calculations: Address = base_ptr +
* (head * 64B ) Head Pointer and Tail Pointer will use the same MMU context
* as the base, and all need to be VA from one address space, or all need to
* be PA. In typical use, to allow direct user access to the head and tail
* pointer VAs are used.
*/
/* XXX: should this be defined as rb_sequence_number_t? */
/* pd(24[0] bits)Protection domain. */
/*
* Pre-fetch threshold (clog2) indicating when to read the software portion
* of the descriptor. If there are less entries than indicated by this
* threshold, the software portion of the descriptor must be read.
*/
/* Reserved */
/*
* Ring buffer header. A ring buffer header is preceding payload data when
* written to host memory. The full message with RB header and payload data
* is padded out to become a multiple of 64 bytes. The last 4 bytes of every
* 64B data written, will contain the ring buffer sequence number.
*/
/* Length of data associated with this ring buffer header. */
/* ib_bth_qp_number(24[0] bits)Queue Pair */
/* Applicable only if this is for EPS-A. */
/* Reserved */
/*
* Defining the packet type the headers valid for this ring buffer.
* PSIF_RB_TYPE_INVALID PSIF_RB_TYPE_DM_PUT PSIF_RB_TYPE_DM_GET_RESP
* PSIF_RB_TYPE_RCV_PROXY_COMPLETION
* PSIF_RB_TYPE_RCV_PROXY_COMPLETION_AND_DATA
* PSIF_RB_TYPE_SEND_PROXY_COMPLETION PSIF_RB_TYPE_SEND_COMPLETION
*/
/* Payload bulk */
/* sequence number for sanity checking */
/* Payload last */
/*
* QP state information as laid out in system memory. This structure should
* be used to cast the state information stored to a register.
*/
/*
* This retry tag is the one used by tsu_rqs and added to the packets sent to
* tsu_dma. It is the responsibility of tsu_rqs to update this retry tag
* whenever the sq_sequence_number in QP state is equal to the one in the
* request.
*/
/*
* This retry tag is updated by the error block when an error occur. If
* tsu_rqs reads this retry tag and it is different than the
* retry_tag_comitted, tsu_rqs must update retry_tag_comitted to the value of
* retry_tag_err when the sq_sequence_number indicates this is the valid
* request. The sq_sequence_number has been updated by tsu_err at the same
* time the retry_tag_err is updated.
*/
/*
* If the DMA is getting an L-Key violation or an error from PCIe when
* fetching data for requests, it has to set this bit. When set, all requests
* behind must be marked in error and not transmitted on IB. Responses are
* sent as normal.
*/
/*
* If the DMA is getting an R-Key violation or an error from PCIe when
* fetching data for RDMA read responses, it has to set this bit. When set,
* all packets sitting behind the RDMA read on this QP (requests and
* responses), must be marked bad so they are not transmitted on IB.
*/
/*
* The XRC domain is used to check against the XRC domain in the XRCSRQ
* descriptor indexed by the request. If the XRC domain matches, the
* protection domain in the XRCSRQ descriptor is used instead of the
* protection domain associated with the QP.
*/
/*
* Error retry counter initial value. Read by tsu_dma and used by tsu_cmpl to
* calculate exp_backoff etc..
*/
/*
* Retry counter associated with retries to received NAK or implied NAK. If
* it expires, a path migration will be attempted if it is armed, or the QP
* will go to error state. Read by tsu_dma and used by tsu_cmpl.
*/
/*
* When 1, indicates that the receive queue of this QP is a shared receive
* queue. This bit is used by tsu_err to classify errors.
*/
/* A hit in the set locally spun out of tsu_cmpl is found. */
/* Send queue extent - the clog2 size between the work requests. */
/* The size (log2 number of entries) of the send queue. */
/*
* Current number of outstanding read or atomic requests. Intialize to zero.
* It is updated by tsu_rqs every time a new read or atomic requests is
* transmitted.
*/
/*
* Current number of retired read or atomic requests. Initialze to zero.
* Updated by tsu_cmpl every time a read or atomic request is completed.
*/
/*
* This is a multicast QP, and is creating UC multicasts. The is_multicast
* bit is based on the destination QP being the multicast QP number
* (0xffffff). When the QP is not a UD QP, this bit is forwarded to DMA as
* the is_multicast bit.
*/
/*
* Indication that a receive queue access is in progress. The bit is set on a
* Send First packet and cleared on a Send Last packet. It is used to
* indicate if there exists an RQ which can be re-used in the case of UC
* transport packet drop.
*/
/* Bit used internally in tsu_cmpl. */
/*
* When 1, indicates that the receive queue of this QP is a shared receive
* queue. This bit is used by tsu_err to classify errors.
*/
/*
* If set, this QP will not be evicted unless QP state is filled up by QPs
* with this bit set.
*/
/*
* Minium RNR NAK timeout. This is added to RNR NAK packets and the requester
* receiving the RNR NAK must wait until the timer has expired before the
* retry is sent.
*/
/* QP State for this QP. */
/* QP number for the remote node. */
/* R-Key of received multipacket message. */
/*
* Number of bytes received for in progress RDMA RD Responses. This is
* maintained by tsu_cmpl.
*/
/* sq_seq(16[0] bits) * Send queue sequence number. This sequence number is used to make sure
*/
/* sq_seq(16[0] bits) * Send queue sequence number. This sequence number is used to make sure
*/
/*
* Magic number used to verify use of QP state. This is done by calculating a
* checksum of the work request incorporating the magic number. This checksum
* is checked against the checksum in the work request.
*/
/*
* Completion queue sequence number. This is used for privileged requests,
* where sequence number for one CQ is added to a different completion.
*/
/*
* Q-Key received in incoming IB packet is checked towards this Q-Key. Q-Key
* used on transmit if top bit of Q-Key in WR is set.
*/
/* When 1 indicates that we have an IB retry outstanding. */
/* When 1 indicates that we have a fence retry outstanding. */
/*
* When 1, indicates that we have started a flush retry. SQ or QP in error.
* Must be cleared on modify QP - SQErr to RTS.
*/
/*
* Bit used for internal use when QP is moved to error and error completions
* etc should be sent. Should alway be initialized to zero by SW.
*/
/*
* This is set by CMPL when there are outstanding requests and a TX error is
* received from DMA. It is cleared when the error is sent on.
*/
/*
* Sequence number of the last ACK received. Read and written by tsu_cmpl.
* Used to verify that the received response packet is a valid response.
*/
/* Offset within scatter element of in progress SEND. */
/* Index to scatter element of in progress SEND. */
/*
* 2 bits (next_opcode) 0x0: No operation in progress 0x1: Expect SEND middle
* or last 0x2: Expect RDMA_WR middle or last
*/
/*
* When 1, indicates that a psn_nak has been sent. Need a valid request in
* order to clear the bit.
*/
/*
* Expected packet sequence number: Sequence number on next expected packet.
*/
/*
* Timeout timestamp - if the timer is running and the timestamp indicates a
* timeout, a retry iss issued.
*/
/*
* When 1, indicates that a NAK has been for committed_psn+1. Need a valid
* packet for the committed_psn+1.
*/
/*
* TSU quality of service level. Can take values indicating low latency and
* to PSIF. The qosl bit in the doorbell request must match this bit in the
* QP state, otherwise the QP must be put in error. This check only applies
* to tsu_rqs.
*/
/*
* Migration state (migrated, re-arm and armed). Since path migration is
* handled by tsu_qps, this is controlled by tsu_qps. XXX: Should error
* handler also be able to change the path?
*/
/* This is an Ethernet over IB QP. */
/* This is an IB over IB QP. */
/*
* separate scatter elements.
*/
/*
* Dynamic MTU is enabled - i.e. incoming requests can have 256B payload
* instead of MTU size specified in QP state.
*/
/*
* This is a proxy QP. Packets less than a particular size are forwarded to
* EPS-A core indicated in the CQ descriptor.
*/
/* Enable capability for RSS. */
/* Reserved */
/* PSIF specific capability enable for receiving Masked Atomic operations. */
/* IB defined capability enable for receiving Atomic operations. */
/* IB defined capability enable for receiving RDMA WR. */
/* IB defined capability enable for receiving RDMA RD. */
/* Receive capabilities enabled for this QP. */
/* Inlined rcv_cap : struct psif_qp_rcv_cap (64 bits) */
/*
* Transmit packet sequence number. Read and updated by tsu_dma before
* sending packets to tsu_ibpb and tsu_cmpl.
*/
/*
* Retry transmit packet sequence number. This is the xmit_psn which should
* be used on the first packet of a retry. This is set by tsu_err. When
* tsu_dma see that a packet is the first of a retry, it must use this psn as
* the xmit_psn and write back xmit_psn as this psn+1.
*/
/*
* Index to scatter element of in progress RDMA RD response. This field does
* not need to be written to host memory.
*/
/*
* An error is found by tsu_cmpl. All packets on this QP is forwarded to
* tsu_err until this bit is cleared. The bit is cleared either from QP
* cleanup or when tsu_cmpl is receiving is_retry.
*/
/* The timestamp is valid and will indicate when to time out the request.. */
/*
* TSU Service Level used to decide the TSU VL for requests associated with
* this QP.
*/
/*
* Maximum number of outstanding read or atomic requests allowed by the
* remote HCA. Initialized by software.
*/
/*
* DMA length found in first packet of inbound request. When last packet is
* received, it must be made sure the dmalen and received_bytes are equal.
*/
/* Send Queue RNR retry count initialization value. */
/*
* Retry counter associated with RNR NAK retries. If it expires, a path
* migration will be attempted if it is armed, or the QP will go to error
* state.
*/
/*
* When this bit is set, ordering from the send queue is ignored. The
* sq_sequence_number check in the RQS is ignored. When the bit is not set,
* sq_sequence_number check is done. This bit must be set for QP0 and QP1.
*/
/*
* When set, RQS should only check that the orig_checksum is equal to magic
* number. When not set, RQS should perform the checksum check towards the
* checksum in the psif_wr.
*/
/*
* This is an index to a receive queue descriptor. The descriptor points to
* the next receive queue element to be used. Receive queues are used for IB
* Send and RDMA Writes with Immediate data.
*/
/*
* Transport type of the QP (RC, UC, UD, XRC, MANSP1). MANSP1 is set for
* privileged QPs.
*/
/* Reserved */
/*
* This is an index to completion queue descriptor. The descriptor points to
* a receive completion queue, which may or may not be the same as the send
* completion queue. For XRC QPs, this field is written by the CQ descriptor
* received by the XRCSRQ on the first packet. This way we don't need to look
* up the XRCSRQ for every packet. of the message.
*/
/*
* Number of bytes received of in progress RDMA Write or SEND. The data
* should be added to the msg_length.
*/
/*
* Offloading type for EoIB. Indicating how the Enforcement of EoIB is done
* by PSIF.
*/
/* PSIF specific exponential backoff enable. */
/*
* The privileged QP is not so privileged, which means that it is not allowed
* to perform all privileged requests.
*/
/*
* Dynamic MTU is enabled - i.e. requests can use 256B payload instead of
* what is specified in QP state.
*/
/* This QP is running IP over IB. */
/* This QP is running Ethernet over IB. */
/* Send capabilities enabled for this QP. */
/* Inlined send_cap : struct psif_qp_snd_cap (64 bits) */
/* Used for retry handling. */
/*
* The counter is taken from the response packet and stored. tsu_host is
* using this value to decide if we go into or out of response scheduling
* mode.
*/
/*
* The counter is compared towards the resp_sched_count_done and incremented
* every time a packet is sent to the SQS.
*/
/*
* Write pointer for the scheduling of responses. Host is updating and
* forwarding this to tsu_sqs.
*/
/*
* Set when entering response scheduling mode and cleared when going out of
* the mode. We exit this mode when resp_sched_count_sched ==
* resp_sched_count_done.
*/
/*
* Flag indicating if the swap in the last atomic swap operation was
* performed or not. If swapped, the next RDMA WR should be performed towards
* host memory. If not swapped, the next RDMA WR should not be performed
* towards host memory, but should be ACK'ed at the IB level as normal.
*/
/*
* This bit is set by RQS when a TSU_RQS_MAX_OUTSTANDING_REACHED_ERR or
* TSU_RQS_REQUEST_FENCED_ERR error is seen and cleared when the first packet
* of a retry is seen. While this bit is set, all packets towards DMA shall
* have the TSU_RQS_SEQNUM_ERR set.
*/
/*
* Combined 'Last Received MSN' and 'Last Outstanding MSN', used to maintain
* 'spin set floor' and indicate 'all retries completed', respectively.
*/
/* Reserved */
/*
* This bit is set when a HOST initiated NAK is sent due to errors when
* handling an atomic. When this bit is set, no data is forwarded to EPS or
*/
/*
* This bit indicates that the QP is now handling responses in a safe manner
* with respect to MSN values in the incoming IB packets.
*/
/*
* This is set when the field operation_successful == 0 from HOST. It is used
* to make sure that no good completion is to be sent after an atomic error
* has occurred. When set, the QP state is moved to error when seen on the
* exec side.
*/
/*
* When this bit is not equal to apm_failed_event_needed, CBLD should send an
* event and set this bit equal to apm_failed_event_needed. When the QP is
* initialized, this value should be set equal to apm_failed_event_needed.
*/
/*
* When this bit is not equal to apm_success_event_needed, CBLD should send
* an event and set this bit equal to apm_success_event_needed. When the QP
* is initialized, this value should be set equal to
* apm_success_event_needed.
*/
/* This is inverted by the APM module when an event should be sent. */
/* This is inverted by the APM module when an event should be sent. */
/*
* Request address. In the case of RDMA WR, this is the current write
* pointer. In the case of a SEND, this is the address to the receive queue
* element.
*/
/*
* Write pointer to atomic data stored in QP. Every time an atomic operation
* is performed, the original atomic data is stored in order be to returned
* in the event of duplicate atomic.
*/
/*
* Communication established bit. When a packet is received when in RTR
* state, this bit should be set, and an asynchronous event should be sent.
*/
/* This PSN is committed - ACKs sent will contain this PSN. */
/*
* Offset within scatter element of in progress RDMA RD response. This field
* does not need to be written to host memory.
*/
/*
* Message sequence number used in AETH when sending ACKs. The number is
* incremented every time a new inbound message is processed.
*/
/*
* This is an index to send completion queue descriptor. The descriptor
* points to a send completion queue, which may or may not be the same as the
* send completion queue.
*/
/*
* Committed MSN - the MSN of the newest committed request for this QP. Only
* the bottom 16 bits of the MSN is used.
*/
/* pd(24[0] bits)Protection domain. */
/* pd(24[0] bits)Protection domain. */
/*
* This is the eps_tag to be used in the case there is an outstanding error
* detected in CMPL. The field is owned CMPL and is used for internal
* handling.
*/
/*
* Path specific information. This is information which can be different for
* primary and alternate path.
*/
/* Inlined grh : struct psif_grh (192 bits) */
/* ib_lrh_lid(16[0] bits)Local ID */
/* gid_indx(1[0] bits)GID index indicating which of the UFs two GIDs are used. */
/* ib_lrh_sl(4[0] bits)Service Level */
/* Reserved */
/* ib_grh_hoplmt(8[0] bits)Hop Limit */
/* ib_grh_tclass(8[0] bits)Traffic Class */
/* ib_grh_flowl(20[0] bits)Flow Label */
/* Reserved */
/* Reserved field - used by hardware for error handling on PCIe errors. */
/* timeout(5[0] bits) * Local ACK timeout. This is the exponent used to calculate the delay before
* an ACK is declared 'lost'
*/
/* ipd(8[0] bits)Inter packet delay. Encoded as specified in IB spec. */
/* Reserved */
/*
* This is the LID path bits. This is used by tsu_ibpb when generating the
* SLID in the packet, and it is used by tsu_rcv when checking the DLID.
*/
/* pkey_indx(9[0] bits)Index into the P-Key table. */
/* Query QP structure. */
struct psif_query_qp {
/* QP state information from query. */
/* Primary path information. */
/* Alternate path information. */
/*
* modified.
*/
struct psif_qp_attributes {
/* Do not modify unless current state is as indicated in command. */
/* Change the xmit psn (SQ PSN) when set. */
/* Change the RNR retry count when set. */
/* Change the retry count when set. */
/* Change the RNR minimum timer value when set. */
/* Change the local ack timeout when set. */
/* Change P-Key index if set. */
/* Change the Q-Key when set. */
/* Change the receive capabilities when set. */
/* Change the state of the QP when set. */
/* Change alternate path if set. */
/*
* Change migration state if set. In some cases this might lead to a path
* migration.
*/
/* Change primary path if set. */
/* Change expected PSN (RQ PSN) if set. */
/* Change path MTU if set. */
/* Change path req_access error if set. */
/* Manually added spacing to pad outpsif_qp_attributes */
/* XXX: This is how the QP state in host memory is organized. */
/*
* Path information for path A specific for this QP connection. This field
* only makes sense for QPs using connected mode. For datagram mode, this
* information comes from the AHA.
*/
/*
* Path information for path B specific for this QP connection. This field
* only makes sense for QPs using connected mode. For datagram mode, this
* information comes from the AHA.
*/
/* Temp.definition of collect buffers */
/* Content pt. not defined in ASIC XML */
/* Temp.definition of PCIe WR BAR SQS WR layout = first 8 bytes of WR */
struct psif_pcie_sqs_wr {
/*
* Send queue sequence number. Used to map request to a particular work
* request in the send queue.
*/
/* Length (number of bytes of valid data in the collect payload buffer). */
/*
* in the QP State. If it is unequal, the QP should be in error.
*/
/* Only applicable to UD. This is an indication that AHA should be used. */
/* Port number to use for QP0/1 packets. This field is ignored if not QP0/1. */
/*
* The TSL (Tsu SL) must be matched against the TSL in the QP State (XXX: or
* in the AHA?). If it is unequal, the QP should be put in error.
*/
/*
* QP sending this request. XXX: Should name be own_qp_num as defined in QP
* state?
*/
/*
* XXX: Naming - do we want to use opcode for this also, or should we use
* pkt_type.
*/
/* Temp.definition of PCIe WR BAR layout */
struct psif_pcie_wr {
struct psif_mbox {
/* Host posting to EPS-x */
/* EPS-x posting to Host */
struct psif_pcie_mbox {
/* MBOX_EPS_MAX mbox'es for all the EPS's */
/* (Reset all mailboxes) */
/* Modify QP structure. */
struct psif_modify_qp {
/*
* Current number of retired read or atomic requests. Initialze to zero.
* Updated by tsu_cmpl every time a read or atomic request is completed.
*/
/* QP State for this QP. */
/*
* Minium RNR NAK timeout. This is added to RNR NAK packets and the requester
* receiving the RNR NAK must wait until the timer has expired before the
* retry is sent.
*/
/*
* Error retry counter initial value. Read by tsu_dma and used by tsu_cmpl to
* calculate exp_backoff etc..
*/
/* This is an Ethernet over IB QP. */
/* This is an IB over IB QP. */
/*
* separate scatter elements.
*/
/*
* Dynamic MTU is enabled - i.e. incoming requests can have 256B payload
* instead of MTU size specified in QP state.
*/
/*
* This is a proxy QP. Packets less than a particular size are forwarded to
* EPS-A core indicated in the CQ descriptor.
*/
/* Enable capability for RSS. */
/* Reserved */
/* PSIF specific capability enable for receiving Masked Atomic operations. */
/* IB defined capability enable for receiving Atomic operations. */
/* IB defined capability enable for receiving RDMA WR. */
/* IB defined capability enable for receiving RDMA RD. */
/* Receive capabilities enabled for this QP. */
/* Inlined rcv_cap : struct psif_qp_rcv_cap (64 bits) */
/*
* Retry counter associated with RNR NAK retries. If it expires, a path
* migration will be attempted if it is armed, or the QP will go to error
* state.
*/
/*
* If the DMA is getting an L-Key violation or an error from PCIe when
* fetching data for requests, it has to set this bit. When set, all requests
* behind must be marked in error and not transmitted on IB. Responses are
* sent as normal.
*/
/* Q-Key received in incoming IB packet is checked towards this Q-Key. */
/*
* Transmit packet sequence number. Read and updated by tsu_dma before
* sending packets to tsu_ibpb and tsu_cmpl.
*/
/* Reserved */
/*
* Migration state (migrated, re-arm and armed). Since path migration is
* handled by tsu_qps, this is controlled by tsu_qps. XXX: Should error
* handler also be able to change the path?
*/
/* Reserved */
/* Path MTU. */
/*
* Receive packet sequence number. Read and updated by tsu_dscr before
* passing packets to tsu_rqh.
*/
/* Primary path information. */
/* Alternate path information. */
/* QP number UF and command for either modify or query QP. */
struct psif_modify_command {
/* Manually added spacing to pad out psif_modify_command */
/*
* This will arm interrupt to be sent when the refcount for the QP index used
* have reached zero. It should be used when modify to Reset - when interrupt
* is seen, there are no outstanding transactions towards RQs or CQs for the
* QP, and it should be safe to take these queues down.
*/
/* QP number for this operation. */
/* Current state the QP must be in to do the modification. */
/*
* Port number used for accesses to QP0/1. This field is don't care for all
* other QPs.
*/
/* UF this QP belongs to. */
/* Command indicating operation - query or modify. */
/*
* Structure defining DMA Key Validation entries. This structure is specific
* R-Key, an L-Key or both at the same time. This is is decided bythe key
* states.
*/
struct psif_key {
/* Reserved */
/*
* If this bit is set, the va in the key is used as an offset to the base
* address given in this descriptor.
*/
/*
* If this bit is set, it means that this memory region is enabled for
* conditional RDMA write. The bit must be added to the header at tsu_val and
* follow the request towards tsu_host. When tsu_host receives this bit, it
* is checking the 'swapped' bit in the QP state in order to decide if the
* payload is written to host memory or not.
*/
/* Atomic access enabled. */
/* Write access enabled. */
/* Read access enabled. */
/*
* Local access rights. Used for L-Key accesses when this is a valid L-Key.
* Must be set correctly by SW so that RD access is always set.
*/
/* Inlined local_access : struct psif_dma_vt_mem_access (64 bits) */
/* Atomic access enabled. */
/* Write access enabled. */
/* Read access enabled. */
/* Remote access rights. Used for R-Key accesses when this is a valid R-Key. */
/* Inlined remote_access : struct psif_dma_vt_mem_access (64 bits) */
/* pd(24[0] bits)Protection domain. */
/* Reserved */
/* L-key state for this DMA validation entry */
/* R-key state for this DMA validation entry */
/* Length of memory region this validation entry is associated with. */
/**
* Flash image header format for application image
* extension of struct psif_flash_header_all
*/
struct psif_flash_header_app {
/* byte[0:3] signature is 0xdeadbeef */
/* byte[4:7] image type */
/* byte[8:11] SHRDMEM start address */
/* byte[16:19] SHRDMEM ZI base address */
/* byte[20:23] ZI size */
/* byte[24:27] Storage only used by boot loader */
/* byte[28:31] Execution start address */
/* byte[32:35] SHRDMEM address base of low vectors */
/* byte[36:39] Flash address base of low vectors */
/* byte[40:43] Size of low vectors */
/* byte[44:47] FLASH_DATE_LEN > = sizeof(__DATE__) */
/* byte[48:55] */
/* byte[56:59] */
/* byte[60:63] FLASH_TIME_LEN > = sizeof(__TIME__) */
/* byte[64:71] */
/* byte[72:79] FLASH_REV_STR_LEN > = sizeof(REV_STRING) */
/* byte[80:83] checkssum_ptr - this value + 4 equals the size of the immage in bytes */
/* byte[84:87] */
/* byte[88:91] */
/* byte[92:95] */
/**
* Flash image header format
* Note: image length is not valid for the boot loader image itself (64k bytes)
* struct is always located at offset 0x800 within an image
*/
struct psif_flash_header_all {
/* byte[0:3] signature of 0xdeadbeef */
/* byte[4:7] image type */
/* byte[8:11] execution base */
/* byte[12:15] image length.
The length is defined in bytes and starts at offset 0x0A00 into the image. */
/* This is the portion of the descriptor which is updated by software. */
struct psif_eq_sw {
/* Index to event elements consumed by SW. */
/*
* Descriptor entry for an event queue. This entry is used to address into
* the event queue and write the correct entries. This structure is the
* hardware updateable part of the EQ descriptor.
*/
struct psif_eq_hw {
/*
* Event queue sequence number. This is the sequence number to be used for
* this event. When used by a client, it is incremented and written back to
* this descriptor.
*/
/*
* The size (log2 number of entries) of the event queue. This is used for
* calculating when to wrap the head and tail indexes.
*/
/*
* The size between event queue entries. This is the shift value to find the
* start of the next entry.
*/
/* The descriptor is valid. */
/* Inlined ctrl : struct psif_eq_ctrl (64 bits) */
/* Reserved */
/*
* VA or PA of the base of the queue. If PA the MMU context above will be a
* bypass context. Updated by software. The head and tail pointers can be
* calculated by the following calculations: Address = base_ptr + (head *
* ($bits(event_entry_t)/8 ) Head Pointer and Tail Pointer will use the same
* MMU context as the base, and all need to be VA from one address space, or
* all need to be PA. In typical use, to allow direct user access to the head
* and tail pointer VAs are used.
*/
/* Info: Edge padding added (for endian convert) */
/* Index to event queue elements added by HW. */
/* Event queue entry. */
struct psif_eq_entry {
/* vendor_fields(3[0] bits)Should this be an enum? */
/* IB port number */
/* Completion queue descriptor ID. */
/* Error field indicating vendor error when this is an error event. */
/*
* The port_flags are only applicable for port type events. These are not set
* from the TSU, but implemented from EPS.
*/
/* PSIF_EVENT_EPS_A. */
/* PSIF_EVENT_EPS_C. */
/* PSIF_EVENT_CMPL_NOTIFY. */
/* PSIF_EVENT_PORT_ERROR. */
/* PSIF_EVENT_LOCAL_CATASTROPHIC_ERROR. */
/* PSIF_EVENT_PORT_CHANGED. */
/* PSIF_EVENT_CLIENT_REGISTRATION. */
/* PSIF_EVENT_PORT_ACTIVE. */
/* PSIF_EVENT_LOCAL_WORK_QUEUE_CATASTROPHIC_ERROR. */
/* PSIF_EVENT_SRQ_CATASTROPHIC_ERROR. */
/* PSIF_EVENT_INVALID_XRCETH. */
/* PSIF_EVENT_XRC_DOMAIN_VIOLATION. */
/* PSIF_EVENT_PATH_MIGRATION_REQUEST_ERROR. */
/* PSIF_EVENT_LOCAL_ACCESS_VIOLATION_WQ_ERROR. */
/* PSIF_EVENT_INVALID_REQUEST_LOCAL_WQ_ERROR. */
/* PSIF_EVENT_CQ_ERROR. */
/* PSIF_EVENT_LAST_WQE_REACHED. */
/* PSIF_EVENT_SRQ_LIMIT_REACHED. */
/* PSIF_EVENT_COMMUNICATION_ESTABLISHED. */
/* PSIF_EVENT_PATH_MIGRATED. */
/* Inlined event_status : struct psif_event_status (64 bits) */
/* LID. */
/* QP number. */
/* Receive queue descriptor ID. */
/* Event type if port_flags is PSIF_EVENT_EXTENSION */
/* Completion queue sequence number causing the event to be sent. */
/* More info on event */
/* Additional data on event */
/* Padding out struct bulk */
/* sequence number for sanity checking */
/* Padding out struct last */
/**
* CSR Query port structure
*/
struct psif_epsc_port_attr {
/** port state */
/** port number */
/** currently configured path MTU */
/** maximum supported path MTU */
struct psif_epsc_log_stat {
/* Owned by epsc runs all the way to 64 bit */
/* Owned by host */
/* Owned by host real offset modulo sz */
/* Allign to 32 byte */
/**
* Query GID response in host memory
*/
struct psif_epsc_gid_attr {
/**
* Populate MMU table
*/
struct psif_epsc_exercise_mmu {
/* Start address */
/* MMU context supplied by driver */
/* Buffer length in bytes */
/* Stride in bytes */
/**
* CSR Query device structure
*/
struct psif_epsc_device_attr {
/**
* For data in response structure of EPSC_BER_DATA Op.
*/
struct psif_epsc_csr_rsp_ber_data {
/* Received signal values (H0 values) for each Serdes Channel per port.
status_rxd_reg0 in Sonoma PRM */
/* Number of elements is same as psif_epsc_csr_ber_counters enum */
/**
* The eps-c fw csr to host sw completion
* Response to a CSR request
*/
struct psif_epsc_csr_rsp {
/* Address from request */
/* Data integrity */
/* enum psif_epsc_csr_opcode from request */
/* return status of operation */
/* Data from operation */
/* Info from operation */
/* Sequence number from request */
struct psif_epsc_csr_opaque {
struct psif_epsc_csr_single {
/**
* \brief Padded base address structure
* \details
* With this structure the driver provides the information needed be the
* firmware to set up queue, queue pair and address handle descriptor base
* addresses before they can be used.
* \par Used in
* psif_epsc_csr_details for \ref EPSC_SET_BASEADDR and
* \ref EPSC_SET_BASEADDR_EQ mailbox requests
* \par Classification
* driver
*/
struct psif_epsc_csr_base_addr {
/** base address in host memory to be used for the descriptor */
/** MMU context for `address` */
/**
* Size of an entry as log2 value. The address to an entry is calculated
* as host_addr + entry_num*(1 << extent_log2).
*/
/** unused (padding) */
/** number of entries in the table */
/** unused (padding) */
/** MSI-X interrupt index only valid for EQ setup */
/** unused (padding) */
/* CSR automated type for TSU_QPS_MODIFY_QP_CTRL */
/*
* implemented in hardware - one at a time. EPS implements one register per
* UF. When one is written, the modify data is written to modify_qp_data
* register before this register is written. The Modify or Query QP command
* is autmatically kicked when this register is written. Is one outstanding
*/
struct psif_csr_modify_qp_ctrl {
/* Do not modify unless current state is as indicated in command. */
/* Change the xmit psn (SQ PSN) when set. */
/* Change the RNR retry count when set. */
/* Change the retry count when set. */
/* Change the RNR minimum timer value when set. */
/* Change the local ack timeout when set. */
/* Change P-Key index if set. */
/* Change the Q-Key when set. */
/* Change the receive capabilities when set. */
/* Change the state of the QP when set. */
/* Change alternate path if set. */
/*
* Change migration state if set. In some cases this might lead to a path
* migration.
*/
/* Change primary path if set. */
/* Change expected PSN (RQ PSN) if set. */
/* Change path MTU if set. */
/* Change path req_access error if set. */
/* Manually added spacing to pad outpsif_qp_attributes */
/* Inlined cmd_attributes : struct psif_qp_attributes (24 bits) */
/* Manually added spacing to pad out psif_modify_command */
/*
* This will arm interrupt to be sent when the refcount for the QP index used
* have reached zero. It should be used when modify to Reset - when interrupt
* is seen, there are no outstanding transactions towards RQs or CQs for the
* QP, and it should be safe to take these queues down.
*/
/* QP number for this operation. */
/* Current state the QP must be in to do the modification. */
/*
* Port number used for accesses to QP0/1. This field is don't care for all
* other QPs.
*/
/* UF this QP belongs to. */
/* Command indicating operation - query or modify. */
/* Inlined cmd : struct psif_modify_command (40 bits) */
/**
* Modify QP CSR structure
*/
struct psif_epsc_csr_modify_qp {
/**
* Query QP
*
* int ibv_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, enum
* ibv_qp_attr_mask attr_mask, struct ibv_qp_init_attr *init_attr)
*
* Input Parameters:
* qp struct ibv_qp from ibv_create_qp
* attr_mask bitmask of items to query (see ibv_modify_qp)
* Output Parameters:
* attr struct ibv_qp_attr to be filled in with requested attributes
* init_attr struct ibv_qp_init_attr to be filled in with initial
* attributes
* Return Value:
* 0 on success, errno on failure.
*/
struct psif_epsc_csr_query_qp {
/* MMU context supplied by driver */
/* CSR automated type for TSU_RQS_P{1,2}_OWN_LID_BASE */
/*
* Own LIDs base and LMC. Potentially all own LID bits come from the QP state
* entry. The number of bits to use is based on the LMC. Per UF register.
*/
struct psif_csr_own_lid_base {
/* lmc(3[0] bits)LID Mask Control data type. */
/* ib_lrh_lid(16[0] bits)Local ID */
/* CSR automated type for TSU_IBPB_P{1,2}_OWN_LID_BASE */
/*
* Own LIDs base and LMC. Potentially all own LID bits come from the QP state
* entry. The number of bits to use is based on the LMC. Per UF register.
*/
struct psif_csr_snd_lid {
/* lmc(3[0] bits)LID Mask Control data type. */
/* ib_lrh_lid(16[0] bits)Local ID */
/* CSR automated type for TSU_IBPR_P{1,2}_OWN_LID_BASE */
/*
* Own LIDs base and LMC. Potentially all own LID bits come from the QP state
* entry. The number of bits to use is based on the LMC. Per UF register.
*/
struct psif_csr_rcv_lid {
/* If set GID routing must be used. */
/* LID mask control. */
/* LID base. */
/* Inlined data : struct psif_lid_base (64 bits) */
/**
* EPSC_SET_LID
*/
struct psif_epsc_csr_set_lid {
/* Index pt. not used (PSIF.ARCH.03.12 and later) */
/**
* EPSC_SET_GID{,_P1,_P2}
*/
struct psif_epsc_csr_set_gid {
/**
* EPSC_SET_EOIB_MAC
*/
struct psif_epsc_csr_set_eoib_mac {
/**
* Set EPSC_SET_VLINK_STATE
*/
struct psif_epsc_csr_vlink_state {
/* universal_function(6[0] bits)UF */
/**
* EPSC_QUERY_DEVICE, EPSC_QUERY_PORT, EPSC_QUERY_INFO,
*/
struct psif_epsc_csr_query_hw {
/* MMU context supplied by driver */
/**
* EPSC_QUERY_PKEY, EPSC_QUERY_GID,
*/
struct psif_epsc_csr_query_table {
/**
* EPSC_MC_ATTACH, EPSC_MC_DETACH, EPSC_QUERY_MC
*/
struct psif_epsc_csr_mc {
/**
* EPSC_EVENT_ACK
*/
struct psif_epsc_csr_event {
/* Will become : psif_eq_event event */
/**
* EPSC_MODIFY_DEVICE
*/
struct psif_epsc_csr_modify_device {
/**
* EPSC_MODIFY_PORT_{1,2}
*/
struct psif_epsc_csr_modify_port {
/**
* Test operations : EPSC_TEST_HOST_RD & EPSC_TEST_HOST_WR
*/
struct psif_epsc_csr_test_host_wrd {
/* pattern number 0..xxx */
/**
* Flash programming: EPSC_FLASH_START, EPSC_FLASH_RD,
* EPSC_FLASH_WR & EPSC_FLASH_STOP
*/
struct psif_epsc_csr_flash_access {
/**
* IB packet trace acquire : EPSC_TRACE_ACQUIRE
*/
struct psif_epsc_csr_trace_acquire {
/* Pointer to trace buffer */
/* Buffer length in bytes */
/* Buffer offset in bytes */
/* MMU context supplied by driver */
/**
* EPSC_FW_VERSION
*/
struct psif_epsc_csr_fw_version {
struct psif_epsc_csr_log_ctrl {
/* Log mode to use */
/* Log level to use */
/*
* Fields only used by log mode EPSC_LOG_MODE_HOST:
* Start address of the data area to write to.
*/
/* pointer to a log_stat data area */
/* Length in bytes of the buffer */
/**
* EPS-A to EPS-C
*/
struct psif_epsc_csr_epsa_cntrl {
/* Which EPS-A core */
/* Operation */
/* Offset within flash */
/* Address in EPS-A memory */
/**
* host to EPS-A
*/
struct psif_epsc_csr_epsa_cmd {
/* Buffer address in host memory */
/**
* EPSC_CLI_ACCESS - buffer size is presumed to be 2K
*/
struct psif_epsc_csr_cli_access {
/**
* EPSC_MAD_PROCESS:
*/
struct psif_epsc_csr_mad_process {
/* ib_bth_qp_number(24[0] bits)Queue Pair */
/* ib_reth_dmalen(32[0] bits)Direct Memory Access Length */
/*
* SLID taken from the received packet. This is only valid for UD QPs. Only
* valid if not privileged.
*/
/* IB portnumber this packet was received on. Only valid if not privileged. */
/* Only valid for UD QPs. */
/* P-Key index from UD packet. */
/* Flags indicating GRH and immediate presence.Only valid if not privileged. */
/* Inlined wc_flags : struct psif_wc_flags (64 bits) */
/* Only valid for UD QPs. */
/*
* Path bits (lower 7 bits) taken from the DLID in the received packet. This
* is only valid for UD QPs. Only valid if not privileged.
*/
/**
* EPSC_MAD_SEND_WR:
*/
struct psif_epsc_csr_mad_send_wr {
struct psif_epsc_query_req {
/* Value for EPSC_SET operation */
/**
* Structure for EPSC_QUERY
*
*/
struct psif_epsc_csr_query {
/* Future */
/* UF number */
/* Query destin for the response data field */
/* Query destin for the response info field */
/**
* Structure for EPSC_SET
*/
struct psif_epsc_csr_set {
/* Future */
/* UF number */
/* Set destin for the response data field */
/* Set destin for the response info field */
/**
* EPSC_HOST_INT_COMMON_CTRL - PF only
*/
struct psif_epsc_csr_interrupt_common {
/* Moderate total interrupt generation. How many usecs to delay. */
/**
* EPSC_HOST_INT_CHANNEL_CTRL - PF + VF
*/
struct psif_interrupt_attributes {
struct psif_epsc_csr_interrupt_channel {
/* Mask of attributes to set */
/* rx-to-tx timer scaling factor 2-exponent value */
/* Future */
/* Set to 1 for adaptive coalescing */
/* EQ number */
/* Message rate in messages per second. High rate threshold. */
/* Message rate in messages per second. Low rate threshold. */
/* How many usecs to delay after packet. */
/* How many usecs to delay after first packet. High rate value. */
/* How many usecs to delay after first packet. Low rate value. */
/* How many usecs to delay after first packet. */
/* Align to 64 bit */
/* How many usecs to delay after packet. High rate value. */
/* How many usecs to delay after packet. Low rate value. */
union psif_epsc_update_set_or_offset {
/**
* Flash update: EPSC_UPDATE
*/
struct psif_epsc_csr_update {
union psif_epsc_update_set_or_offset u;
/**
* UF maintenance: EPSC_UF_CTRL
*/
struct psif_epsc_csr_uf_ctrl {
/* CSR automated type for TSU_MMU_FLUSH_CACHES */
/* Flush MMU and-or PTW Caches. */
struct psif_csr_mmu_flush_caches {
/**
* Flush MMU and-or PTW Caches: EPSC_FLUSH_CACHES
*/
struct psif_epsc_flush_caches {
/**
* Structure for EPSC_PMA_COUNTERS
* Common structure for virtual port per UF and
* external (physical) port per vSwitch.
*/
struct psif_epsc_csr_pma_counters {
/**
* If MSB is set then it's a physical port number.
* Otherwise it's a virtual port number.
*/
/* UF number */
/* Base address in host memory */
/**
* Bitmask to indicate which counters to clear. Bit
* positions are based on the response structure's enum.
*/
/** \brief Command params for opcode EPSC_VIMMA_CTRL_SET_VFP_VHCA_DEREGISTER
* \note This struct belongs to capability: EPSC_VIMMA_CTRL_CAP_PSIF_VFP_CAPS
* \par Classification
* external
*/
struct psif_epsc_vimma_dereg {
/* highest uf index set in array below */
/* lowest uf index set in array below */
/* size 5*u64 */
/* allows multi UF setting. bit0 = UF0 bit1 = UF1 etc. */
/** \brief Struct defintion for vHCA registration details
* \note This struct belongs to capability: EPSC_VIMMA_CTRL_CAP_PSIF_VFP_CAPS
* \par Classification
* external
*/
struct psif_epsc_vimma_vfp_reg {
/* size 5*u64 */
/** \brief Command params for opcode EPSC_VIMMA_CTRL_SET_ADMIN_MODE
* \note This struct belongs to capability: EPSC_VIMMA_CTRL_CAP_PSIF_VFP_CAPS
* \par Classification
* external
*/
struct psif_epsc_vimma_set_admmode {
/* highest uf index set in array below */
/* lowest uf index set in array below */
/* size 5*u64 */
/* allows multi UF setting. bit0 = UF0 bit1 = UF1 etc. */
/** \brief Command params for opcode EPSC_VIMMA_CTRL_SET_VFP_VHCA_REGISTER
* \note This struct belongs to capability: EPSC_VIMMA_CTRL_CAP_PSIF_VFP_CAPS
* \par Classification
* external
*/
struct psif_epsc_vimma_reg_info {
/* highest uf index set in array below */
/* lowest uf index set in array below */
/* allows multi UF setting. bit0 = UF0 bit1 = UF1 etc. */
/** \brief Defining params for VIMMA opcodes
* \par Classification
* external
*/
union psif_epsc_vimma_ctrl_cmd {
/* all union elements are size 5*u64 */
/** \brief Defines the complete command params for VIMMA opcodes
* \note This struct belongs to capability: EPSC_VIMMA_CTRL_CAP_PSIF_BASIC_CAPS
* and should never change in an incompatible way.
* \par Classification
* external
*/
struct psif_epsc_csr_vimma_ctrl {
/* length of DMA response buffer pinned in host memory */
/* VIMMA sub-opcodes triggered by EPSC_VIMMA_CTRL */
/* Size 5*64 bits: union of the params for the various opcodes */
union psif_epsc_vimma_ctrl_cmd u;
/* Size 64 bits */
/* Place to DMA back longer responses during retrieval */
/* Summing up to 11 * u64 which is total and max */
/**
* Structure for EPSC_BER_DATA
*/
struct psif_epsc_csr_ber_data {
/* Buffer address in host memory */
/* MMU supplied by the driver */
/* Buffer length in bytes */
/* IBU port number */
/* Public API for mailbox requests details */
union psif_epsc_csr_details {
/* Anonymous data */
/* Single data to write */
/* Descriptor base address */
/* Modify QP request */
/* Query QP */
/* Set LID entry (backdoor setup) */
/* Set GID entry (backdoor setup) */
/* Set EoIB MAC address (backdoor setup) */
/* Set vlink state */
/* Query HW state of device port or other */
/* Query table info pkey or gid */
/* MC subscription */
/* Asynchronous event */
/* EPSC_MODIFY_DEVICE */
/* EPSC_MODIFY_PORT_{1 2} */
/* EPSC_TEST_HOST_RD & EPSC_TEST_HOST_WR */
/* EPSC_FLASH_START EPSC_FLASH_RD EPSC_FLASH_WR & EPSC_FLASH_STOP */
/* EPSC_TRACE_ACQUIRE */
/* EPSC_FW_VERSION */
/* EPSC_LOG_CTRL */
/* Control epsa */
/* Issue commands to serial console */
/* Process incomming (QP 1) packet from host */
/* Send MAD formated WR to host for sending */
/* Single value query */
/* Single value set */
/* Setup interrupt control */
/* EPSC_UPDATE (update firmware) */
/* EPSC_UF_CTRL: UF maintenance functions */
/* EPSC_FLUSH_CACHES: Flush MMU and-or PTW Caches */
/* PMA counters query */
/* EPSC_VIMMA_CTRL: VIMMA functions */
/* BER data query */
/**
* The host sw to eps-c fw csr workrequest
*
* The EPSC will post the completion responses for request `#seq_num`
* into the completion queue at :
* `index = #seq_num % epsc_cq.base_addr.num_entries`
* as provided by the initial EPSC_SETUP work request:
*/
struct psif_epsc_csr_req {
/* Data integrity */
/* UF - only valid for UF 0 - must be 0 otherwise */
/* Sequence number - included in response */
/* Register offset or port number */
/* Operation specific data */
union psif_epsc_csr_details u;
struct psif_epsc_csr_doorbell {
/** Identical to head to assure 8 byte atomic write */
/** Payload or info */
/** Transfer index */
/**
* Basic configuration data for each UF
*/
struct psif_epsc_csr_config {
/** Minor HW API version identifier. */
/** Major HW API version identifier. */
/** Minor EPS API version identifier. */
/** Major EPS API version identifier. */
/** Request base address. */
/** Respose base address. */
/** Size of response entry. */
/** Size of request entry. */
/** Number of entries in table. */
/** MMU context for mailbox. */
/** Padded field. */
/** Setup CMPL spin set mode to be fast - default is safe (PF only). */
/** Connect all vlinks to external port (PF only). */
/** Enable all VFs to receive SMPs at startup (PF only). */
/** VCB access: Exact length for scoreboard data copy (PF only). */
/** PCI access: Select host endian memory layout (PF only). */
/** Flush SIF pipeline similar to FLR (PF and VF). */
/** PCI access: enable atomic support from SIF (PF only). */
/** PCI access: setup for sparc memory layout (PF only). */
/* This is the portion of the descriptor which is updated by software. */
/* Info: Edge padding added (for endian convert) */
/* Index to completion elements added by SW. */
/*
* Descriptor entry for a completion queue. This entry is used to address
* into the completion queue and write the correct entries. This structure is
* the hardware updateable part of the CQ descriptor.
*/
/* cq_max_msg(32[0] bits)Maximum message size in bytes. */
/*
* Interrupt channel associated with the event queue. In the PSIF design the
* event queues are one to one with interrupt channel.
*/
/*
* Set by DSCR when CQ overrun async event is sent for this CQ. Not cleared
* before CQ is destroyed.
*/
/* Reserved */
/*
* Pre-fetch threshold (clog2) indicating when to read the software portion
* of the descriptor. If there are less entries than indicated by this
* threshold, the software portion of the descriptor must be read.
*/
/*
* EPS-A core number completions are forwarded to if the proxy_enabled bit is
* set.
*/
/*
* If set, this completion queue is proxy enabled and should send completions
* to EPS core indicated by the eps_core field.
*/
/*
* Log2 size of the completion queue. Maximum number of entries in the
* completion queue. This is used for calculating when to wrap the head and
* tail indexes.
*/
/* The descriptor is valid. */
/*
* CQ notification states. The use of these are as defined in the description
* of the PSIF interrupt coalsecing scheme.
*/
/* Do not evict this entry if this bit is set. */
/*
* VA or PA of the base of the completion queue. If PA the MMU context above
* will be a bypass context. Updated by software. The head and tail pointers
* can be calculated by the following calculations: Address = base_ptr +
* (head * ($bits(completion_entry_t)/8 ) Head Pointer and Tail Pointer will
* use the same MMU context as the base, and all need to be VA from one
* address space, or all need to be PA. In typical use, to allow direct user
* access to the head and tail pointer VAs are used.
*/
/*
* Completion queue sequence number. This is the sequence number to be used
* for this completion. When used by a client, it is incremented and written
* back to this descriptor.
*/
/* Index to completion elements to be consumed by HW. */
/*
* Union between CQ sequence number and immediate date. CQ sequence number is
* only valid for privileged QP requests.
*/
union psif_seq_num_immdt {
/*
* Completion queue sequence number for arming of completion queues. This is
* the CQ sequence number for the completion queue which was armed.
*/
/* ib_immediate(32[0] bits)Immediate Data */
struct psif_offload_info {
/* Reserved */
/*
* which is not written to memory.
*/
/*
* Receive Tossed Packet. PSIF thought there was something wrong with this
* offloaded packet so it should be tossed.
*/
/*
* header is added to one scatter element.
*/
/*
* in hdr_length.
*/
/* Inlined hdr_split : struct psif_hdr_split_offload (64 bits) */
/* This is set if the packet was a DR packet. Only valid if not privileged. */
/*
* Original UF for QP0/1 packets going to the EPS-C. Only valid if not
* privileged.
*/
/*
* checksum not generated by the transmitter. Only valid if not privileged.
*/
/*
* L3 checksum calculated ok. This is either an IPv6 packet or a correctly
* checksummed IPv4 header. Only valid if not privileged.
*/
/* L4 is UDP. */
/* L4 is TCP. */
/* Unsupported IPv6 extension headers detected. */
/* Packet is ARP reply */
/* Packet is ARP */
/* IPv4 options or IPv6 extension headers present. */
/* IP fragment. */
/* This is set for IPv6 packets only. */
/* This is set for IPv4 packets only. */
/* Inlined packet_classification_ip_class : struct psif_ip_class (64 bits) */
/*
* 0: means LLC_SNAP, 1: means Ethernet type 2. (L2 packet classification.)
* This field is applicable for EoIB only.
*/
/*
* Packet classification structure for offloading packets. Only valid if not
* privileged.
*/
/* Inlined packet_classification : struct psif_packet_classification (64 bits) */
/* RSS hash. Only valid if not privileged. */
/*
* Union - offload is valid for normal QPs. For privileged QPs, it is the WC
* ID needed to completed if outstanding is set.
*/
union psif_offload_wc_id {
/*
* This is used if this is a privileged commend INVALIDATE_SGL_CACHE.
* Software must figure out if this WC_ID is valid or not.
*/
/* This countain offload or PSIF specific infornation. */
/*
* Completion entry. A completion entry written to host memory, will be
* padded out to 64 bytes. The last 4 bytes will contain a completion queue
* sequence number.
*/
/*
* Work queue completion ID. For receive completions this is the entry number
* in the receive queue and the receive queue descriptor index. For send
* completions this is the sq_sequence number.
*/
/* ib_bth_qp_number(24[0] bits)Queue Pair */
/* Length of message. Only valid if not privileged. */
/* Only valid for UD QPs. */
/* RSS source. Only valid if not privileged. */
/*
* Checksum with error. This is not inverted for UDP if zero result from
* check. It can be either a full or partial checksum. Only valid if not
* privileged.
*/
/*
* Path bits (lower 7 bits) taken from the DLID in the received packet. This
* is only valid for UD QPs. Only valid if not privileged.
*/
/*
* SLID taken from the received packet. This is only valid for UD QPs. Only
* valid if not privileged.
*/
/* IB portnumber this packet was received on. Only valid if not privileged. */
/* Only valid for UD QPs. */
/* P-Key index from UD packet. */
/* Flags indicating GRH and immediate presence.Only valid if not privileged. */
/* Inlined wc_flags : struct psif_wc_flags (64 bits) */
/*
* For normal QPs, this is offload information. For privileged QPs, this is
* WC ID for in progress RQE.
*/
/* Padding out struct bulk */
/* sequence number for sanity checking */
/* Padding out struct last */
/* Generic CSR */
struct psif_csr_generic {
/* Compact Base Address Register format. Not for use in register definitions. */
/*
* clog2_extent used for entry alignment. This field used to calculate
* address for a particular entry. Address to an entry is calculated as
* follows: host_addr + entry_num*(1 (leftshift) clog2_extent)
*/
/* Manually added spacing to pad out base addr */
/* Number of entries in table. */
/* Retry data for one atomic request. Layout per BugZilla 3710 */
struct psif_atomic_retry_element {
/* [255:192] response atomic data */
/* [157:0] Padding. Always set to zero. */
/* [158] This atomic response was in error. */
/*
* [159] When set to one, entry has been used. When set to zero,
* no duplicate has been written in this entry.
*/
/* [183:160] psn */
/* [191:184] padding. always zero */
/*
* Data type for TSU_HOST_QP_BASE_ADDR - atomic replay scratch pad
* Layout as of 16 deep atomic queue - elements padded to 32 byte
*/
struct psif_atsp {
/*
* Address handle array entry used for sending UD packets. The structure
* contains information about the destination for a request.
*/
/* Inlined grh : struct psif_grh (192 bits) */
/* ib_lrh_lid(16[0] bits)Local ID */
/* gid_indx(1[0] bits)GID index indicating which of the UFs two GIDs are used. */
/* ib_lrh_sl(4[0] bits)Service Level */
/* Reserved */
/* ib_grh_hoplmt(8[0] bits)Hop Limit */
/* ib_grh_tclass(8[0] bits)Traffic Class */
/* ib_grh_flowl(20[0] bits)Flow Label */
/* Reserved */
/*
* The protection domain is checked against the protection domain in the QP
* state. As long as they are equal, the QP is allowed to use this AHA entry.
*/
/* ipd(8[0] bits)Inter packet delay. Encoded as specified in IB spec. */
/* Reserved */
/* ib_lrh_lid_path_bits(7[0] bits)Path bits for the LID. Used as the least signficant bits in a LID */
/* Reserved */
/* CSR automated type for TSU_IBPR_P{1,2}_EOIB_MAC1 */
/* Per vHCA + EPS-C ethernet MAC address register. */
struct psif_csr_ibpr_eoib_mac1 {
#endif /* _PSIF_HW_DATA_H_LE */