Traffic management chip control method, chip and storage medium

By obtaining multi-queue messages in the traffic management chip and determining the queue number according to business needs, the performance degradation problem caused by multiple input and output of messages is solved, and the data processing speed and chip efficiency are improved.

CN113839879BActive Publication Date: 2025-09-12ZTE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010583439.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-23
Publication Date
2025-09-12
Estimated Expiration
2040-06-23

AI Technical Summary

Technical Problem

The traffic management chip in the router suffers from performance degradation due to multiple input and output messages, and cannot meet the preset transmission rate requirements.

Method used

By obtaining multi-queue messages flowing into the traffic management chip, the queue number is determined according to business needs, and the chip is controlled to send messages after determining that all queues have been stored in the management queue, reducing the number of message in and out.

Benefits of technology

It improves data processing speed, reduces the impact on chip performance, and improves the processing efficiency of traffic management chips.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113839879B_ABST
    Figure CN113839879B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a traffic management chip control method, chip, and storage medium, belonging to the field of traffic management technology. The method includes: obtaining a multi-queue message flowing into the traffic management chip, wherein the multi-queue message includes multiple queue numbers, and the multiple queue numbers are determined according to business needs; when it is determined that there is no queue in the multi-queue message that is not stored in the management queue of the traffic management chip, controlling the traffic management chip to send the multi-queue message outward. The technical solution of the embodiment of the present invention reduces the number of times multi-queue messages enter and exit the chip by managing and controlling the multi-queue messages, thereby reducing the impact on chip performance and improving the speed of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traffic management technology, and in particular to a traffic management chip control method, chip and storage medium. Background Art

[0002] As core Internet equipment, routers are experiencing increasing transmission speeds and capacities as network capacity and services continue to grow rapidly. To ensure high-speed packet forwarding, routers typically utilize traffic management chips to manage high-speed data flows. For example, if a router has a line rate of 500Gbps, the corresponding traffic management chip must be higher than or equal to 500Gbps to enable high-speed packet forwarding.

[0003] As traffic management services in routers grow in demand, traffic must enter the traffic management chip multiple times. However, this multiple entry reduces the chip's performance, preventing it from meeting the required line rate. For example, a traffic management chip can theoretically handle 500Gbps per packet in and out. However, due to bandwidth limitations in the chip's peripheral hardware and the performance limitations of packet movement within the chip's memory, performance for two in and out packets can only reach 500Gbps / 2, and for n in and out packets, only 500Gbps / n. Consequently, the router's transmission performance falls short of the expected service requirements. Therefore, resolving the performance degradation caused by multiple in and out packets is a pressing issue. Summary of the Invention

[0004] The main purpose of the present invention is to provide a traffic management chip control method, chip and storage medium, aiming to solve the problem of multiple messages entering and exiting the chip, thereby reducing the impact on chip performance and thereby improving the speed of data processing.

[0005] In a first aspect, an embodiment of the present invention provides a traffic management chip control method, comprising:

[0006] Acquire a multi-queue message flowing into the traffic management chip, wherein the multi-queue message includes a plurality of queue numbers, and the plurality of queue numbers are determined according to service requirements;

[0007] When it is determined that there is no queue in the multi-queue message that is not stored in the management queue of the traffic management chip, the traffic management chip is controlled to send the multi-queue message.

[0008] In the second aspect, an embodiment of the present invention also provides a traffic management chip, which includes a processor, a memory, a computer program stored on the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of any traffic management chip control method provided in the specification of the present invention are implemented.

[0009] In a third aspect, an embodiment of the present invention further provides a storage medium for computer-readable storage, characterized in that the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any traffic management chip control method provided in the specification of the present invention.

