# US 2006/0187963 A1 · Method for sharing single data buffer by several packets

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

- Number: US 2006/0187963 A1
- Document ID: US20060187963A1
- Status: Published application
- Kind: A1
- Application number: 11/062,036
- Filed: 2005-02-18
- Published: 2006-08-24
- Earliest claimed: 2005-02-18
- Assignees: International Business Machines Corporation
- Inventors: Claude Basso; Jean Calvignac; Chih-jen Chang; Fabrice Verplanken
- Web page: https://patentgrep.com/patent/US20060187963A1

## CPC

- H04L 49/901: using storage descriptor, e.g. read or write pointers
- H04L 49/90: Buffering arrangements
- H04L 49/9021: {Plurality of buffers per packet}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Methods, computer readable programs and network processor systems appropriate for IP fragmentation and reassembly on network processors comprising a plurality of buffers and buffer control blocks, the buffer control blocks comprising a buffer usage field, the buffer usage field having a value set responsive to a quantity of frame data fragments, wherein the network processor system associates a buffer control block with each buffer and frees a first buffer after reading a frame data fragment responsive to the first buffer control block buffer usage field value indicating only one frame data fragment is present in the first buffer.

## Claims

### Claim 1

A method of sharing data buffers on a network processor comprising the steps of:
providing a plurality of buffers;
associating a buffer control block with each buffer;
providing a buffer usage field in each of the buffer control blocks, the buffer usage field having a value set responsive to a quantity of frame data fragments;
freeing a first buffer after reading a frame data fragment responsive to the first buffer control block buffer usage field value indicating only one frame data fragment is present in the first buffer.

### Claim 2 (depends on 1)

The method for sharing data buffers as recited in claim 1, further comprising the steps of:
providing a buffer usage field initial value;
incrementing the first buffer control block buffer usage field value responsive to writing second frame data to the first buffer if the buffer already contains first frame data; and
decrementing the first buffer control block buffer usage field responsive to reading either the first frame data or the second frame data from the first buffer;
wherein the step of freeing the first buffer is performed when the first buffer usage field is the initial value.

### Claim 3 (depends on 2)

The method for sharing data buffers as recited in claim 2, further comprising the steps of:
providing a plurality of frame control blocks;
receiving a frame and associating the frame with an original frame control block of the frame control blocks;
fragmenting the frame into a plurality of frame fragments;
storing the frame fragments in the buffers and associating the buffers with fragment frame control blocks and linking the fragment frame control blocks with the original frame control block, the fragment buffers chained together by a linked list, wherein a buffer may contain more than one fragment; and
freeing the original frame control block when all fragments assigned to the original frame control block have been read.

### Claim 4 (depends on 3)

The method for sharing data buffers as recited in claim 3, further comprising the steps of:
providing a Multicast Count field in the original frame control block;
incrementing the Multicast Count field for each of a plurality of frame fragments from an original frame; and
decrementing the Multicast Count field responsive to reading each frame fragment from the first buffer;
wherein the step of freeing the original frame control block is responsive to the frame control block Multicast Count field returning to an initial value.

### Claim 5 (depends on 4)

The method for sharing data buffers as recited in claim 4, further comprising the steps of:
providing the plurality of buffers in a free buffer queue;
providing the plurality of frame control blocks in a free frame control block queue;
receiving frames into a frame queue to await dispatch to a network processor;
associating a queue control block with the frame queue;
associating the original frame control block from the free frame control block queue with a frame in the frame queue; and
assigning additional buffers from the free buffer queue and additional frame control blocks from the free control block queue for each frame fragment of the plurality of frames and linking the additional frame control blocks with the original frame control block;
wherein the step of freeing the fragment buffer comprises returning the additional buffer assigned to any of the fragments to the free buffer queue when the buffer is read a number of times equal to a quantity of fragments contained in the buffer; and
wherein the step of freeing original frame control block comprises returning the original frame control block to the free control block queue when all fragments assigned to the original frame control block have been read.

### Claim 6 (depends on 2)

The method for sharing data buffers as recited in claim 2 wherein the buffer control block associated with each buffer forms a linked list for chaining buffers into a frame and contains a plurality of fields, including separate fields to:
store a pointer to a next buffer in the frame;
store a starting byte position of valid data in a next buffer of a frame;
store an ending byte position of valid data in a next buffer of a frame; and
store a number of frame fragments stored in a corresponding buffer.

### Claim 7 (depends on 3)

The method for sharing data buffers as recited in claim 3, wherein the frame control block associated with each frame forms a linked list for chaining frames into a queue and contains a plurality of fields, including separate fields to:
store a pointer to a next frame in the queue, or a number of frame instances using data of a reference frame;
store a count of a total number of bytes of a next frame in the queue;
store an address of a first buffer in a frame;
store a starting byte position of valid data in the first buffer; and
store an ending byte position of valid data in the first buffer.

### Claim 8 (depends on 3)

The method for sharing data buffers as recited in claim 3, wherein the buffer control block buffer usage field is incremented once for every fragment boundary.

### Claim 9

A network processor system comprising:
a plurality of buffers;
a plurality of buffer control blocks, each of the buffer control blocks associated with one of the plurality buffers; and
a buffer usage field in each of the buffer control blocks, the buffer usage field having a value set responsive to a quantity of frame data fragments;
wherein the system is configured to free a buffer after reading a frame data fragment responsive to the buffer control block buffer usage field value indicating only one frame data fragment is present in the buffer.

