# US 2026/0089120 A1 · Stable Allocation of Labels for Network Traffic Policies

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

- Number: US 2026/0089120 A1
- Document ID: US20260089120A1
- Status: Published application
- Kind: A1
- Application number: 18/897,664
- Filed: 2024-09-26
- Published: 2026-03-26
- Earliest claimed: 2024-09-26
- Applicants: Arista Networks, Inc.
- Inventors: Ramakrishna PADUVALLI; Muhammad Khalid YOUSUF; Michael CHEN; Edward XIE
- Web page: https://patentgrep.com/patent/US20260089120A1

## CPC

- H04L 47/801: {Real time traffic}
- H04L 45/742: {Route cache; Operation thereof}
- H04L 47/781: {Centralised allocation of resources}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Techniques for performing stable allocation of encoded labels for a traffic policy are provided. “Stable allocation” refers to allocating the encoded labels in a manner that reduces or minimizes the number of label changes caused by an upgrade of the traffic policy, thereby improving the latency of the upgrade process and increasing the likelihood that the upgrade can be completed hitlessly (i.e., without any service disruption or traffic loss).

## Claims

### Claim 1

A method performed by a network device for allocating encoded labels for a traffic policy comprising a plurality of rules, the method comprising:
determining a set of fields specified in one or more of the plurality of rules; and
for each field in the set of fields:
determining one or more field-sets for the field, each field-set being associated with one or more rules in the plurality of rules and corresponding to a set of plain labels representing match patterns for the field in the one or more rules; and
for each field-set in the one or more field-sets:
determining a number of plain labels in the field-set that have not yet been allocated an encoded label;
determining a block size based on the number of plain labels;
searching a label cache for a cache entry corresponding to a rule in the one or more rules; and
upon finding the cache entry in the label cache and determining that a plain label count in the cache entry is between the number of plain labels and the block size, allocating a first block of encoded labels specified in the cache entry to the field-set.

### Claim 2 (depends on 1)

The method of claim 1 wherein the set of fields correspond to packet header fields.

### Claim 3 (depends on 1)

The method of claim 1 further comprising, upon failing to find the cache entry in the label cache or determining that the plain label count in the cache entry is not between the number of plain labels and the block size:
checking whether a second block of encoded labels having a size equal to the block size is available in a domain of available encoded labels; and
upon determining that the second block of encoded labels is available in the domain of available encoded labels, allocating the second block of encoded labels to the field-set.

### Claim 4 (depends on 3)

The method of claim 3 wherein the block size is a nearest power of 2 equal to or greater than the number of plain labels.

### Claim 5 (depends on 4)

The method of claim 4 further comprising, upon determining that the first block of encoded labels or the second block of encoded labels was allocated to the field-set:
reducing the number of plain labels by a size of the first block or the second block; and
upon determining that the reduced number of plain labels remains greater than zero, setting the block size to a nearest power of 2 equal to or greater than the reduced number of plain labels and repeating the searching of the label cache.

### Claim 6 (depends on 4)

The method of claim 4 further comprising, upon determining that neither the first block of encoded labels nor the second block of encoded labels was allocated to the field-set:
setting the block size to a next lower power of 2 and repeating the searching of the cache.

### Claim 7 (depends on 1)

The method of claim 1 further comprising, upon processing all fields in the set of fields:
updating the label cache to remove any encoded labels that remain unallocated and to add any encoded labels that were allocated from the domain of available encoded labels.

### Claim 8 (depends on 1)

The method of claim 1 further comprising:
computing a ternary content-addressable memory (TCAM) cost for each field-set in the one or more field-sets.

### Claim 9 (depends on 8)

The method of claim 8 wherein said each field-set is processed in order from highest TCAM cost to lowest TCAM cost.

### Claim 10

A network device comprising:
a central processing unit (CPU);
a set of lookup tables;
a ternary content-addressable memory (TCAM); and
a main memory having stored thereon program code that, when executed by the CPU, causes the CPU to:
determine a set of fields specified in one or more of a plurality of rules of a traffic policy; and
for each field in the set of fields:
determine one or more field-sets for the field, each field-set being associated with one or more rules in the plurality of rules and corresponding to a set of plain labels representing match patterns for the field in the one or more rules; and
for each field-set in the one or more field-sets:
determine a number of plain labels in the field-set that have not yet been allocated an encoded label;
determine a block size based on the number of plain labels;
search a label cache for a cache entry corresponding to a rule in the one or more rules; and
upon finding the cache entry in the label cache and determining that a plain label count in the cache entry is between the number of plain labels and the block size, allocate a first block of encoded labels specified in the cache entry to the field-set.

### Claim 11 (depends on 10)

The network device of claim 10 wherein the set of fields correspond to packet header fields.

### Claim 12 (depends on 10)

The network device of claim 10 wherein the program code further causes the CPU to, upon failing to find the cache entry in the label cache or determining that the plain label count in the cache entry is not between the number of plain labels and the block size:
check whether a second block of encoded labels having a size equal to the block size is available in a domain of available encoded labels; and
upon determining that the second block of encoded labels is available in the domain of available encoded labels, allocate the second block of encoded labels to the field-set.

### Claim 13 (depends on 12)

The network device of claim 12 wherein the block size is a nearest power of 2 equal to or greater than the number of plain labels.

### Claim 14 (depends on 13)

The network device of claim 13 wherein the program code further causes the CPU to, upon determining that the first block of encoded labels or the second block of encoded labels was allocated to the field-set:
reduce the number of plain labels by a size of the first block or the second block; and
upon determining that the reduced number of plain labels remains greater than zero, set the block size to a nearest power of 2 equal to or greater than the reduced number of plain labels and repeat the searching of the label cache.

### Claim 15 (depends on 13)

The network device of claim 13 wherein the program code further causes the CPU to, upon determining that neither the first block of encoded labels nor the second block of encoded labels was allocated to the field-set:
set the block size to a next lower power of 2 and repeat the searching of the cache.

### Claim 16 (depends on 10)

The network device of claim 10 wherein the program code further causes the CPU to, upon processing all fields in the set of fields:
update the label cache to remove any encoded labels that remain unallocated and to add any encoded labels that were allocated from the domain of available encoded labels.

### Claim 17 (depends on 10)

The network device of claim 10 wherein the program code further causes the CPU to:
compute a TCAM cost for each field-set in the one or more field-sets.

### Claim 18 (depends on 17)

The network device of claim 17 wherein said each field-set is processed in order from highest TCAM cost to lowest TCAM cost.

### Claim 19

A method performed by a network device for allocating encoded labels for a traffic policy comprising a plurality of rules, the method comprising:
determining a set of fields specified in one or more of the plurality of rules; and
for each field in the set of fields:
determining one or more field-sets for the field, each field-set being associated with one or more rules in the plurality of rules and corresponding to a set of plain labels representing match patterns for the field in the one or more rules; and
for each field-set in the one or more field-sets:
determining a number of plain labels in the field-set that have not yet been allocated an encoded label;
determining, based on a label cache, whether a range of encoded labels equal in size to the number of plain labels was previously allocated to the field-set; and
upon determining that a range of encoded labels equal in size to the number of plain labels was previously allocated to the field-set, re-allocating the range of encoded labels to the field-set.

### Claim 20 (depends on 19)

The method of claim 19 further comprising, upon determining that a range of encoded labels equal in size to the number of plain labels was not previously allocated to the field-set, allocating a new range of encoded labels equal in size to the number of plain labels to the field-set from a domain of available encoded labels.
