Ethernet multi-queue traffic scheduling method, device, computer-readable storage medium and electronic device

By adjusting the scheduling method and weight values ​​in real time, combining multi-queue transmission and precise classification, the problem of insufficient flexibility and scalability in the existing technology is solved, efficient and reliable data transmission and bandwidth utilization are achieved, and network performance and user experience are improved.

CN119520416BActive Publication Date: 2025-04-15EHIWAY MICROELECTRONIC SCI & TECH (SUZHOU) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510059628.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-04-15
Estimated Expiration
2045-01-15

AI Technical Summary

Technical Problem

The existing Ethernet multi-queue scheduling methods lack flexibility and scalability, are difficult to adapt to dynamically changing network environments and diversified application needs, and are difficult to balance between fairness and efficiency, resulting in waste of resources and degradation of network performance.

Method used

By adjusting the scheduling method and the weight values ​​of each queue in real time, flexible adjustment of service traffic at different priority levels on Ethernet is achieved. Multiple queues are used to transmit data and accurately classify the queues. The scheduling method is selected according to the traffic type and network status, data scheduling is performed in combination with priority and weight, and real-time adjustment is made through register control and status monitoring modules.

Benefits of technology

It improves bandwidth usage efficiency and data transmission reliability, flexibly responds to transmission needs of different traffic categories, reduces the possibility of data congestion, and improves the overall performance and user experience of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520416B_ABST
    Figure CN119520416B_ABST
Patent Text Reader

Abstract

The present invention provides an Ethernet multi-queue traffic scheduling method, including classifying data and confirming the queue number corresponding to the classified data; confirming the remaining cache space in the queue, and storing the classified data in the corresponding queue when the remaining cache space in the queue is sufficient; selecting a scheduling method based on the data traffic type to be transmitted in the queue and the network status, and performing the current round of data scheduling based on the selected scheduling method and the priority of each traffic class set and the weight corresponding to the traffic class. The beneficial effect of this technical solution is that a scheduling method is selected based on the traffic type in the queue and the network status, and different scheduling methods are used to schedule the current round of data, thereby improving the efficiency of bandwidth utilization and the reliability of data transmission. The present invention also provides an Ethernet multi-queue traffic scheduling device, a computer-readable storage medium and an electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of communication technology, and in particular relates to an Ethernet multi-queue traffic scheduling method, device, computer-readable storage medium and electronic equipment. Background Art

[0002] With the rapid development of modern network technology, Ethernet has become the core of data transmission, bearing the growing demand for data transmission. However, with the rapid popularization of technologies such as cloud computing, big data, and the Internet of Things, the amount of global data has exploded, causing a series of problems such as network congestion, degraded service quality, and poor user experience. In order to cope with these problems, it is particularly important to improve the traffic scheduling capabilities of Ethernet.

[0003] Traditional Ethernet traffic scheduling methods mainly rely on a single queue to process and forward data. In the early stages when network traffic was small, this method was able to meet basic communication needs. However, as the scale and complexity of the network increased significantly, the single queue processing method gradually exposed serious deficiencies. For example, in the face of large traffic impacts, a single queue is prone to cause network congestion, resulting in increased data transmission delays and even packet loss, all of which seriously affect the quality of network communication and user experience.

[0004] To address these challenges, the Priority-based Flow Control (PFC) method was developed. PFC divides an Ethernet link into multiple virtual channels with different priorities and assigns a priority level to each virtual channel. Each channel can contain multiple data queues. When a link is blocked, the transmission of all data on the link will not be suspended. Instead, each channel can be suspended or restarted separately. The channels are independent of each other and do not affect each other. In theory, this method can better utilize network bandwidth resources and improve the overall performance of the network.

[0005] However, in practical applications, the existing PFC multi-queue scheduling methods still have the following problems: Existing scheduling methods often lack flexibility and scalability. They usually only support one or a few fixed scheduling strategies, which are difficult to adapt to the ever-changing network environment and diverse application requirements. In addition, when network traffic changes dynamically, existing methods often cannot respond in time, resulting in some queues being overloaded while other queues are idle, which seriously wastes network resources and reduces the overall performance of the network.

