Patent ID: 7397800

Claim:
A method for handling out-of-order TCP segments, the method comprising: one or both of placing a first received TCP segment in a host buffer and/or having a mapping between a TCP sequence number and a corresponding buffer address; determining whether a second received TCP segment is one of an in-order TCP segment or an out-of-order TCP segment; if the second received TCP segment is an out-of-order TCP segment: storing control information associated with at least said second TCP segment locally on a network interface card (NIC); and placing said out-of-order TCP segment in a portion of said host buffer; recording at least a buffer address occupied by an end of said first received TCP segment on said NIC, said buffer being one or more of a TCP buffer, an ULP buffer and/or an application buffer; and if said second received TCP segment is an in-order TCP segment: placing said in-order TCP segment adjacent to said first received TCP segment in said host buffer; placing said in-order TCP segment starting from an address adjacent to said recorded address occupied by said end of said first received TCP segment in said host buffer; and one or both of: recording by said NIC, one or more of data indicating: an end buffer address occupied by an end of said in-order TCP segment; a start buffer address plus a length of a data portion of said in-order TCP segment; and a buffer address of a byte following an end of said in-order TCP segment; and storing on said NIC, control information associated with at least one of said indicating data.