摘要 |
The present invention provides a method and a system of packet communication queuing and selective pushout. In the packet communication module, the quasi-longest-queue pointer is set up to point to the quasi-longest queue within the shared buffer to implement selective pushout. When an in-coming packet enters its destination queue, or an out-going packets leaves one of the output queues, the quasi-longest-queue pointer is maintained by comparing the length of the quasi-longest queue and that of the destination or output queue, respectively. The longer one of the current quasi-longest queue and the length-varied queue becomes the new quasi-longest queue. In addition, a flag and a pointer are used to indicate the presence of a damaged upper-layer packet and the queue the damaged packet belongs to, respectively When the shared buffer is full and packet discarding is to be performed, the packet to be discarded is first selected from the queue storing the damaged upper-layer packet, and then, the quasi-longest queue. The present invention implements the selective pushout packet discarding discipline with significantly reduced number of queue length comparisons, and employs the upper-layer packet discarding control to achieve better upper layer packet loss performance.
|