[0006] More importantly, existing PFC multi-queue scheduling methods have difficulty striking a balance between fairness and efficiency. Some methods may sacrifice the overall efficiency of the network in pursuit of fairness; conversely, in order to improve efficiency, they may ignore fairness, resulting in some queues not being served for a long time. Summary of the invention

[0007] The present invention provides an Ethernet multi-queue traffic scheduling method, device, computer-readable storage medium and electronic device, which flexibly adjust the service traffic of different priorities of Ethernet by adjusting the scheduling method and the weight value setting of each queue in real time, thereby improving the data transmission service quality.

[0008] Other purposes and advantages of the present invention can be further understood from the technical features disclosed in the present invention.

[0009] In order to achieve one or part or all of the above purposes or other purposes, a technical solution of the present invention provides an Ethernet multi-queue traffic scheduling method, including classifying data and confirming the queue number corresponding to the classified data; confirming the remaining cache space in the queue, and storing the classified data in the corresponding queue when the remaining cache space in the queue is sufficient; selecting a scheduling method according to the data traffic type to be transmitted in the queue and the network status, and performing the current round of data scheduling according to the selected scheduling method and the priorities of each traffic class set and the weights corresponding to the traffic class; after the current round of data scheduling is completed, the scheduling method, the traffic class priority or the traffic class weight is adjusted through the monitoring feedback information of the register control and status monitoring module. The beneficial effect of the technical solution is that the Ethernet traffic scheduling method of the present invention uses multiple queues to transmit data, and at the same time accurately classifies the queues, selects a scheduling method according to the traffic type in the queue and the network status, and at the same time performs the current round of data scheduling according to the scheduling method and the priorities of each traffic class and the corresponding weights, thereby improving the bandwidth utilization efficiency and the reliability of data transmission, and flexibly responding to the transmission requirements of different traffic categories.

[0010] The optional scheduling methods include: scheduling strictly in order of priority set for the traffic class, scheduling based on the priority order of each traffic class and the weight of the traffic class bandwidth, scheduling based on the priority order of the traffic class and the length of the data packet in the traffic class, and scheduling based on the priority order of the traffic class and the time required to send the head data packet in the traffic class.

[0011] The register for configuring the scheduling method stores a corresponding value, and the system selects the corresponding scheduling method according to the value in the register.

[0012] Scheduling strictly in accordance with the priority order set for the traffic class includes sending data packets in the traffic class in sequence according to the set priority order of the traffic within a scheduling cycle.

[0013] When scheduling data packets of low-priority traffic classes, data packets of high-priority traffic classes are sent to queues waiting for scheduling, and data packets of high-priority traffic classes are scheduled first; when data packets of the same priority are sent to queues waiting for scheduling, they are scheduled in sequence according to the order in which the data are sent to the queues.

[0014] When the selected scheduling method is to schedule strictly in the order of priority set by the traffic class, the register for setting the weight will not take effect.

[0015] Scheduling is performed according to the priority order of each traffic class and the weight of the traffic class bandwidth, including configuring a weight value for each traffic class according to the percentage of the bandwidth allocated to each traffic class in the total bandwidth, polling each traffic class in turn according to the priority order of each traffic class, the polled traffic class outputs a data packet, and the corresponding traffic class weight value is reduced accordingly, until the weight value of the polled traffic class is 0, then continuing with the next traffic class scheduling.

[0016] A weighted counter is set for each traffic class. The initial value of the weighted counter is set according to the corresponding weight. During the scheduling process, each time a traffic class is polled, the traffic class outputs a data packet, and the value of the weighted counter corresponding to the traffic class is reduced by 1; when the counter value of any traffic class returns to zero, the scheduling of the traffic class corresponding to the weighted counter that has returned to zero is suspended, and the system continues with the next traffic class scheduling; when the weighted counters of all the traffic classes return to zero, the system starts the next round of scheduling.

