# US 8,990,422 B1 · TCP segmentation offload (TSO) using a hybrid approach of manipulating memory pointers and actual packet data

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 8,990,422 B1
- Document ID: US8990422B1
- Status: Granted
- Kind: B1
- Application number: 13/165,768
- Filed: 2011-06-21
- Granted: 2015-03-24
- Earliest claimed: 2011-06-21
- Assignees: NetLogic Microsystems, Inc.
- Applicants: Ozair Usmani; Kaushik Kuila
- Inventors: Ozair Usmani; Kaushik Kuila
- Web page: https://patentgrep.com/patent/US8990422B1

## CPC

- H04L 69/166: IP fragmentation; TCP segmentation
- H04L 49/9042: {Separate storage for different parts of the packet, e.g. header and payload}
- H04L 69/321: Interlayer communication protocols or service data unit [SDU] definitions; Interfaces between layers
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Systems, apparatusses, and methods are disclosed for transmission control protocol (TCP) segmentation offload (TSO). A hardware TSO engine is capable of handling segmentation of data packets and consequent header field mutation of hundreds of flows simultaneously. The TSO engine generates data pointers in order to “cut up” the payload data of a data packet, thereby creating multiple TCP segments. Once the data of the data packet has been fetched, the TSO engine “packs” the potentially-scattered chunks of data into TCP segments, and recalculates each TCP segment's internet protocol (IP) length, IP identification (ID), IP checksum, TCP sequence number, and TCP checksum, as well as modifies the TCP flags. The TSO engine is able to rapidly switch contexts, and share the control logic amongst all flows.

## Claims

### Claim 1

A method for transmission control protocol (TCP) segmentation offload (TSO), the method comprising:
generating descriptors for a data packet to be segmented into two or more TCP segments;
generating pseudo descriptors according to the descriptors;
accessing memory according to the pseudo descriptors to retrieve data related to the data packet; and
building the TCP segments according to the pseudo descriptors,
wherein the descriptors comprise a first descriptor that points to data and a second descriptor that describes an operation to perform on the data pointed to by the first descriptor.

### Claim 2 (depends on 1)

The method for TSO of claim 1, wherein the method further comprises sending the descriptors to a TSO engine, which is configured to perform the generating pseudo descriptors according to the descriptors, the accessing memory according to the pseudo descriptors to retrieve data related to the data packet, and the building the TCP segments according to the pseudo descriptors.

### Claim 3 (depends on 1)

The method for TSO of claim 1, wherein the second descriptor is a micro-struct descriptor.

### Claim 4 (depends on 3)

The method for TSO of claim 3, wherein the micro-struct descriptor includes parameters relating to calculating for at least one of the TCP segments at least one of an internet protocol (IP) length, an IP identification (ID), an IP checksum, a TCP sequence number, or a TCP checksum.

### Claim 5 (depends on 1)

The method for TSO of claim 1, wherein the first descriptor is a pointer-to-data descriptor that points to a contiguous block of data in the memory.

### Claim 6 (depends on 5)

The method for TSO of claim 5, wherein the pointer-to-data descriptor includes an address relating to the contiguous block of data and a length relating to the contiguous block of data.

### Claim 7 (depends on 1)

The method for TSO of claim 1, wherein the descriptors further comprise a third descriptor that is a pointer-to-data end-of-packet (EOP) descriptor that points to a contiguous block of data in the memory, wherein a last byte of the contiguous block of data is also a last byte of the data packet.

### Claim 8 (depends on 7)

The method for TSO of claim 7, wherein the pointer-to-data EOP descriptor includes an address relating to the contiguous block of data and a length relating to the contiguous block of data.

### Claim 9 (depends on 1)

The method for TSO of claim 1, wherein at least one pseudo descriptor is a header pseudo-descriptor (DH) that relates to a header of each of the TCP segments.

### Claim 10 (depends on 9)

The method for TSO of claim 9, wherein the DH includes an address relating to a contiguous block of data and a length relating to the contiguous block of data.

### Claim 11 (depends on 1)

The method for TSO of claim 1, wherein at least one pseudo descriptor is a payload pseudo-descriptor (DP) that relates to at least a portion of payload data of at least one of the TCP segments.

### Claim 12 (depends on 11)

The method for TSO of claim 11, wherein the DP includes an address relating to a contiguous block of data and a length relating to the contiguous block of data.

### Claim 13 (depends on 1)

The method for TSO of claim 1, wherein payload data of each of the TCP segments is one of a size equal to a maximum segment size (MSS) and a size less than the MSS.

### Claim 14 (depends on 13)

The method for TSO of claim 13, wherein the MSS corresponds to the largest amount of the payload data that can be encapsulated by a header of one of the TCP segments.

### Claim 15 (depends on 1)

The method for TSO of claim 1, wherein the TSO engine is implemented by hardware.

### Claim 16 (depends on 1)

The method for TSO of claim 1, further comprising:
forwarding the descriptors to one or more free descriptor queues.

### Claim 17 (depends on 1)

The method for TSO of claim 1, wherein the descriptors further comprise a third descriptor that is a pointer-to-list-of-pointers descriptor.

