# US 2018/0026860 A1 · Time efficient counters and meters architecture

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

- Number: US 2018/0026860 A1
- Document ID: US20180026860A1
- Status: Published application
- Kind: A1
- Application number: 15/722,601
- Filed: 2017-10-02
- Published: 2018-01-25
- Earliest claimed: 2013-05-03
- Assignees: Marvell World Trade Ltd.
- Applicants: Marvell World Trade Ltd.
- Inventors: Carmi ARAD; Kurt Thomas BODEN; Gil LEVY; Jakob CARLSTROM
- Web page: https://patentgrep.com/patent/US20180026860A1

## CPC

- H04L 43/024: by adaptive sampling
- H04L 43/0876: Network utilisation, e.g. volume of load or congestion level
- H04L 43/16: Threshold monitoring
- H04L 47/215: using token-bucket
- H04L 43/02: Capturing of monitoring data
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A meter module for use in a network device comprises conformance circuitry configured to: access a first memory device storing a conformance indicator that indicates whether a permitted rate of packet traffic has been exceeded, and classify packets received at the network device based at least in part on the conformance indicator. Sampling circuitry is configured to, responsively to the conformance circuitry classifying the packets: sample events associated with at least some of the received packets, and generate indicators of the sampled events. Update circuitry is configured to: access a second memory device, slower than the first memory, to update a number of tokens stored in the second memory device, and access the first memory device to update the conformance indicator when the updated number of tokens indicates that the permitted rate of packet traffic has been exceeded.

## Claims

### Claim 1

A meter module for use in a network device, the meter module comprising:
conformance circuitry configured to:
access a first memory device storing a conformance indicator that indicates whether a permitted rate of packet traffic has been exceeded, and
classify packets received at the network device based at least in part on the conformance indicator;
sampling circuitry configured to, responsively to the conformance circuitry classifying the packets:
sample events associated with at least some of the received packets, and
generate indicators of the sampled events; and
update circuitry configured to:
access a second memory device to update, at least based on the indicators of the sampled events, a number of tokens stored in the second memory device, the second memory device being separate from the first memory device and having a maximum access rate that is slower than a maximum access rate of the first memory device, and
access the first memory device to update the conformance indicator when the updated number of tokens indicates that the permitted rate of packet traffic has been exceeded.

### Claim 2 (depends on 1)

The meter module of claim 1, wherein:
the conformance circuitry is configured to access the first memory device to update conformance indicators at up to a first rate; and
the update circuitry is configured to access the second memory device to update numbers of tokens at up to a second rate lower than the first rate.

### Claim 3 (depends on 1)

The meter module of claim 1, wherein:
the conformance circuitry is configured to access the first memory device at up to at least a maximum event rate of the network device; and
the update circuitry is configured to access the second memory device at up to a rate that is less than the maximum event rate of the network device.

### Claim 4 (depends on 1)

The meter module of claim 1, wherein the second memory device is configured to intermittently receive a number of tokens that corresponds to the permitted rate of packet traffic.

### Claim 5 (depends on 1)

The meter module of claim 1, wherein the sampling circuitry is configured to sample events associated with at least some of the received packets by:
statistically sampling events associated with packets that the conformance circuitry classifies as being in conformance based on the conformance indicator, wherein statistically sampling events comprises sampling events with a probability less than one; and
sampling no events associated with packets that the conformance circuitry classifies as not being in conformance based on the conformance indicator.

### Claim 6 (depends on 1)

The meter module of claim 1, wherein the sampling circuitry is configured to sample events associated with at least some of the received packets by:
statistically sampling events associated with packets that (i) the conformance circuitry classifies as being in conformance based on the conformance indicator, and (ii) fall below a packet length threshold, wherein statistically sampling events comprises sampling events with a probability less than one;
sampling all events associated with packets (i) the conformance circuitry classifies as being in conformance based on the conformance indicator, and (ii) do not fall below the packet length threshold; and
sampling no events associated with packets that the conformance circuitry classifies as not being in conformance based on the conformance indicator.

### Claim 7 (depends on 1)

The meter module of claim 1, wherein the sampling circuitry comprises:
a dual-mode counter module configured to (i) estimate a count of quanta associated with a first set of received packets without counting every event using a first counting mode that uses non-deterministic sampling, and (ii) determine a count of quanta associated with a second set of received packets using a second counting mode that uses deterministic sampling.