[0010] Embodiments of the present invention provide a traffic management chip control method, chip, and storage medium. The present invention obtains multi-queue messages flowing into the traffic management chip, wherein the multi-queue messages include multiple queue numbers determined based on service requirements. When it is determined that no queues in the multi-queue messages are not stored in the management queues of the traffic management chip, the traffic management chip is controlled to send the multi-queue messages. By managing and controlling the multi-queue messages, the number of times multi-queue messages enter and exit the chip is reduced, thereby reducing the impact on chip performance and improving data processing speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 A flow chart showing the steps of a flow management chip control method provided by an embodiment of the present invention;

[0012] Figure 2 1 is a schematic block diagram of a structure of a multi-queue message according to an embodiment of the present invention;

[0013] Figure 3 A schematic flow chart of another method for controlling a flow management chip according to an embodiment of the present invention;

[0014] Figure 4 1 is a schematic block diagram of a structure of a multi-queue message descriptor according to an embodiment of the present invention;

[0015] Figure 5 A schematic flow chart of another method for controlling a flow management chip according to an embodiment of the present invention;

[0016] Figure 6 A schematic block diagram of the structure of a traffic management chip provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0018] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0019] It should be understood that the terms used in this specification are only for the purpose of describing particular embodiments and are not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0020] Embodiments of the present invention provide a traffic management chip control method, chip, and storage medium. The traffic management chip control method can be applied to a traffic management chip, which can be used in electronic devices such as routers, mobile phones, tablet computers, laptops, desktop computers, personal digital assistants, and wearable devices to increase the information transmission rate of these electronic devices.

[0021] The following embodiments of the present invention are described in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.

[0022] Please refer to Figure 1 , Figure 1 A flow chart of the steps of a traffic management chip control method provided by an embodiment of the present invention.

[0023] like Figure 1 As shown, the traffic management chip control method includes steps S101 to S102.

[0024] Step S101: Acquire a multi-queue message flowing into a traffic management chip, wherein the multi-queue message includes a plurality of queue numbers, and the plurality of queue numbers are determined according to service requirements.

[0025] Among them, the multi-queue message includes multiple queue numbers, and the multiple queue numbers are determined according to business requirements. For example, if the multi-queue message required by the business has 5 queue numbers, then the multi-queue message includes queue 1, queue 2, queue 3, queue 4 and queue 5.

[0026] In one embodiment, the network message processor fills the queue number required by the service in the header of the original message according to the service demand, so that the queues in the multi-queue message are sorted in sequence according to the queue number. By sorting the queues of the multi-queue message, it is convenient to determine whether the multi-queue message is passed or discarded in the traffic management chip. The specific selection of the network message processor can be selected according to the actual situation, and this application does not make specific restrictions on this. For example, the network message processor is IXP1200 or SB1250. For example, Figure 2 As shown, the queue number required for the business is filled in the header of the original message according to business needs. The queue number includes queue 1, queue 2 to queue n, where queue n is determined according to actual conditions. This application does not make specific restrictions on this. For example, if the number of queues required for the business is 5, then n is 5.

[0027] Step S102: When it is determined that there is no queue in the multi-queue message that is not stored in the management queue of the traffic management chip, control the traffic management chip to send the multi-queue message.

[0028] After acquiring a multi-queue message, it is determined whether there is a queue in the multi-queue message that is not stored in the management queue of the traffic management chip. When it is determined that there is no queue in the multi-queue message that is not stored in the management queue of the traffic management chip, the traffic management chip is controlled to send the multi-queue message. When the traffic management chip acquires the multi-queue message, it stores the multi-queue message in a memory and parses the multi-queue message to obtain a multi-queue message descriptor corresponding to the multi-queue message, and the multi-queue message descriptor carries a memory pointer.

[0029] In one embodiment, the method for controlling the traffic management chip to send multi-queue messages can be: obtaining a multi-queue message descriptor of the multi-queue message; obtaining a memory pointer of the multi-queue message from the multi-queue message descriptor; sending the multi-queue message in the memory outward according to the memory pointer, that is, reading the corresponding multi-queue message from the memory based on the memory pointer, and sending the read multi-queue message through the message export device of the traffic management chip.

