A sampling method and a network chip
A network chip and sampling ratio technology, applied in the field of communication, can solve the problems of large access bandwidth of network chips and counters, affecting the forwarding performance of network chips, time-consuming and other problems
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0088] Figure 8 Shown is a schematic diagram of the port representation in the embodiment of the present invention, and figure 2 Compared with , a field is added, which stores the preset sampling step value X. Exemplarily, if the sampling ratio is configured as N:1, X needs to be calculated in advance, assuming that the counting bit width of the counter is M, then when the count is accumulated to 2 M Flip after -1, set 2 M / N is written to the port table as the step value X. For example, when M is 10 and N=32, X=2 M / N=32. It is worth mentioning that when 2 M When / N is not an integer, in some cases where the sampling ratio N is not strictly required, X can be a pair of 2 M / N Round up.
[0089] Figure 9 It is a schematic structural diagram of the information returned by the counter in the embodiment of the present invention. Compared with the traditional counter, an overflow flag (Overflow Flag, OF) needs to be added to the information returned by the counter each ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 
