A QP Is a Bi-Directional Message Transport Engine

QP Consists of Two Queues

Each CA implements a number of bi-directional message transport engines, each of which is referred to as a Queue Pair (QP). It is called a QP because it consists of a pair of queues:

  • Send Queue (SQ). See items J and R. Message transfer requests are posted to this queue by software. As each is executed, the SQ Logic transmits an outbound message transfer request to a remote QP's RQ Logic.

  • Receive Queue (RQ). See items H and S. Software posts Work Requests (WRs) to this queue to handle certain types of inbound message transfer requests transmitted to the RQ Logic by a remote QP's SQ Logic.

A CA Contains Multiple QPs

Although the illustration shows a single QP in each of the two CAs (H and J in one; R and S in the other), a CA will implement a minimum of several QPs, and as many as 16M (224) possible QPs, each of which is capable of sending messages to and receiving messages from one or more QPs in remote CAs.

Request and Response Packets

A QP's SQ Logic transmits a message transfer request to a remote QP's RQ Logic in a series of one or more request packets.

There are several different types of QPs. Depending on the type of QP, the remote QP's RQ Logic may respond to the receipt of a message transfer request by transmitting a series of one or more response packets back to the other QP's SQ Logic.

Packet Sequence Numbers

Each request packet generated by a QP's SQ Logic contains a PSN that identifies this request packet. Upon receipt of each request packet, a QP's RQ Logic verifies that the packet contains the next expected PSN (ePSN).

Each response packet generated by a QP's RQ Logic contains a PSN that associates it with a specific request packet that was received from the remote QP's SQ Logic. Upon receipt of each response packet, a QP's SQ Logic verifies that the packet's PSN is associated with a previously issued request.

Overview of QP Types

There are a number of different QP types that may be implemented in a CA. Because a QP is a message transport engine, the type of QP is referred to as the transport service type.

RC (Reliable Connected) QP
QP Setup

When it is set up by software, a RC QP is initialized with:

- The port number on the local CA through which it will send and receive all messages.

- The QP Number (QPN) that identifies the RC QP that it is married to in a remote CA.

- The port address of the remote CA port behind which the remote RC QP resides.

Private Comm Channel

The RC QP can only send messages to and receive messages from its companion RC QP in another CA.

Ack/Nak Protocol

The destination RC QP's RQ Logic is required to respond to each message request packet sent by the source QP's SQ Logic. The possible response types are:

- A positive Acknowledge (Ack) packet is returned to signal the successful receipt and processing of a Send or RDMA Write Request packet.

- A Negative Acknowledge (Nak) packet is returned to signal one of the following:

- A temporary Receiver Not Ready (RNR Nak) condition. Upon receipt of this type of Nak, the sending QP's SQ Logic may retry the transmission of the affected request packet repeatedly either until the request packet is successfully accepted and processed or until the sender's Retry Count is exhausted. An error is reported to the sender's software if the count is exhausted.

- A PSN Sequence Error Nak is returned if one or more missing packets are detected. Upon receipt of this type of Nak, the sending QP's SQ Logic rewinds its SQ Logic to the first missing packet and re-transmits from that point forward. It will repeatedly rewind and resend until either the missing request packet is received by the destination QP's RQ Logic or until its retry count is exhausted. An error is reported to the sender's software if the count is exhausted.

- A fatal Nak error code is returned if the destination QP's RQ Logic detects a fatal error either in a request packet or upon attempting to execute it. The operation is not retried and an error is reported to the sender's software.

- An RDMA Read Response packet is the appropriate response to an RDMA Read Request. The requested read data is returned in a series of one or more RDMA Read Response packets.

- An Atomic Response packet is the appropriate response to an Atomic Request packet. The requested read data is returned in a single Atomic response packet.

This service is referred to as “reliable” for the following reasons:

- The destination QP's RQ Logic verifies the PSN in each request packet to ensure that all of the message's request packets are received in order, that none are missing, and, if any duplicate request packets are received, that they are only processed once. There is one exception; upon receipt of a duplicate memory read, the data is read from memory again.

