Packet Forwarding Scheduler Virtual Queue Head-of-Line Blocking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In packet forwarding systems, the head-of-line blocking phenomenon occurs when back pressure in a physical egress port prevents packets from being output, leading to inefficient bandwidth utilization and scheduling issues, as the scheduler waits for bandwidth scheduling results before sending packets.
Innovation Solution
A packet forwarding method and apparatus where a first scheduler sends packets to a destination physical egress port without waiting for bandwidth scheduling results, using a virtual queue to represent needed bandwidth, and a port controller determines the output occasion, thereby avoiding head-of-line blocking even if back pressure appears in connected egress ports.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If the scheduler waits for bandwidth scheduling results before sending packets, then bandwidth scheduling accuracy is improved, but packet forwarding delay increases and head-of-line blocking occurs
Solution Approach 1:
The scheduler performs preliminary packet forwarding actions without waiting for bandwidth scheduling results. Packets are forwarded based on available buffer space information, and bandwidth scheduling results are used subsequently to adjust virtual queue lengths, thereby eliminating waiting time while maintaining scheduling accuracy through feedback mechanisms.
2Stability of the object's composition
If the scheduler sequentially processes packets in the packet queue, then packet processing order is maintained, but head-of-line blocking prevents packets behind the queue head from being forwarded
Solution Approach 1:
The system segments the packet queue into multiple virtual queues, each associated with different egress ports. This allows independent processing of packets destined for different ports, enabling packets behind the physical queue head to be forwarded if their destination port has available bandwidth, thereby eliminating head-of-line blocking while maintaining logical processing order through virtual queue management.
3Reliability
If back pressure appears in a physical egress port, then bandwidth allocation control is improved, but the scheduler cannot obtain bandwidth scheduling results and stops forwarding packets
Solution Approach 1:
The system introduces virtual queues as intermediaries between the scheduler and physical egress ports. When back pressure occurs at a physical egress port, the scheduler can still forward packets to other egress ports by checking buffer space information, while the virtual queue mechanism tracks bandwidth usage and receives scheduling results asynchronously, thereby maintaining forwarding continuity while preserving bandwidth allocation control.
Data Source
Figure 1
Figure 2~4
Figure 5~6
AI summary
Embodiments of the present invention disclose a packet forwarding method and apparatus, where the method includes: receiving, by a first scheduler, a target packet; sending the target packet to a destination physical egress port corresponding to the egress port information, and increasing, according to the queue identifier, a queue length of a virtual queue corresponding to the queue identifier by the packet length; sending update information to a second scheduler, where the update information includes that the queue length of the virtual queue is increased by the packet length; and decreasing the queue length of the virtual queue by the packet length according to a bandwidth scheduling result that is corresponding to the update information and sent by the second scheduler. It may be learnt that when the packet arrives at the first scheduler, the first scheduler may send the packet to a corresponding physical egress port with no need to wait for the bandwidth scheduling result. In this way, even if back pressure appears in the destination physical egress port corresponding to the target packet, that the first scheduler sends the target packet to the destination physical egress port is not affected.