[0017] Scheduling according to the priority order of the traffic classes and the length of the data packets in the traffic classes includes setting a deficit counter for each traffic class, the initial value of the deficit counter being set to the maximum byte of data allowed to be transmitted for each traffic class in one scheduling; polling each traffic class in turn and scheduling according to the priority order of the traffic classes, in one scheduling, if: when a traffic class is polled and the length of the traffic class data packet is less than or equal to the value of the deficit counter, the traffic class outputs a data packet, and the deficit counter is reduced by the length of the data packet; when a traffic class is polled and the length of the traffic class data packet is greater than the value of the deficit counter, the traffic class will not be sent, the deficit counter value will not be changed, and the scheduling will be transferred to the next traffic class whose deficit counter value is not zero; when all the data packets in any of the traffic classes are sent, the deficit counter value of the traffic class is cleared, and the scheduling will be transferred to the next traffic class whose deficit counter value is not zero; when the length of the data packets of all traffic classes exceeds the value of the corresponding deficit counter, the corresponding initial value is added to the deficit counter of each traffic class, and a new round of scheduling is performed.

[0018] Scheduling is performed according to the priority order of the traffic classes and the time required to send the header data packet in the traffic class, including: in one round of scheduling, the traffic class with the shortest time required to send the header data packet and the highest priority forwards the header data packet; after one round of scheduling is completed, if there is still data in each traffic class, the transmission time of the header data packet in each traffic class after one round of scheduling is calculated, and the next round of data scheduling is continued.

[0019] The user classifies the data according to the destination address, type, operation code, and VLAN ID part type of the extracted data frame to be transmitted.

[0020] According to the cache queue numbers mapped to the different types of data configured by the register, the queue number corresponding to the data transmission of the classified data is determined.

[0021] When the cache space in the queue is insufficient but has not reached the threshold, the data to be transmitted is temporarily cached in the data classification routing module, and the data is stored in the corresponding cache queue after the cache space in the queue is released;

[0022] If the space of the classification routing module is also insufficient, the data to be transmitted is discarded, and the register control and status monitoring module is notified to adjust the data scheduling method, traffic priority or the traffic class weight.

[0023] After the current round of data scheduling is completed, the scheduling method, the traffic class priority or the traffic class weight is adjusted through the monitoring feedback information of the register control and status monitoring module.

[0024] Another technical solution of the present invention provides an Ethernet multi-queue traffic scheduling device, which is used to execute the Ethernet multi-queue traffic scheduling method described above, including a sending path and a receiving path, and the data transmission direction of the sending path is opposite to that of the receiving path; the sending path and the receiving path both include a data classification routing module, a cache module and a traffic scheduling module connected in sequence; the data classification routing module receives and classifies data sent by an upstream device, and the classified data is stored in a cache queue in the cache module; the traffic scheduling module schedules the data in the cache queue according to the configured scheduling method, the priority and weight of the traffic class.

[0025] It also includes a register control and status monitoring module for monitoring the data classification routing module, cache module and traffic scheduling module on the sending path and the receiving path. The register control and status monitoring module is used to set configuration information and monitor and count the operation scheduling of the device.

[0026] Another technical solution of the present invention provides a computer-readable storage medium, in which program codes are stored. The program codes are called by a processor to execute the Ethernet multi-queue traffic scheduling method described above.

[0027] Another technical solution of the present invention provides an electronic device, comprising one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the Ethernet multi-queue traffic scheduling method described above.

[0028] Compared with the prior art, the beneficial effects of the present invention mainly include: 1. The Ethernet traffic scheduling method of the present invention uses multiple queues to transmit data, and accurately classifies the queues at the same time, selects a scheduling method based on the traffic type in the queue and the network status, and schedules the current round of data based on the scheduling method and the priority and corresponding weight of each traffic class, thereby improving the bandwidth utilization efficiency and the reliability of data transmission, and flexibly responding to the transmission requirements of different traffic categories.

[0029] 2. In the Ethernet traffic scheduling method of the present invention, the register control and status monitoring module set in the system will monitor the traffic scheduling and transmission process in the system. According to the monitoring feedback information, the scheduling method, traffic class priority or the traffic class weight can be adjusted, making the system more flexible and reducing the possibility of data congestion.

[0030] In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the specific embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 This is an Ethernet multi-queue traffic scheduling device of the present invention.

[0033] Figure 2 This is a flow chart of the Ethernet multi-queue traffic method of the present invention.

[0034] Figure 3 It is a flow chart of the strict priority scheduling method of the present invention.

[0035] Figure 4 It is a flow chart of the weighted round-robin scheduling method of the present invention.

[0036] Figure 5 It is a flow chart of the deficit weighted polling scheduling method of the present invention.

[0037] Figure 6 This is a flow chart of the weighted fair queuing scheduling method of the present invention. DETAILED DESCRIPTION

