Packet processing method and apparatus, communications device, and switching circuit
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.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 10 · Forward citations: 0.
Claims (8)
- Claim 1Independent Claim
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 2Depends 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 3Depends 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 4Depends 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 5Depends 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 6Depends 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 7Depends 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 8Depends 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.
Technical Overview & Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation of U.S. patent application Ser. No. 17/809,166, filed on Jun. 27, 2022, which is a continuation of U.S. patent application Ser. No. 17/171,661, filed on Feb. 9, 2021, now U.S. Pat. No. 11,388,114, which is a continuation of International Application No. PCT/CN2019/098050, filed on Jul. 27, 2019, which claims priority to Chinese Patent Application No. 201810912207.4, filed on Aug. 10, 2018. All of the aforementioned applications are hereby incorporated by reference in their entireties. TECHNICAL FIELD Embodiments of this disclosure relate to the field of communications technologies, and in particular, to a packet processing method and apparatus, a communications device, and a switching circuit. BACKGROUND A shared buffer is a mainstream configuration parameter of an existing router, a switch forwarding chip (TM), and a switching network. Generally, the shared buffer is allocated and managed at a plurality of levels. A multi-level buffer may include a queue buffer, a port buffer, a global buffer, and the like in ascending order. The global buffer may include at least one port buffer, and the port buffer may include at least one queue buffer. When congestion occurs in a high-level buffer, regardless of whether congestion occurs in a low-level buffer, packets to be stored in the low-level buffer are discarded without differentiation. For example, when congestion occurs in the port buffer because of packets stored in a low-priority queue buffer 1 , packets to be stored in a high-priority queue buffer 2 are discarded without differentiation. Based on the foregoing congestion control manner, when excessive shared buffers are occupied because of congestion, a high-priority packet, a non-congestion-level packet, and the like are discarded without differentiation, and a bandwidth allocation error is further caused because a low-priority queue buffer preempts a bandwidth of a high-priority queue buffer,
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (10)
| Patent | Title | Year | Citations |
|---|