CN115086245A - Method, switch, equipment and storage medium for scheduling TSN (transport stream network) message - Google Patents

Method, switch, equipment and storage medium for scheduling TSN (transport stream network) message Download PDF

Info

Publication number
CN115086245A
CN115086245A CN202210763954.2A CN202210763954A CN115086245A CN 115086245 A CN115086245 A CN 115086245A CN 202210763954 A CN202210763954 A CN 202210763954A CN 115086245 A CN115086245 A CN 115086245A
Authority
CN
China
Prior art keywords
tsn
message
scheduling
level cache
queue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210763954.2A
Other languages
Chinese (zh)
Other versions
CN115086245B (en
Inventor
易建华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wuxin Technology Co ltd
Original Assignee
Beijing Wuxin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Wuxin Technology Co ltd filed Critical Beijing Wuxin Technology Co ltd
Priority to CN202210763954.2A priority Critical patent/CN115086245B/en
Publication of CN115086245A publication Critical patent/CN115086245A/en
Application granted granted Critical
Publication of CN115086245B publication Critical patent/CN115086245B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling
    • H04L47/562Attaching a time tag to queues

Abstract

The invention provides a method, a switch, equipment and a storage medium for scheduling a TSN message, wherein the technical scheme comprises the following steps: the scheduling process is divided into first-level scheduling and second-level scheduling, and a first-level cache and a second-level cache are respectively arranged; the first-level scheduling selects a TSN message which arrives first from a first-level cache according to the timestamp of the TSN message, and simultaneously schedules the TSN message to each corresponding queue in a second-level cache in parallel, wherein the queue of one second-level cache stores all TSN messages output through the same port; and the second-level scheduling selects one queue in the second-level cache, and schedules the output port of the TSN message scheduling which arrives at the first in the queue according to the timestamp of the TSN message. The technical scheme of the embodiment of the invention meets the requirements of low delay and stable delay required by the TSN message.

Description

Method, switch, equipment and storage medium for scheduling TSN (transport stream network) message
Technical Field
The invention relates to the fields of TCP/IP internet and communication, in particular to a method, a switch, equipment and a storage medium for scheduling a TSN message.
Background
At present, a switch adopts a one-time scheduling mode and only schedules an egress port of a TSN packet at a time, fig. 1 shows a scheduling method of an SP + DWRR switch in the prior art, and each scheduling time is simply exemplified as follows:
(1) when only the source port 0 has a message application with priority 0 and is a unicast message, that is, the message has only one output port, the scheduling can be completed by only 2 clk.
(2) When there is a message application only at the source port 0, priority 0, and the message is a multicast message, for example, the egress ports of the message are ports 1 to 30, 2 × 30 — 60 clk are required to complete scheduling.
(3) When there are multiple message applications, and the output port of each message does not include its source port, and the number of output ports is 31, 32 × 8 × 31 × 2 — 15872 clk are all needed to schedule one output port of one message.
It can be seen from the above example that the scheduling delay increases in the square times with the increase of the ports, and the delay is large, and does not meet the scheduling requirement of the TSN packet.
Disclosure of Invention
In view of this, an embodiment of the present invention provides a method, a switch, a device, and a storage medium for scheduling a TSN packet, where a technical scheme includes: the scheduling process is divided into first-level scheduling and second-level scheduling, and a first-level cache and a second-level cache are respectively arranged; the first-level scheduling selects a TSN message which arrives first from a first-level cache according to the timestamp of the TSN message, and simultaneously schedules the TSN message to each corresponding queue in a second-level cache in parallel, wherein the queue of one second-level cache stores all TSN messages output through the same port; and the second-level scheduling selects one queue in the second-level cache, and schedules the output port of the TSN message scheduling which arrives at the first in the queue according to the timestamp of the TSN message. In some embodiments, the messages are divided into TSN messages and non-TSN messages, the priority of the TSN message is higher than that of all non-TSN messages, and the TSN messages in the TSN message and the non-TSN messages which are scheduled out of the same egress port are scheduled to corresponding ports according to the priority of the messages. The technical scheme of the embodiment of the invention meets the requirements of low delay and stable delay required by the TSN message.
In a first aspect, an embodiment of the present invention provides a method for scheduling a TSN packet, including: primary scheduling and secondary scheduling; the first-level scheduling selects a TSN message which arrives first from a first-level cache according to the time stamp of the TSN message, and simultaneously schedules the TSN message to each corresponding queue in a second-level cache in parallel, wherein a queue of the second-level cache stores all the TSN messages output through the same port, and different queues in the second-level cache correspond to different output ports; and the second-level scheduling selects one queue in the second-level cache, and schedules the output port of the TSN message which arrives at the first in the queue according to the timestamp of the TSN message.
By the above, the TSN packet is simultaneously and concurrently scheduled to each corresponding queue in the second-level cache by the first-level scheduling, and the technical scheme of the embodiment improves the scheduling efficiency and reduces the scheduling delay, thereby meeting the requirements of low delay and stable delay required by the TSN packet.
In a possible implementation manner of the first aspect, a method for scheduling a TSN packet further includes: dividing the messages into TSN messages and non-TSN messages, and storing the TSN messages in a first-level cache, wherein the priority of the TSN messages is higher than that of the non-TSN messages; when a TSN message and a non-TSN message are dispatched to the same output port at the same time, the TSN message is dispatched to the corresponding port according to the priority of the message.
Therefore, by increasing the distinction between the TSN message and the non-TSN message, the priority of the TSN message is higher than that of the non-TSN message, and the scheduling back pressure of the non-TSN message on the TSN message is removed in the mixed scene of the TSN message and the non-TSN message, so that the requirements of low delay and delay stability required by the TSN message are met in the mixed scene.
In a possible implementation manner of the first aspect, the selecting a queue in the second level cache specifically includes: and polling and selecting one queue in the second-level cache according to the port corresponding to each queue in the second-level cache.
Therefore, each column in the secondary cache is selected through polling, so that the TSN message of each output port is scheduled fairly.
In a possible implementation manner of the first aspect, the first-level scheduling of one packet is completed in a first set number of system clock cycles, and the second-level scheduling of one packet in one queue of the second-level cache is completed in a second set number of system clock cycles.
Therefore, the scheduling is finished in the set system clock period through the scheduling and the secondary scheduling, so that the primary scheduling and the secondary scheduling are compatible with the existing scheduling technology, and the existing scheduling technology is reused.
In a possible implementation manner of the first aspect, a method for scheduling a TSN packet further includes: and when more than 1 TSN message arrives at the first in the selected queue of the second-level cache according to the timestamp of the TSN message, scheduling the message with the highest priority to the output port of the second-level cache.
Therefore, the priority scheduling of the TSN message which is the highest in priority and arrives first is selected from the queues of the second-level cache according to the priority, and the QoS management requirement of the TSN is met.
In a possible implementation manner of the first aspect, a method for scheduling a TSN packet further includes: when more than 1 TSN message which arrives first is selected in the first-level cache according to the timestamp of the TSN message, the TSN message with the highest priority is selected; and when the TSN message with the highest priority is more than 1, selecting one message according to the source port polling of the TSN message.
Therefore, the first-arriving TSN message with the highest priority is selected to be scheduled preferentially in the queue of the first-level cache according to the priority and the port polling mode, the QoS management requirement of the TSN is met, and the messages from each source port are scheduled fairly.
In a second aspect, an embodiment of the present invention provides a switch for TSN message scheduling, including: the system comprises a primary scheduling module and a secondary scheduling module; the first-level scheduling module is used for selecting a TSN message which arrives firstly from a first-level cache according to the timestamp of the TSN message, and simultaneously scheduling the TSN message to each corresponding queue in a second-level cache in parallel, wherein a queue of the second-level cache stores all the TSN messages output through the same port, and different queues in the second-level cache correspond to different output ports; and the second-level scheduling module is used for selecting a queue in the second-level cache and scheduling the output port of the TSN message which arrives at the first in the queue according to the timestamp of the TSN message.
By the above, the TSN packet is simultaneously and concurrently scheduled to each corresponding queue in the second-level cache by the first-level scheduling, and the technical scheme of the embodiment improves the scheduling efficiency and reduces the scheduling delay, thereby meeting the requirements of low delay and stable delay required by the TSN packet.
In a possible implementation manner of the second aspect, a switch for TSN message scheduling further includes: the message distinguishing module is used for dividing the message into a TSN message and a non-TSN message and storing the TSN message in a first-level cache, wherein the priority of the TSN message is higher than that of the non-TSN message; and the priority scheduling module is used for scheduling the TSN message to the corresponding port according to the priority of the message when the same output port is scheduled by one TSN message and a non-TSN message at the same time.
Therefore, by increasing the distinction between the TSN message and the non-TSN message, the priority of the TSN message is higher than that of the non-TSN message, and the scheduling back pressure of the non-TSN message on the TSN message is removed in the mixed scene of the TSN message and the non-TSN message, so that the requirements of low delay and delay stability required by the TSN message are met in the mixed scene.
In a possible implementation manner of the second aspect, the second-level scheduling is specifically configured to poll and select one queue in the second-level buffer according to a port corresponding to each queue in the second-level buffer when selecting one queue in the second-level buffer.
Therefore, each column in the secondary cache is selected through polling, so that the TSN message of each output port is scheduled fairly.
In a possible implementation manner of the second aspect, the first-level scheduling of one packet is completed within a first set number of system clock cycles, and the second-level scheduling of one packet in one queue of the second-level cache is completed within a second set number of system clock cycles.
Therefore, the scheduling is finished in the set system clock period through the scheduling and the secondary scheduling, so that the primary scheduling and the secondary scheduling are compatible with the existing scheduling technology, and the existing scheduling technology is reused.
In a possible implementation manner of the second aspect, when more than 1 TSN packet arrives first in the selected queue of the secondary cache according to the timestamp of the TSN packet, the primary scheduling module is specifically configured to schedule a packet with a highest priority among the TSN packets to an egress port of the primary scheduling module.
Therefore, the priority scheduling of the TSN message which is the highest in priority and arrives first is selected from the queues of the second-level cache according to the priority, and the QoS management requirement of the TSN is met.
In a possible implementation manner of the second aspect, when more than 1 TSN packet is selected from the first-level cache according to a timestamp of the TSN packet, the second-level scheduling module is specifically configured to select a TSN packet with a highest priority; and when the TSN message with the highest priority is more than 1, selecting one message according to the source port polling of the TSN message.
Therefore, the TSN message with the highest priority arriving firstly is selected in the queue of the first-level cache for priority scheduling according to the priority and the port polling mode, the QoS management requirement of the TSN is met, and the messages from each source port are guaranteed to be scheduled fairly.
In a third aspect, embodiments of the invention provide a computing device comprising,
a bus;
a communication interface connected to the bus;
at least one processor coupled to the bus; and
at least one memory coupled to the bus and storing program instructions that, when executed by the at least one processor, cause the at least one processor to perform any of the embodiments of the first aspect of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which program instructions are stored, where the program instructions, when executed by a computer, cause the computer to execute any one of the embodiments of the first aspect.
Drawings
FIG. 1 is a schematic diagram of a scheduling method of a prior art SP + DWRR switch;
fig. 2 is a schematic flowchart of a scheduling method of a TSN packet according to a first embodiment of the present invention;
fig. 3 is a schematic structural diagram of an application scenario of a scheduling method of a TSN packet according to a first embodiment of the present invention;
fig. 4 is a flowchart illustrating a second method for scheduling a TSN packet according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a TSN packet and a non-TSN packet separate scheduling method according to a second embodiment of a scheduling method for a TSN packet of the present invention;
fig. 6 is a schematic structural diagram of a scheduling apparatus of a TSN packet according to a first embodiment of the present invention;
fig. 7 is a schematic structural diagram of a second scheduling apparatus for TSN packets according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a computing device according to various embodiments of the present invention.
Detailed Description
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the following description, references to the terms "first \ second \ third, etc." or module a, module B, module C, etc. are used solely to distinguish between similar objects or different embodiments and are not intended to imply a particular ordering with respect to the objects, it being understood that where permissible any particular ordering or sequence may be interchanged to enable embodiments of the invention described herein to be practiced otherwise than as shown or described herein.
In the following description, reference to reference numerals indicating steps, such as S110, S120 … …, etc., does not necessarily indicate that the steps are performed in this order, and the order of the preceding and following steps may be interchanged or performed simultaneously, where permissible.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
The embodiment of the invention provides a method, a switch, equipment and a storage medium for scheduling a TSN message, wherein the technical scheme comprises the following steps: the scheduling process is divided into first-level scheduling and second-level scheduling, and a first-level cache and a second-level cache are respectively arranged; the first-level scheduling selects the TSN message which arrives firstly from the first-level cache according to the time stamp of the TSN message, and simultaneously schedules the TSN message to each corresponding queue in the second-level cache in parallel, and the queue of one second-level cache stores all the TSN messages output through the same port; and the second-level scheduling selects one queue in the second-level cache, and schedules the output port of the TSN message scheduling which arrives at the first in the queue according to the timestamp of the TSN message. In some embodiments, the messages are divided into TSN messages and non-TSN messages, the priority of the TSN message is higher than that of all non-TSN messages, and the TSN messages in the TSN message and the non-TSN messages scheduled out of the same egress port are preferentially scheduled to the corresponding ports according to the message priority. The technical scheme of the embodiment of the invention meets the requirements of low delay and stable delay required by the TSN message.
An embodiment of a method for scheduling a TSN packet according to the present invention is described below with reference to fig. 2 to 5.
First, an embodiment of a scheduling method of a TSN packet according to the present invention is described with reference to fig. 2.
An embodiment of a scheduling method for a TSN packet includes: the scheduling process is divided into first-level scheduling and second-level scheduling, and a first-level cache and a second-level cache are respectively arranged; and the first-level scheduling selects the TSN message which arrives firstly from the first-level cache according to the timestamp of the TSN message, and simultaneously schedules the TSN message to each corresponding queue in the second-level cache in parallel, wherein the queue of one second-level cache stores all the TSN messages output through the same port. The technical scheme of the embodiment improves the scheduling efficiency and reduces the scheduling delay, thereby meeting the requirements of low delay and stable delay required by the TSN message.
Fig. 2 shows a flow of a first embodiment of a scheduling method for a TSN packet, which includes steps S110 and S120.
S110: and primary scheduling, namely selecting the TSN message which arrives firstly from the primary cache according to the timestamp of the TSN message, and simultaneously scheduling the TSN message to each corresponding queue in the secondary cache in parallel.
The first-level cache stores the scheduled TSN messages, each message comprises a source port, an output port, a priority and a timestamp, and the timestamp is set according to the arrival time of the message.
The second-level cache comprises a plurality of queues, each queue stores all TSN messages output through the same port, and different queues correspond to different ports.
The first-level scheduling adopts a parallel scheduling mode for each message, and the TSN message which arrives firstly in the first-level cache is scheduled to each corresponding queue in the second-level cache simultaneously.
The first-stage scheduling of one packet is completed in a first set number of system clock cycles clk, and the maximum time of the first-stage scheduling is clk (the number of source ports × the number of priority levels × the first set number). Illustratively, the primary scheduling of one packet is completed in 2 clks, the number of source ports of the packet is 32, the number of priority levels is 8, and the maximum time of the primary scheduling is 32 × 8 × 2 — 512 clk.
In this way, the second-level cache is set and the first-arriving TSN message in the first-level cache is simultaneously scheduled to each corresponding queue in the second-level cache in parallel, so that the scheduling efficiency of the first-level scheduling is improved, and the delay of the whole scheduling is reduced.
S120: and secondary scheduling, namely selecting a queue of a secondary buffer, and scheduling the TSN message which arrives firstly from the queue according to the timestamp of the TSN message.
When the queue of the second level buffer is selected, in some embodiments, one queue of the second level buffer is selected by polling according to a port corresponding to each queue of the second level buffer.
And completing secondary scheduling of one message in one queue in a second set number of system clock cycles clk, wherein the maximum time of the secondary scheduling is (the number of ports is the second set number) clk. Illustratively, the secondary scheduling of one packet in one queue is completed by 2 clks, the port number of the packet is 32, and the maximum time of the secondary scheduling is 32 × 2 — 64 clk.
Therefore, each queue of the second-level cache corresponds to one port respectively, and the second-level scheduling delay is controlled.
The effect of the present embodiment will be described with reference to fig. 3.
Fig. 3 shows an application scenario of a scheduling method of a TSN packet according to an embodiment, where the TSN packet is exchanged between 32 ports, and the priority of the TSN packet is from 0 to 7. The scheduling is divided into first-level scheduling and second-level scheduling, and a first-level cache and a second-level cache are respectively arranged.
For convenience of describing the effect of the present embodiment, the technical solution of the present embodiment and the prior art both perform comparative analysis on the scheduling time of the following two cases.
In the first case: each port has a message with priority 0 to 7, and 256 messages in total, wherein the message with priority 0 at the source port is output to the 31 ports, and the other messages are output to the other ports except the source port, that is, each other message is output to the 31 ports.
In the second case: only source port 0 is a unicast packet of source priority 0.
For comparison, in the prior art, 2 output ports of one message are required to be scheduled out by clk; in this embodiment, the first-level scheduling needs 2clk to simultaneously schedule a packet from the first-level cache to the queue of each corresponding port in the second-level cache in parallel, and the second-level scheduling needs 2clk to schedule a packet from a queue of the second-level cache to its output port.
For the first case, in the prior art, if the source port 0 is scheduled last according to the priority and port polling, a total scheduling time of (32 × 8-1) × (32-1) × 2+ 2) × 15812 clks is needed; for the second case, only 2 schedules of clk are required. It can be found that the delay difference 15810clk between the first case and the second case in the prior art is about 70us, which exceeds the tolerance range of the TSN message.
Meanwhile, in the prior art, the messages are scheduled according to SP + DWRR, and only when some ports (10GE) and priorities (high priorities) schedule a plurality of messages, the ports (1G) and the messages with low priorities are scheduled. Therefore, the maximum delay 15812clk needs to be multiplied by a coefficient (the coefficient is configured in a register of the switch, and is exemplarily 3), and the maximum delay in actual use is far beyond the tolerance range of the TSN message.
For the first case, it is assumed in this embodiment that the source port 0 packet with priority 0 arrives last, the first-stage scheduling needs 255 × 2+2 — 512clk packets, the second-stage scheduling needs 32 × 2 — 64clk packets at most, and the scheduling time is 576 clk packets; for the second case, in this embodiment, the primary schedule and the secondary schedule are both 2 clks, and the scheduling time is 4 clks. And finishing the overall scheduling, namely finishing the primary scheduling and the secondary scheduling. It can be found that the delay difference between the first case and the second case in this embodiment is 572clk, the delay difference is about 2.6us, which is much lower than 15810clk in the prior art, i.e. about 70us, and the delay difference in this embodiment is within the tolerance range of the TSN message. Meanwhile, the messages are not scheduled according to SP + DWRR, the messages are scheduled according to the timestamp, and are scheduled first, so that the errors of SP + DWRR can be eliminated, the maximum delay time can not be multiplied by extra coefficients to be expanded, and the scheduling requirement of the TSN messages is met.
In summary, the scheduling process of the scheduling method for the TSN packet according to the first embodiment of the present invention is divided into a first-level scheduling and a second-level scheduling, and a first-level cache and a second-level cache are respectively configured; the first-level scheduling selects a TSN message which arrives first from a first-level cache according to the timestamp of the TSN message, and simultaneously schedules the TSN message to each corresponding queue in a second-level cache in parallel, wherein the queue of one second-level cache stores all TSN messages output through the same port; and the second-level scheduling selects one queue in the second-level cache, and schedules the output port of the TSN message scheduling which arrives at the first in the queue according to the timestamp of the TSN message. The embodiment improves the scheduling efficiency and reduces the scheduling delay, thereby meeting the requirements of low delay and stable delay required by the TSN message.
The second scheduling method embodiment of the TSN message inherits the first scheduling method embodiment of the TSN message, has all advantages of the first scheduling method embodiment of the TSN message, increases the distinction between the TSN message and the non-TSN message, ensures that the priority of the TSN message is higher than that of the non-TSN message, and eliminates the back pressure of the non-TSN message on the scheduling of the TSN message in the mixed scene of the TSN message and the non-TSN message, thereby meeting the requirements of low delay and stable delay required by the TSN message in the mixed scene.
Fig. 4 shows a flow of a second embodiment of a scheduling method for a TSN packet, which includes steps S210 to S250.
S210: the message is divided into TSN message and non-TSN message, and the TSN message is stored in the first-level cache according to the timestamp.
The lowest priority of the TSN packet is higher than the highest priority of the non-TSN packet, that is, the priority of the TSN packet is higher than that of the non-TSN packet.
Therefore, by setting the priority of the SN message to be higher than that of the non-TSN message, the problems that the non-TSN message has large flow and an output port is easy to back-press the TSN message are avoided, and the influence of the non-TSN message on the TSN message scheduling is eliminated.
S220: and selecting the TSN message which arrives firstly from the first-level cache according to the timestamp of the TSN message, and simultaneously scheduling the TSN message to each corresponding queue in the second-level cache in parallel.
On the basis of step S110 in the first embodiment of the scheduling method for TSN packets, when more than 1 TSN packet is selected from the first-level cache according to the timestamp of the TSN packet, the TSN packet with the highest priority is selected; and when the TSN message with the highest priority is more than 1, selecting one message according to the source port polling of the TSN message.
S230: and polling and selecting one secondary cache according to the corresponding outlet port of each secondary cache, and scheduling the first arriving TSN message from the secondary cache according to the timestamp of the TSN message.
In this step, on the basis of step S120 of the first scheduling method for a TSN packet, when more than 1 TSN packet arrives first in the queue of the selected second-level cache according to the timestamp of the TSN packet, a packet with the highest priority is scheduled to its egress port.
S240: and dispatching the output ports of the non-TSN messages.
The method for non-TSN packet scheduling is not limited in this embodiment, and may be, for example, an SP + DWRR technique in the prior art
S250: and dispatching the TSN message and the non-TSN message of which the output ports are dispatched to the output ports according to the priority.
Because the priority of the TSN message is higher than that of the non-TSN message, when the TSN message and the non-TSN message of the same output port are scheduled at the same time, the TSN message is always scheduled to be dequeued and output to the output port.
Fig. 5 shows a schematic diagram of a method for separately scheduling a TSN message and a non-TSN message, where the TSN message enters a TSN message scheduling module, the non-TSN message enters a non-TSN message scheduling module, output of the TSN message has absolute priority over output of the non-TSN message, and the TSN message is output first when priority is scheduled as long as the TSN message is scheduled to be dequeued.
In summary, the second scheduling method for a TSN packet in the first scheduling method for a TSN packet increases the difference between the TSN packet and the non-TSN packet, so that the priority of the TSN packet is higher than that of the non-TSN packet, thereby meeting the requirements of low delay and stable delay required by the TSN packet in the mixed scene of the TSN packet and the non-TSN packet.
An embodiment of a dispatching switch of a TSN message according to the present invention is described below based on fig. 6 to 7.
Fig. 6 shows a first configuration of an embodiment of a dispatching switch for TSN messages, which includes: a first level cache 610, a second level cache 620, a first level scheduling module 630, and a second level scheduling module 640.
The level one cache 610 is used to cache TSN messages arriving at the switch.
The second-level buffer 620 includes a plurality of queues, each of which corresponds to a port of a switch, and buffers the TSN packet output to the corresponding port according to the FIFO method of the queues.
The first-level scheduling module 630 is configured to select a first-arriving TSN packet from the first-level cache according to a timestamp of the TSN packet, and concurrently schedule the TSN packet to each corresponding queue in the second-level cache. Please refer to step S110 in the first embodiment of the method for scheduling and handing over TSN packets.
The second-level scheduling module 640 is configured to select a queue of the second-level buffer, and schedule the first-arriving TSN packet from the queue according to the timestamp of the TSN packet. Please refer to step S120 in the first embodiment of the method for scheduling and handing over TSN packets.
Fig. 7 shows a first configuration of an embodiment of a dispatching switch for TSN messages, which includes: a first level cache 710, a second level cache 720, a packet distinguishing module 730, a first level scheduling module 740, a second level scheduling module 750, a non-TSN packet scheduling module 760, and a priority scheduling module 770.
The level one cache 710 is used to cache TSN messages arriving at the switch.
The second level buffer 720 includes a plurality of queues, each of which corresponds to a port of a switch, and buffers the TSN packet output to the corresponding port according to the FIFO method of the queues.
The message distinguishing module 730 is configured to divide the message into a TSN message and a non-TSN message, and store the TSN message in the first-level cache according to the timestamp. Please refer to step S210 of a second embodiment of a method for scheduling and handing over TSN packets.
The first-level scheduling module 740 is configured to select a TSN packet that arrives first from the first-level cache according to a timestamp of the TSN packet, and concurrently schedule the TSN packet to each corresponding queue in the second-level cache. Please refer to step S220 of a second embodiment of a method for scheduling and handing over TSN packets.
The second-level scheduling module 750 is configured to select a queue of the second-level buffer, and schedule the first-arriving TSN packet from the queue according to the timestamp of the TSN packet. Please refer to step S230 of a second embodiment of a method for scheduling and handing over TSN packets.
The non-TSN packet scheduling module 760 is configured to schedule an egress port of each non-TSN packet. Please refer to step S240 of a second embodiment of a method for scheduling and handing over TSN packets.
The priority scheduling module 770 is configured to schedule the TSN packet and the non-TSN packet, which have been scheduled to the egress port, to the egress port according to priority. Please refer to step S250 of a second embodiment of a method for scheduling and handing over TSN packets.
The embodiment of the invention also provides a computing device, which is described in detail below with reference to fig. 8.
The computing device 800 includes a processor 810, a memory 820, a communication interface 830, and a bus 840.
It is to be appreciated that the communication interface 830 in the computing device 800 illustrated in this figure can be utilized to communicate with other devices.
The processor 810 may be coupled to the memory 820. The memory 820 may be used to store the program codes and data. Therefore, the memory 820 may be a storage unit inside the processor 810, may be an external storage unit independent of the processor 810, or may be a component including a storage unit inside the processor 810 and an external storage unit independent of the processor 810.
Optionally, computing device 800 may also include a bus 840. The memory 820 and the communication interface 830 may be connected to the processor 810 through a bus 840. The bus 840 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 840 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one line is shown, but this does not represent only one bus or one type of bus.
It should be understood that, in the embodiment of the present invention, the processor 810 may employ a Central Processing Unit (CPU). The processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. Or the processor 810 adopts one or more integrated circuits for executing related programs to implement the technical solutions provided by the embodiments of the present invention.
The memory 820 may include both read-only memory and random access memory, and provides instructions and data to the processor 810. A portion of the processor 810 may also include non-volatile random access memory. For example, the processor 810 may also store information of the device type.
When the computing device 800 is run, the processor 810 executes the computer-executable instructions in the memory 820 to perform the operational steps of the various method embodiments.
It should be understood that the computing device 800 according to the embodiment of the present invention may correspond to a corresponding main body for executing the method according to the embodiments of the present invention, and the above and other operations and/or functions of each module in the computing device 800 are respectively for implementing corresponding flows of each method of the embodiment, and are not described herein again for brevity.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. The storage medium includes various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Embodiments of the present invention also provide a computer-readable storage medium having stored thereon a computer program for performing, when executed by a processor, the operational steps of the method embodiments.
Computer storage media for embodiments of the present invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in more detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention.

