# US 12,224,952 B2 · Packet processing method and apparatus, communications device, and switching circuit

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

- Number: US 12,224,952 B2
- Document ID: US12224952B2
- Status: Granted
- Kind: B2
- Application number: 18/476,667
- Filed: 2023-09-28
- Published: 2024-01-18
- Granted: 2025-02-11
- Earliest claimed: 2018-08-10
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Nan Li; Chao Huang; Lixia Xiong
- Web page: https://patentgrep.com/patent/US12224952B2

## CPC

- H04L 49/9084: {Reactions to storage capacity overflow}
- H04L 47/12: Avoiding congestion; Recovering from congestion
- H04L 47/32: by discarding or delaying data units, e.g. packets or frames
- H04L 47/627: {policing}
- H04L 47/6275: based on priority
- H04L 49/3018: {Input queuing}
- H04L 49/90: Buffering arrangements
- H04L 49/9047: including multiple buffers, e.g. buffer pools
- H04L 51/226: Delivery according to priorities
- 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 packet processing method includes: a first device receives a packet from a second device; the first device determines a first queue buffer used to store the packet, and determines a first upper limit value of the first queue buffer based on an available value of a first port buffer and an available value of a global buffer, where the global buffer includes at least one port buffer, the first port buffer is one of the at least one port buffer, the first port buffer includes at least one queue buffer, and the first queue buffer is one of the at least one queue buffer. The first device processes the packet based on the first upper limit value of the first queue buffer, an occupation value of the first queue buffer, and a size of the packet.

## Claims

### Claim 1

An apparatus comprising:
an interface for receiving a packet; and
at least one processor, wherein the at least one processor is configured to execute a program, and execution of the program causes the apparatus to perform:
obtaining a first threshold of a first queue buffer based on a second threshold of a first port buffer and a third threshold of a global buffer, wherein the second threshold is associated with an available value of the first port buffer, and the third threshold is associated with an available value of the global buffer, and wherein the global buffer comprises at least two buffers including the first port buffer, and the first port buffer comprises at least two buffers including the first queue buffer; and
processing the packet based on the first threshold.

### Claim 2 (depends on 1)

The apparatus according to claim 1, wherein execution of the program causes the apparatus to perform:
obtaining the first threshold based on the second threshold, the third threshold, and a fourth threshold of the first queue buffer.

### Claim 3 (depends on 1)

The apparatus according to claim 1, wherein the available value of the global buffer is associated with an upper limit value of the global buffer and an occupation value of the global buffer; an upper limit value of the first port buffer is associated with a coefficient and the available value of the global buffer; and the available value of the first port buffer is associated with the second threshold and an occupation value of the first port buffer.

### Claim 4 (depends on 3)

The apparatus according to claim 3, wherein execution of the program causes the apparatus to perform:
when a sum of an occupation value of the first queue buffer and a size of the packet is greater than the first threshold, discarding the packet.

### Claim 5 (depends on 3)

The apparatus according to claim 3, wherein execution of the program causes the apparatus to perform:
when a sum of an occupation value of the first queue buffer and a size of the packet is less than or equal to the first threshold, storing the packet in the first queue buffer.

### Claim 6 (depends on 3)

The apparatus according to claim 3, wherein execution of the program causes the apparatus to perform:
when a sum of an occupation value of the first queue buffer and a size of the packet is greater than the first threshold, adding a congestion identifier to the packet, and storing, in the first queue buffer, the packet to which the congestion identifier is added, wherein the congestion identifier indicates that the first queue buffer is in a congestion state.

### Claim 7 (depends on 3)

The apparatus according to claim 3, wherein execution of the program causes the apparatus to perform:
when a sum of an occupation value of the first queue buffer and a size of the packet is greater than the first threshold, storing the packet in the first queue buffer, and sending an indication signal to the interface.

### Claim 8 (depends on 1)

The apparatus according to claim 1, wherein the interface is further configured to send a backpressure signal to another communications device, wherein the backpressure signal instructs the another communications device to stop sending a packet, or stop sending a packet after sending at least one packet whose total size is a specific value.

### Claim 9 (depends on 1)

The apparatus according to claim 1, wherein a packet that is stored in the first queue buffer is also stored in the first port buffer and the global buffer.

### Claim 10

A method comprising:
receiving a packet;
obtaining a first threshold of a first queue buffer based on a second threshold of a first port buffer and a third threshold of a global buffer, wherein the second threshold is associated with an available value of the first port buffer, and the third threshold is associated with an available value of the global buffer, wherein the global buffer comprises at least two buffers including the first port buffer, and the first port buffer comprises at least two buffers including the first queue buffer; and
processing the packet based on the first threshold.

### Claim 11 (depends on 10)

The method according to claim 10, comprising:
obtaining the first threshold based on the second threshold, the third threshold, and a fourth threshold of the first queue buffer.

### Claim 12 (depends on 10)

The method according to claim 10, wherein the available value of the global buffer is associated with an upper limit value of the global buffer and an occupation value of the global buffer; an upper limit value of the first port buffer is associated with a coefficient and the available value of the global buffer; and the available value of the first port buffer is associated with the second threshold and an occupation value of the first port buffer.

### Claim 13 (depends on 12)

The method according to claim 12, wherein processing the packet based on the first threshold comprises:
when a sum of an occupation value of the first queue buffer and a size of the packet is less than or equal to the first threshold, storing the packet in the first queue buffer.

### Claim 14 (depends on 12)

The method according to claim 12, wherein processing the packet based on the first threshold comprises:
when a sum of an occupation value of the first queue buffer and a size of the packet is greater than the first threshold, adding a congestion identifier to the packet, and storing, in the first queue buffer, the packet to which the congestion identifier is added, wherein the congestion identifier indicates that the first queue buffer is in a congestion state.

### Claim 15 (depends on 12)

The method according to claim 12, wherein processing the packet based on the first threshold comprises:
when a sum of an occupation value of the first queue buffer and a size of the packet is greater than the first threshold, storing the packet in the first queue buffer, and sending an indication signal.

### Claim 16 (depends on 10)

The method according to claim 10, wherein processing the packet based on the first threshold comprises:
when a sum of an occupation value of the first queue buffer and a size of the packet is greater than the first threshold, discarding the packet.

### Claim 17 (depends on 10)

The method according to claim 10, further comprising:
sending a backpressure signal to another communications device, wherein the backpressure signal instructs the another communications device to stop sending a packet, or stop sending a packet after sending at least one packet whose total size is a specific value.

### Claim 18 (depends on 10)

The method according to claim 10, wherein a packet that is stored in the first queue buffer is also stored in the first port buffer and the global buffer.