[0030] In one embodiment, if Figure 3 As shown, step S101 also includes steps S103 to S104.

[0031] Step S103: parse the multi-queue message to obtain a multi-queue message descriptor.

[0032] After acquiring the multi-queue message, the traffic management chip parses the multi-queue message to obtain the multi-queue message descriptor corresponding to the multi-queue message. The traffic management chip includes a multi-queue message processing device, through which the multi-queue message processing device can parse the multi-queue message to obtain the multi-queue message descriptor corresponding to the multi-queue message. For example, please refer to Figure 4 , Figure 4 FIG. 1 is a schematic block diagram of a structure of a multi-queue message descriptor according to an embodiment of the present invention. Figure 4 As shown, the multi-queue message descriptor includes a message memory pointer, queue number identifiers queue 1, queue 2 to queue n, and each queue entry identifier, where n is set according to actual conditions and this application does not make specific restrictions on this.

[0033] In one embodiment, when a multi-queue message is obtained, it is determined whether the multi-queue message comes from the message entry device of the traffic management chip. If the multi-queue message comes from the message entry device of the traffic management chip, the multi-queue message is parsed to obtain a multi-queue message descriptor, and the multi-queue message is stored in a memory device, and the memory pointer of the multi-queue message is filled in the multi-queue message descriptor; if the multi-queue message does not come from the message entry device, the multi-queue message descriptor is extracted, and the queues not stored in the management queue are stored in the corresponding queues in the management queue according to the multi-queue message descriptor. By determining whether the multi-queue message comes from the message entry device, the processing efficiency of the traffic management chip is further improved. The number of queues stored in the management queue can be set according to actual conditions, and this application does not make specific restrictions on this. For example, the number of queues stored in the management queue can be set to 500 queues according to the number of network transmissions.

[0034] Step S104: Determine, based on the multi-queue message descriptor, whether there is a queue in the multi-queue message that is not stored in the management queue of the traffic management chip.

[0035] The traffic management chip includes a queue list management device and a traffic management device. The queue list management device is used to store the management queue of the traffic management chip. The number of stored queues of the management queue is determined by the traffic management device.

[0036] In one embodiment, an enqueue identifier for each queue is obtained from the multi-queue message descriptor. Based on the enqueue identifier for each queue, it is determined whether there is any queue in the multi-queue message that is not stored in the management queue of the traffic management chip. Specifically, it is determined whether the enqueue identifiers for each queue are all first identifiers. When it is determined that the enqueue identifiers for each queue are all first identifiers, it is determined that there is no queue in the multi-queue message that is not stored in the management queue of the traffic management chip. When it is determined that the enqueue identifiers for at least one queue are all second identifiers, it is determined that there is a queue in the multi-queue message that is not stored in the management queue of the traffic management chip. The enqueue identifier is used to determine whether a queue has been stored in the management queue of the traffic management chip. For example, if a queue has been stored in the management queue of the traffic management chip, the enqueue identifier for the queue is the first identifier. If the queue has not been stored in the management queue of the traffic management chip, the enqueue identifier for the queue is the second identifier. The first identifier and the second identifier are set according to actual circumstances and are not specifically limited thereto. For example, the first identifier is 1 and the second identifier is 0.

[0037] For example, the enqueue identifier of each queue is obtained from the multi-queue message descriptor, the enqueue identifier of queue 1 is the first identifier, the enqueue identifier of queue 2 is the first identifier, the enqueue identifier of queue 3 is the second identifier, the enqueue identifier of queue 4 is the first identifier, and the enqueue identifier of queue 5 is the second identifier. It is determined that queue 1, queue 2 and queue 4 have been stored in the management queue of the traffic management chip, and queue 3 and queue 5 have not been stored in the management queue of the traffic management chip.

[0038] In one embodiment, if Figure 5 As shown, step S104 also includes steps S105 to S108.

