Stable Allocation of Labels for Network Traffic Policies
OwnerRamakrishna PADUVALLI, Muhammad Khalid YOUSUF +2inventors
InventorsRamakrishna PADUVALLI, Muhammad Khalid YOUSUF, Michael CHEN, Edward XIE
Life of this patent
Estimating the term…
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).
Claims20
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.
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.
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.
Dependencies are inferred from the claim text.