Claims
- 1. A method for managing a queue, comprising:
generating a queue tail index in the channel interface; generating a queue head index for the queue in a host channel adapter; generating a queue entry count for the queue in the host channel adapter; and controlling the queue using the head index, the tail index, and the queue entry count.
- 2. The method of claim 1, wherein the queue is a work queue, and wherein the queue entry count is used to determine if the work queue is full.
- 3. The method of claim 1, wherein the queue is a work queue, and wherein the queue tail index is used to determine a position in the work queue where a work queue entry may be written by the channel interface.
- 4. The method of claim 1, wherein the queue is a work queue, and wherein the queue head index is used to determine a work queue entry to be processed by the host channel adapter.
- 5. The method of claim 1, wherein the queue is a work queue, and wherein the queue entry count is used to determine if the work queue is empty.
- 6. The method of claim 1, wherein the queue head index is comprised of a queue pointer table index and a queue page index.
- 7. The method of claim 1, wherein the queue is a work queue, and wherein controlling the queue includes:
determining whether the work queue is full; and accepting a work request if the work queue is not full.
- 8. The method of claim 7, wherein accepting the work request includes:
writing a work queue entry corresponding to the work request in a position of the work queue identified by the queue tail pointer; incrementing the queue tail pointer; and incrementing the queue entry count.
- 9. The method of claim 8, wherein updating the queue entry count is not performed for every increment of the queue tail pointer.
- 10. The method of claim 1, wherein the queue is a work queue, and wherein controlling the queue includes:
determining whether the work queue is empty; processing, in the host channel adapter, a work queue entry corresponding to the queue head index if the work queue is not empty; and posting a completion queue entry to a completion queue after processing of the work queue entry is complete.
- 11. A method for managing a queue, comprising:
generating a queue head index for the queue in a channel interface; generating a queue tail index for the queue in a host channel adapter; generating a free queue entry count for the queue in the host channel adapter; and controlling the queue using the head index, the tail index, and the free queue entry count.
- 12. The method of claim 11, wherein the queue is a completion queue, and wherein the queue head index is used to identify a completion queue entry to be processed by the channel interface.
- 13. The method of claim 11, wherein the queue is a completion queue, and wherein the free queue entry count is used to determine if the completion queue is empty.
- 14. The method of claim 11, wherein the queue is a completion queue, and wherein the free queue entry count is used to determine if the completion queue is full.
- 15. The method of claim 11, wherein the queue is a completion queue, and wherein the queue tail index is used to identify a position in the completion queue where a completion queue entry may be written.
- 16. The method of claim 11, wherein the queue tail index is comprised of a queue pointer table index and a queue page index.
- 17. The method of claim 11, wherein the queue is a completion queue, and wherein controlling the queue includes:
determining whether the completion queue is full; and writing a completion queue entry to a position of the completion queue identified by the queue tail index if the completion queue is not full.
- 18. The method of claim 17, wherein the queue is a completion queue, and wherein controlling the queue includes:
determining whether the completion queue is empty; and processing a completion queue entry identified by the queue head index if the completion queue is not empty.
- 19. A computer program product, in a computer readable medium, for managing a queue, comprising:
instructions for generating a queue tail index in the channel interface; instructions for generating a queue head index for the queue in a host channel adapter; instructions for generating a queue entry count for the queue in the host channel adapter; and instructions for controlling the queue using the head index, the tail index, and the queue entry count.
- 20. The computer program product of claim 19, wherein the queue is a work queue, and wherein the queue entry count is used to determine if the work queue is full.
- 21. The computer program product of claim 19, wherein the queue is a work queue, and wherein the queue entry count is used to determine if the work queue is empty.
- 22. The computer program product of claim 19, wherein the queue is a work queue, and wherein the instructions for controlling the queue include:
instructions for determining whether the work queue is full; and instructions for accepting a work request if the work queue is not full.
- 23. The computer program product of claim 22, wherein the instructions for accepting the work request include:
instructions for writing a work queue entry corresponding to the work request in a position of the work queue identified by the queue tail pointer; instructions for incrementing the queue tail pointer; and instructions for incrementing the queue entry count.
- 24. The computer program product of claim 23, wherein the queue entry count is not updated for every increment of the queue tail pointer.
- 25. The computer program product of claim 19, wherein the queue is a work queue, and wherein the instructions for controlling the queue include:
instructions for determining whether the work queue is empty; instructions for processing, in the host channel adapter, a work queue entry corresponding to the queue head index if the work queue is not empty; and instructions for posting a completion queue entry to a completion queue after processing of the work queue entry is complete.
- 26. A computer program product, in a computer readable medium, for managing a queue, comprising:
instructions for generating a queue head index for the queue in a channel interface; instructions for generating a queue head index for the queue in a host channel adapter; instructions for generating a free queue entry count for the queue in the host channel adapter; and instructions for controlling the queue using the head index, the tail index, and the free queue entry count.
- 27. The computer program product of claim 26, wherein the queue is a completion queue, and wherein the free queue entry count is used to determine if the completion queue is empty.
- 28. The computer program product of claim 26, wherein the queue is a completion queue, and wherein the free queue entry count is used to determine if the completion queue is full.
- 29. The computer program product of claim 26, wherein the queue is a completion queue, and wherein the instructions for controlling the queue include:
instructions for determining whether the completion queue is full; and instructions for writing a completion queue entry to a position of the completion queue identified by the queue tail index if the completion queue is not full.
- 30. The computer program product of claim 29, wherein the queue is a completion queue, and wherein the instructions for controlling the queue include:
instructions for determining whether the completion queue is empty; and instructions for processing a completion queue entry identified by the queue head index if the completion queue is not empty.
- 31. An apparatus for managing a work queue, comprising:
a channel interface; and a host channel adapter coupled to the channel interface, wherein the channel interface includes a queue tail index for the queue, the host channel adapter includes a queue head index for the queue and a queue entry count for the queue, and wherein the host channel adapter and channel interface manage the queue using the head index, the tail index, and the queue entry count.
- 32. An apparatus for managing a completion queue, comprising:
a channel interface; and a host channel adapter coupled to the channel interface, wherein the channel interface includes a queue head index for the queue, the host channel adapter includes a queue tail index for the queue and a queue entry count for the queue, and wherein the host channel adapter and channel interface manage the queue using the head index, the tail index, and the queue entry count.
RELATED APPLICATIONS
[0001] The present application is related to commonly assigned and co-pending U.S. patent application Ser. No. ______ (Attorney Docket No. AUS920010479US1) entitled “APPARATUS AND METHOD FOR MANAGING WORK AND COMPLETION QUEUES USING HEAD AND TAIL POINTERS”, filed on ______, and U.S. patent application Ser. No. ______ (Attorney Docket No. AUS920010478US1) entitled “INFINIBAND WORK AND COMPLETION QUEUE MANAGEMENT VIA HEAD AND TAIL CIRCULAR BUFFERS WITH INDIRECT WORK QUEUE ENTRIES”, filed on an even date herewith, and hereby incorporated by reference.