Adaptec 1737100 Programmer Manual - Page 169
Two Receive Queues, Receive Producer/Consumer Model, Receive Polling Model, Receive Initialization
![]() |
UPC - 760884136362
View all Adaptec 1737100 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 169 highlights
Sample Driver Two Receive Queues The AIC-6915 offers the ability to use two Receive Completion Descriptors Queues and two Receive Buffer Descriptor Queues. Two Receive Buffer Descriptor Queues are selected through the RXDESCQUEUE2CTRL register. There is a corresponding register, RXCOMPLETIONQUEUE2CTRL, if two receive completion queues are used. Use of two completion queues does not dictate the use of two receive descriptor queues, and vice versa. If a single completion queue is used with two buffer queues, the completion queue points to the buffer queue for each received packet through the BUFFERQUEUE bit in the STATUS1 field in the Receive Completion Descriptor. There are several options available for the use of two receive descriptor queues. Incoming frames are sorted based on the criteria selected in the driver, and are placed in the appropriate receive queue. The developer may choose among the criteria of sorting based on size, VLAN priority, or on priority as defined in the Perfect Addressing table. Receive Producer/Consumer Model There are two different receive models available in the AIC-6915. One option is to use a producer-consumer model to manage receive resources. In this case, the software is the producer of Receive Buffer Descriptors, since it makes the receive buffer resource available at initialization time and also again after processing each receive interrupt. The driver writes an updated value to the RXDESCQ1PRODUCER field in the RXDESCQUEUE1PTRS register following receive processing. The AIC-6915 is then the consumer of Receive Buffer Descriptors, as it uses the buffer resources provided by the driver. The AIC-6915 writes entries to the Receive Completion Descriptor Queue, and is therefore the producer of Receive Completion Descriptors. The software is the consumer in this case. It is responsible for writing the RXCOMPLETIONQ1CONSUMERINDEX field in register COMPLETIONQUEUE1CONSUMERINDEX. Receive Polling Model The software developer may choose to implement the polling model instead of the producer-consumer model for receive buffers. In this model, the AIC-6915 does not rely on the producer index to determine that a buffer descriptor is available. Instead, the VALID bit in the next Receive Buffer Descriptor is examined. If the VALID bit is set, AIC-6915 uses the descriptor. The software manages the setting of the VALID bit after processing receive complete interrupts. The END bit in the Receive Buffer Descriptor indicates the last descriptor in the list, and must be set by the driver when using the polling model. Receive Completion Descriptors are handled in a manner identical to that used in the producer-consumer model. Receive Initialization There are several registers which must be defined before the AIC-6915 can begin to receive packets. These registers and the fields which must be initialized in the driver are summarized below for the case of 32-bit addressing. Control bit fields which require initialization are described. Register bits which are not explicitly described here may be left at the default reset value. The developer must determine if these default values need to be modified for the driver under development. These registers may be initialized in any order. Refer to Chapter 7 for more detailed information on these registers. 8-9
![](/manual_guide/products/adaptec-1737100-programmer-manual-d6d6d7d/169.png)