[0039] Step S105: When it is determined that there is a queue in the multi-queue message that is not stored in the management queue of the traffic management chip, select the queue number of the queue that is not stored in the management queue of the traffic management chip from the multi-queue message descriptor.

[0040] When it is determined that there is a queue in the multi-queue message that is not stored in the management queue of the traffic management chip, the queue number of the queue not stored in the management queue is extracted from the multi-message descriptor, and when it is determined that there is no queue in the multi-queue message that is not stored in the management queue of the traffic management chip, the traffic management chip is controlled to send the multi-queue message.

[0041] Step S106: Hang the multi-queue message descriptor in the corresponding queue in the management queue according to the selected queue number.

[0042] After selecting a queue number, the multi-queue message descriptor is attached to the corresponding queue in the management queue of the queue linked list management device. For example, if the selected queue number is 200, the multi-queue message descriptor is attached to the management queue corresponding to queue number 200. For another example, if the selected queue number is 300, the multi-queue message descriptor is attached to the management queue corresponding to queue number 300.

[0043] Step S107: Obtain scanning results of all queues in the management queue, and determine whether to discard the multi-queue message according to the scanning results.

[0044] After attaching the multi-queue message descriptor to the corresponding management queue of the traffic management chip based on the selected queue number, a scan result of all queues in the management queue of the traffic management chip is obtained, and based on the scan result, a determination is made whether to discard the multi-queue message. The scan result includes a discard identifier for each queue of the traffic management chip, and the discard identifier is used to determine whether to discard the message corresponding to the queue in the management queue.

[0045] In one embodiment, a drop identifier of a queue on which a multi-queue message descriptor is mounted is obtained from the scan result; based on the drop identifier of the queue on which the multi-queue message descriptor is mounted, a determination is made as to whether to drop the multi-queue message, i.e., whether the drop identifier is a first drop identifier or a second drop identifier is determined. If the drop identifier is determined to be the first drop identifier, the multi-queue message is determined to be dropped, and if the drop identifier is determined to be the second drop identifier, the multi-queue message is determined not to be dropped. The first drop identifier and the second drop identifier can be set according to actual circumstances and are not specifically limited in this application. For example, the first drop identifier is 0 and the second drop identifier is 1.

[0046] In one embodiment, the traffic management chip includes a queue linked list management device and a traffic management device. The queue linked list management device is used to store the management queue of the traffic management chip. The actual number of stored queues of the management queue is determined by the traffic management device. For example, after hanging the multi-queue message descriptor in the corresponding queue in the management queue based on the selected queue number, the queue linked list management device of the traffic management chip is controlled to send an application authorization request for the actual number of messages that can pass to the traffic management device of the traffic management chip, and the queue linked list management device is controlled to receive the actual number of messages that can pass returned by the traffic management device based on the application authorization request, and based on the actual number of messages that can pass, all queues in the management queue in the queue linked list management device are scanned to obtain the scanning results.

[0047] Step S108: When it is determined to discard the multi-queue message, release the multi-queue message in the memory according to the multi-queue message descriptor.

[0048] When it is determined not to discard the multi-queue message, continue to select the queue numbers of the queues that are not stored in the management queue of the traffic management chip from the multi-queue message descriptor until there are no queues in the multi-queue message that are not stored in the management queue of the traffic management chip. When it is determined to discard the multi-queue message, release the multi-queue message in the memory according to the multi-queue message descriptor, that is, obtain the memory pointer of the multi-queue message from the multi-queue message descriptor, and release the multi-queue message in the memory according to the memory pointer.

[0049] The traffic management chip control method provided in the above embodiment obtains multi-queue messages flowing into the traffic management chip, wherein the multi-queue messages include multiple queue numbers determined based on service requirements. When it is determined that no queues in the multi-queue messages are not stored in the management queue of the traffic management chip, the traffic management chip is controlled to transmit the multi-queue messages. By managing and controlling the multi-queue messages, the number of times multi-queue messages enter and exit the chip is reduced, thereby reducing the impact on chip performance and improving data processing speed.

