WO2023108479A1 - 确定性流传输方法及装置 - Google Patents
确定性流传输方法及装置 Download PDFInfo
- Publication number
- WO2023108479A1 WO2023108479A1 PCT/CN2021/138338 CN2021138338W WO2023108479A1 WO 2023108479 A1 WO2023108479 A1 WO 2023108479A1 CN 2021138338 W CN2021138338 W CN 2021138338W WO 2023108479 A1 WO2023108479 A1 WO 2023108479A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- message
- current
- cft
- queue
- dbq
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
- H04L47/2441—Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/34—Source routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/34—Flow control; Congestion control ensuring sequence integrity, e.g. using sequence numbers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/621—Individual queue per connection or flow, e.g. per VC
Definitions
- This application relates to network communication technology, in particular to a method and device for deterministic traffic (DT: Deterministic Traffic) transmission.
- DT Deterministic Traffic
- Deterministic Network can provide deterministic service functions for carried services in a network domain. These deterministic business functions may include delay, packet loss rate, etc. Taking the deterministic network based on the local area network, that is, the time-sensitive network (TSN: Timesensitive Network) as an example, in TSN, the transmission delay on the entire forwarding path at the forwarding level is ensured by using Cyclic Queuing and Forwarding (CQF: Cyclic Queuing and Forwarding) Ok wait.
- TSN Timesensitive Network
- a service flow with deterministic service functions such as delay and packet loss rate transmitted in a deterministic network is called a deterministic flow.
- deterministic flow For other service flows other than deterministic flows, combined with existing forwarding devices such as software forwarding devices or hardware forwarding devices based on switching chips or NPs, etc., according to the best-effort forwarding method, other service flows that are different from deterministic flows can be forwarded. Traffic flows are called best effort flows.
- the present application provides a deterministic stream transmission method, system and device, so as to realize the deterministic stream transmission of CSQF queued and forwarded at a specified period based on segment routing SR.
- An embodiment of the present application provides a deterministic stream DT transmission method, which is applied to a network device, and the method includes:
- the deterministic flow cache queue DBQ distributes the packets belonging to the best-effort flow to the corresponding best-effort flow cache queue BTQ; the packets in the packet receiving queue refer to the packets received through the local interface of the network device Messages from outside;
- the device Put the message in the DTQ bound to the CFT into the corresponding specified periodic queue CSQ through the awakened periodic forwarding thread CFT on the device, and select the message from the sending queue SQ through the CFT and send it by using The message is forwarded on the outgoing interface of the forwarded message; the SQ is the CSQ currently pointed to by the queue sending pointer SQP corresponding to the CFT.
- the embodiment of the present application also provides an electronic device.
- the electronic device includes: a processor and a machine-readable storage medium;
- the machine-readable storage medium stores machine-executable instructions executable by the processor
- the processor is used to execute machine-executable instructions to implement the steps of the methods disclosed above.
- this embodiment implements the forwarding of deterministic flows on the basis of existing best-effort flow forwarding
- FIG. 1 is a schematic diagram of a best-effort forwarding structure
- Fig. 2 is the flow chart of the method provided by the embodiment of the present application.
- FIG. 3 is a structural schematic diagram of determined flow forwarding and best-effort flow forwarding provided by the embodiment of the present application;
- FIG. 4 is a flowchart for implementing a distribution thread provided by an embodiment of the present application.
- Fig. 5 is the DFT implementation flowchart provided by the embodiment of the present application.
- FIG. 6 is a schematic diagram of the fast forwarding table, OutIfInfo and SRLists association provided by the embodiment of the present application;
- Fig. 7 is the CFT implementation flowchart provided by the embodiment of the present application.
- FIG. 8 is a schematic diagram of the relationship between CSQP and CSQ provided by the embodiment of the present application.
- FIG. 9 is a schematic structural diagram among SQ, RQ, and TQ provided by the embodiment of the present application.
- FIG. 10 is a schematic diagram of the interaction between threads provided in the embodiment of the present application.
- Fig. 11 is a device structure diagram provided by the embodiment of the present application.
- FIG. 12 is a structural diagram of an electronic device provided by an embodiment of the present application.
- the hardware controller such as the controller on the interface board
- the hardware controller receives the message
- it will first store the message in the corresponding message receiving queue (RcvQueue : Receiving Queue).
- the calculation result can be obtained by performing a hash (Hash) operation on the message quintuple, and the queue number can be searched in the message receiving queue in the memory
- Hash hash
- the queue number can be searched in the message receiving queue in the memory
- store the message in the found message receiving queue store the message in the found message receiving queue. It should be noted that this is just an example to describe how to store the message into the corresponding message receiving queue in the memory according to the message characteristic parameters of the message, and it is not used for limitation.
- the hardware controller after the above-mentioned hardware controller receives the message, it will also trigger the interrupt controller to generate an interrupt, so as to call the interrupt handler in the driver software (such as CPU, etc.) to wake up at least one best-effort And for forwarding thread (BFT: Best-effort Forwarding Thread).
- the interrupt handler in the driver software (such as CPU, etc.) to wake up at least one best-effort And for forwarding thread (BFT: Best-effort Forwarding Thread).
- BFT Best-effort Forwarding Thread
- the awakened BFT takes out the message from the bound message receiving queue, converts the taken out message into a message of a specified structure and sends it to the platform software (also called the platform interface).
- platform software also called the platform interface
- the platform software queries the FIB table to determine the outgoing interface used to forward the message, and calls the transmission interface (Transmod) of the driver software to send the message to the hardware queue corresponding to the outgoing interface for transmission.
- Transmod transmission interface
- a high-priority hardware queue is set, and packets therein are sent preferentially.
- the storage resource occupied by the sent message can be further released by calling the release resource software (Free Buffer Pool).
- an embodiment of the present application provides a deterministic stream transmission method, which superimposes deterministic stream forwarding on the basis of best-effort stream forwarding, ensures compatibility between best-effort stream forwarding and deterministic stream forwarding, and ensures Deterministic flow forwarding is not affected by best effort flow forwarding.
- FIG. 2 is a flowchart of a deterministic stream transmission method provided in an embodiment of the present application.
- This process applies to network devices.
- the embodiment of the present application does not specifically limit the specific structural form of the network device.
- it can be a low-end router, etc., or it can be a high-end router with high performance requirements and supports more CPU cores.
- This embodiment does not specifically limit , so that the embodiment of the present application has wide applicability and expansibility.
- the embodiment of this application superimposes deterministic flow forwarding on the basis of best-effort flow forwarding.
- the following is the superposition of deterministic flow forwarding on the basis of best-effort flow forwarding.
- the following transformations have been newly added for sex flow forwarding:
- Deterministic streams are very sensitive to delay and jitter, and are easily affected by platform business processing such as best-effort stream forwarding.
- the embodiment of the present application adds a new distribution thread to the above-mentioned network devices.
- the number of distribution threads is set according to the number of message receiving queues, and one distribution thread is bound to at least one message receiving queue.
- the distribution thread is used to distribute the messages in the bound message receiving queue, so as to distribute the messages belonging to the deterministic flow in the message receiving queue to the corresponding deterministic flow cache queue (DBQ: Deterministic Traffic Queue), which distributes the packets belonging to the best-effort flow to the corresponding best-effort flow buffer queue (BTQ: Best-Effort Traffic Queue).
- DBQ Deterministic Traffic Queue
- BTQ Best-Effort Traffic Queue
- DBQ there is a one-to-one correspondence between DBQ and message receiving queues.
- the messages belonging to the deterministic flow in the message receiving queue 1 are distributed to DBQ1
- the messages belonging to the deterministic flow in the message receiving queue 2 are distributed to DBQ2.
- analogy. DBQ is used to cache the packets belonging to the determined flow distributed by the distribution thread.
- the work of dispatching messages by the distribution thread is decoupled from the work of the platform to process the messages belonging to the deterministic flow, so that the processing of the distribution thread is single, so that it is efficient and non-blocking.
- the processing of the messages belonging to the deterministic flow is independent.
- BTQ packets belonging to best-effort flow in packet receiving queue 1 are distributed to BTQ1
- packets belonging to best-effort flow in packet receiving queue 2 are distributed to BTQ2, and so on....
- BTQ is used to cache the best-effort packets distributed by the distribution thread.
- the work of dispatching messages by the distribution thread is decoupled from the work of the platform processing messages belonging to the best-effort flow, so as to avoid the blockage of the distribution thread by the platform's uncertain processing work.
- the process of distributing packets by the distribution thread is a non-blocking process. Even if there may be platform business processing uncertainty, the distribution thread can still ensure that packets such as those belonging to deterministic flows are distributed in a timely manner.
- a deterministic stream forwarding core module can be added to the driver software of the network device.
- the deterministic flow forwarding core module at least includes: a deterministic flow forwarding thread (DFT: Deterministic Forwarding Thread), and a periodic forwarding thread (CFT: Cycle Forwarding Thread).
- the number of DFTs is set according to the number of DBQs and the deterministic flow load.
- a DFT binds at least one DBQ. DFT is used to put the packets in the bound DBQ into the corresponding deterministic traffic queue (DTQ: Deterministic Traffic Queue).
- the number of CFTs is set according to the number of DTQs and deterministic flow load.
- a CFT binds at least one DTQ.
- CFT is used to put the messages in the bound DTQ into the corresponding specified cycle queue (CSQ: Cycle Specified Queue).
- CSQ Cycle Specified Queue
- the CFT is also bound to at least one CSQ of at least one interface, and is used to take out a message from a specified CSQ within a specified period, and forward the message through the outgoing interface used to forward the message .
- Transmitting Module Transform the Transmitting Module (TransMod: Transmitting Module) so that the Transmitting Module can provide deterministic stream forwarding (such as adding hardware adaptation for deterministic stream forwarding, etc.).
- deterministic stream forwarding such as adding hardware adaptation for deterministic stream forwarding, etc.
- packets belonging to deterministic flows can be assigned the highest priority on the outbound interface, so as to ensure that packets belonging to deterministic flows are forwarded preferentially, and at the same time, the Best-effort traffic forwarding rate limiting.
- Fig. 3 shows an example of a modified frame structure based on the frame shown in Fig. 1 .
- the process may include the following steps:
- Step 201 Distribute the packets in the message receiving queue bound to the distribution thread through the awakened distribution thread on the local device, so as to distribute the messages belonging to the deterministic flow in the message receiving queue to the corresponding
- the DBQs that belong to the best-effort flow are distributed to the corresponding BTQs.
- the message receiving queue here is as described above, and it stores the external messages received by the network device through the local interface.
- the distribution thread distributes the messages in the bound message receiving queue
- the distribution thread may be awakened through an interrupt, or may be awakened through other methods such as polling, which is not specifically limited in this embodiment.
- Step 202 put the message in the DBQ bound to the DFT into the corresponding DTQ through the awakened DFT on the device.
- the DFT can be woken up by the dispatch thread at an appropriate time, and an example will be described below.
- the DFT may also be awakened in other ways, which is not specifically limited in this embodiment.
- Step 203 put the message in the DTQ bound to the CFT into the corresponding designated cycle queue (CSQ: Cyclic Specific Queue) through the awakened periodic forwarding thread CFT on the device, and send the message from the CFT through the CFT
- CSQ Cyclic Specific Queue
- the message is selected from the queue SQ and forwarded through the outbound interface used to forward the message.
- SQ is the CSQ currently pointed to by the sending pointer SQP of the queue corresponding to the CFT.
- the CFT can be woken up by the DFT at an appropriate time, and an example will be described below.
- the CFT can also be woken up in other ways, for example, the CFT is woken up by default directly after being newly created, or if the CFT detects a specified event after being newly created, it is also woken up by default, etc., which are not specifically limited in this embodiment.
- the specified event here refers to the event that there is a message in the CSQ that needs to be forwarded in time. The event will be described with an example below, and will not be repeated here.
- each interface corresponds to multiple CSQs, such as 3 CSQs.
- each CSQ includes at least:
- CSQD Cyclic Specific Queue Descriptors
- the queue element in the BDQ describes the information of a data block, which may at least include: the information of the memory block where the data is located, the starting position of the data, the length of the data, etc., which are not specifically limited in this embodiment.
- each specified periodic queue descriptor may at least include:
- Queue head used to point to the corresponding BDQ
- Head (Head), pointing to the current head position of the team.
- CSQ When CSQ is empty, Head is 0, indicating that the next data packet to be enqueued occupies the 0th position, and Head increases by 1 after each enqueue of data;
- QLen queue length
- MaxBytes the byte capacity of the current queue.
- CSQP Cyclic Specific Queue Pointers
- SQP Sending Queue Pointer (Sending Queue Pointer), the CSQ pointed to by SQP, indicating when
- the CSQ being sent in the previous cycle (the CSQ is also called the sending queue SQ).
- RQP Receiving Queue Pointer (Receiving Queue Pointer), the CSQ pointed to by RQP indicates the CSQ being received in the current cycle (the CSQ is also called the receiving queue RQ).
- TQP Tolerating Queue Pointer (Tolerating Queue Pointer), the CSQ pointed to by TQP, indicates the CSQ to be received in the current cycle after the RQ is full (also called the tolerating queue TQ at this time).
- FIG. 8 shows a schematic diagram of the relationship between CSQP and CSQ by way of example.
- this embodiment realizes the forwarding of deterministic flows added on the basis of existing best-effort flow forwarding
- FIG. 4 is a flowchart for implementing a dispatch thread provided by an embodiment of the present application.
- the distribution thread is set with a corresponding thread polling flag (marked as bPoll_1), initially, bPoll_1 is set to FALSE.
- bPoll_1 is also FALSE at this time.
- the dispatch thread can be woken up by interrupt or other methods.
- the awakened distribution thread can perform the following steps:
- Step 401 the distribution thread traverses the bound message receiving queues in order, determines the currently traversed message receiving queue as the current queue, and inquires whether there are messages in the current queue, if yes, executes step 402, if not, executes Step 407.
- Step 402 set bPoll_1 to TRUE, and traverse the current queue, and determine the traversed message as the current message, when it is recognized that the current message belongs to the deterministic flow, then perform step 403, when it is recognized that the current message belongs to the best effort If it is a stream, go to step 405.
- This step 402 is executed when it is found that there are messages in the current queue.
- set bPoll_1 to TRUE, which means that the distribution thread is currently entering the polling process.
- the shutdown specified function is used to indicate that the dispatch thread is prevented from going to sleep.
- Step 403 put the current message into the DBQ corresponding to the current queue. Then step 404 is executed.
- a packet belonging to a deterministic flow will carry a deterministic flow attribute (DetProperty: Deterministic Property).
- the deterministic flow attributes are not fixed, and the current specification does not provide specific specifications, but are set according to actual needs, such as setting the values of fields such as DSCP to represent the deterministic flow attributes.
- This embodiment does not specifically limit the deterministic flow attribute.
- the deterministic flow attribute is set, it is applied to step 403 to identify whether the current message carries the deterministic flow attribute. If so, it is identified that the current message belongs to the deterministic flow, and the current message is put into The DBQ corresponding to the current queue. Finally, the packet belonging to the deterministic flow is distributed to DBQ.
- DBQs correspond to message receiving queues one by one, for example, the message in the message receiving queue numbered 1 is put into the DBQ numbered 1, and the numbered message is placed into the DBQ numbered 2. The messages in the message receiving queue are put into the DBQ numbered 2, and so on. Finally, based on the above-mentioned corresponding relationship between the DBQ and the message receiving queue, it is realized that the identified current message belonging to the deterministic flow is put into the DBQ corresponding to the current queue.
- Step 404 if the DFT wake-up flag set by the DFT bound to the above-mentioned DBQ is False, then the DFT wake-up flag is set to True, and the DFT wake-up flag is True to wake up the DFT, and then check whether there is still a DFT in the current queue. For the untraversed message, if yes, continue to traverse the untraversed message and return to the step of determining the traversed message as the current message in step 402, if not, execute step 407.
- the distribution thread will set a corresponding DFT wake-up flag for each DFT. Initially, the DFT wake-up flag corresponding to each DFT is set to FALSE.
- the corresponding DFT can be woken up in time, so that the awakened DFT can put the message in the bound DBQ into the corresponding DTQ in time.
- the following DFT process please refer to the following DFT process, which will not be repeated here.
- step 404 can directly traverse the untraversed message when there are still untraversed messages in the current queue. message, return to the step of determining the traversed message as the current message in step 402, and if there is no untraversed message in the current queue, then step 407 is executed.
- Step 405 put the current message into the BTQ corresponding to the current queue. Then step 406 is executed.
- the BTQ corresponds to the message receiving queue one by one, for example, the message in the message receiving queue numbered 1 is put into the BTQ numbered 1, and the BTQ numbered 2 The packets in the packet receiving queue are put into the BTQ numbered 2, and so on.
- the identified current message belonging to the best-effort flow is put into the BTQ corresponding to the current queue.
- Step 406 if the BFT wake-up flag set by the BFT bound to the above-mentioned BTQ is False, then set the BFT wake-up flag to True, wake up the BFT whose BFT wake-up flag is True, and check whether there are still unused BFTs in the current queue. For the traversed message, if yes, traverse the untraversed message, and return to the step of determining the traversed message as the current message in step 401, if not, execute step 407.
- step 406 the BFT bound to the BTQ can be awakened in time, so that the awakened BFT forwards the message in the BTQ in time.
- Step 407 if there is no message in the current queue or there is no message that has not been traversed in the current queue, then it is detected that there is still a message receiving queue that has not been traversed in all message receiving queues bound to the distribution thread, if yes, Continue traversing other message receiving queues that are bound to the distribution thread and have not been traversed, and return to the step of determining the currently traversed message receiving queue as the current queue in step 401 , otherwise, execute step 408 .
- Step 408 for the DFT whose DFT wake-up flag is TRUE, wake up the DFT, and set the DFT wake-up flag of the DFT to FALSE; and, for the BFT whose BFT wake-up flag is TRUE, wake up the BFT, and wake up the BFT of the BFT flag is set to FALSE. Then step 409 is executed.
- step 408 The reason why step 408 is executed here is to wake up the DFT and BFT that have been woken up before but go to sleep while the distribution thread traverses the message receiving queue, so as to ensure that both the deterministic flow and the best-effort flow are forwarded in time.
- step 408 directly sets the DFT wake-up flag of the DFT to FALSE for the DFT whose DFT wake-up flag is TRUE.
- the principle of BFT with the BFT wake-up flag set to TRUE is similar and will not be repeated here.
- Step 409 if bPoll_1 is TRUE, set bPoll_1 to False, and return to the above step 401, if bPoll_1 is False, enable the above specified function, and the specified function is used to instruct the distribution thread to wait to be woken up.
- the implementation process of the distribution process is described through the process shown in FIG. 4 .
- FIG. 5 is a flow chart of DFT implementation provided by the embodiment of the present application.
- the DFT can be awakened by the distribution thread (see the process shown in FIG. 4 above for details).
- the DFT may also be awakened in other ways, which are not specifically limited here.
- the awakened DFT is set with a corresponding thread polling flag (denoted as DFT polling flag), wherein, when the DFT is awakened, the DFT polling flag is FALSE at this time.
- DFT polling flag denoted thread polling flag
- the awakened DFT can perform the following steps:
- Step 501 DFT traverses the bound DBQs in order, determines the currently traversed DBQ as the current DBQ, and inquires whether the current DBQ has a message, if yes, executes step 502, if not, executes step 505.
- Step 502 setting the DFT polling flag as TRUE, and traversing the current DBQ, determining the traversed message as the current DBQ message, calling the set message repetition elimination and sorting (PREOF: Packet Replication, Elimination, and Ordering Functions ) function recognizes that the current DBQ message is not a repeated message and generates a message output chain.
- PREOF Packet Replication, Elimination, and Ordering Functions
- This step 502 is executed when it is found that the current DBQ has messages.
- set the DFT polling flag to TRUE, which means that DFT is currently in the polling process.
- the off designation function is used to indicate that the DFT is prevented from entering the sleep state.
- DFT is set with a PREOF function. Based on the PREOF function, it can be identified whether the current DBQ message is a repeated message. Among them, the PREOF function can be used to identify whether the current DBQ message and the message processed by calling the PREOF function are repeated messages. When it is recognized that the current DBQ message is a repeated message, the current DBQ message is discarded, and When there are untraversed messages in the current DBQ, continue to traverse the untraversed messages, and return to the step of determining the traversed messages as the current DBQ messages in step 502 .
- the current DBQ message is a repeated message based on the PREOF function, for example, to identify whether the message sequence number of the current DBQ message is less than the recorded maximum sequence corresponding to the service flow to which the current DBQ message belongs number, if yes, identify the current DBQ message as a repeated message, etc., which are not specifically limited in this embodiment.
- the PREOF function may be called to generate a message output chain.
- the PREOF function may be called to generate a message output chain.
- each message in the message output chain can be packaged into a message and put into the DTQ corresponding to the outgoing interface used to forward the message. For details, refer to step 503 .
- Step 503 traversing the messages in the message output chain, recording the traversed messages as target messages, encapsulating the target messages, and putting the encapsulated target messages into the output box for forwarding the target messages.
- the interface corresponds to DTQ, check whether the target message is the last untraversed message in the message output chain, if yes, execute step 504, if not, traverse the untraversed message in the message output chain, and return the The traversed message is recorded as the step of the target message.
- a corresponding DTQ is set for each outgoing interface.
- the DTQ corresponding to outbound interface 1 is denoted as DTQ1
- the DTQ corresponding to outbound interface 2 is denoted as DTQ2, and so on.
- the target message is encapsulated and the encapsulated target message is put into the DTQ corresponding to the outbound interface for forwarding the target message.
- the outbound interface for forwarding the target message is outbound interface 1, then the encapsulated target message is put into the DTQ corresponding to the outbound interface for forwarding the target message, that is, DTQ1.
- Step 504 if the CFT wake-up flag set by the CFT bound to the above-mentioned DTQ is False, then the CFT wake-up flag is set to True, and the CFT wake-up flag that wakes up is True, and checks whether there is still an unavailable For the traversed message, if yes, continue to traverse the untraversed message and return to the step of determining the traversed message as the current DBQ message in step 502, if not, execute step 505.
- the DFT will set a corresponding CFT wake-up flag for each CFT. Initially, the CFT wake-up flag corresponding to each CFT is set to FALSE.
- step 504 the CFT bound to the above-mentioned DTQ can be woken up in time, so that the awakened CFT can put the message in the bound DTQ into the corresponding CSQ queue in time, and select the message from the SQ and pass the output of the message.
- the interface is forwarded. For details, see the process shown in Figure 7 below.
- step 504 when there are still untraversed messages in the current DBQ, continue traversing the untraversed messages and Return to the step of determining the traversed packet as the current DBQ packet in step 502, and execute step 505 when there is no untraversed packet in the current DBQ.
- Step 505 if there is no message in the current DBQ or there is no untraversed message in the current DBQ, then check whether there are untraversed DBQs in all DBQs bound to the DFT, if yes, continue to traverse the untraversed and return to the step of determining the currently traversed DBQ as the current DBQ in step 501; otherwise, execute step 506.
- Step 506 wake up the CFT whose CFT wakeup flag is TRUE, and set the CFT wakeup flag of the CFT to FALSE. Then step 507 is executed.
- step 506 is performed here is to wake up the CFT that has been woken up before but goes to sleep during the DFT traversal of the DBQ, so as to ensure the reliability of deterministic flow forwarding.
- Step 507 if the CFT polling flag is TRUE, set the CFT polling flag to False, and return to the above step 501, if the CFT polling flag is False, enable the above specified function to instruct DFT to wait to be woken up.
- an example of calling the PREOF function to generate a message output chain may include:
- Step a11 identify whether the current DBQ message is an out-of-sequence message, if not, perform step a12, and if yes, perform step a13.
- identifying whether the current DBQ message is an out-of-sequence message such as identifying the service flow to which the current DBQ message belongs, and finding that the message sequence number of the current DBQ message is greater than the recorded
- the maximum serial number of the message belonging to the above-mentioned business flow processed by calling the PREOF function then when the message serial number of the current DBQ message is not adjacent to the above-mentioned maximum serial number, it is determined that the current DBQ message is an out-of-sequence message, Otherwise, it is determined that the current DBQ message is not an out-of-sequence message.
- Step a12 put the current DBQ message into the above message output chain.
- This step a12 is performed on the premise that it is recognized that the current DBQ message is not an out-of-sequence message. Once it is recognized that the current DBQ message is not an out-of-sequence message, the current DBQ message can be directly put into the above-mentioned message output chain, and at the same time, the above-mentioned maximum sequence number that has been recorded is further updated to the message sequence of the current DBQ message number, so as to judge whether the subsequent DBQ message is an out-of-sequence message.
- Step a13 determine the business flow to which the current DBQ message belongs, if the current DBQ message meets the condition, the condition means that the current DBQ message and the recorded service flow belong to the business flow and the PREOF function is called within the set time window At least one message processed is successfully sorted, then the current DBQ message, at least one message that has been successfully sorted with the current DBQ message, and the recorded message belonging to the business flow and at the set time Call the PREOF function outside the window to process but have not yet put the message into the message output chain into the message output chain.
- This step a13 is performed on the premise that the current DBQ message is identified as an out-of-sequence message.
- identify the service flow to which the current DBQ message belongs the specific service flow information can be carried in the message
- the sequence number of the message is 8, and the sequence number of a recorded message belonging to the above service flow and processed by calling the PREOF function within the set time window is found to be 7, which means that the recorded message belongs to the above service flow and At least one message processed by calling the PREOF function within the set time window is successfully sorted with the current DBQ message.
- the above-mentioned setting time window can be set according to actual needs, such as setting the closest 10us to the current time, which is not specifically limited in this embodiment.
- the current DBQ message is successfully sorted with at least one message that belongs to the above-mentioned service flow that has been recorded and is processed by calling the PREOF function within the set time window
- the current DBQ message, the recorded and the current At least one message that has been successfully sorted by DBQ messages, and the recorded messages that belong to the above-mentioned business flow and are processed by calling the PREOF function outside the above-mentioned set time window but have not yet been put into the message output chain are put into the message output chain .
- a message output chain is generated.
- the recorded message belonging to the above-mentioned service flow can be And call the PREOF function processing outside the above-mentioned set time window but put the message that has not been put into the message output chain into the message output chain. Finally, a message output chain is generated. It should be noted that if the current DBQ message cannot be successfully sorted with at least one recorded message belonging to the above business flow and processed by calling the PREOF function within the set time window, then optionally, the current DBQ message can be further recorded. DBQ message, and call the PREOF function to process the timestamp of the current DBQ message.
- encapsulating the target message in step 503 may include:
- Step b11 judging whether the target packet is an edge access packet, if yes, execute step b12, otherwise, execute step b13.
- Step b12 performing the first type of encapsulation on the target packet.
- This step b12 is performed on the premise that it is determined that the target packet is an edge access packet.
- the first type of encapsulation may be performed on the target packet.
- this embodiment introduces a new concept: fast forwarding table (FastFwdTbl).
- the fast forwarding table can be obtained by converting routing information in a deterministic network.
- the DFT can quickly obtain the outgoing interface of the target message by looking up the fast forwarding table, so as to find the relevant DTQ (that is, the DTQ corresponding to the outgoing interface).
- the deterministic flow is forwarded through the fast forwarding table.
- the speed of deterministic flow forwarding provides guarantee for deterministic flow forwarding.
- the fast forwarding table has a smaller capacity and faster lookup, and the overhead of the lookup table is not much different, thereby reducing uncertainty factors.
- the fast forwarding table can at least include: Destination IP (purpose IP address), Source IP (source IP address), Destination Port (purpose port), Source Port (source port), Proto (protocol) , Differentiated Services Code Point (DSCP: Differentiated Services Code Point), Out Interface (OutIf: Out Interface), Tunnel Index (LIndex).
- Destination IP purpose IP address
- Source IP source IP address
- Destination Port purpose port
- Source Port source port
- Proto Proto
- DSCP Differentiated Services Code Point
- Out Interface OutIf: Out Interface
- LIndex Tunnel Index
- step b12 can be: based on the message characteristic information carried by the target message such as source IP address, destination IP address, etc., find OutIf and LIndex in the fast forwarding table; Find the OutIfInfo corresponding to OutIf in the outbound interface information (OutIfInfo); here, OutIfInfo includes at least the outbound interface information such as MAC address, the pointer of the segment route list (SRLists) based on the outbound interface (here, the segment route SR is used as an example to describe); and then Obtain the corresponding SRList according to the LIndex and SRLists pointers, encapsulate the target message based on the MAD address in SRList and OutIfInfo, and finally realize the first type of encapsulation of the target message.
- FIG. 6 shows an example of the association relationship between the fast forwarding table and OutIfInfo and SRLists.
- Step b13 performing second-type encapsulation on the target packet.
- This step b13 is performed on the premise that it is determined that the target packet is not an edge access packet.
- it means that the above-mentioned first type of encapsulation has been performed on the target packet.
- the OutIf can be determined according to the SID in the SRLists of the target message being encapsulated, and the corresponding OutIfInfo (such as at least including the MAC address) can be found through the OutIf query.
- the target message is encapsulated and replaced, such as replacing the source MAC address in the encapsulated layer 2 header with the MAC address of the outgoing interface in the OutIfInfo, etc., this implementation Examples are not specifically limited.
- FIG. 7 is a flow chart of CFT implementation provided by the embodiment of the present application.
- the CFT may be awakened by the DFT as described in step 504 or step 506 in the process shown in FIG. 5 above.
- the CFT can also be directly awakened to be awakened. For example, when a CFT is newly created on a network device, if it is detected that there is a message in the CSQ bound to the CFT If it is forwarded in time, the CFT can be directly awakened.
- CFT_Jiffies CFT_prev_Jiffies
- CFT_Rcv_Jiffies CFT_Rcv_Jiffies
- CFT_Jiffies may indicate the period currently being processed, and may be recorded as a variable of the current processing period.
- CFT_prev_Jiffies is used to indicate the historical period and can be recorded as a historical period variable.
- CFT_Rcv_Jiffies is used to record the current cycle of processing and receiving, which can be recorded as a message receiving cycle variable.
- the process may include the following steps:
- Step 701 after the CFT wakes up, reads the current value of CSQF_Jiffies, and updates CFT_Jiffies to the read current value of CSQF_Jiffies. Then step 702 is executed.
- Step 702 check whether the message sending period is updated, if yes, execute step 703, if not, execute step 704.
- CFT_Jiffies represents the current processing cycle variable
- CFT_Prev_Jiffies represents the historical cycle variable. Therefore, based on CFT_Jiffies and CFT_Prev_Jiffies, it can be determined whether the packet sending cycle has been updated.
- the message sending period has been updated, for example, the period is cycled from the first period to the second period; and when CFT_Jiffies and CFT_Prev_Jiffies are equal, it means that the message sending period has not been updated.
- Step 703 readjust the CSQP corresponding to the CFT, and update the value of CFT_Prev_Jiffies to the current value of CFT_Jiffies. Then step 704 is executed.
- the CSQP includes at least: SQP, RQP, and TQP.
- the number of the CSQ pointed to by the readjusted SQP is modeled according to the total number d of CSQs bound to CFT_Jiffies and CFT. The remainder obtained by the operation is determined. This remainder may be denoted as Rem here.
- the serial number of the CSQ pointed to by the readjusted RQP is determined based on the result obtained by performing a modulo operation on the upper number d based on the sum of Rem and the specified number of jitter cycles Jitter.
- the serial number of the CSQ pointed to by the readjusted RQP is obtained by the following formula: (Rem+Jitter) mod d.
- serial number of the CSQ pointed to by the readjusted TQP can be determined according to the following formula: (d-1+Rem-Jitter) mod d.
- Step 704 traversing the messages in the SQ, determining the traversed message as the current SQ message, sending the current SQ message to the outgoing interface for forwarding the current SQ message for forwarding, and then checking whether the SQ is still There are untraversed messages, if yes, continue traversing the untraversed messages and return to the step of determining the traversed message as the current SQ message in step 704, if not, execute step 705.
- Step 705 traversing the DTQ bound to the CFT, determining the traversed DTQ as the current DTQ, querying whether the current DTQ has a message, if yes, performing step 706, and if not, performing step 708.
- This step 705 is executed when there is no message that has not been traversed in the SQ (that is, the SQ is empty).
- Step 706 update the value of CFT_Rcv_Jiffies to the current value of CSQF_Jiffies, traverse the current DTQ, determine the traversed message as the current DTQ message, and determine the current DTQ message according to the specified cycle queue (Cycle) parameter carried by the current DTQ message The target CSQ corresponding to the text. Then step 707 is executed.
- CFT_Rcv_Jiffies Based on the CSQF_Jiffies and CFT_Rcv_Jiffies described above, the value of CFT_Rcv_Jiffies is updated to the current value of CSQF_Jiffies here, the purpose of which is to control the timely execution of CFT threads and reduce scheduling delays.
- the specified cycle queue (Cycle) parameter carried by the current DTQ message indicates the target CSQ. Based on this, it is easy to determine the target CSQ corresponding to the current DTQ message based on the indication of the Cycle parameter.
- Step 707 if the target CSQ is between SQ and RQ, then put the current DTQ message into RQ, if the target CSQ is between TQ and SQ, then put the current DTQ message into TQ, if the target CSQ is between RQ and TQ Between, then put the current DTQ message into the target CSQ; Afterwards, check whether there is a message that has not been traversed in the current DTQ, if yes, continue to traverse the message that has not been traversed and return to the traversed message in step 706 The step of determining the received message as the current DTQ message, if not, go to step 708.
- FIG. 9 shows an example of the structure among SQ, RQ, and TQ.
- Step 708 check whether there is still a DTQ that has not been traversed in all DTQs bound to the CFT, if yes, continue to traverse the DTQ that has not been traversed and return to step 705 to determine the traversed DTQ as the current DTQ, otherwise, execute the step 709.
- Step 709 detecting whether there is an event that a message needs to be forwarded in time in the CSQ bound to the CFT
- the CFT goes to sleep and waits to be woken up; if yes, returns to step 701 above.
- the event that the message needs to be forwarded in time is determined according to the above CFT_Jiffies and CFT_Rcv_Jiffies; optionally, when the difference between the value of CFT_Jiffies and the value of CFT_Rcv_Jiffies is less than or equal to the specified difference, it is determined that there is an event that the message needs to be forwarded in time , otherwise, it is determined that there is no event that the message needs to be forwarded in time.
- the specified difference is set in advance, for example, it can be set to 10 cycles (the cycle in which the above-mentioned timer generates an interrupt), etc., which is not specifically limited in this embodiment.
- the above is an example description of the execution process after the distribution thread, DFT, and CFT are awakened.
- the BFT after being awakened, it can directly obtain the message from the BTQ and forward it to the outgoing interface used for the message for forwarding. No more details here.
- each DBQ there is generally only one distribution thread. Based on the correspondence between the DBQ and the message receiving queue described above, one-to-one correspondence between DBQ, distribution thread, and message receiving queue can be realized.
- Each distribution thread is responsible for The packets belonging to the deterministic flow in the packet receiving queue are distributed to the DBQ corresponding to the distribution thread.
- one DBQ is generally only bound to one DFT.
- a DTQ generally only has one DFT responsible for processing the messages it enters the queue, and binds one CFT to be responsible for processing the messages going out from the DTQ.
- FIG. 10 shows an example of operations between threads based on the above restrictions.
- FIG. 10 shows an example that one port (interface) is associated with one CFT, and packets output through each port are scheduled by the CFT associated with the port.
- DBQ and DTQ are designed as circular queues to achieve lock-free operations and improve concurrency
- DisThr, DFT, and CFT are real-time priority scheduling threads; among them, DFT and CFT threads do not share CPU cores with other real-time priority threads, nor do they share CPU cores with threads that occupy CPU resources for a long time and do not release them. .
- FIG. 11 is a structural diagram of a device provided by an embodiment of the present application.
- the device is applied to network equipment, and the device may include:
- the distribution thread after being awakened, distributes the messages in the bound message receiving queue, so as to distribute the messages belonging to the deterministic flow in the message receiving queue to the corresponding DBQ, which will belong to best effort Distributing the packets for the flow to the corresponding BTQ;
- the packets in the packet receiving queue refer to the packets received from the outside through the local interface of the network device;
- the deterministic forwarding thread DFT after being awakened, puts the message in the bound DBQ into the corresponding DTQ;
- the periodic forwarding thread CFT after being woken up, puts the message in the bound DTQ into the corresponding designated periodic queue CSQ, and selects the message from the sending queue SQ and forwards it through the outgoing interface used to forward the message ;
- the SQ is the CSQ currently pointed to by the queue sending pointer SQP corresponding to the CFT.
- the distributing thread distributing the messages in the bound message receiving queue includes:
- the distribution thread is set to a corresponding thread polling flag, and the thread polling flag has been set to False when the distribution thread is woken up;
- the thread polling flag is further set to be True to indicate that the specified function that the distribution thread is closed is set; the specified function that is closed is used to indicate that the distribution thread is blocked go to sleep;
- the thread polling flag is True, then the thread polling flag is set as False, and return traversal is bound with the distribution thread.
- the distribution thread distributes the packets belonging to the deterministic flow in the packet receiving queue to the corresponding DBQ
- the DFT wakeup flag set by the DFT bound to the DBQ is False
- Set the DFT wake-up flag to True and wake up the DFT whose DFT wake-up flag is True;
- the DFT whose DFT wakeup flag is TRUE is further awakened, and the DFT wakeup flag of the DFT is set to FALSE.
- the DFT puts the message in the bound DBQ into the corresponding DTQ including:
- the message output chain is generated through the following steps:
- the DFT is set with a corresponding DFT polling flag, and the DFT polling flag has been set to False when the DFT is woken up;
- the DFT inquires that the current DBQ has a message, it further sets the DFT polling flag as True, and closes the specified function set by the DFT, and closes the specified function to indicate that the DFT is prevented from entering the sleep state ;
- Described DFT is after the DBQ of binding is all traversed, further in DFT polling sign is True, then setting described thread polling sign is False, and returns the step of traversing the DBQ bound with this awakened DFT ;
- the DFT polling flag is False, enable the specified function, and the specified function is used to instruct the DFT to wait to be woken up.
- the CFT wake-up flag that is further set in the CFT bound to the DTQ is False, then set the The CFT wake-up flag is True, and wake up the CFT whose CFT wake-up flag is True;
- the CFT putting the message in the bound DTQ into the corresponding designated periodic queue CSQ includes:
- traverse the current DTQ determine the traversed message as the current DTQ message, and determine the target CSQ corresponding to the current DTQ message according to the specified period queue Cycle parameter carried by the current DTQ message, if the target CSQ is between SQ and RQ If the target CSQ is between TQ and SQ, put the current DTQ message into TQ; if the target CSQ is between RQ and TQ, put the current DTQ message into Target CSQ; wherein, the RQ is the CSQ currently pointed to by the queue receiving pointer RQP corresponding to the CFT; the TQ is the CSQ currently pointed to by the queue tolerance pointer TQP corresponding to the CFT; after that, in the current DTQ When there is an untraversed message, continue to traverse the untraversed message and return to the step of determining the traversed message as the current DTQ message;
- the CFT puts the packets in the bound DTQ into the corresponding designated periodic queue CSQ when the SQ is empty.
- the CFT selecting a message from the sending queue SQ and forwarding the message through an outgoing interface for forwarding the message includes:
- the CSQP includes at least: SQP; traverse the message in the SQ pointed to by the adjusted SQP, and traverse the message The text is determined as the current SQ message, and the current SQ message is forwarded by calling the outbound interface used to forward the current SQ message; after that, if there are still untraversed messages in the SQ, continue to traverse the untraversed message And return to the step of determining the traversed message as the current SQ message;
- the CSQP also includes a receive queue pointer RQP and a queue tolerance pointer TQP; the RQP points to the CSQ as the receive queue RQ, and the TQP points to the CSQ as the queue tolerance TQ;
- serial number of the CSQ pointed to by the readjusted SQP is determined according to the remainder obtained by modulo operation of the current processing cycle variable CFT_Jiffies set for the CFT and the number d of CSQs bound to the CFT;
- serial number of the CSQ pointed to by the readjusted RQP is determined according to the result obtained by performing a modulo operation on the d according to the sum of the remainder and the specified number of jitter cycles Jitter;
- serial number of the CSQ pointed to by the readjusted TQP is determined according to the following formula:
- the CFT puts all the messages in all bound DTQs into the corresponding designated periodic queue CSQ, and further detects whether there is an event that a message needs to be forwarded in time in the CSQ bound to the CFT, If yes, return to the step of selecting a message from the sending queue SQ through the CFT and forward it through the outgoing interface for forwarding the message; if not, wait for being woken up again.
- the event that the message needs to be forwarded in time is determined according to the current processing period variable CFT_Jiffies set by the CFT and the current message receiving period variable CFT_Rcv_Jiffies, when the value of the CFT_Jiffies is different from the value of the CFT_Rcv_Jiffies
- the difference is less than or equal to the specified difference, it is determined that there is an event that the message needs to be forwarded in time, otherwise, it is determined that there is no event that the message needs to be forwarded in time;
- the value of the CFT_Jiffies is updated to the current value of the set CSQF_Jiffies, and the CSQF_Jiffies It is used to indicate the queuing and forwarding cycle count of the specified cycle based on segment routing;
- whether the message sending period is updated is determined in the following manner:
- the method further includes: updating the value of the CFT_Prev_Jiffies to the current value of the CFT_Jiffies.
- FIG. 12 is a structural diagram of an electronic device provided by an embodiment of the present application.
- the hardware structure may include: a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; Instructions to implement the methods disclosed in the above examples of the present application.
- the embodiment of the present application also provides a machine-readable storage medium, on which several computer instructions are stored, and when the computer instructions are executed by a processor, the present invention can be realized. Apply the method disclosed by the above example.
- the above-mentioned machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device, which may contain or store information, such as executable instructions, data, and so on.
- the machine-readable storage medium can be: RAM (Radom Access Memory, random access memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage media, or a combination of them.
- a typical implementing device is a computer, which may take the form of a personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation device, e-mail device, game control device, etc. desktops, tablets, wearables, or any combination of these.
- embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
- computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means,
- the instruction means implements the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
- These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operational steps are performed on the computer or other programmable equipment to produce computer-implemented processing, so that the information executed on the computer or other programmable equipment
- the instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
Claims (16)
- 一种确定性流DT传输方法,其特征在于,该方法应用于网络设备,该方法包括:通过本设备上已被唤醒的分发线程对与该分发线程相绑定的报文接收队列中的报文进行分发,以将所述报文接收队列中属于确定性流的报文分发至对应的确定性流缓存队列DBQ,将属于尽力而为流的报文分发至对应的尽力而为流缓存队列BTQ;所述报文接收队列中的报文是指通过所述网络设备本地接口接收到的来自外部的报文;通过本设备上已被唤醒的确定性转发线程DFT将与该DFT相绑定的DBQ中的报文放入对应的确定性流队列DTQ;通过本设备上已被唤醒的周期转发线程CFT将与该CFT相绑定的DTQ中的报文放入对应的指定周期队列CSQ,以及通过所述CFT从发送队列SQ中选择报文并通过用于转发报文的出接口进行转发;所述SQ为所述CFT对应的队列发送指针SQP当前指向的CSQ。
- 根据权利要求1所述的方法,其特征在于,所述通过所述分发线程对与该分发线程相绑定的报文接收队列中的报文进行分发包括:遍历与所述分发线程相绑定的报文接收队列,将遍历到的报文接收队列确定为当前队列,查询所述当前队列是否有报文;若当前队列有报文,则遍历当前队列,将遍历到的报文确定为当前报文,若当前报文属于确定性流,则将当前报文放入与当前队列对应的DBQ,若当前报文属于尽力而为流,则将当前报文放入与当前队列对应的BTQ;之后,在当前队列中还存在未被遍历的报文时,继续遍历该未被遍历的报文并返回将遍历到的报文确定为当前报文的步骤;若当前队列无报文或者当前队列中不存在未被遍历的报文,在所述分发线程相绑定的所有报文接收队列中还存在未被遍历的报文接收队列时,继续遍历所述分发线程相绑定的且未被遍历的报文接收队列,并返回将遍历到的报文接收队列确定为当前队列的步骤。
- 根据权利要求2所述的方法,其特征在于,所述分发线程被设对应的线程轮询标志,线程轮询标志在所述分发线程被唤醒时已被置为False;在查询当前队列有报文时,进一步设置所述线程轮询标志为True,以指示关闭所述分发线程被设置的指定功能;关闭所述指定功能用于指示阻止所述分发线程进入睡眠状态;在所述分发线程相绑定的报文接收队列均被遍历后,该方法进一步包括:若所述线程轮询标志为True,则设置所述线程轮询标志为False,并返回遍历与所述分发线程相绑定的报文接收队列的步骤;若所述线程轮询标志为False,则指示开启所述指定功能,所述开启指定功能用于指示所述分发线程等待被唤醒。
- 根据权利要求2或3所述的方法,其特征在于,所述分发线程在将所述报文接收队列中属于确定性流的报文分发至对应的DBQ时进一步包括:若与该DBQ相绑定的DFT被设置的DFT唤醒标志为False,则将该DFT唤醒标志设置为True,唤醒DFT唤醒标志为True的该DFT;和/或,在所述分发线程相绑定的所有报文接收队列均被遍历后,该方法进一步包括:针对DFT唤醒标志为TRUE的DFT,唤醒该DFT,并将该DFT的DFT唤醒标志置为FALSE。
- 根据权利要求1所述的方法,其特征在于,所述通过本设备上已被唤醒的确定性转发线程DFT将与该DFT相绑定的DBQ中的报文放入对应的确定性流队列DTQ包括:遍历与所述DFT相绑定的DBQ,将遍历到的DBQ确定为当前DBQ,查询当前DBQ是否有报文;若当前DBQ有报文,遍历当前DBQ,将遍历到的报文确定为当前DBQ报文,调 用已设置的报文重复消除和排序PREOF功能识别出当前DBQ报文不为重复报文时生成报文输出链;对所述报文输出链中的每一DBQ报文进行报文封装,将封装后的DBQ报文放入用于转发该DBQ报文的出接口对应的DTQ;之后,在当前DBQ中还存在未被遍历的报文时,继续遍历当前DBQ中未被遍历的报文并返回将该遍历到的报文确定为当前DBQ报文的步骤;若当前DBQ无报文或者当前DBQ中不存在未被遍历的报文时,在所述DFT相绑定的所有DBQ中还存在未被遍历的DBQ时,继续遍历该未被遍历的DBQ并返回将当前遍历到的DBQ确定为当前DBQ的步骤。
- 根据权利要求5所述的方法,其特征在于,所述报文输出链通过以下步骤生成:当通过调用所述PREOF功能识别当前DBQ报文不为乱序报文时,将当前DBQ报文放入所述报文输出链;当通过调用所述PREOF功能识别当前DBQ报文为乱序报文时,确定当前DBQ报文所属的业务流,若当前DBQ报文满足条件,所述条件是指当前DBQ报文与已记录的属于所述业务流且在设定时间窗口内通过调用PREOF功能处理的至少一个报文成功排序,则将当前DBQ报文、已记录的与所述当前DBQ报文成功排序的至少一个报文、以及已记录的属于所述业务流且在所述设定时间窗口之外调用PREOF功能处理的报文放入所述报文输出链;若当前DBQ报文不满足所述条件,则将已记录的属于所述业务流且在所述设定时间窗口之外调用PREOF功能处理的报文放入所述报文输出链。
- 根据权利要求5所述的方法,其特征在于,所述DFT被设置对应的DFT轮询标志,所述DFT轮询标志在所述DFT被唤醒时已被置为False;在查询当前DBQ有报文时,进一步设置所述DFT轮询标志为True,并关闭所述述DFT被设置的指定功能,关闭所述指定功能用于指示阻止所述DFT进入睡眠状态;在所述DFT相绑定的DBQ均被遍历后,该方法进一步包括:若所述DFT轮询标志为True,则设置所述线程轮询标志为False,并返回遍历与该被唤醒的DFT相绑定的DBQ的步骤;若所述DFT轮询标志为False,则开启所述指定功能,所述开启指定功能用于指示DFT等待被唤醒。
- 根据权利要求5所述的方法,其特征在于,所述DFT在将DBQ报文放入用于转发该DBQ报文的出接口对应的DTQ之后进一步包括:若与该DTQ相绑定的CFT被设置的CFT唤醒标志为False,则设置该CFT唤醒标志为True,并唤醒该CFT唤醒标志为True的CFT;在所述DFT相绑定的DBQ均被遍历后,该方法进一步包括:针对CFT唤醒标志被设置为TRUE的CFT,唤醒该CFT,并将该CFT的CFT唤醒标志置为FALSE。
- 根据权利要求1所述的方法,其特征在于,所述通过本设备上已被唤醒的周期转发线程CFT将与该CFT相绑定的DTQ中的报文放入对应的指定周期队列CSQ包括:遍历所述CFT相绑定的DTQ,将遍历到的DTQ确定为当前DTQ,查询当前DTQ是否有报文,如果是,遍历当前DTQ,将遍历到的报文确定为当前DTQ报文,依据当前DTQ报文携带的指定周期队列Cycle参数确定当前DTQ报文对应的目标CSQ,若目标CSQ处于SQ和RQ之间,则将当前DTQ报文放入RQ,若目标CSQ处于TQ和SQ之间,则将当前DTQ报文放入TQ,若目标CSQ处于RQ和TQ之间,则将当前DTQ报文放入目标CSQ;其中,所述RQ为所述CFT对应的队列接收指针RQP当前指向的CSQ;所述TQ为所述CFT对应的队列容忍指针TQP当前指向的CSQ;之后,在所述当前DTQ中还存在未被遍历的报文时,遍历该未被遍历的一个报文,返回将该遍历到的报文确定为当前DTQ报文的步骤;如果否,或者在所述当前队列中不存在未被遍历的报文,则在所述CFT相绑定的所有DTQ中还存在未被遍历的DTQ时,继续遍历未被遍历的一个DTQ,返回将遍历 到的DTQ确定为当前DTQ。
- 根据权利要求1或9所述的方法,其特征在于,所述通过本设备上已被唤醒的周期转发线程CFT将与该CFT相绑定的DTQ中的报文放入对应的指定周期队列CSQ是在所述SQ为空时执行的。
- 根据权利要求9所述的方法,其特征在于,所述通过所述CFT从发送队列SQ中选择报文并通过用于转发报文的出接口进行转发包括:在确定报文发送周期发生更新时,重新调整所述CFT对应的指定周期队列指针结构CSQP;所述CSQP至少包括:SQP;遍历调整后的SQP指向的SQ中的报文,将遍历到的报文确定为当前SQ报文,通过调用用于转发当前SQ报文的出接口转发当前SQ报文;之后,在SQ中还存在未被遍历的报文时,遍历该未被遍历的一个报文,返回将该遍历到的报文确定为当前SQ报文的步骤;在确定所述报文发送周期未发生更新时,遍历SQ中的报文,将遍历到的报文确定为当前SQ报文,通过调用用于转发当前SQ报文的出接口转发当前SQ报文;之后,在SQ中还存在未被遍历的报文时,遍历该未被遍历的一个报文,返回将该遍历到的报文确定为当前SQ报文的步骤。
- 根据权利要求11所述的方法,其特征在于,所述CSQP还包括接收队列指针RQP、队列容忍指针TQP;所述RQP指向作为接收队列RQ的CSQ,所述TQP指向作为队列容忍TQ的CSQ;其中,重新调整后的SQP指向的CSQ的编号,是根据针对所述CFT设置的当前处理周期变量CFT_Jiffies与所述CFT绑定的CSQ的数量d进行模运算得到的余数确定;重新调整后的RQP指向的CSQ的编号,是根据所述余数与指定抖动周期数Jitter之和对所述d进行模运算得到的结果确定;重新调整后的TQP指向的CSQ的编号,是根据如下公式确定:(d-1+Rem-Jitter)mod d;其中,Rem为所述余数。
- 根据权利要求9所述的方法,其特征在于,在通过本设备上已被唤醒的周期转发线程CFT将该CFT相绑定的所有DTQ中的所有报文放入对应的指定周期队列CSQ之后,该方法进一步包括:检测所述CFT相绑定的CSQ中是否有报文需要及时转发的事件,如果是,则返回执行通过所述CFT从发送队列SQ中选择报文并通过用于转发报文的出接口进行转发的步骤,如果否,则等待再次被唤醒。
- 根据权利要求11或13所述的方法,其特征在于,所述报文需要及时转发的事件依据所述CFT被设置的当前处理周期变量CFT_Jiffies和当前报文接收周期变量CFT_Rcv_Jiffies确定,当所述CFT_Jiffies的取值与所述CFT_Rcv_Jiffies的取值之差小于或等于指定差时,确定有报文需要及时转发的事件,否则,确定不存在报文需要及时转发的事件;其中,当所述CFT被唤醒时,或者当检测出CFT相绑定的CSQ中有报文需要及时转发的事件时,所述CFT_Jiffies的取值更新为已设置的CSQF_Jiffies的当前值,所述CSQF_Jiffies用于指示基于分段路由实现指定周期排队转发周期计数;当查询出所述当前DTQ有报文时,CFT_Rcv_Jiffies的取值更新为CFT_Jiffies的取值。
- 根据权利要求11所述的方法,其特征在于,所述报文发送周期是否发生更新通过以下方式确定:检查所述CFT被设置的当前处理周期变量CFT_Jiffies的取值和历史周期变量CFT_Prev_Jiffies的取值是否相等,如果是,确定报文发送周期未发生更新,如果否,确定报文发送周期发生更新;当重新调整所述CFT对应的指定周期队列指针结构CSQP后,该方法进一步包括: 将所述CFT_Prev_Jiffies的取值更新为所述CFT_Jiffies的当前值。
- 一种电子设备,其特征在于,该电子设备包括:处理器和机器可读存储介质;所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;所述处理器用于执行机器可执行指令,以实现权利要求1-15任一项的方法步骤。
Priority Applications (5)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2021/138338 WO2023108479A1 (zh) | 2021-12-15 | 2021-12-15 | 确定性流传输方法及装置 |
| EP21967616.0A EP4336796A4 (en) | 2021-12-15 | 2021-12-15 | DETERMINISTIC TRAFFIC TRANSMISSION METHOD AND APPARATUS |
| JP2023574657A JP7752189B2 (ja) | 2021-12-15 | 2021-12-15 | 決定論的フロー伝送方法および装置 |
| US18/569,822 US20240275728A1 (en) | 2021-12-15 | 2021-12-15 | Method and apparatus for transmitting detnet flow |
| CN202180003976.2A CN116615899A (zh) | 2021-12-15 | 2021-12-15 | 确定性流传输方法及装置 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2021/138338 WO2023108479A1 (zh) | 2021-12-15 | 2021-12-15 | 确定性流传输方法及装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023108479A1 true WO2023108479A1 (zh) | 2023-06-22 |
Family
ID=86775009
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2021/138338 Ceased WO2023108479A1 (zh) | 2021-12-15 | 2021-12-15 | 确定性流传输方法及装置 |
Country Status (5)
| Country | Link |
|---|---|
| US (1) | US20240275728A1 (zh) |
| EP (1) | EP4336796A4 (zh) |
| JP (1) | JP7752189B2 (zh) |
| CN (1) | CN116615899A (zh) |
| WO (1) | WO2023108479A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119948850A (zh) * | 2023-09-05 | 2025-05-06 | 新华三技术有限公司 | 一种数据包传输方法及网络设备 |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20240160468A1 (en) * | 2021-03-18 | 2024-05-16 | Nippon Telegraph And Telephone Corporation | Server delay control device, server delay control method, and program |
| US20230116614A1 (en) * | 2022-11-09 | 2023-04-13 | Intel Corporation | Deterministic networking node |
| CN119948843B (zh) * | 2023-09-05 | 2025-11-25 | 新华三技术有限公司 | 确定性流传输方法、装置及网络节点 |
| CN117155883B (zh) * | 2023-10-31 | 2024-01-30 | 国网湖北省电力有限公司电力科学研究院 | 一种实现报文定时发送的tsn网卡装置、方法及介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112202685A (zh) * | 2017-11-06 | 2021-01-08 | 华为技术有限公司 | 报文转发方法、转发设备和网络设备 |
| US20210014177A1 (en) * | 2020-09-26 | 2021-01-14 | Intel Corporation | Deterministic packet scheduling and dma for time sensitive networking |
| CN113411270A (zh) * | 2021-06-07 | 2021-09-17 | 中国人民解放军国防科技大学 | 一种面向时间敏感网络的报文缓冲区管理方法 |
| CN113785538A (zh) * | 2019-05-03 | 2021-12-10 | 微芯片技术股份有限公司 | 用于时间敏感型和尽力服务型数据分组的介质访问及相关系统、方法和设备 |
Family Cites Families (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100490421C (zh) * | 2004-10-20 | 2009-05-20 | 华为技术有限公司 | Mpls环网中实现流量公平传送的方法 |
| US9641351B2 (en) * | 2014-12-18 | 2017-05-02 | Cisco Technology, Inc. | Jitter removal in deterministic networks |
| CN106612236B (zh) * | 2015-10-21 | 2020-02-07 | 深圳市中兴微电子技术有限公司 | 众核网络处理器及其微引擎的报文调度方法、系统 |
| KR102748588B1 (ko) * | 2018-09-21 | 2025-01-02 | 텔레호낙티에볼라게트 엘엠 에릭슨(피유비엘) | 무선 액세스 네트워크들에서 리소스들을 스케줄링하기 위한 방법들 및 장치들 |
| US11743174B2 (en) * | 2019-01-29 | 2023-08-29 | Cisco Technology, Inc. | Supporting asynchronous packet operations in a deterministic network |
| EP3981133B1 (en) * | 2019-07-22 | 2024-09-25 | Huawei Technologies Co., Ltd. | Control device, switch device, methods and computer-readable storage medium |
| US11463370B2 (en) * | 2020-02-12 | 2022-10-04 | Nokia Solutions And Networks Oy | Scalable deterministic services in packet networks |
| CN113382442B (zh) * | 2020-03-09 | 2023-01-13 | 中国移动通信有限公司研究院 | 报文传输方法、装置、网络节点及存储介质 |
| US12255973B2 (en) * | 2020-09-10 | 2025-03-18 | Fisher-Rosemount Systems, Inc. | Highly-versatile field devices and communication networks for use in control and automation systems |
-
2021
- 2021-12-15 US US18/569,822 patent/US20240275728A1/en active Pending
- 2021-12-15 EP EP21967616.0A patent/EP4336796A4/en active Pending
- 2021-12-15 JP JP2023574657A patent/JP7752189B2/ja active Active
- 2021-12-15 WO PCT/CN2021/138338 patent/WO2023108479A1/zh not_active Ceased
- 2021-12-15 CN CN202180003976.2A patent/CN116615899A/zh active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112202685A (zh) * | 2017-11-06 | 2021-01-08 | 华为技术有限公司 | 报文转发方法、转发设备和网络设备 |
| CN113785538A (zh) * | 2019-05-03 | 2021-12-10 | 微芯片技术股份有限公司 | 用于时间敏感型和尽力服务型数据分组的介质访问及相关系统、方法和设备 |
| US20210014177A1 (en) * | 2020-09-26 | 2021-01-14 | Intel Corporation | Deterministic packet scheduling and dma for time sensitive networking |
| CN113411270A (zh) * | 2021-06-07 | 2021-09-17 | 中国人民解放军国防科技大学 | 一种面向时间敏感网络的报文缓冲区管理方法 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4336796A4 * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119948850A (zh) * | 2023-09-05 | 2025-05-06 | 新华三技术有限公司 | 一种数据包传输方法及网络设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116615899A (zh) | 2023-08-18 |
| US20240275728A1 (en) | 2024-08-15 |
| EP4336796A1 (en) | 2024-03-13 |
| EP4336796A4 (en) | 2024-06-26 |
| JP2024520146A (ja) | 2024-05-21 |
| JP7752189B2 (ja) | 2025-10-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2023108479A1 (zh) | 确定性流传输方法及装置 | |
| US8830829B2 (en) | Parallel processing using multi-core processor | |
| US8565092B2 (en) | Dynamic flow redistribution for head of line blocking avoidance | |
| CN116686272B (zh) | 一种报文传输方法及网络设备 | |
| US20230254263A1 (en) | Packet forwarding method, packet forwarding apparatus and electronic device | |
| US20180227247A1 (en) | Early queueing network device | |
| KR102177574B1 (ko) | 컴퓨팅 디바이스에서 패킷 수명을 예측하기 위한 큐잉 시스템 | |
| US11516145B2 (en) | Packet control method, flow table update method, and node device | |
| TW200920035A (en) | Enhancement of end-to-end network QoS | |
| US8953625B2 (en) | Applying backpressure to a subset of nodes in a deficit weighted round robin scheduler | |
| CN107454014A (zh) | 一种优先级队列调度的方法及装置 | |
| CN103685062A (zh) | 缓存管理方法及装置 | |
| US8879578B2 (en) | Reducing store and forward delay in distributed systems | |
| WO2016150020A1 (zh) | 基于调度流标识的报文调度方法和装置 | |
| WO2021120764A1 (zh) | 一种收发数据的方法及装置 | |
| WO2019109902A1 (zh) | 队列调度方法及装置、通信设备、存储介质 | |
| CN117793583A (zh) | 报文转发方法、装置、电子设备及计算机可读存储介质 | |
| EP4425897A1 (en) | Deterministic flow transmission method and apparatus, and electronic device | |
| CN119484418A (zh) | 基于时间基准的同步和异步融合的流量整形方法和装置 | |
| CN121217661A (zh) | 通信方法及装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| WWE | Wipo information: entry into national phase |
Ref document number: 202180003976.2 Country of ref document: CN |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21967616 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2023574657 Country of ref document: JP |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2021967616 Country of ref document: EP |
|
| ENP | Entry into the national phase |
Ref document number: 2021967616 Country of ref document: EP Effective date: 20231205 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 18569822 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |