NonStop S-Series Server Description Manual (G06.27+)
Input/Output Operations
HP NonStop S-Series Server Description Manual—520331-004
10-22
Typical Use of Queue Pairs
Typical Use of Queue Pairs
Figure 10-11 illustrates the typical way in which pairs of queues work. The illustration is
applicable to both transmission from the processor (TX) and reception by the
processor (RX). However, the application differs in the TX and RX cases, so they are
described separately in the following paragraphs. Be aware that all manipulation of the
queues is accomplished by calls to queue services. (See Figure 10-3 on page 10-7 for
orientation.) Also, it is queue services that updates the queue pointers as entries are
written in and are later released after being read and acted upon.
For the outbound queues (TX command queue or RX buffer queue), the module driver
manipulates the write pointer, and the controller manipulates the read pointer. For the
inbound queues (TX completion queue or RX indication queue), the controller
manipulates the write pointer, and the module driver manipulates the read pointer. For
the controller to write entries into queues, the controller uses a local copy of the
pointers and periodically pulls fresh copies to itself across ServerNet hardware.
In the case of a TX operation, the queues involved are the TX command queue for
outbound messages and the TX completion queue for inbound messages.
To begin the TX operation, the module driver, through queue services, writes a
command entry into TX command queue for some particular communications resource
(1). This new entry is designated in the figure with an x” Queue services updates the
write pointer to the next available entry. As the controller reads and acts upon prior
entries in its queue for this resource, it eventually comes upon the entry marked x (2).
(The write pointer has been advancing as other entries have been added and has
wrapped around the physical end of the queue.) The controller pulls the command
entry to itself, updates the TX command read pointer, and then typically enters into a
DMA transfer of the message data.
After the data transfer is completed, the controller writes an entry into the TX
completion queue (marked xx), describing the status of the data transfer (3). The
controller moves the write pointer of the TX completion queue. As the module driver
reads and acts upon prior entries in the TX completion queue, it eventually comes to
the xx entry and reads the status information it contains (4), and the I/O operation is
completed. Queue services advances the read pointer to eliminate the xx entry.
In the case of an RX operation, the queues involved are the RX buffers queue for
outbound messages and the RX indication queue for inbound messages. In this case,
the module driver has set up a buffer pool and begins the operation by writing an entry
into the RX buffers queue (1). This entry, marked x, describes the ServerNet
addresses and the lengths of the buffers in the pool. When the controller comes to the
x entry (2), it pulls the contents to itself and saves the information about the available
buffers.
At some later time, the controller receives some inbound message data. Without any
other preparation, the controller selects a buffer from the buffer pool and enters into a
DMA transfer of the message data. When the transfer is completed, the controller
writes an entry into the RX indication queue (3). This entry (xx) lets the monitor know
that data has been transferred into some particular buffer, specified by a ServerNet