Signed Reference Counter for Multicast Memory Deallocation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current network devices face challenges in efficiently managing memory deallocation for multicast and broadcast packets, leading to increased latency and resource utilization issues due to the need for multiple copies of packets in memory cells, which complicates the determination of when memory can be safely deallocated.
Innovation Solution
A network device employs a signed reference counter that is incremented and decremented for each transmission of a multicast packet, allowing for the determination of a final count, which enables memory deallocation when cumulative updates match the final count, ensuring that memory cells are released only after all copies have been transmitted.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multiple copies of multicast packets are stored in memory cells, then all egress interfaces can process packets simultaneously, but memory management complexity increases and latency increases
Solution Approach 1:
Instead of storing multiple physical copies of the packet in memory cells, the patent uses a single packet copy with multiple egress descriptors that reference the same packet. Each egress interface has its own descriptor containing the packet pointer and transmission control information, eliminating the need for duplicate packet storage while enabling simultaneous processing across multiple interfaces
Solution Approach 2:
The patent segments the packet processing into two independent parts: a single packet data copy stored in memory and multiple egress descriptors stored in descriptor memory. Each descriptor is independently manageable and can be processed separately by different egress interfaces, allowing parallel processing without duplicating the actual packet data
2Productivity
If multiple copies of multicast packets are stored in memory cells, then packet transmission to multiple destinations is enabled, but resource utilization decreases
Solution Approach 1:
The patent creates logical copies through egress descriptors rather than physical copies in memory. Multiple descriptors reference the same packet data, enabling transmission to multiple destinations while using a single packet copy in memory, thus improving memory resource utilization
Solution Approach 2:
The patent merges multiple packet copies into a single shared packet data structure that is referenced by multiple egress descriptors. This consolidation reduces the total memory footprint while maintaining the capability to transmit packets to multiple destinations simultaneously
3Reliability
If memory deallocation is delayed until all copies are transmitted, then data integrity is ensured, but latency increases
Solution Approach 1:
The patent performs preliminary actions by setting up the signed reference counter to track transmission progress before memory deallocation is needed. The counter is incremented as packets are transmitted and decremented when descriptors are processed, allowing the system to know exactly when all copies have been sent without delaying deallocation unnecessarily
Solution Approach 2:
The signed reference counter provides continuous feedback on transmission progress. It starts at zero, increments for each packet transmission, and decrements when descriptors are processed. When the counter reaches zero, it provides definitive feedback that all copies have been transmitted, enabling timely memory deallocation while ensuring data integrity
Data Source
AI summary
A method for deallocating memory in a first network device is described. A multicast packet is received and stored in memory cells. Egress descriptors corresponding to the multicast packet are generated for transmission of the multicast packet. A final count of the egress descriptors is determined. The egress descriptors are processed for transmission of the multicast packet and a value of a signed reference counter corresponding to the multicast packet is updated in a first direction before the final count has been determined and after a copy of the multicast packet has been received by an egress port of the first network device. The value of the signed reference counter is updated in a second direction opposite the first direction by the final count after determination of the final count. The memory cells are deallocated when cumulative first direction updates are equal to the second direction update.


