Two-Stage MAC Learning Engine for Switches
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Cut-through switching in network switches can lead to erroneous source MAC address learning, causing incorrect entries in the MAC address forwarding table and occupying valuable storage capacity, often triggered by mistaken station moves due to incomplete packet verification.
Innovation Solution
A network switching device with a two-stage learning engine that filters out erroneous source MAC addresses by parsing packet headers and verification parameters to generate port identifiers, performing a first-stage learning process to store status parameters and hash addresses, and a second-stage process to update the MAC forwarding table only after verifying packet integrity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If cut-through switching is used to forward packets quickly, then packet forwarding speed is improved, but erroneous source MAC addresses are learned into the forwarding table causing incorrect entries
Solution Approach 1:
The patent performs preliminary MAC address learning at the first stage using only the packet header, before complete packet verification is available. This allows the forwarding table to be populated with MAC addresses early in the packet processing flow, enabling fast forwarding while deferring完整性 verification to a second stage that does not block the forwarding path.
Solution Approach 2:
The patent segments the MAC address learning process into two distinct stages: first-stage learning that occurs during header parsing and second-stage verification that occurs after complete packet reception. This segmentation allows the critical forwarding function to proceed based on preliminary learning while integrity verification happens in parallel without blocking the fast path.
2Productivity
If source MAC address is learned during header parsing in cut-through switching, then processing speed is improved, but storage capacity is wasted due to erroneous entries
Solution Approach 1:
The system performs preliminary MAC address learning during header parsing to populate the forwarding table quickly, then performs second-stage verification after complete packet reception. This allows high-speed learning without immediately committing to permanent storage, as erroneous entries can be identified and removed after verification fails.
Solution Approach 2:
When second-stage verification fails to confirm packet integrity, the patent discards the erroneously learned MAC address from the forwarding table. This recovery mechanism ensures that storage capacity is not permanently wasted on invalid entries while maintaining the high-speed learning capability during the first stage.
3Reliability
If complete packet verification is performed before learning MAC address, then learning accuracy is improved, but processing time increases
Solution Approach 1:
The verification process is segmented into two phases: first-stage verification during header parsing that provides preliminary confidence, and second-stage verification after complete packet reception that provides final confirmation. This segmentation allows the system to make forwarding decisions based on preliminary verification while completing full verification in the background without blocking the forwarding path.
Solution Approach 2:
The patent maintains continuous useful action by performing first-stage MAC address learning and preliminary verification during header parsing, which occurs continuously as packets arrive. The second-stage verification runs in parallel after packet reception without interrupting the forwarding flow, ensuring that verification activities continue without causing time loss in the critical forwarding path.
Data Source
AI summary
A Media Access Control address (MAC) learning method includes: parsing out packet header and packet verification parameter of a packet from an input/output port; generating a port identifier corresponding to the input/output port; starting first-stage procedure for the packet header; and starting second-stage procedure for the packet verification parameter. The first-stage procedure includes: performing, according to a MAC forwarding table and the port identifier, learning processing for source MAC address of the packet header to generate learning result; generating status parameter according to the learning result; and associating and storing the status parameter, the port identifier, and a hash address corresponding to the source MAC address into a memory. The second-stage procedure includes: obtaining the status parameter and the hash address from the memory according to the port identifier; and updating the MAC forwarding table according to the packet verification parameter, the obtained status parameter, and the obtained hash address.


