Patent ID: 8392565

Claim:
A method for processing a packet, comprising: receiving from a network, at a network interface card (NIC), the packet for a first target, wherein the first target is one of a plurality of targets located on a host, and wherein the NIC is interposed between the host and the network; classifying the packet; sending the packet to a receive ring based on the classification, wherein the receive ring is one of a plurality of receive rings located on the NIC, and wherein each of the plurality of receive rings is associated with a different one of the plurality of targets; obtaining an identifier (ID) based on the classification, wherein the ID is associated with the first target, wherein the ID is associated with a first virtual memory allocation, wherein the first virtual memory allocation is allocated to the first target, wherein a second virtual memory allocation is allocated to a second target, wherein the first virtual memory allocation and the second virtual memory allocation are allocated from a virtual memory pool included in the host, and wherein the first virtual memory allocation and the second virtual memory allocation are allocated prior to receiving the packet; sending a request, based on classifying the packet, to allocate virtual memory on the host to the first target, wherein the request comprises the ID and a requested amount of virtual memory required to store the packet; determining, using the ID, whether allocating the requested amount of virtual memory would cause the first target to exceed the first virtual memory allocation; upon determining that allocating the requested amount of virtual memory would not cause the first target to exceed the first virtual memory allocation, then perform: allocating the virtual memory; storing the packet in the virtual memory on the host; and upon determining that allocating the requested amount of virtual memory would cause the first target to exceed the first virtual memory allocation, then perform: storing the packet in the receive ring until allocating the requested amount of virtual memory would not cause the first target to exceed the first virtual memory allocation.