Per-Module IP Switching Mode Selection in Packet Forwarders
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional packet forwarding devices inefficiently utilize hardware resources, particularly in scenarios where the routing table exceeds the capacity of the hardware LPM table, leading to sub-optimal performance due to excessive slowpath processing and memory/CPU requirements.
Innovation Solution
Implementing a method to automatically select between LPM and IPFDB modes on a per-module basis, determining the capacity of the LPM table and the number of IP routes, and switching to IPFDB mode when the routing table exceeds the LPM table capacity, allowing only active hosts to be stored in both tables for efficient hardware-based forwarding.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If the hardware LPM table size is limited for cost-sensitive applications, then device cost is reduced, but routing performance deteriorates when the routing table exceeds LPM table capacity
Solution Approach 1:
The patent segments the routing table management into two parts: a hardware LPM table for common prefixes and a software routing table for complete routing information. This segmentation allows the hardware table to remain small (reducing cost) while the software table handles the full routing table (maintaining performance).
Solution Approach 2:
The patent introduces a hybrid forwarding mechanism as an intermediary between pure hardware LPM forwarding and pure software forwarding. The system first checks the hardware LPM table, then falls back to software routing table lookups, and finally uses a cache of active hosts to optimize frequently accessed routes, thus mediating between cost and performance requirements.
2Productivity
If the entire routing table is stored in the hardware LPM table, then routing performance is improved, but memory requirements and device cost increase
Solution Approach 1:
The patent extracts only the most frequently accessed routing information (active hosts and common prefixes) into the hardware LPM table and cache, while leaving the complete routing table in software memory. This extraction principle ensures that hardware resources are used efficiently for high-frequency operations without requiring the entire routing table to be stored in hardware.
Solution Approach 2:
The patent applies local quality by optimizing only the locally accessed portion of the routing table (active hosts and commonly used prefixes) in hardware, while the rest remains in software. This allows high-performance hardware forwarding for the most critical routes without the cost of storing all routes in hardware.
3Ease of manufacture
If LPM mode is used with limited hardware LPM table capacity, then device cost is reduced, but excessive slowpath processing occurs when routing table exceeds capacity
Solution Approach 1:
The patent performs preliminary action by proactively caching active host routes in both the hardware LPM table and a software cache before they are needed for forwarding. This preliminary population of the cache prevents subsequent slowpath processing, as frequently accessed routes are already in fast-access memory structures.
Solution Approach 2:
The patent implements feedback mechanisms that monitor routing table usage patterns and dynamically adjust what entries are maintained in the hardware LPM table versus the software cache. This feedback allows the system to adapt to changing traffic patterns and optimize the division between hardware and software routing to minimize slowpath processing.
Data Source
Figure 1
Figure 2A~2D
Figure 3
AI summary
The subject matter described herein includes methods, systems, and computer readable media for automatically selecting between Internet protocol switching modes on a per-module basis in a packet forwarding device. According to one aspect, the subject matter described herein includes a packet forwarding device including at least one input/output (I/O) module. The at least one I/O module includes a longest prefix matching (LPM) table, an Internet protocol forwarding database (IPFDB) and the packet forwarding device includes an IP routing table and an IPFDB. When the I/O module operates in an LPM mode, the IPFDB on the I/O module is populated with entries corresponding to active hosts, the LPM table on the I/O module is populated from the IP routing table with routes learned from IP routing protocols, and layer 3 packets received by the I/O module are routed using the IPFDB and LPM table of the I/O module. An automatic mode-selection module determines a capacity of the LPM table on the I/O module. The automatic mode-selection module also determines a total number of IP routes stored in the IP routing table and determines a relationship between the total number of IP routes and the capacity of the LPM table. In response to determining that the total number of IP routes has a predetermined relationship with the capacity of the LPM table, the automatic mode-selection module also automatically switches the I/O module from the LPM mode to an IPFDB mode, where the IPFDB and the LPM table are populated with entries corresponding to active hosts and layer 3 packets received by the I/O module are routed using the IPFDB and LPM table of the I/O module.