[0038] The above and other technical contents, features and effects of the present invention will be clearly presented in the following detailed description of a preferred embodiment with reference to the drawings. The directional terms mentioned in the following embodiments, such as up, down, left, right, front or back, etc., are only referenced to the directions of the attached drawings. Therefore, the directional terms used are used to illustrate and not to limit the present invention.

[0039] Embodiment 1

[0040] Embodiment 1 provides an Ethernet multi-queue traffic scheduling method, including classifying data and confirming the queue number corresponding to the classified data; confirming the remaining cache space in the queue, and storing the classified data in the corresponding queue when the remaining cache space in the queue is sufficient; selecting a scheduling method according to the type of data traffic to be transmitted in the queue and the network status, and performing the current round of data scheduling according to the selected scheduling method and the priority of each traffic class and the weight corresponding to the traffic class. The present invention can select and adjust the scheduling method in real time according to the scheduling requirements by presetting multiple scheduling methods, thereby improving the efficiency of scheduling.

[0041] The implementation process of the present invention is shown in Figure 2, specifically including the following steps:

[0042] Step 1: Classify the data, extract the destination address, type, operation code, VLAN ID (digital tag to identify different VLANs) and other parts of the data frame to be transmitted to determine the type of data to be transmitted. For example, the data to be transmitted can be divided into: the data to be transmitted destination address meets the priority transmission destination address set by the register and the data to be transmitted destination address does not meet the priority transmission destination address set by the register according to the destination address of the data frame to be transmitted. According to the data frame type classification, for example, the data frame type part is 0x8808, indicating that it is a pause frame (802.3x pause frame) or a PFC frame (Priority Flow Control), and the data frame type part is 0x8100, indicating that it contains VLAN tagged data. For the classification of data, users can make adjustments according to the data flow to be scheduled for transmission, make full use of multiple virtual channels of PFC, and effectively improve the utilization rate of bandwidth.

[0043] Step 2: Confirm the queue number corresponding to the classified data, and determine to which queue the current data needs to be transmitted according to the cache queue number mapped by the different types of data configured by the register.

[0044] Step 3: Confirm the remaining buffer space in the corresponding queue and make a judgment based on the current length of the data to be transmitted and the remaining buffer space in the queue. Mainly includes:

[0045] If there is enough remaining space in the queue, the data is stored in the corresponding cache queue;

[0046] If the cache space in the queue is insufficient or is about to reach the threshold, the data will be temporarily cached in the data classification routing module and stored in the corresponding cache queue after the cache space in the queue is released;

[0047] If the cache space in the classification routing module is also insufficient, the group of data is discarded, and the register control and status monitoring module is notified in time to prompt the user to adjust the classification strategy or scheduling method in time.

[0048] Step 4: Select the current scheduling method according to the register configuration. Different scheduling methods can adapt to different working scenarios. Users can select the scheduling method based on the type of data traffic to be transmitted in the above queue and the network status.

[0049] Step 5: Perform data scheduling for the current round according to the selected scheduling method and the priorities of each traffic class and the weights corresponding to the traffic classes;

[0050] The scheduling method used in the Ethernet multi-queue traffic scheduling method of the present invention can be set in multiple ways as needed. Embodiment 1 takes four scheduling methods as examples for explanation, namely, a strict priority scheduling method that strictly schedules in the order of priority set by traffic, a weighted round-robin scheduling method that schedules according to the weight of each traffic class bandwidth, a deficit weighted round-robin scheduling method that schedules according to the length of the data packet in the traffic class, and a weighted fair queuing scheduling method that schedules according to the time required for data transmission in the traffic class and the weight. The specific flow charts of the four scheduling methods are shown in Figure 3 , 4 , 5, 6.

[0051] See Figure 3 , the optional strict priority scheduling method of embodiment 1 is strictly scheduled in the order of priority set for each traffic class. In one round of scheduling cycle, the data packets of the high priority traffic class are sent first, until the data packets in the high priority traffic class are sent, and then the data packets in the medium priority traffic class are sent, and finally the low priority traffic class is sent. When scheduling the low priority traffic class, when encountering the arrival of a high priority traffic class data packet, the data packet of the high priority traffic class will be scheduled first. When scheduling a traffic class data packet and encountering the arrival of a traffic class data packet of the same priority, the data of the traffic class of the same priority is subject to the first-come-first-served principle and forwarded in order. The scheduling of the previous and next traffic class data in the strict priority scheduling method is only related to the priority of the traffic class, and has nothing to do with the weight. When the system selects the strict priority scheduling method, the register for setting the weight is not effective.

