Patent ID: 7689702

Claim:
A method of processing a network connection in a computer system, comprising: establishing the network connection by a software network protocol stack implemented in a kernel of an operating system associated with the computer system, wherein the kernel maintains kernel-level connection state information for the network connection, and wherein a socket layer maintains socket layer-level connection state information for the network connection; determining whether to offload the network connection from the software network protocol stack to a hardware network protocol stack implemented in a TCP Offload Engine (TOE)-capable network interface card operatively connected to the computer system; transferring the network connection from the software network protocol stack to the hardware network protocol stack using a network interface card driver comprises: obtaining, by the network interface card driver for the software network protocol stack, a hardware connection identifier maintained by the network interface card in association with hardware-level connection state information for the network connection, wherein the software network protocol stack is configured to use the hardware connection identifier to obtain hardware-level connection state information for the network connection; and obtaining, by the network interface card driver for the hardware network protocol stack, a reference to socket layer-level connection state information and a reference to kernel-level connection state information, wherein the hardware network protocol stack is configured to use the references to create mappings from the hardware connection identifier to both socket layer-level connection state information and kernel-level connection state information, wherein the hardware network protocol stack is further configured to use the mappings to obtain kernel-level connection state information and socket layer-level connection state information for the network connection, when it is determined to offload the network connection from the software network protocol stack to the hardware network protocol stack; and determining to accept the transfer of the network connection at the hardware network protocol stack based on a processing capability of the hardware network protocol stack, wherein the network interface card maintains hardware-level connection state information for the network connection, and wherein after the hardware network protocol stack accepts transfer of the network connection, the software network protocol stack is configured to continually reference hardware-level connection state information and the hardware network protocol stack is configured to continually reference kernel-level connection state information and socket layer-level connection state information.