- The sending QP's SQ Logic verifies that the appropriate response is received for each request packet issued. In addition, upon receipt of either an RNR Nak or a PSN Sequence Error Nak, the SQ Logic automatically attempts recovery without involving software.

Bandwidth Use

Due to the generation of Acks and Naks, the RC protocol consumes a substantial amount of IBA bandwidth.

Message Length

Each message transferred can contain from 0 to 2GB of data.

RC CA Support Requirements

HCAs are required to support the RC QP type. It is optional whether or not a TCA implements the RC QP type.

UC (Unreliable Connected) QP
QP Setup

When it is set up by software, an UC QP is initialized with:

- The port number on the local CA through which it will send and receive all messages.

- The QP Number (QPN) that identifies the UC QP that it is married to in a remote CA.

- The port address of the remote CA port behind which the remote UC QP resides.

Private Comm Channel

The UC QP can only send messages to and receive messages from its companion UC QP in another CA.

No Ack/Nak Protocol

Unlike the RC service type, the remote QP's RQ Logic does not respond to each request packet with an Ack or Nak. The message sender therefore has no guarantee that all request packets of a message have been received correctly by the target QP's RQ Logic (hence, the term “unreliable”).

Bandwidth Use

Since the target QP's RQ Logic does not generate Acks and Naks, the UC protocol consumes significantly less IBA bandwidth than the RC protocol.

Message Length

Each message transferred can contain from 0 to 2GB of data.

UC CA Support Requirements

HCAs are required to support the UC QP type. It is optional whether or not a TCA implements the UC QP type.

RD (Reliable Datagram) QP
General

A RD QP can send messages to and receive messages from any number of RD QPs located in one or more other CAs. It does so through one or more “pipelines” that are established between the local CA and one or more remote CA(s). Each “pipeline” is referred to as a Reliable Datagram Channel (RDC) and acts as the conduit through which multiple local client RD QPs send messages to and receive messages from RD QPs residing in the remote CA. The QP sends the request packets that comprise a message transfer request to an RDC in its local CA. That RDC is programmed to send and receive all packets through a specific local CA port. The RDC is also programmed with the address of a port on the remote CA behind which the other end of the RDC resides, as well as the address of the other end of that RDC.

Multiple-Destination Comm Channel

The RD QP can send messages to and receive messages from multiple RD QPs residing in other CAs.

Ack/Nak Protocol

The RD QP transport service type uses the same Ack/Nak protocol as the RC type. It is therefore referred to as “reliable.”

Bandwidth Use

Due to the generation of Acks and Naks, the RD protocol consumes a substantial amount of IBA bandwidth.

Message Length

Each message transferred can contain from 0 to 2GB of data.

RD CA Support Requirements

It is optional whether or not HCAs and TCAs implement the RD QP type.

UD (Unreliable Datagram) QP
General

An UD QP can send messages to and receive messages from any number of UD QPs located in one or more other CAs. Unlike RD, no Ack or Nak is returned for each request packet received (hence, the term “unreliable”).

QP Bound To a Local CA Port

When it is set up by software, an UD QP is initialized with the port number on the local CA through which it will send and receive messages. It can therefore only send and receive messages with remote UD QPs that are reachable through that port.

Multiple-Destination Comm Channel

The UD QP can send messages to and receive messages from multiple UD QPs residing in other CAs.

No Ack/Nak Protocol

Unlike the RC and RD service types, the remote QP's RQ Logic does not respond to each request packet with an Ack or Nak. The message sender therefore has no guarantee that a request packet has been received correctly by the target QP's RQ Logic (hence, the term “unreliable”).

Bandwidth Use

Since the target QP's RQ Logic does not generate Acks and Naks, the UD protocol consumes significantly less IBA bandwidth than the RC and RD protocols.

Message Length

Each message transferred must fit in the data payload field of a single packet.

UD CA Support Requirements

HCAs are required to support the UD QP type. This includes general purpose UD QPs as well as the special UD QPs (QP0 and QP1) that are used to send and receive MADs. TCAs are required to support the special UD QPs (QP0 and QP1) that are used to send and receive MADs, but it is optional whether or not they support general-purpose UD QPs.