[0052] See Figure 4 , Embodiment 1 is an optional weighted polling scheduling method, the method comprising: determining the priority order of traffic classes, and then assigning a weight to each traffic class according to the percentage of the configured bandwidth to the total bandwidth. During scheduling, a counter count is set for each traffic class, and the initial value of the counter is set according to the corresponding weight. During scheduling, each traffic class is polled in turn according to the priority of the traffic class. When a traffic class is polled, the traffic class will output a data packet, and the counter value corresponding to the traffic class will be reduced by one until the counter value of the traffic class is reduced to zero. The system will suspend the scheduling of the traffic class and then schedule the next traffic class.

[0053] After scheduling, if there is still data in each traffic class, the weight counter of each traffic class is added with a value, and data scheduling is continued according to the weighted polling scheduling method until there is no data in each traffic class and the scheduling is completed.

[0054] The weight in the weighted round-robin scheduling method actually represents the number of data packets that each traffic class can transmit in one round of scheduling.

[0055] See also Figure 5 , the deficit weighted polling scheduling method in the first embodiment is similar to the weighted polling scheduling method, the difference is that the weighted polling scheduling is scheduled according to the number of data packets in the traffic class, and the deficit weighted polling scheduling is scheduled according to the length of the data packets in the traffic class. The method includes first determining the priority order of the traffic classes, and then setting a deficit counter Deficit for each traffic class. The initial value of the deficit counter Deficit is set to the maximum number of bytes of data allowed to be transmitted in one scheduling (assuming it is Quantum, configured by a register). In one scheduling, each traffic class is polled in turn according to the priority of the traffic class. When a traffic class is polled, if the length of the header data packet of the traffic class is less than or equal to the value of the deficit counter Deficit, the traffic class forwards the header data packet, and the deficit counter Deficit value is subtracted from the data packet length until the length of the data packet is greater than the value of the deficit counter Deficit, then it will not be sent. At this time, the value of the deficit counter Deficit remains unchanged, and the system will continue to schedule the next traffic class. When all packets in a certain priority traffic class are forwarded, the count value of this traffic class is reset to zero, the traffic class is stopped from being scheduled, and other traffic classes with count values ​​not equal to 0 are scheduled. When the length of packets in all traffic classes exceeds the corresponding deficit counter Deficit, the module adds Quantum to the value of the deficit counter Deficit of each traffic class and starts a new round of scheduling.

[0056] When the scheduling method is selected as deficit weighted round-robin scheduling, the weight is expressed as the maximum number of bytes that each traffic class can transmit in one round of scheduling.

[0057] See also Figure 6 The weighted fair queuing scheduling method in the first embodiment is based on the shortest time for scheduling. According to the size of the header data packet to be transmitted in each traffic class and the weight of the corresponding traffic class (traffic class priority), the time required for sending the header data packet is calculated. The traffic class data with the shortest time and the highest corresponding priority can be sent first.

[0058] According to the weight value configured in the register, the corresponding bandwidth is allocated to each traffic class, the priority order of each traffic class is determined, and the transmission time of the head data packet in each traffic class is calculated. In one scheduling, the traffic class with the shortest time required to send the head data packet and the highest priority will forward the head data packet in the traffic class. After a round of data scheduling is completed, if there are still data packets in each traffic class, the transmission time of the head data packet in each traffic class after one round of scheduling is calculated again, and the next round of scheduling is performed until there is no data in each traffic class.

[0059] When the scheduling method is weighted fair queuing, the weight is expressed as the bandwidth ratio of each traffic class.

[0060] Among the four scheduling methods mentioned above, the strict priority scheduling method is the default traffic scheduling method. When there is a lot of data in the high-priority traffic class, that is, there is always data in the high-priority traffic class during the scheduling request cycle, low-priority traffic will never be forwarded, causing starvation of the low-priority traffic class. At this time, it is necessary to switch to the other three scheduling methods.

