5562N/A * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. 7118N/A * Redistribution and use in source and binary forms, with or without 7118N/A * modification, are permitted provided that the following conditions are met: 5562N/A * 1. Redistributions of source code must retain the above copyright notice, 5562N/A * this list of conditions and the following disclaimer. 5562N/A * 2. Redistributions in binary form must reproduce the above copyright notice, 5562N/A * this list of conditions and the following disclaimer in the documentation 5562N/A * and/or other materials provided with the distribution. 5562N/A * 3. Neither the name of the copyright holder nor the names of its contributors 7118N/A * may be used to endorse or promote products derived from this software 7118N/A * without specific prior written permission. 5562N/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 7118N/A * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 7118N/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 7118N/A * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 7118N/A * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 7118N/A * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 7118N/A * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 7118N/A * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 7118N/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 7118N/A * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 5562N/A * cache. PSIF_WR_INVALIDATE_TLB: this is the address vector to invalidate in 5562N/A * Send queue sequence number. Used to map request to a particular work 5562N/A * request in the send queue. 5562N/A * QP sending this request. XXX: Should name be own_qp_num as defined in QP 5562N/A/* Completion notification identifier. */ 5562N/A * Checksum used for data protection and consistency between work request and 5562N/A * Index to where elements are added to the send queue by SW. SW is 5562N/A * responsibel for keeping track of how many entries there are in the send 5562N/A * queue. I.e. SW needs to keep track of the head_index so it doesn't 5562N/A * overwrite entries in the send queue which is not yet completed. 5562N/A * Send queue sequence number used by the SQS to maintain ordering and keep 5562N/A * track of where which send queue elements to fetch. This field is not in 5562N/A * sync with the field in qp_t. This number is typically a little bit before 5562N/A * the number in the qp_t as SQS has to fetch the elements from host memory. 5562N/A * This is also used as tail_index when checking if there are more elements 5562N/A/* QP and UF to be processed next. */ 5562N/A * This bit is set through the doorbell. SW should check this bit plus 5562N/A * psif_next = null to ensure SW can own the SQ descriptor. 5562N/A/* Software modified index pointing to the tail reecive entry in host memory. */ 5562N/A * Hardware modified index pointing to the head of the receive queue. TSU is 5562N/A * using this to find the address of the receive queue entry. 5562N/A/* The desciptor is valid. */ 5562N/A * Receive queue entry ID. This is added to the receive completion using this 5562N/A * This retry tag is the one used by tsu_rqs and added to the packets sent to 5562N/A * tsu_dma. It is the responsibility of tsu_rqs to update this retry tag 5562N/A * whenever the sq_sequence_number in QP state is equal to the one in the 5562N/A * This retry tag is updated by the error block when an error occur. If 5562N/A * tsu_rqs reads this retry tag and it is different than the 5562N/A * retry_tag_comitted, tsu_rqs must update retry_tag_comitted to the value of 5562N/A * retry_tag_err when the sq_sequence_number indicates this is the valid 5562N/A * request. The sq_sequence_number has been updated by tsu_err at the same 5562N/A * time the retry_tag_err is updated. 5562N/A * Error retry counter initial value. Read by tsu_dma and used by tsu_cmpl to 5562N/A * calculate exp_backoff etc.. 5562N/A * Retry counter associated with retries to received NAK or implied NAK. If 5562N/A * it expires, a path migration will be attempted if it is armed, or the QP 5562N/A * will go to error state. Read by tsu_dma and used by tsu_cmpl. 5562N/A/* A hit in the set locally spun out of tsu_cmpl is found. */ 5562N/A * Minium RNR NAK timeout. This is added to RNR NAK packets and the requester 5562N/A * receiving the RNR NAK must wait until the timer has expired before the 5562N/A/* QP number for the remote node. */ 5562N/A * Magic number used to verify use of QP state. This is done by calculating a 5562N/A * checksum of the work request incorporating the magic number. This checksum 5562N/A * is checked against the checksum in the work request. 5562N/A * Q-Key received in incoming IB packet is checked towards this Q-Key. Q-Key 5562N/A * used on transmit if top bit of Q-Key in WR is set. 5562N/A * Sequence number of the last ACK received. Read and written by tsu_cmpl. 5562N/A * Used to verify that the received response packet is a valid response. 5562N/A/* Index to scatter element of in progress SEND. */ 5562N/A * Expected packet sequence number: Sequence number on next expected packet. 5562N/A * TSU quality of service level. Can take values indicating low latency and 5562N/A * high throughput. This is equivalent to high/low BAR when writing doorbells 5562N/A * to PSIF. The qosl bit in the doorbell request must match this bit in the 5562N/A * QP state, otherwise the QP must be put in error. This check only applies 5562N/A * Migration state (migrated, re-arm and armed). Since path migration is 5562N/A * handled by tsu_qps, this is controlled by tsu_qps. XXX: Should error 5562N/A * handler also be able to change the path? 5562N/A/* This is an IB over IB QP. */ 5562N/A/* IB defined capability enable for receiving Atomic operations. */ 5562N/A/* IB defined capability enable for receiving RDMA WR. */ 5562N/A/* IB defined capability enable for receiving RDMA RD. */ 5562N/A * Transmit packet sequence number. Read and updated by tsu_dma before 5562N/A * sending packets to tsu_ibpb and tsu_cmpl. 5562N/A * TSU Service Level used to decide the TSU VL for requests associated with 5562N/A * Maximum number of outstanding read or atomic requests allowed by the 5562N/A * remote HCA. Initialized by software. 5562N/A/* Send Queue RNR retry count initialization value. */ 5562N/A * Retry counter associated with RNR NAK retries. If it expires, a path 5562N/A * migration will be attempted if it is armed, or the QP will go to error 5562N/A * When set, RQS should only check that the orig_checksum is equal to magic 5562N/A * number. When not set, RQS should perform the checksum check towards the 5562N/A * Transport type of the QP (RC, UC, UD, XRC, MANSP1). MANSP1 is set for 7118N/A * This is an index to completion queue descriptor. The descriptor points to 7118N/A * a receive completion queue, which may or may not be the same as the send 7118N/A * completion queue. For XRC QPs, this field is written by the CQ descriptor 7118N/A * received by the XRCSRQ on the first packet. This way we don't need to look 7118N/A * up the XRCSRQ for every packet. of the message. 5562N/A * Number of bytes received of in progress RDMA Write or SEND. The data 5562N/A * received for SENDs and RDMA WR w/Imm are needed for completions. This 5562N/A * should be added to the msg_length. 5562N/A/* This QP is running IP over IB. */ 5562N/A * Combined 'Last Received MSN' and 'Last Outstanding MSN', used to maintain 5562N/A * 'spin set floor' and indicate 'all retries completed', respectively. 5562N/A/* This PSN is committed - ACKs sent will contain this PSN. */ 5562N/A * Message sequence number used in AETH when sending ACKs. The number is 5562N/A * incremented every time a new inbound message is processed. 5562N/A * This is an index to send completion queue descriptor. The descriptor 5562N/A * points to a send completion queue, which may or may not be the same as the 5562N/A * Committed MSN - the MSN of the newest committed request for this QP. Only 5562N/A * the bottom 16 bits of the MSN is used. 5562N/A * This is the LID path bits. This is used by tsu_ibpb when generating the 5562N/A * SLID in the packet, and it is used by tsu_rcv when checking the DLID. 5562N/A/* L-key state for this DMA validation entry */ 5562N/A/* R-key state for this DMA validation entry */ 5562N/A/* Length of memory region this validation entry is associated with. */ 5562N/A/* sequence number for sanity checking */ 5562N/A/* enum psif_epsc_csr_opcode from request */ 5562N/A/* Sequence number from request */ 5562N/A/* Sequence number - included in response */ 5562N/A/* Index to completion elements added by SW. */ 5562N/A * EPS-A core number completions are forwarded to if the proxy_enabled bit is 5562N/A * If set, this completion queue is proxy enabled and should send completions 5562N/A * to EPS core indicated by the eps_core field. 5562N/A/* The descriptor is valid. */ 5562N/A * VA or PA of the base of the completion queue. If PA the MMU context above 5562N/A * will be a bypass context. Updated by software. The head and tail pointers 5562N/A * can be calculated by the following calculations: Address = base_ptr + 5562N/A * (head * ($bits(completion_entry_t)/8 ) Head Pointer and Tail Pointer will 5562N/A * use the same MMU context as the base, and all need to be VA from one 5562N/A * address space, or all need to be PA. In typical use, to allow direct user 5562N/A * access to the head and tail pointer VAs are used. 5562N/A/* Index to completion elements to be consumed by HW. */ 5562N/A * Work queue completion ID. For receive completions this is the entry number 5562N/A * in the receive queue and the receive queue descriptor index. For send 5562N/A * completions this is the sq_sequence number. 5562N/A/* sequence number for sanity checking */ 5562N/A#
endif /* _PSIF_HW_MACRO_H */