Claims (10)

1. A method for scheduling TSN messages is characterized by comprising the following steps: primary scheduling and secondary scheduling;
the first-level scheduling selects a TSN message which arrives first from a first-level cache according to the time stamp of the TSN message, and simultaneously schedules the TSN message to each corresponding queue in a second-level cache in parallel, wherein a queue of the second-level cache stores all the TSN messages output through the same port, and different queues in the second-level cache correspond to different output ports;
and the second-level scheduling selects one queue in the second-level cache, and schedules the output port of the TSN message which arrives at the first in the queue according to the timestamp of the TSN message.
2. The method of claim 1, further comprising:
dividing the messages into TSN messages and non-TSN messages, and storing the TSN messages in a first-level cache, wherein the priority of the TSN messages is higher than that of the non-TSN messages;
when a TSN message and a non-TSN message are dispatched to the same output port at the same time, the TSN message is dispatched to the corresponding port according to the priority of the message.
3. The method of claim 1, wherein the selecting a queue in the second level cache comprises:
and polling and selecting one queue in the second-level cache according to the port corresponding to each queue in the second-level cache.
4. The method of claim 1, wherein the first level scheduling of a packet is performed within a first set number of system clock cycles and the second level scheduling of a packet in a queue of the second level cache is performed within a second set number of system clock cycles.
5. The method of claim 1, further comprising: and when more than 1 TSN message arrives at the first in the selected queue of the second-level cache according to the timestamp of the TSN message, scheduling the message with the highest priority to the output port of the second-level cache.
6. The method of claim 1, further comprising:
when more than 1 TSN message which arrives first is selected in the first-level cache according to the timestamp of the TSN message, the TSN message with the highest priority is selected; and
and when the number of the TSN messages with the highest priority is more than 1, selecting one message according to the source port polling of the TSN message.
7. A switch for TSN message scheduling, comprising: the system comprises a primary scheduling module and a secondary scheduling module;
the first-level scheduling module is used for selecting a TSN message which arrives firstly from a first-level cache according to the timestamp of the TSN message, and simultaneously scheduling the TSN message to each corresponding queue in a second-level cache in parallel, wherein a queue of the second-level cache stores all the TSN messages output through the same port, and different queues in the second-level cache correspond to different output ports;
and the second-level scheduling module is used for selecting a queue in the second-level cache and scheduling the output port of the TSN message which arrives at the first in the queue according to the timestamp of the TSN message.
8. The switch of claim 7, further comprising: the message distinguishing module is used for dividing the message into a TSN message and a non-TSN message and storing the TSN message in a first-level cache, wherein the priority of the TSN message is higher than that of the non-TSN message;
and the priority scheduling module is used for scheduling the TSN message to the corresponding port according to the priority of the message when the same output port is scheduled by one TSN message and a non-TSN message at the same time.
9. A computing device, comprising,
a bus;
a communication interface connected to the bus;
at least one processor coupled to the bus; and
at least one memory coupled to the bus and storing program instructions that, when executed by the at least one processor, cause the at least one processor to perform the method of any of claims 1 to 6.
10. A computer-readable storage medium having stored thereon program instructions which, when executed by a computer, cause the computer to perform the method of any of claims 1 to 6.
CN202210763954.2A 2022-06-29 2022-06-29 TSN message scheduling method, switch, equipment and storage medium Active CN115086245B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210763954.2A CN115086245B (en) 2022-06-29 2022-06-29 TSN message scheduling method, switch, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210763954.2A CN115086245B (en) 2022-06-29 2022-06-29 TSN message scheduling method, switch, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115086245A true CN115086245A (en) 2022-09-20
CN115086245B CN115086245B (en) 2023-10-03