[0061] The weighted polling method is more flexible in bandwidth allocation and improves the resource utilization of the network. However, the weight allocation of each priority traffic class may not be consistent with the actual needs of each traffic class. Large data packets will have a larger bandwidth, resulting in unfair network bandwidth allocation. At this time, it is necessary to switch to deficit weighted polling scheduling.

[0062] Deficit weighted round-robin scheduling effectively overcomes the problem of low-priority traffic packets not being served for a long time that may occur in strict priority scheduling. It also solves the defect of weighted round-robin scheduling that it cannot allocate bandwidth resources according to the preset ratio when the packet lengths vary greatly or change frequently.

[0063] The advantage of the weighted fair queuing scheduling method is that it provides fairness at the flow level. If some flows occupy most of the bandwidth and other flows are affected, this method can be selected to ensure that high-priority data flows can be transmitted faster.

[0064] The scheduling method is selected according to the type of data traffic to be transmitted in the queue and the network status. At the same time, the scheduling method can also be adjusted according to abnormal conditions such as congestion in the data forwarding of each queue in the system.

[0065] Step 6: After the current round of data scheduling is completed, the monitoring feedback information of the register control and status monitoring module is used to make judgments and analyses, and decide whether it is necessary to adjust the scheduling method, traffic class priority or the traffic class weight. The register control and status monitoring module here monitors whether there are abnormal conditions such as congestion in the data forwarding of each queue in the system, and adjusts the scheduling method, traffic class priority or traffic class weight according to the feedback information of the abnormal conditions.

[0066] Embodiment 2

[0067] Embodiment 2 provides an Ethernet multi-queue traffic scheduling device, see Figure 1 , including a sending path and a receiving path. The data transmission directions of the sending path and the receiving path are opposite, but the internal components of the sending path and the receiving path are the same;

[0068] The sending path and the receiving path both include a data classification routing module, a cache module and a traffic scheduling module connected in sequence;

[0069] The data classification and routing module has two functions. The first is to classify the data received from the upstream device, determine the type of the data frame based on the destination address, type, operation code, VLAN ID, etc., and determine which corresponding cache queues the data should enter based on the configuration of the register to prepare for the next step of scheduling. The second is to confirm the remaining length space in the cache queue to determine whether the length of the cache queue will exceed the threshold after the current data is transmitted. If the remaining length space meets the requirements, the data will be routed to the corresponding queue. If it does not meet the requirements, it will wait for the release of the cache space to avoid data truncation or loss.

[0070] The main function of the cache module is to cache the data to be scheduled. The number of internal cache queues can be configured through registers before data transmission. The maximum configurable upper limit is 16, and the cache space of each queue is relatively independent. Since PFC supports up to 8 virtual channels, the module also assumes the function of mapping 16 queues to 8 traffic classes (i.e. virtual channels). One traffic class can map one or more queues, but one queue can only correspond to one traffic class.

[0071] The main function of the traffic scheduling module is to schedule the data to be transmitted in traffic classes of different priorities according to the currently configured scheduling method, as well as the priority and weight value of each traffic class. It is the core part of this device. The module supports four methods: strict priority scheduling, weighted round-robin scheduling, deficit weighted round-robin scheduling, and weighted fair queuing scheduling. It can perform accurate and flexible scheduling according to the characteristics and needs of different traffic categories. In strict priority scheduling mode, high-priority traffic will always have the opportunity for priority transmission to ensure the real-time and reliability of critical business data. In weighted round-robin scheduling and deficit weighted round-robin scheduling modes, the module will reasonably allocate transmission resources according to the weight settings of each traffic class to achieve more balanced bandwidth utilization. For scenarios where bandwidth needs to be fairly allocated, the weighted fair queuing scheduling method provides an effective solution.

[0072] The device also includes a register control and status monitoring module for monitoring a data classification routing module, a buffer module, and a flow scheduling module on a sending path and a receiving path.

[0073] The register control and status monitoring module has two functions. The first is to set various configuration information of the device, such as the mapping relationship between different types of data and queues, the number and length of cache queues, the mapping relationship between queues and traffic classes, the selection of scheduling methods, the priority and weight of each traffic class, etc. The second is to monitor and count the operation and scheduling of the device and transmit the data to the outside world. Users can evaluate and adjust the scheduling method in real time based on the monitored information, such as bandwidth utilization, queue length of data packets, transmission delay and other key indicators, so as to make traffic scheduling more accurate and improve resource utilization efficiency.

