Buffer management method and apparatus
AssigneeHuawei Technologies Co., Ltd.
InventorsSai Yuan, Xiaozhong Wang, Guang Li, Yu Bai
Life of this patent
Estimating the term…
Abstract
A memory management method includes: determining that available storage space of a first memory in a network device is less than a first threshold, where the first threshold is greater than 0 and the first memory stores a first packet queue; and deleting at least one packet at the tail of the first packet queue from the first memory based on the available storage space of the first memory being less than the first threshold. When the available storage space of the first memory is less than the first threshold, a packet queue, namely, the first packet queue, is selected and a packet at the tail of the packet queue is deleted from the first memory.
Claims15
A method comprising:
- storing packet queues in a first memory of a network device, the packet queues comprising a first packet queue and a second packet queue, wherein a first parameter value of the first packet queue is greater than a second parameter value of the second packet queue, wherein the first parameter value is a first latency of the first packet queue or a first length of the first packet queue, wherein the second parameter value is a second latency of the second packet queue or a second length of the second packet queue, wherein the first latency is a first duration that a first packet at a first tail of the first packet queue is expected to stay in the first packet queue, and wherein the second latency is a second duration that a second packet at a second tail of the second packet queue is expected to stay in the second packet queue;
- make a first determination that an available storage space of the first memory is less than a first threshold, wherein the first threshold is greater than 0;
- and
- deleting the first packet at the first tail of the first packet queue from the first memory in response to the first determination.
An apparatus comprising:
- a memory configured to store instructions;
- and
- a processor coupled to the memory and configured to execute the instructions to:
- store packet queues in a first memory of a network device, the packet queues comprising a first packet queue and a second packet queue, wherein a first parameter value of the first packet queue is greater than a second parameter value of the second packet queue, wherein the first parameter value is a first latency of the first packet queue or a first length of the first packet queue, wherein the second parameter value is a second latency of the second packet queue or a second length of the second packet queue, wherein the first latency is a first duration that a first packet at a first tail of the first packet queue is expected to stay in the first packet queue, and wherein the second latency is a second duration that a second packet at a second tail of the second packet queue is expected to stay in the second packet queue;
- make a first determination that an available storage space of the first memory is less than a first threshold, wherein the first threshold is greater than 0;
- and
- delete the first packet at the first tail of the first packet queue from the first memory.
A non-transitory computer-readable storage medium configured to store a computer program product, wherein the computer program comprising instructions that, when executed by a processor, cause an apparatus to:
- store packet queues in a first memory of a network device, the packet queues comprising a first packet queue and a second packet queue, wherein a first parameter value of the first packet queue is greater than a second parameter value of the second packet queue, wherein the first parameter value is a first latency of the first packet queue or a first length of the first packet queue, wherein the second parameter value is a second latency of the second packet queue or a second length of the second packet queue, wherein the first latency is a first duration that a first packet at a first tail of the first packet queue is expected to stay in the first packet queue, and wherein the second latency is a second duration that a second packet at a second tail of the second packet queue is expected to stay in the second packet queue;
- make a first determination that an available storage space of the first memory is less than a first threshold, wherein the first threshold is greater than 0;
- and
- deleting the first packet at the first tail of the first packet queue from the first memory in response to the first determination.
Dependencies are inferred from the claim text.