Router Shared Memory Statistical Counter Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Routers lack a comprehensive mechanism for maintaining statistical information about packet flows, leading to inefficient data collection that can slow down packet transmission by diverting processing power away from forwarding packets.
Innovation Solution
A method is implemented in a router with a forwarding path for packet forwarding and a service path for managing statistical data, where counters in the forwarding path collect aggregate packet information and store it in shared memory, allowing the service path to retrieve and calculate statistical information without affecting the line rate, ensuring the line rate remains at or above a minimum.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If comprehensive statistical information about packet flows is maintained, then measurement precision is improved, but device complexity increases and processing power is diverted from packet forwarding
Solution Approach 1:
The router is divided into two independent functional paths: a forwarding path for packet transmission and a service path for statistical data collection. The forwarding path includes input interface, forwarding engine, and output interface, while the service path includes counter, shared memory, and statistics calculator. This segmentation allows statistical processing to occur without interfering with packet forwarding operations.
Solution Approach 2:
A shared memory structure acts as an intermediary between the forwarding path and service path. The forwarding path writes count information to the shared memory, and the service path reads from it to generate statistics. This intermediary mechanism enables data exchange without direct interaction between the two paths, preventing resource contention and maintaining forwarding performance.
2Measurement precision
If comprehensive statistical information about packet flows is maintained, then measurement precision is improved, but productivity decreases due to diverted processing power
Solution Approach 1:
The router is divided into two independent functional paths: a forwarding path for packet transmission and a service path for statistical data collection. The forwarding path includes input interface, forwarding engine, and output interface, while the service path includes counter, shared memory, and statistics calculator. This segmentation allows statistical processing to occur without interfering with packet forwarding operations.
Solution Approach 2:
The forwarding path autonomously updates count information in the shared memory without requiring intervention from the service path. The service path independently retrieves this information and generates statistics. This self-service mechanism ensures that statistical processing does not become a bottleneck for packet forwarding, maintaining high productivity.
3Speed
If statistical data collection is performed outside the forwarding path, then line rate is maintained, but statistical information completeness is reduced
Solution Approach 1:
The shared memory structure serves multiple functions: it stores count information from the forwarding path, provides data for statistical calculation by the service path, and maintains accessibility without blocking forwarding operations. This multi-functional design enables both high-speed forwarding and comprehensive statistical collection to coexist efficiently.
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
A method provides a router having an input, an output, and a shared memory. The router also has a forwarding path to forward a plurality of packets from the input to the output, and a service path to manage statistical data relating to packets forwarded through the forwarding path. The forwarding path has a counter to count aggregate packet information relating to the plurality of packets it forwards. Next, the method counts, using the counter(s), aggregate packet information relating to the packets forwarded through the forwarding path to produce count information. After producing the count information, the method uses the forwarding path to store the count information in the shared memory of the router, and then causes the service path to retrieve the count information from the shared memory. The service path ultimately produces statistical information using the count information retrieved from the shared memory.