# US 2021/0176182 A1 · Method and Apparatus for Determining Packet DeQueue Rate

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0176182 A1
- Document ID: US20210176182A1
- Status: Published application
- Kind: A1
- Application number: 17/171,250
- Filed: 2021-02-09
- Published: 2021-06-10
- Earliest claimed: 2018-08-09
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Sai Yuan; Xiaozhong Wang
- Web page: https://patentgrep.com/patent/US20210176182A1

## CPC

- H04L 43/0852: Delays
- H04L 43/16: Threshold monitoring
- H04L 47/25: with rate being modified by the source upon detecting a change of network conditions
- H04L 47/28: in relation to timing considerations
- H04L 47/29: {using a combination of thresholds}
- H04L 47/32: by discarding or delaying data units, e.g. packets or frames
- H04L 49/9005: using dynamic buffer space allocation
- H04L 47/33: using forward notification
- H04L 47/56: implementing delay-aware scheduling
- H04L 51/234: for tracking messages
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method for determining a packet dequeue rate includes allocating a plurality of consecutive blocks in a first memory to a first packet, storing the first packet and a first length in the plurality of blocks, where the first length is of a first packet queue and is obtained when the first packet is enqueued into the first packet queue, and determining, based on a first span and the first length stored, a first rate at which a packet in the first packet queue is dequeued, where the first span is equal to a difference between a second time and a first time, the first time is when the first packet is enqueued into the first packet queue, and the second time is when the first packet is dequeued from the first packet queue.

## Claims

### Claim 1

A method for determining a packet dequeue rate comprising:
allocating a plurality of blocks in a first memory to a first packet, wherein the blocks are consecutive;
enqueuing the first packet into a first packet queue;
obtaining a first length of the first packet queue at a first time when the first packet is enqueued into the first packet queue;
storing the first packet and the first length in the blocks; and
determining, based on a first span and the first length, a first rate at which a second packet in the first packet queue is dequeued,
wherein the first span is equal to a first difference between a second time and the first time, and
wherein the second time is when the first packet is dequeued from the first packet queue.

### Claim 2 (depends on 1)

The method of claim 1, wherein each of the blocks comprises a first capacity, and wherein a second difference between a second length of the first packet and second capacities of the blocks is less than the first capacity.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
determining a queuing latency of a third packet at a third time based on the first rate, wherein the queuing latency is equal to a quotient of a third length and the first rate, wherein the third length is of the first packet queue at the third time, and wherein the third time is later than the second time; and
processing the third packet based on the queuing latency.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
enqueuing the third packet into the first packet queue by storing the third packet in a second memory when the queuing latency is less than a first threshold, wherein a second working frequency of the second memory is higher than a first working frequency of the first memory;
enqueuing the third packet into the first packet queue by storing the third packet in the first memory when the queuing latency is greater than the first threshold and less than a second threshold;
avoiding enqueuing the third packet into the first packet queue when the queuing latency is greater than the second threshold; and
performing Explicit Congestion Notification (ECN) marking on the third packet when the queuing latency is greater than a third threshold.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
storing the first time in the first memory; and
determining, based on the first length and the first time, the first rate.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
enqueuing a fourth packet into the first packet queue, wherein the fourth packet and the first packet are not adjacent to each other in the first packet queue;
obtaining a fourth length of the first packet queue at a fourth time when the fourth packet is enqueued into the first packet queue, wherein the fourth length is greater than zero; and
determining, based on the fourth length and a second span, a second rate at which the second packet is dequeued, wherein the second span is equal to a third difference between a fifth time and the fourth time, wherein the fifth time is when the fourth packet is dequeued from the first packet queue.

### Claim 7

An apparatus for determining a packet dequeue rate comprising:
a first memory comprising a plurality of blocks, wherein the blocks are consecutive; and
a processor coupled to the first memory and configured to:
allocate the blocks to a first packet;
enqueue the first packet into a first packet queue;
obtain a first length of the first packet queue at a first time when the first packet is enqueued into the first packet queue;
store the first packet and the first length in the blocks; and
determine, based on a first span and the first length, a first rate at which a second packet in the first packet queue is dequeued,
wherein the first span is equal to a first difference between a second time and the first time, and
wherein the second time is when the first packet is dequeued from the first packet queue.

### Claim 8 (depends on 7)

The apparatus of claim 7, wherein each of the blocks comprises a first capacity, and wherein a second difference between a second length of the first packet and second capacities of the blocks is less than the first capacity.

### Claim 9 (depends on 7)

The apparatus of claim 7, wherein the processor is further configured to:
determine a queuing latency of a third packet at a third time based on the first rate, wherein the queuing latency is equal to a quotient of a third length and the first rate, wherein the third length is of the first packet queue at the third time, and wherein the third time is later than the second time; and
process the third packet based on the queuing latency.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein the processor is further configured to:
enqueue the third packet into the first packet queue by storing the third packet in a second memory when the queuing latency is less than a first threshold, wherein a second working frequency of the second memory is higher than a first working frequency of the first memory;
enqueue the third packet into the first packet queue by storing the third packet in the first memory when the queuing latency is greater than the first threshold and less than a second threshold;
avoid enqueuing the second packet into the first packet queue when the queuing latency is greater than the second threshold; and
perform Explicit Congestion Notification (ECN) marking on the third packet when the queuing latency is greater than a third threshold.