### Claim 8 (depends on 7)

The meter module of claim 7, further comprising:
a load determination circuit configured to determine whether traffic load exceeds a load threshold; and
wherein the dual-mode counter module is configured to (i) estimate the count of quanta associated with the received packets using the first counting mode in response to the load determination unit determining that the traffic load exceeds the load threshold, and (ii) determine the count of quanta using the second counting mode in response to the load determination unit determining that the traffic load does not exceed the load threshold.

### Claim 9 (depends on 1)

The meter module of claim 1, wherein the update circuitry is configured to:
store the number of tokens in the second memory device using exact value representations.

### Claim 10 (depends on 1)

The meter module of claim 1, wherein the update circuitry is configured to:
store the number of tokens in the second memory device using truncated representations or mantissa-exponent representations.

### Claim 11

A method for metering traffic in a network device, the method comprising:
accessing, using conformance circuitry, a first memory device storing a conformance indicator that indicates whether a permitted rate of packet traffic has been exceeded;
classifying, using the conformance circuitry, packets received at the network device based at least in part on the conformance indicator;
responsively to the conformance circuitry classifying the packets,
sampling, using sampling circuitry, events associated with at least some of the received packets, and
generating, using sampling circuitry, indicators of the sampled events;
accessing, with update circuitry, a second memory device to update, at least based on the indicators of the sampled events, a number of tokens stored in the second memory device, the second memory device being separate from the first memory device and having a maximum access rate that is slower than a maximum access rate of the first memory device; and
accessing, with the update circuitry, the first memory device to update the conformance indicator when the updated number of tokens indicates that the permitted rate of packet traffic has been exceeded.

### Claim 12 (depends on 11)

The method of claim 11, wherein:
accessing the first memory device to update conformance indicators is performed by the conformance circuitry at up a first rate; and
accessing the second memory device to update numbers of tokens is performed by the update circuitry at up to a second rate that is lower than the first rate.

### Claim 13 (depends on 11)

The method of claim 11, wherein:
accessing the first memory device to update conformance indicators is performed by the conformance circuitry at up to at least a maximum event rate of the network device; and
accessing the second memory device to update the numbers of tokens is performed by the update circuitry at up to a rate that is less than the maximum event rate of the network device.

### Claim 14 (depends on 11)

The method of claim 11, further comprising:
intermittently receiving, at the second memory device, a number of tokens that corresponds to the permitted rate of packet traffic.

### Claim 15 (depends on 11)

The method of claim 11, wherein sampling events comprises:
statistically sampling events associated with packets that the conformance circuitry classifies as being in conformance based on the conformance indicator, wherein statistically sampling events comprises sampling events with a probability less than one; and
sampling no events associated with packets that the conformance circuitry classifies as not being in conformance based on the conformance indicator.

### Claim 16 (depends on 11)

The method of claim 11, wherein sampling events comprises:
statistically sampling events associated with packets that (i) the conformance circuitry classifies as being in conformance based on the conformance indicator, and (ii) fall below a packet length threshold, wherein statistically sampling events comprises sampling events with a probability less than one;
sampling all events associated with packets (i) the conformance circuitry classifies as being in conformance based on the conformance indicator, and (ii) do not fall below the packet length threshold; and
sampling no events associated with packets that the conformance circuitry classifies as not being in conformance based on the conformance indicator.

### Claim 17 (depends on 11)

The method of claim 11, wherein sampling events comprises:
estimating a count of quanta associated with a first set of received packets without counting every event using a first counting mode that uses non-deterministic sampling; and
determining a count of quanta associated with a second set of received packets using a second counting mode that uses deterministic sampling.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
determining, with a load determination circuit, whether traffic load exceeds a load threshold; and
wherein sampling events comprises:
estimating the count of quanta associated with the received packets using the first counting mode in response to the load determination unit determining that the traffic load exceeds the load threshold, and
determining the count of quanta using the second counting mode in response to the load determination unit determining that the traffic load does not exceed the load threshold.

### Claim 19 (depends on 11)

The method of claim 11, wherein accessing the second memory device to update the number of tokens comprises:
storing the number of tokens in the second memory device using exact value representations.

### Claim 20 (depends on 11)

The method of claim 11, wherein accessing the second memory device to update the number of tokens comprises:
storing the number of tokens in the second memory device using truncated representations or mantissa-exponent representations.