Family

ID=83258539

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210763954.2A Active CN115086245B (en) 2022-06-29 2022-06-29 TSN message scheduling method, switch, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115086245B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6850490B1 (en) * 1999-10-06 2005-02-01 Enterasys Networks, Inc. Hierarchical output-queued packet-buffering system and method
US20050047425A1 (en) * 2003-09-03 2005-03-03 Yonghe Liu Hierarchical scheduling for communications systems
CN101505273A (en) * 2009-03-04 2009-08-12 中兴通讯股份有限公司 Switch and scheduling method for implementing private network packet thereof
WO2017211252A1 (en) * 2016-06-08 2017-12-14 中兴通讯股份有限公司 Service flow scheduling method, device, apparatus, and data storage medium
US20200042349A1 (en) * 2018-07-31 2020-02-06 Nutanix, Inc. Multi-level job processing queues
CN113627832A (en) * 2021-10-09 2021-11-09 国网江苏省电力有限公司营销服务中心 Task multi-stage intelligent scheduling method for electricity utilization information acquisition

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6850490B1 (en) * 1999-10-06 2005-02-01 Enterasys Networks, Inc. Hierarchical output-queued packet-buffering system and method
US20050047425A1 (en) * 2003-09-03 2005-03-03 Yonghe Liu Hierarchical scheduling for communications systems
CN101505273A (en) * 2009-03-04 2009-08-12 中兴通讯股份有限公司 Switch and scheduling method for implementing private network packet thereof
WO2017211252A1 (en) * 2016-06-08 2017-12-14 中兴通讯股份有限公司 Service flow scheduling method, device, apparatus, and data storage medium
US20200042349A1 (en) * 2018-07-31 2020-02-06 Nutanix, Inc. Multi-level job processing queues
CN113627832A (en) * 2021-10-09 2021-11-09 国网江苏省电力有限公司营销服务中心 Task multi-stage intelligent scheduling method for electricity utilization information acquisition