### Claim 11 (depends on 7)

The apparatus of claim 7, wherein the processor is further configured to:
store the first time in the first memory; and
determine, based on the first length and the first time, the first rate.

### Claim 12 (depends on 7)

The apparatus of claim 7, wherein the processor is further configured to:
enqueue a fourth packet into the first packet queue, wherein the fourth packet and the first packet are not adjacent to each other in the first packet queue;
obtain a fourth length of the first packet queue at a fourth time when the fourth packet is enqueued into the first packet queue, wherein the fourth length is greater than zero; and
determine, based on the fourth length and a second span, a second rate at which the second packet is dequeued, wherein the second span is equal to a third difference between a fifth time and the fourth time, wherein the fifth time is when the fourth packet is dequeued from the first packet queue.

### Claim 13

A computer program product comprising computer-executable instructions stored on a non-transitory computer-readable storage medium that, when executed by a processor, cause a device to:
allocate a plurality of blocks in a first memory to a first packet, wherein the blocks are consecutive;
enqueue the first packet into a first packet queue;
obtain a first length of the first packet queue at a first time when the first packet is enqueued into the first packet queue;
store the first packet and the first length in the blocks; and
determine, based on a first span and the first length, a first rate at which a second packet in the first packet queue is dequeued,
wherein the first span is equal to a difference between a second time and the first time, and
wherein the second time is when the first packet is dequeued from the first packet queue.

### Claim 14

A computer program product comprising computer-executable instructions stored on a non-transitory computer-readable storage medium that, when executed by a processor, cause a device to:
allocate a plurality of blocks in a first memory to a first packet, wherein the blocks are consecutive;
enqueue the first packet into a first packet queue;
obtain a first length of the first packet queue at a first time when the first packet is enqueued into the first packet queue;
store the first packet and the first length in the blocks;
determine, based on a first span and the first length, a first rate at which a second packet in the first packet queue is dequeued, wherein the first span is equal to a first difference between a second time and the first time, and wherein the second time is when the first packet is dequeued from the first packet queue;
determine a queuing latency of a third packet at a third time based on the first rate, wherein the queuing latency is equal to a quotient of a third length and the first rate, wherein the third length is of the first packet queue at the third time, and wherein the third time is later than the second time; and
process the third packet based on the queuing latency.

### Claim 15

(canceled)

### Claim 16 (depends on 13)

The computer program product of claim 13, wherein each of the blocks comprises a first capacity, and wherein a second difference between a second length of the first packet and second capacities of the blocks is less than the first capacity.

### Claim 17 (depends on 13)

The computer program product of claim 13, wherein the instructions, when executed by the processor, further cause the device to:
determine a queuing latency of a third packet at a third time based on the first rate, wherein the queuing latency is equal to a quotient of a third length and the first rate, wherein the third length is of the first packet queue at the third time, and wherein the third time is later than the second time; and
process the third packet based on the queuing latency.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein the instructions, when executed by the processor, further cause the device to:
enqueue the third packet into the first packet queue by storing the third packet in a second memory when the queuing latency is less than a first threshold, wherein a second working frequency of the second memory is higher than a first working frequency of the first memory;
enqueue the third packet into the first packet queue by storing the third packet in the first memory when the queuing latency is greater than the first threshold and less than a second threshold;
avoid enqueuing the second packet into the first packet queue when the queuing latency is greater than the second threshold; and
perform Explicit Congestion Notification (ECN) marking on the third packet when the queuing latency is greater than a third threshold.

### Claim 19 (depends on 13)

The computer program product of claim 13, wherein the instructions, when executed by the processor, further cause the device to:
store the first time in the first memory; and
determine, based on the first length and the first time, the first rate.

### Claim 20 (depends on 13)

The computer program product of claim 13, wherein the instructions, when executed by the processor, further cause the device to:
enqueue a fourth packet into the first packet queue, wherein the fourth packet and the first packet are not adjacent to each other in the first packet queue;
obtain a fourth length of the first packet queue at a fourth time when the fourth packet is enqueued into the first packet queue, wherein the fourth length is greater than zero; and
determine, based on the fourth length and a second span, a second rate at which the second packet is dequeued, wherein the second span is equal to a third difference between a fifth time and the fourth time, wherein the fifth time is when the fourth packet is dequeued from the first packet queue.

### Claim 21 (depends on 14)

The computer program product of claim 14, wherein the instructions, when executed by the processor, further cause the device to:
enqueue a fourth packet into the first packet queue, wherein the fourth packet and the first packet are not adjacent to each other in the first packet queue;
obtain a fourth length of the first packet queue at a fourth time when the fourth packet is enqueued into the first packet queue, wherein the fourth length is greater than zero; and
determine, based on the fourth length and a second span, a second rate at which the second packet is dequeued, wherein the second span is equal to a third difference between a fifth time and the fourth time, wherein the fifth time is when the fourth packet is dequeued from the first packet queue.