### Claim 18

A system for transmission control protocol (TCP) segmentation offload (TSO), the system comprising:
a processor configured to generate descriptors for a data packet to be segmented into two or more TCP segments; and
a TSO engine configured to read the descriptors, generate pseudo descriptors according to the descriptors, access memory according to the pseudo descriptors to retrieve data related to the data packet, and build the TCP segments according to the pseudo descriptors,
wherein the descriptors comprise a first descriptor that points to data and a second descriptor that describes an operation to perform on the data pointed to by the first descriptor.

### Claim 19 (depends on 18)

The system for TSO of claim 18, wherein the second descriptor is a micro-struct descriptor.

### Claim 20 (depends on 19)

The system for TSO of claim 19, wherein the micro-struct descriptor includes parameters relating to calculating for at least one of the TCP segments at least one of an internet protocol (IP) length, an Identification (ID), an IP checksum, a TCP sequence number, and a TCP checksum.

### Claim 21 (depends on 18)

The system for TSO of claim 18, wherein the first descriptor is a pointer-to-data descriptor that points to a contiguous block of data in the memory.

### Claim 22 (depends on 21)

The system for TSO of claim 21, wherein the pointer-to-data descriptor includes an address relating to the contiguous block of data and a length relating to the contiguous block of data.

### Claim 23 (depends on 18)

The system for TSO of claim 18, wherein the descriptors further comprise a third descriptor that is a pointer-to-data end-of-packet (EOP) descriptor that points to a contiguous block of data in the memory, wherein a last byte of the contiguous block of data is also a last byte of the data packet.

### Claim 24 (depends on 23)

The system for TSO of claim 23, wherein the pointer-to-data EOP descriptor includes an address relating to the contiguous block of data and a length relating to the contiguous block of data.

### Claim 25 (depends on 18)

The system for TSO of claim 18, wherein at least one pseudo descriptor is a header pseudo-descriptor (DH) that relates to a header of at least one of the TCP segments.

### Claim 26 (depends on 25)

The system for TSO of claim 25, wherein the DH includes an address relating to the contiguous block of data and a length relating to the contiguous block of data.

### Claim 27 (depends on 18)

The system for TSO of claim 18, wherein at least one pseudo descriptor is a payload pseudo-descriptor (DP) that relates to at least a portion of payload data of at least one of the TCP segments.

### Claim 28 (depends on 27)

The system for TSO of claim 27, wherein the DP includes an address relating to a contiguous block of data and a length relating to the contiguous block of data.

### Claim 29 (depends on 18)

The system for TSO of claim 18, wherein payload data of each of the TCP segments is one of a size equal to a maximum segment size (MSS) and a size less than the MSS.

### Claim 30 (depends on 29)

The system for TSO of claim 29, wherein the MSS corresponds to the largest amount of the payload data that can be encapsulated by a header of one of the TCP segments.

### Claim 31 (depends on 18)

The system for TSO of claim 18, wherein the TSO engine is implemented by hardware.

### Claim 32 (depends on 18)

The system for TSO of claim 18, further comprising:
one or more free descriptor queues, wherein the TSO engine is further configured to forward the descriptors to the one or more free descriptor queues.

### Claim 33 (depends on 18)

The system for TSO of claim 18, wherein the descriptors further comprise a third descriptor that is a pointer-to-list-of-pointers descriptor.

### Claim 34

A system comprising:
a free descriptor queue configured to store free descriptors;
a packet egress subsystem configured to receive a transmit packet descriptor, generate a pseudo descriptor based on the transmit packet descriptor, generate a TCP segment based on the pseudo descriptor, and forward the transmit packet descriptor to the free descriptor queue; and
a packet ingress subsystem configured to process an incoming data packet, fetch a free descriptor from the free descriptor queue, and generate a receive packet descriptor that indicates a location in memory of data related to the incoming data packet.

### Claim 35 (depends on 34)

The system of claim 34, further comprising:
a packet ordering engine communicatively coupled to the packet egress subsystem, and configured to forward the transmit packet descriptor to the packet egress subsystem.

### Claim 36 (depends on 34)

The system of claim 34, wherein the packet egress subsystem comprises a TCP segmentation offload engine configured to generate the TCP segment.

### Claim 37 (depends on 34)

The system of claim 34, wherein the packet ingress subsystem comprises a parser configured to parse the incoming data packet.

### Claim 38 (depends on 34)

The system of claim 34, wherein the packet ingress subsystem is further configured to forward the received packet descriptor to a packet ordering engine.

### Claim 39 (depends on 34)

The system of claim 34, further comprising:
an ingress port, communicatively coupled to the packet ingress subsystem, and configured to receive an incoming data packet; and
an egress port, communicatively coupled to the packet egress subsystem, and configured to transmit an outgoing data packet that includes the TCP segment.

### Claim 40 (depends on 34)

The system of claim 34, further comprising:
a memory system, communicatively coupled to the packet egress subsystem, and configured to store data used to generate the TCP segment.

### Claim 41 (depends on 34)

The system of claim 34, wherein the free descriptor queue is configured to store descriptors that are available for use by the packet ingress subsystem.
