Queue management method and device based on variable-length packets stored in fixed-size location
暂无分享,去创建一个
The invention discloses a queue management method and device based on variable-length packets stored in fixed-size location. The method comprises the steps of: dividing a queue storage space into basic buffer memory units with equal size, setting a buffer memory descriptor for each unit, and storing the buffer memory descriptors in a buffer memory descriptor storage table to form a chain table; allocating required buffer memory descriptors in the buffer memory descriptor storage table to enqueue packets, filling in corresponding table item information, and giving enqueue logical addresses; finding buffer memory descriptors occupied by dequeue packets in the buffer memory descriptor storage table, and giving dequeue logical addresses; updating an idle queue information table and an output queue information table after the packets are enqueued and dequeued; and carrying the packets into the storage space in a fragmentation way through the enqueue logical addresses, and carrying the packets out of the storage space in a fragmentation way through the dequeue logical addresses. According to the queue management method and device based on the variable-length packets stored in the fixed-size location disclosed by the invention, the utilization rate of the queue storage space is improved, the complexity of queue maintenance is reduced, and the queue management method and device can be used in a packet switching system.