### Claim 10 (depends on 9)

The system of claim 9, further comprising a buffer usage field initial value;
wherein the system is configured to increment the first buffer control block buffer usage field value responsive to writing a second frame data to the buffer if the buffer already contains a first frame data; and
to decrement the first buffer control block buffer usage field responsive to reading either the first frame data or the second frame data from the first buffer;
wherein the first buffer is freed when the first buffer usage field is the initial value.

### Claim 11 (depends on 10)

The system of claim 10, further comprising a plurality of frame control blocks;
wherein the system is configured to receive a frame and associate the frame with an original frame control block of the plurality of frame control blocks;
fragment the frame into a plurality of frame fragments;
store the frame fragments in the buffers and associate the buffers with fragment frame control blocks and link the fragment frame control blocks with the original frame control block, the fragment buffers chained together by a linked list, wherein a buffer may contain more than one fragment; and
free the original frame control block when all fragments assigned to the original frame control block have been read.

### Claim 12 (depends on 11)

The system of claim 11, further comprising a Multicast Count field in the original frame control block;
wherein the system is configured to increment the Multicast Count field for each of a plurality of frame fragments from an original frame; and
decrement the Multicast Count field responsive to reading each frame fragment from the first buffer;
wherein the original frame control block is freed responsive to the frame control block Multicast Count field returning to an initial value.

### Claim 13 (depends on 12)

The system of claim 12, further comprising:
a free buffer queue containing the plurality of buffers; and
a free frame control block queue containing the plurality of frame control blocks;
wherein the system is configured to receive frames into a frame queue to await dispatch to a network processor;
associate a queue control block with the frame queue;
associate the original frame control block from the free frame control block queue with a frame in the frame queue;
assign additional buffers from the free buffer queue and additional frame control blocks from the free control block queue for each frame fragment of the plurality of frames and link the additional frame control blocks with the original frame control block;
free the fragment buffer by returning the additional buffer assigned to any of the fragments to the free buffer queue when the buffer is read a number of times equal to a quantity of fragments contained in the buffer; and
free the original frame control block by returning the original frame control block to the free control block queue when all fragments assigned to the original frame control block have been read.

### Claim 14 (depends on 10)

The system of claim 10 wherein the buffer control block associated with each buffer forms a linked list for chaining buffers into a frame and contains a plurality of fields, including separate fields to:
store a pointer to a next buffer in the frame;
store a starting byte position of valid data in a next buffer of a frame;
store an ending byte position of valid data in a next buffer of a frame; and
store a number of frame fragments stored in a corresponding buffer.

### Claim 15 (depends on 11)

The system of claim 11 wherein the frame control block associated with each frame forms a linked list for chaining frames into a queue and contains a plurality of fields, including separate fields to:
store a pointer to a next frame in the queue, or a number of frame instances using data of a reference frame;
store a count of a total number of bytes of a next frame in the queue;
store an address of a first buffer in a frame;
store a starting byte position of valid data in the first buffer; and
store an ending byte position of valid data in the first buffer.

### Claim 16 (depends on 11)

The system of claim 11, wherein the buffer control block buffer usage field is incremented once for every fragment boundary.

### Claim 17

An article of manufacture comprising a computer usable medium having a computer readable program embodied in said medium, wherein the computer readable program when executed on a network processor system comprising a plurality of buffers and buffer control blocks, the buffer control blocks comprising a buffer usage field, the buffer usage field having a value set responsive to a quantity of frame data fragments, causes the network processor to:
associate a buffer control block with each buffer; and
free a first buffer after reading a frame data fragment responsive to the first buffer control block buffer usage field value indicating only one frame data fragment is present in the first buffer.

### Claim 18 (depends on 17)

The article of manufacture of claim 17, wherein the network processor system further comprises a buffer usage field initial value, and wherein the computer readable program causes the network processor to:
increment the first buffer control block buffer usage field value responsive to writing second frame data to the first buffer if the buffer already contains first frame data;
decrement the first buffer control block buffer usage field responsive to reading either the first frame data or the second frame data from the first buffer; and
free the first buffer when the first buffer usage field is the initial value.

### Claim 19 (depends on 18)

The article of manufacture of claim 18, wherein the network processor system further comprises a plurality of frame control blocks, and wherein the computer readable program causes the network processor to:
receive a frame and associate the frame with an original frame control block of the frame control blocks;
fragment the frame into a plurality of frame fragments;
store the frame fragments in the buffers and associate the buffers with fragment frame control blocks and link the fragment frame control blocks with the original frame control block, the fragment buffers chained together by a linked list, wherein a buffer may contain more than one fragment; and
free the original frame control block when all fragments assigned to the original frame control block have been read.

### Claim 20 (depends on 19)

The article of manufacture of claim 19, wherein the network processor system further comprises a Multicast Count field in the original frame control block, and wherein the computer readable program causes the network processor to:
increment the Multicast Count field for each of a plurality of frame fragments from an original frame;
decrement the Multicast Count field responsive to reading each frame fragment from the first buffer; and
free the original frame control block responsive to the frame control block Multicast Count field returning to an initial value.
