# US 8,577,854 B1 · Apparatus and method for high speed flow classification

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

- Number: US 8,577,854 B1
- Document ID: US8577854B1
- Status: Granted
- Kind: B1
- Application number: 10/179,483
- Filed: 2002-06-24
- Granted: 2013-11-05
- Earliest claimed: 2001-11-27
- Assignees: Marvell Israel (M.I.S.L) Ltd.
- Applicants: Yaniv Kopelman; Carmi Arad; Nafea Bishara
- Inventors: Yaniv Kopelman; Carmi Arad; Nafea Bishara
- Web page: https://patentgrep.com/patent/US8577854B1

## CPC

- H04L 47/2441: relying on flow classification, e.g. using integrated services [IntServ]
- G06F 16/951: Indexing; Web crawling techniques
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A flow classifier for a network device that processes packets including packet headers includes a hash generator that generates hash index values from search keys derived from the packet headers. A hash table receives the hash index values and outputs pointers. A flow table includes flow keys and corresponding actions. A variable length (VL) trie data structure uses the pointers to locate the flow keys for the search keys. The VL trie data structure selects different flow keys for the search keys that share a common hash index value. The pointers include node, NIL and leaf pointers. The flow classifier performs a default action for the NIL pointers. A pointer calculator accesses a VL trie table using the pointers.

## Claims

### Claim 1

A flow classifier for a network device that processes packets including packet headers, comprising:
a hash generator, implemented with a processor, that generates hash index values from search keys derived from said packet headers;
a hash table that receives said hash index values and that outputs pointers;
a flow table including flow keys and corresponding actions; and
a variable length (VL) trie data structure that uses said pointers and said search keys to locate said flow keys and said corresponding actions for said search keys.

### Claim 2 (depends on 1)

The flow classifier of claim 1 wherein said VL trie data structure selects different flow keys for said search keys that share a common hash index value.

### Claim 3 (depends on 1)

The flow classifier of claim 1 wherein said pointers include node, NIL and leaf pointers and wherein said flow classifier performs a default action for said NIL pointers.

### Claim 4 (depends on 3)

The flow classifier of claim 3 further comprising a pointer calculator that accesses a VL trie table using said pointers.

### Claim 5 (depends on 4)

The flow classifier of claim 4 wherein when said pointer is a node pointer, said node pointer points to a root entry in said VL trie table.

### Claim 6 (depends on 5)

The flow classifier of claim 5 wherein said pointer calculator locates a first child entry in said VL trie table using said search key and an offset field, a branch factor field and a pointer field of said root entry.

### Claim 7 (depends on 6)

The flow classifier of claim 6 wherein when said first child entry is a node pointer, said pointer calculator locates a second child entry based on said search key and an offset field, a branch factor field and a pointer field of said first child entry.

### Claim 8 (depends on 7)

The flow classifier of claim 7 wherein when said second child entry is a node pointer, said pointer calculator locates an nth child entry based on said search key and an offset field, a branch factor field and a pointer field of said second child entry.

### Claim 9 (depends on 8)

The flow classifier of claim 8 wherein when said nth child entry is a node pointer, said pointer calculator locates an (n+1)th child entry based on said search key and an offset field, a branch factor field and a pointer field of said nth child entry.

### Claim 10 (depends on 9)

The flow classifier of claim 9 wherein said leaf pointers include regular and branching leaf pointers.

### Claim 11 (depends on 10)

The flow classifier of claim 10 wherein when one of said child entries of said VL trie table is a branching leaf pointer, said pointer calculator locates a flow key based on said search key and an offset field, a branch factor field and a pointer field of said one of said child entries.

### Claim 12 (depends on 10)

The flow classifier of claim 10 wherein when one of said child entries is a regular leaf pointer, said flow classifier locates a flow key associated with said regular leaf pointer.

### Claim 13 (depends on 10)

The flow classifier of claim 10 wherein when said pointer is a branching leaf pointer, said pointer calculator locates a flow key based on said search key and an offset field, a branch factor field and a pointer field of said one of said child entries.

### Claim 14 (depends on 10)

The flow classifier of claim 10 wherein when one of said child entries is a regular leaf pointer, said flow classifier locates a flow key associated with said regular leaf pointer.

### Claim 15 (depends on 4)

The flow classifier of claim 4 wherein said VL trie table includes entries with a valid/invalid field, a pointer field, an offset field, a branch factor field and a pointer field.

### Claim 16 (depends on 15)

The flow classifier of claim 15 wherein said pointer calculator includes a bit selector that receives said valid/invalid field, said branch factor field, said offset field from a first VL trie table entry, and said search key, wherein said bit selector outputs one of b and b+1 consecutive bits.

### Claim 17 (depends on 16)

The flow classifier of claim 16 wherein said pointer calculator further includes a summing circuit having a first input that receives an output of said bit selector and a second input that receives said pointer field from said first VL trie table entry, wherein an output of said summing circuit generates a pointer to one of a child entry of said VL trie table and a flow key of said flow table.

### Claim 18 (depends on 17)

The flow classifier of claim 17 wherein said entries in said VL trie table further include a hash type field and an index size field, and further comprising a second hash generator that receives an output from said bit selector, said hash type field and said index size field of said first VL trie table entry and that generates one of i and i+1 consecutive bits.

### Claim 19 (depends on 18)

The flow classifier of claim 18 wherein said pointer calculator further includes a summing circuit having a first input that receives an output of said second hash generator and a second input that receives said pointer field of said first VL trie entry, wherein an output of said summing circuit generates a pointer to a child entry.

### Claim 20 (depends on 1)

The flow classifier of claim 1 wherein said flow classifier handles packets in a router.

### Claim 21

A flow classifier for a router that routes packets with packet headers, comprising:
a field selector that generates search keys from said packet headers;
a hash generator, implemented with a processor, that generates hash index values from said search keys;
a hash table that outputs pointers based on said hash index values; and
a variable length (VL) trie data structure that receives said pointers.

### Claim 22 (depends on 21)

The flow classifier of claim 21 wherein said VL trie data structure includes a VL trie table having entries with a valid/invalid field, an offset field, a branch factor field and a pointer field.

### Claim 23 (depends on 22)

The flow classifier of claim 22 further comprising a flow table including a plurality of flow keys, wherein each of said flow keys is associated with an action.

### Claim 24 (depends on 23)

The flow classifier of claim 23 wherein said VL trie data structure uses said pointers and a pointer calculator to select a flow key for a search key.

### Claim 25 (depends on 24)

The flow classifier of claim 24 wherein said pointers include NIL pointers, regular and branching leaf pointers, and node pointers.

### Claim 26 (depends on 21)

The flow classifier of claim 21 wherein said field selector generates said search keys for said packets by selecting and concatenating fields of said header.

### Claim 27 (depends on 25)

The flow classifier of claim 25 wherein when said pointer is a node pointer, said node pointer points to a root entry in said VL trie table.

### Claim 28 (depends on 27)

The flow classifier of claim 27 wherein said pointer calculator locates a first child entry in said VL trie table using said search key and said offset field, said branch factor field and said pointer field of said root entry, wherein when said first child entry is a node pointer, said pointer calculator locates a second child entry based on said search key and said offset field, said branch factor field and said pointer field of said first child entry, wherein when said second child entry is a node pointer, said pointer calculator locates an nth child entry based on said search key and said offset field, said branch factor field and said pointer field of said second child entry, and wherein when said nth child entry is a node pointer, said pointer calculator locates an (n+1)th child entry based on said search key and said offset field, said branch factor field and said pointer field of said nth child entry.

### Claim 29 (depends on 28)

The flow classifier of claim 28 wherein when one of said child entries of said VL trie table is a branching leaf pointer, said pointer calculator locates a flow key based on said search key and said offset field, said branch factor field and said pointer field of said one of said child entries.

### Claim 30 (depends on 29)

The flow classifier of claim 29 wherein when one of said child entries is a regular leaf pointer, said flow classifier locates a flow key associated with said regular leaf pointer.

### Claim 31

A method for processing packets including packet headers in a network device, comprising:
generating hash index values from search keys derived from said packet headers;
generating pointers from said hash index values;
providing a flow table including flow keys and corresponding actions; and
using a variable length (VL) trie data structure and said pointers and said search keys to locate said flow keys for said search keys.

### Claim 32 (depends on 31)

The method of claim 31 further comprising selecting different flow keys for said search keys that share a common hash index value.

### Claim 33 (depends on 31)

The method of claim 31 wherein said pointers include node, NIL and leaf pointers and further comprising performing a default action for said NIL pointers.

### Claim 34 (depends on 33)

The method of claim 33 further comprising accessing a VL trie table using said pointers.

### Claim 35 (depends on 34)

The method of claim 34 further comprising pointing to a root entry in said VL trie table when said pointer is a node pointer.

### Claim 36 (depends on 35)

The method of claim 35 further comprising locating a first child entry in said VL trie table using said search key and an offset field, a branch factor field and a pointer field of said root entry.

### Claim 37 (depends on 36)

The method of claim 36 further comprising locating a second child entry based on said search key and an offset field, a branch factor field and a pointer field of said first child entry when said first child entry is a node pointer.

### Claim 38 (depends on 37)

The method of claim 37 further comprising locating an nth child entry based on said search key and an offset field, a branch factor field and a pointer field of said second child entry when said second child entry is a node pointer.

### Claim 39 (depends on 38)

The method of claim 38 further comprising locating an (n+1)th child entry based on said search key and an offset field, a branch factor field and a pointer field of said nth child entry when said nth child entry is a node pointer.

### Claim 40 (depends on 39)

The method of claim 39 wherein said leaf pointers include regular and branching leaf pointers.

### Claim 41 (depends on 40)

The method of claim 40 further comprising locating a flow key based on said search key and an offset field, a branch factor field and a pointer field of said one of said child entries when one of said child entries of said VL trie table is a branching leaf pointer.

### Claim 42 (depends on 40)

The method of claim 40 further comprising locating a flow key associated with said regular leaf pointer when one of said child entries is a regular leaf pointer.

### Claim 43 (depends on 40)

The method of claim 40 further comprising locating a flow key based on said search key and an offset field, a branch factor field and a pointer field of said one of said child entries when said pointer is a branching leaf pointer.

### Claim 44 (depends on 40)

The method of claim 40 further comprising locating a flow key associated with said regular leaf pointer when one of said child entries is a regular leaf pointer.

### Claim 45 (depends on 34)

The method of claim 34 wherein said VL trie table includes entries with a valid/invalid field, an offset field, a branch factor field and a pointer field.

### Claim 46 (depends on 45)

The method of claim 45 further comprising:
receiving said valid/invalid field, said offset field from a first VL trie table entry, and said search key; and
outputting one of b and b+1 consecutive bits.

### Claim 47 (depends on 46)

The method of claim 46 further comprising:
summing said one of the b and b+1 consecutive bits and said pointer field from said first VL trie table entry; and
generating a pointer to one of a child entry of said VL trie table and a flow key of said flow table.

### Claim 48 (depends on 47)

The method of claim 47 wherein said entries in said VL trie table further include a hash type field and an index size field, and further comprising:
receiving said one of the b and b+1 consecutive bits, said hash type field and said index size field of said first VL trie table entry; and
generating one of i and i+1 consecutive bits.

### Claim 49 (depends on 48)

The method of claim 48 further comprising:
summing said one of the i and i+1 consecutive bits and said pointer field of said first VL trie entry; and
generating a pointer to a child entry.

### Claim 50 (depends on 31)

The method of claim 31 further comprising handling packets in a router.
