Patent ID: 7522623

Claim:
A method for intermediate storage of incoming iSCSI protocol data units (“PDUs”) received by an adapter coupled to a host system with a host system memory and a network system, comprising: (a) receiving an incoming PDU from the network system, wherein the received PDU includes a command and data, and the received PDU is initially stored in a local memory for the adapter and processed by a processor dedicated for handling the iSCSI PDU; (b) comparing an incoming PDU size with a size of a small buffer from among a plurality of small buffers of a small buffer pool; wherein the small buffer pool is maintained by a direct memory access (DMA) engine that manages a DMA channel for transferring the PDU to the host system memory and the DMA engine compares the PDU size with the size of the small buffer; (c) before transferring the PDU to the host system memory, placing the incoming PDU in the small buffer if the PDU fits in the small buffer; (d) if the PDU does not fit the small buffer in step (b), determining if the incoming PDU will fit in a large buffer from among a plurality of large buffers of a large buffer pool; wherein the large buffer pool is maintained by the DMA engine that determines if the PDU will fit in the large buffer; (e) before transferring the PDU to the host system memory, placing the incoming PDU in the large buffer if the incoming PDU will fit in the large buffer as determined in step (d); (f) placing the incoming PDU in more than one large buffer, if the incoming PDU size is greater than a large buffer, as determined in step (d); (g) creating a pointer to a list of large buffers that are used to store the PDU in step (f); wherein the pointer is stored in the small buffer from the small buffer pool; and notifying the host system whether the small buffer in step (c), the large buffer in step (e), or the more than one large buffer in step (f) is used for intermediate storage.