[0074] Embodiment 3

[0075] Embodiment 3 provides a computer-readable storage medium, in which a program code is stored. The program code is called by a processor to execute the Ethernet multi-queue traffic scheduling method in Embodiment 1.

[0076] Embodiment 4

[0077] Embodiment 4 provides an electronic device, comprising one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the Ethernet multi-queue traffic scheduling method in Embodiment 1.

[0078] The above is a detailed introduction to an Ethernet multi-queue traffic scheduling method, device, computer-readable storage medium and electronic device provided by the present invention. The structure and working principle of the present invention are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. An Ethernet multi-queue traffic scheduling method, characterized in that: Including classifying the data and confirming the queue number corresponding to the classified data; confirming the remaining buffer space in the queue, and storing the classified data into the corresponding queue when the remaining buffer space in the queue is sufficient; Selecting a scheduling method according to the type of data traffic to be transmitted in the queue and the network status, and performing data scheduling for the current round according to the selected scheduling method combined with the priority of each traffic class and the weight corresponding to the traffic class; Use the strict priority scheduling method as the default traffic scheduling method, which strictly schedules traffic classes in the order of their priorities. When there is more data in the high-priority traffic class, the strict priority scheduling method is switched to one of the weighted round-robin scheduling method, the deficit weighted round-robin scheduling method or the weighted fair queuing scheduling method; When the difference in data packet length is small or the frequency of change is low, the weighted round-robin scheduling method is used for scheduling, and the weighted round-robin scheduling method is used for scheduling according to the priority order of each traffic class and the weight of the traffic class bandwidth; When the packet lengths vary greatly or change frequently, the deficit weighted round-robin scheduling method is used for scheduling, and the deficit weighted round-robin scheduling method is used for scheduling according to the priority order of the traffic class and the length of the packets in the traffic class; When some data flows occupy most of the bandwidth and cause other data flows to be affected, the weighted fair queuing scheduling method is used for scheduling. The weighted fair queuing scheduling method is scheduled according to the priority order of the traffic class and the time required for sending the head data packet in the traffic class.

2. The Ethernet multi-queue traffic scheduling method according to claim 1, characterized in that: The register for configuring the scheduling method stores a corresponding value, and the system selects the corresponding scheduling method according to the value in the register.

3. The Ethernet multi-queue traffic scheduling method according to claim 1, characterized in that: Scheduling strictly in accordance with the priority order set for the traffic class includes sending data packets in the traffic class in sequence according to the set priority order of the traffic within a scheduling cycle.

4. The Ethernet multi-queue traffic scheduling method according to claim 3, characterized in that: When scheduling packets of low-priority traffic classes, packets of high-priority traffic classes are sent to queues to wait for scheduling, and packets of high-priority traffic classes are scheduled first; When data packets of the same priority are sent to a queue and wait for scheduling, they are scheduled in the order in which they are sent to the queue.

5. The Ethernet multi-queue traffic scheduling method according to claim 3, characterized in that: When the selected scheduling method is to schedule strictly in the order of priority set by the traffic class, the register for setting the weight will not take effect.

6. The Ethernet multi-queue traffic scheduling method according to claim 1, characterized in that: Scheduling according to the priority order of each traffic class and the weight of the traffic class bandwidth includes configuring a weight value for each traffic class according to the percentage of the bandwidth allocated to each traffic class in the total bandwidth, polling each traffic class in turn according to the priority order of each traffic class, the polled traffic class outputs a data packet, and reduces the corresponding traffic class weight value accordingly, until the weight value of the polled traffic class is 0, and then continuing with the next traffic class scheduling.

7. The Ethernet multi-queue traffic scheduling method according to claim 6, characterized in that: A weighted counter is set for each traffic class, and the initial value of the weighted counter is set according to the corresponding weight. During the scheduling process, each time a traffic class is polled, the traffic class outputs a data packet, and the weighted counter value corresponding to the traffic class is reduced by 1; When the counter value of any of the traffic classes returns to zero, the scheduling of the traffic class corresponding to the weighted counter that returns to zero is suspended, and the system continues the scheduling of the next traffic class; When the weighted counters of all the traffic classes return to zero, the system starts the next round of scheduling.

