Patent ID: 7729368

Claim:
A method of processing packets by a network stack, the method comprising: receiving a request packet from a client via a network; allocating a network buffer for the request packet and copying the request packet into the network buffer; giving an indication that the request packet is ready for reading by an application; and retaining the network buffer in a buffer cache until response data associated with the request packet is received from the application; re-using the retained network buffer by copying the response data into the retained network buffer; and freeing the network buffer after copying the response data therein and sending the response data: wherein the request packet and the response data are each associated with a transaction identifier and the method further comprises associating the retained network buffer with the transaction identifier, and wherein the re-using step comprises selecting the retained buffer from the buffer cache based on a match between the transaction identifier associated with the request packet, the transaction identifier associated with the response data and the transaction identifier associated with the retained buffer.