# US 2025/0158910 A1 · Method and apparatus for flexible and efficient analytics in a network switch

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

- Number: US 2025/0158910 A1
- Document ID: US20250158910A1
- Status: Published application
- Kind: A1
- Application number: 19/004,387
- Filed: 2024-12-29
- Published: 2025-05-15
- Earliest claimed: 2014-05-28
- Assignees: Marvell Asia Pte Ltd
- Applicants: Marvell Asia Pte., Ltd.
- Inventors: Weihuang Wang; Gerald Schmidt; Tsahi Daniel; Saurabh Shrivastava
- Web page: https://patentgrep.com/patent/US20250158910A1

## CPC

- H04L 43/0894: Packet rate
- H04L 12/1407: {Policy-and-charging control [PCC] architecture}
- H04L 12/1435: {volume-based}
- H04L 41/0893: Assignment of logical groups to network elements
- H04L 41/0894: Policy-based network configuration management
- H04L 43/0805: by checking availability
- H04L 43/0888: Throughput
- H04L 47/20: Traffic policing
- H04L 41/142: using statistical or mathematical methods
- H04M 15/58: {based on statistics of usage or network monitoring}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- H04M: TELEPHONIC COMMUNICATION (circuits for controlling other apparatus via a telephone cable and not involving telephone switching apparatus G08)

## Abstract

Embodiments of the present invention relate to a centralized network analytic device, the centralized network analytic device efficiently uses on-chip memory to flexibly perform counting, traffic rate monitoring and flow sampling. The device includes a pool of memory that is shared by all cores and packet processing stages of each core. The counting, the monitoring and the sampling are all defined through software allowing for greater flexibility and efficient analytics in the device. In some embodiments, the device is a network switch.

## Claims

### Claim 1

A network switch comprising:
at least one core including a plurality of pipeline stages;
an interface module including a unified request and response interface for communicating with each of the plurality of pipeline stages of the at least one core to receive requests therefrom; and
a common memory pool coupled with the interface module and for processing the requests in parallel.

### Claim 2 (depends on 1)

The network switch of claim 1, further comprising an analytics module for performing multiple parallel network analytics, wherein the analytics module includes:
a plurality of client interfaces;
an interconnect; and
a plurality of analytics banks.

### Claim 3 (depends on 2)

The network switch of claim 2, wherein the plurality of client interface and the plurality of analytics banks are interconnected through the interconnect.

### Claim 4 (depends on 2)

The network switch of claim 2, wherein each of the plurality of client interfaces is programmable to map to one or more of the plurality of analytics banks.

### Claim 5 (depends on 2)

The network switch of claim 2, wherein memories from the common memory pool are separated into the plurality of analytics banks.

### Claim 6 (depends on 2)

The network switch of claim 2, wherein the plurality of analytics banks is homogenous.

### Claim 7 (depends on 2)

The network switch of claim 2, wherein each of the plurality of analytics banks includes an on-chip memory.

### Claim 8 (depends on 2)

The network switch of claim 2, wherein the plurality of client interfaces is similarly configured.

### Claim 9 (depends on 2)

The network switch of claim 2, wherein each of the plurality of client interfaces includes a request interface for receiving requests and a response interface for sending responses.

### Claim 10 (depends on 9)

The network switch of claim 9, wherein the request interface classifies each request and determines a target analytics bank and a target entry address within the target analytics bank that the request should target, wherein the target analytics bank is one of the plurality of analytics bank.

### Claim 11 (depends on 10)

The network switch of claim 10, wherein the request is sent to the interconnect to be routed to the target analytics bank for processing.

### Claim 12 (depends on 2)

The network switch of claim 2, wherein each of the plurality of client interfaces is configured as one of four modes: counter, policing, policing with billing counters and sampling.

### Claim 13 (depends on 12)

The network switch of claim 12, wherein the counting mode, the policing mode and the sampling mode are each allocated at bank granularity, and wherein the policing with billing counters mode is allocated at granularity of a pair of analytics banks.

### Claim 14 (depends on 13)

The network switch of claim 13, wherein analytics bank 2*i is for policing and the immediate next analytics bank 2*i+1 is for corresponding billing counters.

### Claim 15 (depends on 2)

The network switch of claim 2, wherein when an analytics bank is in counting mode, the analytics bank is configured in one of four configurations, wherein modification operations are different for each of the configurations.

### Claim 16 (depends on 15)