[0050] See also Figure 6 , Figure 6 A schematic block diagram of the structure of a traffic management chip provided by an embodiment of the present invention.

[0051] like Figure 6 As shown, the traffic management chip control device 200 includes a processor 201 and a memory 202. The processor 201 and the memory 202 are connected via a bus 203, which is, for example, an I2C (Inter-integrated Circuit) bus.

[0052] Specifically, the processor 201 is used to provide computing and control capabilities to support the operation of the entire traffic management chip. The processor 201 can be a central processing unit (CPU), and the processor 201 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0053] Specifically, the memory 202 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.

[0054] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the traffic management chip to which the solution of the present invention is applied. The specific traffic management chip may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0055] The processor is configured to run a computer program stored in a memory, and implement any one of the traffic management chip control methods provided by the embodiments of the present invention when executing the computer program.

[0056] In one embodiment, the processor is configured to run a computer program stored in the memory, and implement the following steps when executing the computer program:

[0057] Acquire a multi-queue message flowing into the traffic management chip, wherein the multi-queue message includes a plurality of queue numbers, and the plurality of queue numbers are determined according to service requirements;

[0058] When it is determined that there is no queue in the multi-queue message that is not stored in the management queue of the traffic management chip, the traffic management chip is controlled to send the multi-queue message.

[0059] In one embodiment, after obtaining the multi-queue message flowing into the traffic management chip, the processor is further configured to:

[0060] Parsing the multi-queue message to obtain a multi-queue message descriptor;

[0061] According to the multi-queue message descriptor, it is determined whether there is a queue in the multi-queue message that is not stored in the management queue of the traffic management chip.

[0062] In one embodiment, when the processor implements determining, based on the multi-queue message descriptor, whether there is a queue in the multi-queue message that is not stored in the management queue of the traffic management chip, it is configured to implement:

[0063] Obtaining an enqueue identifier for each queue from the multi-queue message descriptor;

[0064] According to the queue entry identifier of each queue, it is determined whether there is a queue in the multiple queue messages that is not stored in the management queue of the traffic management chip.

[0065] In one embodiment, the processor is further configured to implement:

[0066] When it is determined that there is a queue in the multi-queue message that is not stored in the management queue of the traffic management chip, selecting the queue number of the queue that is not stored in the management queue of the traffic management chip from the multi-queue message descriptor;

[0067] Hanging the multi-queue message descriptor in the corresponding queue in the management queue according to the selected queue number;

[0068] Obtaining scan results of all queues in the management queue, and determining whether to discard the multi-queue message according to the scan results;

[0069] When it is determined not to discard the multi-queue message, continue to select the queue numbers of queues that are not stored in the management queue of the traffic management chip from the multi-queue message descriptor until there are no queues in the multi-queue message that are not stored in the management queue of the traffic management chip.

[0070] In one embodiment, when the scanning result includes a discard identifier for each queue in the management queue; and when determining whether to discard the multi-queue message according to the scanning result, the processor is configured to implement:

[0071] Obtaining a discard identifier of a queue on which the multi-queue message descriptor is mounted from the scanning result;

[0072] Determine whether to discard the multi-queue message according to the discard identifier of the queue on which the multi-queue message descriptor is mounted.

[0073] In one embodiment, the processor is further configured to implement:

[0074] When it is determined to discard the multi-queue messages, the multi-queue messages in the memory are released according to the multi-queue message descriptors.

[0075] In one embodiment, when the processor implements releasing the multi-queue messages in the memory according to the multi-queue message descriptor, it is configured to implement:

[0076] Obtaining a memory pointer of the multi-queue message from the multi-queue message descriptor;

[0077] According to the memory pointer, the multi-queue messages in the memory are released.

[0078] In one embodiment, when the processor controls the traffic management chip to send the multi-queue message, it is configured to implement:

[0079] Obtaining a multi-queue message descriptor of the multi-queue message;