Also Published As

Publication number Publication date
CN115086245B (en) 2023-10-03

Similar Documents

Publication Publication Date Title
US10705878B2 (en) Task allocating method and system capable of improving computational efficiency of a reconfigurable processing system
CN1989738B (en) Propagation of minimum guaranteed scheduling rates
US8782295B2 (en) Method and apparatus for a multi-engine descriptor controller for distributing data processing tasks across the engines
US10101996B2 (en) Arithmetic processing apparatus, information processing apparatus, and method of controlling information processing apparatus
CN107066408B (en) Method, system and apparatus for digital signal processing
US8848532B2 (en) Method and system for processing data
US10146468B2 (en) Addressless merge command with data item identifier
US20150339332A1 (en) Tracking a relative arrival order of events being stored in multiple queues using a counter
US7533201B2 (en) Queue management mechanism in network processor wherein packets stored at memory device corresponds to addresses stored in plurity of queues within queue management
US8392636B2 (en) Virtual multiple instance extended finite state machines with wait rooms and/or wait queues
CN114679415A (en) Non-blocking banyan network meeting AXI5-Lite protocol standard
US8122169B2 (en) Data buffering based on priority tagging of input data
US8127262B1 (en) Communicating state data between stages of pipelined packet processor
US8761188B1 (en) Multi-threaded software-programmable framework for high-performance scalable and modular datapath designs
CN110515749B (en) Method, device, server and storage medium for queue scheduling of information transmission
CN115086245A (en) Method, switch, equipment and storage medium for scheduling TSN (transport stream network) message
US20150370535A1 (en) Method and apparatus for handling incoming data frames
CN115408153B (en) Instruction distribution method, device and storage medium of multithreaded processor
CN110868364B (en) Bandwidth isolation device and method
CN113010464A (en) Data processing apparatus and device
CN115695330A (en) Scheduling system, method, terminal and storage medium for micro-program in embedded system
US8762615B2 (en) Dequeue operation using mask vector to manage input/output interruptions
CN108259382B (en) 3x256 priority scheduling circuit
US7583678B1 (en) Methods and apparatus for scheduling entities using a primary scheduling mechanism such as calendar scheduling filled in with entities from a secondary scheduling mechanism
US20200034213A1 (en) Node device, parallel computer system, and method of controlling parallel computer system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant