# US 2020/0287832 A1 · Dynamic allocation of memory for packet processing instruction tables in a network device

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

- Number: US 2020/0287832 A1
- Document ID: US20200287832A1
- Status: Published application
- Kind: A1
- Application number: 15/929,868
- Filed: 2020-05-27
- Published: 2020-09-10
- Earliest claimed: 2018-01-30
- Assignees: Marvell Israel (M.I.S.L) Ltd.
- Applicants: Marvell Israel (M.I.S.L) Ltd.
- Inventors: Zvi Leib Shmilovici
- Web page: https://patentgrep.com/patent/US20200287832A1

## CPC

- H04L 45/74591: {using content-addressable memories [CAM]}
- G06F 12/0646: {Configuration or reconfiguration}
- H04L 45/7453: using hashing
- H04L 45/748: using longest matching prefix
- G06F 2212/154: Networked environment
- 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 method for operating a network device, having data storage with selectably modifiable capacity for storing instructional data for a packet processing operation, includes detecting a need for additional storage for the instructional data, allocating an additional memory block without interrupting operation of the network device, associating with the additional memory block an additional address hashing function, different from each of at least one respective previous address hashing function associated with any previously-allocated memory block. Each respective previous address hashing function transforms a look-up key into a respective addressable location in a previously-allocated memory block, and the additional address hashing function transforms the look-up key into an addressable location in the additional memory block. When a block is deallocated, each unit of instructional data is reprocessed through the hashing function of a different block to which the unit of the instructional data will be moved.

## Claims

### Claim at position 1

1-21. (canceled)

### Claim 22

A method for operating a network device having a data storage resource for storing data for network transmissions, the method comprising:
maintaining a plurality of allocated memory blocks, each respective allocated memory block being associated with a respective address hashing function, each respective address hashing function transforming a look-up key into a respective addressable location in a respective one of the at least one respective allocated memory block;
maintaining a reserve of at least one additional memory block;
determining that any one of the respective allocated memory blocks is an excess memory block that is not required for operation of the network device; and
deallocating the excess memory block without interrupting searching operations being performed in the one of the respective allocated memory blocks of the data storage resource, by:
storing a copy of data from the excess memory block in one of the at least one remaining one of the at least one respective allocated memory block;
rehashing the copy of the data from the excess memory block, stored in the one of the at least one remaining one of the at least one respective allocated memory block, according to a respective address hash function of the at least one remaining one of the at least one respective allocated memory block, to form a new addressable location in the respective one of the at least one respective allocated memory block for the copy of the data from the excess memory block, for continued availability for network transmissions, by transformation of a look-up key into the new addressable location, of the data from the excess memory block.

### Claim 23 (depends on 22)

The method of claim 22 wherein the deallocating further comprises:
concurrently searching in the excess memory block and the at least one remaining one of the at least one respective allocated memory block until all stored data in the excess memory block has been copied to the at least one remaining one of the at least one respective allocated memory block; and
after all stored data in the excess memory block has been copied to the at least one remaining one of the at least one respective allocated memory block, returning the excess memory block to the reserve.

### Claim 24 (depends on 23)

The method of claim 23 further comprising:
when the concurrently searching in the excess memory block and the at least one remaining one of the at least one respective allocated memory block, according to a respective addressable location associated with results of one of the respective hash functions, results in retrieving a first instance of the particular data from the excess memory block and a second instance of the particular data from a remaining one of the at least one respective allocated memory block, selecting one of the first instance of the particular data and the second instance of the particular data.

### Claim 25 (depends on 22)

The method of claim 22 further comprising:
monitoring capacity of the one of the at least one respective allocated memory block; wherein:
the determining comprises detecting that the occupancy of the one of the at least one respective allocated memory block has fallen below a predetermined threshold.

### Claim 26 (depends on 22)

The method of claim 22, further comprising:
detecting a need for additional storage resources to store data for network transmissions;
allocating an additional memory block from the reserve, to store the data for network transmissions, without interrupting operation of the data storage resource;
associating with the additional memory block an additional address hashing function, different from each of at least one respective previous address hashing function associated with a respective one of the at least one respective allocated memory block, each respective previous address hashing function transforming a look-up key into a respective addressable location in a respective one of the at least one respective allocated memory block, and the additional address hashing function transforming the look-up key into an addressable location in the additional memory block;
storing a unit of data for network transmissions in the additional memory block; and
processing the unit of data, stored in the additional memory block, through the additional address hashing function to determine an addressable location, in the additional memory block, of the unit of data.

### Claim 27 (depends on 26)

The method of claim 26, further comprising:
receiving a request for particular data and generating from the request an incoming look-up key for the particular data;
processing the incoming look-up key through each of the at least one respective previous address hashing function to generate respective hash results, and through the additional address hashing function to generate an additional hash result; and
accessing each respective allocated memory block according to a respective memory address associated with one of the respective hash results and accessing the additional memory block according to an additional memory address associated with the additional hash result, to retrieve the particular data.

### Claim 28 (depends on 27)

The method of claim 27 wherein the accessing each respective allocated memory block according to a respective memory address associated with one of the respective hash results, and the accessing the additional memory block according to an additional memory address associated with the additional hash result, are performed concurrently, together returning a plurality of candidate units of data; the method further comprising:
selecting one of the candidate units of data as the particular data.

### Claim 29 (depends on 28)

The method of claim 28 wherein:
each unit of the data for the type of packet processing operation stored at a location in one of the additional memory block and the at least one respective allocated memory block is stored along with a raw look-up key that was hashed to determine the location to store the unit of the data for the type of packet processing operation; and
the selecting comprises comparing the raw look-up key to the incoming look-up key.

### Claim 30 (depends on 26)

The method of claim 26, wherein the detecting the need for additional storage resources to store data for network transmissions comprises:
attempting to store a unit of the data for network transmissions; and
finding only occupied memory locations during the attempting.

### Claim 31 (depends on 22)

The method of claim 22, wherein
maintaining a plurality of allocated memory blocks comprises maintaining at least one respective allocated memory block for each of at least two respective types of data comprises associating each respective allocated memory block with an attribute of the respective type of data stored in the respective allocated memory block.

### Claim 32 (depends on 31)

The method of claim 31, wherein the maintaining at least one respective allocated memory block for each of at least two respective types of data comprises associating each respective allocated memory block with a physical attribute of the respective type of data stored in the respective allocated memory block.

### Claim 33 (depends on 31)

The method of claim 31 wherein the maintaining at least one respective allocated memory block for each of at least two respective types of data comprises associating each respective allocated memory block with an attribute of the respective type of data stored in the respective allocated memory block comprises associating each respective allocated memory block with a source of the respective type of data stored in the respective allocated memory block.

### Claim 34

A network device, comprising:
at least one respective quantity of allocated memory blocks for storing data for network transmissions, each respective allocated memory block being associated with a respective address hashing function, each respective address hashing function transforming a look-up key into a respective addressable location in a respective one of the at least one respective allocated memory block;
a reserve of at least one additional memory block; and
a controller configured to selectably modify the respective quantity of memory blocks for one of the respective types of data, by:
determining that any one of the respective allocated memory blocks is an excess memory block that is not required for operation of the data storage resource, and
deallocating the excess memory block without interrupting searching operations being performed in the one of the respective allocated memory blocks of the data storage resource, by:
storing a copy of data from the excess memory block in one of the at least one remaining one of the at least one respective allocated memory block;
rehashing the copy of the data from the excess memory block, stored in the one of the at least one remaining one of the at least one respective allocated memory block, according to a respective address hash function of the at least one remaining one of the at least one respective allocated memory block, to form a new addressable location in the respective one of the at least one respective allocated memory block for the copy of the data from the excess memory block, for continued availability for network transmissions, by transformation of a look-up key into the new addressable location, of the data from the excess memory block.

### Claim 35 (depends on 34)

The network device of claim 34 wherein the controller is further configured to:
concurrently search in the excess memory block and the at least one remaining one of the at least one respective allocated memory block until all stored data in the excess memory block has been copied to the at least one remaining one of the at least one respective allocated memory block; and
after all stored data in the excess memory block has been moved to the at least one remaining one of the at least one respective allocated memory block, return the excess memory block to the reserve.

### Claim 36 (depends on 35)

The network device of claim 35 wherein the controller is further configured to, during the concurrent searching in the excess memory block and the at least one remaining one of the at least one respective allocated memory block, when accessing each respective allocated memory block, according to a respective memory address associated with results of one of the respective hash functions, results in retrieving a first instance of the particular data from the excess memory block and a second instance of the particular data from the respective remaining memory block:
select one of the first instance of the particular data and the second instance of the particular data.

### Claim 37 (depends on 34)

The network device of claim 34 wherein the controller is further configured to:
monitor capacity of the respective allocated memory blocks and the additional memory block; and
determine that any one of the respective allocated memory blocks is an excess memory block that is not required for operation of the data storage resource by detecting that the capacity of the respective allocated memory blocks and the additional memory block has fallen below a predetermined threshold.

### Claim 38 (depends on 34)

The network device of claim 34 wherein the controller is further configured to:
detect a need for additional storage resources to store the one of the respective types of data;
allocate an additional memory block, to store the one of the respective types of data, without interrupting operation of the data storage resource;
associate with the additional memory block an additional address hashing function, different from each of at least one respective previous address hashing function associated with at least one of the at least one respective quantity of allocated memory blocks, each respective previous address hashing function transforming a look-up key into a respective addressable location in a respective one of the at least one quantity of allocated memory blocks, and the additional address hashing function transforming the look-up key into an addressable location in the additional memory block;
store the unit of the one of the respective types of data at the location determined by the additional address hashing function, and
process a unit of the one of the respective types of data through the additional address hashing function to determine an addressable location, in the additional memory block, of the unit of data.

### Claim 39 (depends on 38)

The network device of claim 38, wherein the controller is further configured to:
receive a request for particular data and generate from the request an incoming look-up key for the particular data;
process the incoming look-up key through each of the at least one respective previous address hashing function to generate respective hash results, and through the additional address hashing function to generate an additional hash result; and
access each respective allocated memory block according to a respective memory address associated with one of the respective hash results, and access the additional memory block according to an additional memory address associated with the additional hash result, to retrieve the particular data.

### Claim 40 (depends on 39)

The network device of claim 39 wherein the controller is configured to:
concurrently access each respective allocated memory block according to a respective memory address associated with one of the respective hash results, and the additional memory block according to an additional memory address associated with the additional hash result, to return a plurality of candidate units of the particular data; and
select one of the candidate units of the particular data.

### Claim 41 (depends on 40)

The data storage resource of claim 40 wherein:
each unit of the particular data stored at a location in one of the additional memory block and the at least one respective allocated memory block is stored along with a raw look-up key that was hashed to determine the location to store the unit of the particular data; and
the controller is configured to select one of the candidate units of the particular data by comparing the raw look-up key to the incoming look-up key.