The network switch of claim 15, wherein the modification operations include incrementing the value of an events field by one for each incoming request, incrementing the value of a sum field by the value of the incoming request, and incrementing the value of a sumOfSquare field by the square of the value of the incoming request.

### Claim 17 (depends on 15)

The network switch of claim 15, wherein standard deviation of network activities is calculated by subtracting the square of average of sum from the average of sumOfSquare.

### Claim 18 (depends on 15)

The network switch of claim 15, wherein no result response goes out of the analytics bank, wherein counter values are stored in memory of the analytics bank.

### Claim 19 (depends on 15)

The network switch of claim 15, wherein a fifth configuration is only used for policing with billing counter mode.

### Claim 20 (depends on 2)

The network switch of claim 2, wherein when an analytics bank is in policing mode, the analytics bank performs a two-rate three color rate monitoring function.

### Claim 21 (depends on 20)

The network switch of claim 20, wherein every row of the analytics bank has one policer, wherein the policer has configuration and internal state.

### Claim 22 (depends on 20)

The network switch of claim 20, wherein the policer returns a color of a packet to one of the client interfaces that originated the packet.

### Claim 23 (depends on 21)

The network switch of claim 21, wherein when the originating client interface is configured as policing with billing counters mode, the analytics bank is sends a counter request to its immediate next analytics bank to calculate byte count for a packet in each color.

### Claim 24 (depends on 2)

The network switch of claim 2, wherein when an analytics bank is in sampling mode, the analytics bank supports N/M random sampling, wherein N contiguous events are sampled in every M events interval.

### Claim 25 (depends on 24)

The network switch of claim 24, wherein a response is returned to the originating client interface for each request.

### Claim 26

An analytics bank comprising:
at least three processing units including:
a counter processing unit;
a policing processing unit, wherein the policing processing unit is able to push a request to another analytics bank for byte counting of color, wherein the another analytics bank is immediate next to the analytics bank; and
a sampling processing unit; and
a memory bypass module to hide memory read latency, wherein output data of the memory bypass module is directed to the counter processing unit, the policing processing unit or the sampling processing unit.

### Claim 27 (depends on 26)

The analytics bank of claim 26, wherein when the analytics bank is in counter mode, the counter processing unit is configured to calculate sum of square, summation and event count for network activity statistical analysis.

### Claim 28 (depends on 27)

The analytics bank of claim 27, wherein the counter processing unit is configured to calculate standard deviation of network activities.

### Claim 29

A method of a network switch comprising:
partitioning a pool of shared memories into a plurality of homogeneous analytics banks;
programmably configuring each of a plurality of client interfaces as one of four modes: counter, policing, policing with billing counters or sampling;
programmably mapping each of the plurality of client interfaces to a subset of the plurality of homogeneous analytics banks;
programmably assigning each of the plurality of homogeneous analytics banks as one of three modes: counter, policing or sampling; and
parallel processing multiple requests received at the plurality of client interfaces.

### Claim 30 (depends on 29)

The method of claim 29, wherein the parallel processing multiple requests comprises, for each of the multiple requests:
determining a target analytics bank and a target entry address within the target analytics bank;
when the target analytics bank is in the counter mode, the target analytics bank performing at least one operation, wherein the at least one operation includes sum of square, summation or event count;
when the target analytics bank is in the policing mode, the target analytics bank performing a two-rate three-color rate monitoring function; and
when the target analytics bank is in the sampling mode, the target analytics bank supporting N/M random sampling, wherein N contiguous events are sampled in every M events interval.

### Claim 31 (depends on 30)

The method of claim 30, wherein when the target analytics bank is in the counter mode, the method further includes determining a counter entry within the target analytics bank based on the target entry address and determining a memory row within the target analytics bank to store counter values.

### Claim 32 (depends on 31)

The method of claim 31, further comprising calculating standard deviation of network activities.

### Claim 33 (depends on 30)

The method of claim 30, wherein when the target analytics bank is in the policing mode, the target analytics bank returning a color of a packet to an originating client interface of the packet.

### Claim 34 (depends on 34)

The method of claim 34, further comprising the target analytics bank sending a counter request to an immediate next analytics bank for calculating byte count for the packet in each color.

### Claim 35 (depends on 30)

The method of claim 30, wherein when the target analytics bank is in the sampling mode, the target analytics bank returning a response to an originating client interface of the request.
