Data structure and associated management routines for TCP control block (TCB) table in network stacks
First Claim
1. A method for transport layer lookup, comprising:
- receiving, by a transport layer of a network protocol stack, a first incoming transport layer packet;
searching a pointer cache for a first matching transport layer data structure comprising state information corresponding to the first incoming packet, wherein the pointer cache comprises;
a plurality of pointer cache lines, each of which is configured to store at least one pointer to a subset of a plurality of global transport layer data structures in main memory, and a pointer cache line size, wherein each of the plurality of pointer cache lines comprises a plurality of array elements, each of which stores a pointer to a memory address for a recently accessed transport layer data structure, wherein each of the plurality of pointer cache lines is aligned with a boundary of a central processing unit (CPU) cache line of a plurality of CPU cache lines of a CPU cache, wherein the pointer cache line size is a function of a size of the CPU cache line and a transport control protocol control block (TCB) pointer size;
prefetching a plurality of array elements of a pointer cache line of the plurality of pointer cache lines into the CPU cache line, wherein the plurality of array elements comprises a pointer to the first matching transport layer data structure;
returning the state information corresponding to the first incoming packet using the first matching transport layer data structure when a pointer cache hit occurs for the state information corresponding to the first incoming packet;
receiving, by the transport layer of a network protocol stack, a second incoming transport layer packet;
searching the pointer cache for a second matching transport layer data structure comprising state information corresponding to the second incoming packet;
and in response to a pointer cache miss when searching for the second matching transport layer data structure;
searching the plurality of global transport layer data structures in main memory to obtain the second matching transport layer data structure, and storing a pointer to a memory address of the second matching transport layer data structure in the pointer cache.
2 Assignments
0 Petitions
Accused Products
Abstract
A method for transport layer lookup involves receiving a first incoming transport layer packet, and searching a pointer cache for a first matching transport layer data structure including state information corresponding to the first incoming packet. The pointer cache includes pointer cache lines, each of which stores at least one pointer to a subset of global transport layer data structures. The method further involves returning the state information corresponding to the first incoming packet using the first matching transport layer data structure when a pointer cache hit occurs, receiving a second incoming transport layer packet, searching the pointer cache for a second matching transport layer data structure including state information corresponding to the second incoming packet, and searching the plurality of global transport layer data structures in main memory to obtain the matching second transport layer data structure, when a pointer cache miss occurs.
-
Citations
10 Claims
-
1. A method for transport layer lookup, comprising:
-
receiving, by a transport layer of a network protocol stack, a first incoming transport layer packet; searching a pointer cache for a first matching transport layer data structure comprising state information corresponding to the first incoming packet, wherein the pointer cache comprises; a plurality of pointer cache lines, each of which is configured to store at least one pointer to a subset of a plurality of global transport layer data structures in main memory, and a pointer cache line size, wherein each of the plurality of pointer cache lines comprises a plurality of array elements, each of which stores a pointer to a memory address for a recently accessed transport layer data structure, wherein each of the plurality of pointer cache lines is aligned with a boundary of a central processing unit (CPU) cache line of a plurality of CPU cache lines of a CPU cache, wherein the pointer cache line size is a function of a size of the CPU cache line and a transport control protocol control block (TCB) pointer size; prefetching a plurality of array elements of a pointer cache line of the plurality of pointer cache lines into the CPU cache line, wherein the plurality of array elements comprises a pointer to the first matching transport layer data structure; returning the state information corresponding to the first incoming packet using the first matching transport layer data structure when a pointer cache hit occurs for the state information corresponding to the first incoming packet;
receiving, by the transport layer of a network protocol stack, a second incoming transport layer packet;searching the pointer cache for a second matching transport layer data structure comprising state information corresponding to the second incoming packet; and in response to a pointer cache miss when searching for the second matching transport layer data structure; searching the plurality of global transport layer data structures in main memory to obtain the second matching transport layer data structure, and storing a pointer to a memory address of the second matching transport layer data structure in the pointer cache. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A host, comprising:
-
a central processing unit (CPU) and an associated CPU cache, wherein the associated CPU cache comprises a plurality of CPU cache lines;
a network protocol stack comprising a transport layer configured to receive a first incoming packet and a second incoming packet; and
main memory configured to store;a plurality of global transport layer data structures, wherein the plurality of global transport layer data structures is configured to store state information for a plurality of incoming packets, and a pointer cache comprising a plurality of pointer cache lines, each of which is configured to store at least one pointer to a subset of the plurality of global transport layer data structures, and a pointer cache line size, wherein each of the plurality of pointer cache lines comprises a plurality of array elements, each of which stores a pointer to a memory address for a recently accessed transport layer data structure, wherein each of the plurality of pointer cache lines is aligned with a boundary of a central processing unit (CPU) cache line of the plurality of CPU cache lines, wherein the pointer cache line size is a function of a size of the CPU cache line and a transport control protocol control block (TCB) pointer size, wherein the transport layer is further configured to; search the pointer cache for a first matching transport layer data structure comprising state information corresponding to the first incoming packet; prefetch a plurality of array elements of a pointer cache line of the plurality of pointer cache lines into the CPU cache line, wherein the plurality of array elements comprises a pointer to the first matching transport layer data structure; return the state information corresponding to the first incoming packet using the first matching transport layer data structure when a pointer cache hit occurs for the state information corresponding to the first incoming packet; search the pointer cache for a second matching transport layer data structure comprising state information corresponding to the second incoming packet; and in response to a pointer cache miss when searching for the second matching transport layer data structure; search the plurality of global transport layer data structures in the main memory to obtain the second matching transport layer data structure, and store a pointer to a memory address of the second matching transport layer data structure in the pointer cache. - View Dependent Claims (8, 9)
-
-
10. A non-transitory computer readable medium comprising software instructions that when executed, perform a method for transport layer lookup, comprising:
-
receiving, by a transport layer of a network protocol stack, a first incoming transport layer packet; searching a pointer cache for a first matching transport layer data structure comprising state information corresponding to the first incoming packet, wherein the pointer cache comprises; a plurality of pointer cache lines, each of which is configured to store at least one pointer to a memory address of a subset of a plurality of global transport layer data structures in main memory, and a pointer cache line size, wherein each of the plurality of pointer cache lines comprises a plurality of array elements, each of which stores a pointer to a memory address for a recently accessed transport layer data structure, wherein each of the plurality of pointer cache lines is aligned with a boundary of a central processing unit (CPU) cache line of a plurality of CPU cache lines of a CPU cache, wherein the pointer cache line size is a function of a size of the CPU cache line and a transport control protocol control block (TCB) pointer size; prefetching a plurality of array elements of a pointer cache line of the plurality of pointer cache lines into the CPU cache line, wherein the plurality of array elements comprises a pointer to the first matching transport layer data structure;
returning the state information corresponding to the first incoming packet using the first matching transport layer data structure when a pointer cache hit occurs for the state information corresponding to the first incoming packet;
receiving, by the transport layer of a network protocol stack, a second incoming transport layer packet;searching the pointer cache for a second matching transport layer data structure comprising state information corresponding to the second incoming packet; and in response to a pointer cache miss when searching for the second matching transport layer data structure; searching the plurality of global transport layer data structures in main memory to obtain the second matching transport layer data structure, and storing a pointer to the memory address of the second matching transport layer data structure in the pointer cache.
-
Specification