摘要 |
<p>The present invention provides a method and an apparatus for transferring data between a computer system (190) and a network interface card (195) that avoids virtual-to-physical address translations. The computer system (190) allocates blocks of memory (180) during system initialization for storing data in transit between the computer system (190) and the NIC (195), and the physical addresses of the blocks of memory (180) are stored in a table (105) on the NIC (195). Consequently, address conversion is performed only once, when the memory (180) is allocated. When a request to transfer data to the NIC (195) is received from the upper layers, the device driver copies the data from the upper layers into the next available memory block. The device driver then formats a command and passes into the NIC (195) for processing. Data transfer commands are communicated to the NIC (195) through a packet descriptor command (PDC), which is a 32-bit value subdivided into fields that completely describe the data transfer operation. The PDC contains a small ordinal value that indexes a table (105) in the NIC (195), which includes a set of physical addresses of buffers (182) preallocated by the computer system (190) in the computer system memory (180). These buffers (182) are used for storing data in transit to the NIC (195). The present invention also allows for multiple packets to be formatted into buffers and then subsequently transferred to the NIC (195) in a single I/O operation.</p> |