[0080] Obtaining a memory pointer of the multi-queue message from the multi-queue message descriptor;

[0081] The multi-queue messages in the memory are sent according to the memory pointer.

[0082] It should be noted that technical personnel in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the traffic management chip described above can refer to the corresponding process in the aforementioned traffic management chip control method embodiment, and will not be repeated here.

[0083] An embodiment of the present invention also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any traffic management chip control method provided in the specification of the present invention.

[0084] The storage medium may be an internal storage unit of the traffic management chip described in the aforementioned embodiment, such as a memory of the traffic management chip. The storage medium may also be an external storage device of the traffic management chip, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the traffic management chip.

[0085] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0086] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system that includes a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system that includes the element.

[0087] The serial numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the advantages or disadvantages of the embodiments. The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be based on the scope of protection of the claims.

Claims

1. A traffic management chip control method, characterized in that: include: Acquire a multi-queue message flowing into the traffic management chip, wherein the multi-queue message includes a plurality of queue numbers, and the plurality of queue numbers are determined according to service requirements; Parsing the multi-queue message to obtain a multi-queue message descriptor; Determining, according to the multi-queue message descriptor, whether there is a queue in the multi-queue message that is not stored in the management queue of the traffic management chip; When it is determined that there is no queue in the multi-queue message that is not stored in the management queue of the traffic management chip, controlling the traffic management chip to send the multi-queue message; or, When it is determined that there is a queue in the multi-queue message that is not stored in the management queue of the traffic management chip, selecting the queue number of the queue that is not stored in the management queue of the traffic management chip from the multi-queue message descriptor; Hanging the multi-queue message descriptor in a corresponding queue in the management queue according to the selected queue number; Obtaining scan results of all queues in the management queue, and determining whether to discard the multi-queue message according to the scan results; When it is determined not to discard the multi-queue message, continue to select the queue numbers of queues that are not stored in the management queue of the traffic management chip from the multi-queue message descriptor until there are no queues in the multi-queue message that are not stored in the management queue of the traffic management chip.

2. The traffic management chip control method according to claim 1, characterized in that: The determining, based on the multi-queue message descriptor, whether there is a queue in the multi-queue message that is not stored in the management queue of the traffic management chip includes: Obtaining an enqueue identifier for each queue from the multi-queue message descriptor; According to the queue entry identifier of each queue, it is determined whether there is a queue in the multiple queue messages that is not stored in the management queue of the traffic management chip.

3. The traffic management chip control method according to claim 1, characterized in that: The scanning result includes a discard identifier of each queue in the management queue; and determining whether to discard the multi-queue message according to the scanning result includes: Obtaining a discard identifier of a queue on which the multi-queue message descriptor is mounted from the scanning result; Determine whether to discard the multi-queue message according to the discard identifier of the queue on which the multi-queue message descriptor is mounted.

4. The traffic management chip control method according to claim 1, characterized in that: The method further comprises: When it is determined to discard the multi-queue messages, the multi-queue messages in the memory are released according to the multi-queue message descriptors.

5. The traffic management chip control method according to claim 4, characterized in that: The releasing the multi-queue messages in the memory according to the multi-queue message descriptor includes: Obtaining a memory pointer of the multi-queue message from the multi-queue message descriptor; According to the memory pointer, the multi-queue messages in the memory are released.

6. The traffic management chip control method according to any one of claims 1 to 5, characterized in that: The controlling the traffic management chip to send the multi-queue message outward includes: Obtaining a multi-queue message descriptor of the multi-queue message; Obtaining a memory pointer of the multi-queue message from the multi-queue message descriptor; The multi-queue messages in the memory are sent according to the memory pointer.

7. A traffic management chip, characterized in that: The traffic management chip includes a processor, a memory, a computer program stored on the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory. When the computer program is executed by the processor, the steps of the traffic management chip control method as described in any one of claims 1 to 6 are implemented.

8. A storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the traffic management chip control method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Processing method and device for queue operation

    CN108234348A