8. The Ethernet multi-queue traffic scheduling method according to claim 1, characterized in that: Scheduling according to the priority order of the traffic classes and the length of the data packets in the traffic classes includes setting a deficit counter for each traffic class, wherein the initial value of the deficit counter is set to the maximum bytes of data allowed to be transmitted in one scheduling for each traffic class; and polling and scheduling each traffic class in turn according to the priority order of the traffic classes. In one scheduling, if: When a traffic class is polled and the length of the data packet of the traffic class is less than or equal to the value of the deficit counter, the traffic class outputs a data packet, and the deficit counter is subtracted by the length of the data packet; When a traffic class is polled and the length of the traffic class data packet is greater than the value of the deficit counter, the traffic class will not be sent, the deficit counter value will not change, and the scheduling will be transferred to the next traffic class whose deficit counter value is not zero; When all the data packets in any of the traffic classes are sent, the value of the deficit counter of the traffic class is reset to zero, and the scheduling of the next traffic class whose deficit counter value is not zero is transferred to the next traffic class; When the lengths of data packets of all traffic classes exceed the corresponding values ​​of the deficit counters, the corresponding initial values ​​are added to the deficit counters of each traffic class, and a new round of scheduling is performed.

9. The Ethernet multi-queue traffic scheduling method according to claim 1, characterized in that: Scheduling is performed according to the priority order of the traffic classes and the time required for sending the header data packet in the traffic class, including queuing up in turn according to the time required for sending the header data packet and the priority order for waiting for scheduling. In one round of scheduling, the traffic class with the shortest time required for sending the header data packet and the highest priority forwards the header data packet in the traffic class. After one round of scheduling is completed, if there is still data in each traffic class, the transmission time of the header data packet in each traffic class after one round of scheduling is calculated, and the next round of data scheduling continues.

10. The Ethernet multi-queue traffic scheduling method according to claim 1, characterized in that: The user classifies the data according to the destination address, type, operation code, and VLAN ID part type of the extracted data frame to be transmitted.

11. The Ethernet multi-queue traffic scheduling method according to claim 1, characterized in that: According to the cache queue numbers mapped by the different types of data configured in the register, the queue number corresponding to the classified data transmission is determined.

12. The Ethernet multi-queue traffic scheduling method according to claim 1, characterized in that: When the cache space in the queue is insufficient but has not reached the threshold, the data to be transmitted is temporarily cached in the data classification routing module, and the data is stored in the corresponding cache queue after the cache space in the queue is released; If the space of the classification routing module is also insufficient, the data to be transmitted is discarded, and the register control and status monitoring module is notified to adjust the data scheduling method, traffic priority or the traffic class weight.

13. The Ethernet multi-queue traffic scheduling method according to claim 1, characterized in that: After the current round of data scheduling is completed, the scheduling method, the traffic class priority or the traffic class weight is adjusted through the monitoring feedback information of the register control and status monitoring module.

14. An Ethernet multi-queue traffic scheduling device, characterized in that: Used to execute the Ethernet multi-queue traffic scheduling method according to any one of claims 1 to 13, comprising a sending path and a receiving path, wherein the data transmission directions of the sending path and the receiving path are opposite; The sending path and the receiving path both include a data classification routing module, a cache module and a traffic scheduling module connected in sequence; The data classification routing module receives and classifies data sent by the upstream device, and stores the classified data in the cache queue in the cache module. The traffic scheduling module schedules the data in the cache queue according to the configured scheduling method, priority and weight of the traffic class.

15. The Ethernet multi-queue traffic scheduling device according to claim 14, characterized in that: It also includes a register control and status monitoring module for monitoring the data classification routing module, cache module and traffic scheduling module on the sending path and the receiving path. The register control and status monitoring module is used to set configuration information and monitor and count the operation scheduling of the device.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, and the program code is called by a processor to execute the Ethernet multi-queue traffic scheduling method as described in any one of claims 1-13.

17. An electronic device, characterized in that: comprising one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the one or more processors, and the one or more applications are configured to execute the Ethernet multi-queue traffic scheduling method as described in any one of claims 1-13.

Citation Information

Patent Citations

  • Network data packet scheduling method and system based on mobile 5G network

    CN113747597A