Raw QP

A Raw QP is used to send and receive message packets for a protocol other than IBA (e.g., IPv6 or Ethernet packets). The non-IBA packet encapsulates the non-IBA message within itself and permits the non-IBA message to be transported through the IBA fabric to its destination. Switches and routers are responsible for routing the encapsulated non-IBA packet to its ultimate destination.

How Many CA Ports Can a QP Be Associated With?

When initially set up by software, each QP is associated with only one local CA port. This QP/port association is established when software creates the QP.

How Many QPs Can Be Associated With One Port?

Multiple QPs and/or EECs (see “Reliable Datagram (RD) Service Type” on page 67) can be associated with each local CA port.

QP's SQ Logic Responsibilities

A QP's SQ Logic (item L or P) has the following basic responsibilities:

  • It processes message transfer requests (referred to as Work Requests, or WRs) that were posted to the SQ by software. Once a WR is posted to the SQ, it is referred to as a Work Queue Entry (WQE, or “wookie”). The WQEs are processed by the QP's SQ Logic one-at-a-time in the same order that they were posted.

  • It handles the transmission of message transfer request packets and, if the request packet recipient is expected to return Acknowledge packets (RC service type), the SQ Logic waits for the Ack packets and, upon receipt, verifies that they are in the correct order and do not indicate any errors.

  • It handles inbound RDMA Read response packets returning previously requested read data. The data is written to the CA's local memory using the address pointer contained in the SQ WQE specifying the RDMA Read message transfer.

  • It handles an inbound data item being returned in response to a previously issued Atomic RMW request. The data is written to the CA's local memory using the address pointer contained in the SQ WQE specifying the Atomic RMW message transfer.

QP's RQ Logic Responsibilities

A QP's RQ Logic (item K or Q) awaits incoming message transfer request packets sent by the remote QP's SQ Logic. A QP's RQ Logic has the following basic responsibilities:

  • Upon receipt of a request packet, the RQ Logic verifies that the PSN in the packet is the next expected PSN (ePSN).

  • Upon receipt of a request packet, if the request packet recipient is expected to return Acknowledge packets (RC service type), the RQ Logic sends an Ack packet back to the remote QP's SQ Logic. The Ack packet's PSN is the same as the PSN in the request packet being acknowledged.

  • If the request packet is a Send packet, the request packet's data payload is written to the CA's local memory (by the QP's RQ Logic; see item C or W) using the Scatter Buffer List specified in the RQ WQE currently at the top of the RQ (item H or S). Upon receipt of the last or only packet of a Send, the RQ Logic retires the top entry from the RQ. In addition, it posts a Completion Queue Entry (CQE, or cookie) to the Completion Queue (CQ; see item F or T) associated with the QP's RQ and, if the optional 32-bit immediate data value (more on this later) is present in the last or only request packet of the Send, the RQ Logic stores the immediate data value in the newly posted CQE.

  • If the request packet is an RDMA Write request packet, the request packet's data payload is written to the CA's local memory (by the QP's RQ Logic) using the address pointer supplied in the first request packet of that RDMA Write message transfer.

  • If the request packet is the last or only request packet of an RDMA Write message transfer, and, if the packet contains the optional 32-bit immediate data item, the RQ Logic retires the top entry from the RQ. In addition, it posts a Completion Queue Entry (CQE, or cookie) to the Completion Queue (CQ; see item F or T) associated with the QP's RQ and stores the immediate data value in the newly posted CQE.

  • If the request packet is an RDMA Read Request packet, the QP's RQ Logic reads the requested data from the area of its local memory indicated by the start memory address supplied in the RDMA Read request packet (the request packet also specifies how much data is to be read). The requested read data is supplied back to the remote QP's SQ Logic in a series of one or more RDMA Read response packets.

  • If the request packet is an atomic RMW request, the RQ Logic performs the operation on the local memory location specified in the packet and returns the data read from the location to the SQ Logic in the remote QP.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset