A message transmission method and network device
By employing CSQF and SR technologies in network devices, determinism and flexibility in wide area networks are achieved, the determinism problem is solved, and the coexistence and sharing of a wide range of deterministic and flexible flows are realized. This ensures that the transmission of deterministic flows is not affected by best-effort flows and maintains the quality of service of best-effort flows.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NEW H3C TECH CO LTD
- Filing Date
- 2021-12-29
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies lack effective solutions to achieve the coexistence and shared network of deterministic and best-effort flows in wide area networks, which causes deterministic flows to be affected by congestion and makes it difficult to maintain HQOS scheduling for best-effort flows.
By employing CSQF (Cycle Specified Queuing and Forwarding) combined with SR (Segment Routing) technology, unified traffic scheduling is performed by dividing network devices into fixed-period time slices. This ensures that deterministic flows are forwarded within a defined time slice, and that deterministic flows and best-effort flows are processed separately through high-priority channels, thus achieving compatibility and coexistence between deterministic and best-effort flows.
It achieves deterministic transmission of deterministic flows in wide area networks, ensures that best-effort flows do not affect deterministic flows during congestion, and maintains HQOS scheduling for best-effort flows, thus achieving mutual compatibility and full-service convergence of deterministic and best-effort flows.
Smart Images

Figure CN116686272B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a message transmission method and network device. Background Technology
[0002] Deterministic Network (DetNet) provides deterministic service functions for carried services within a network domain. These deterministic service functions can include latency, packet loss rate, etc. Time-Sensitive Networking (TSN) is a deterministic network implemented based on a local area network (LAN). In TSN, deterministic transmission at the forwarding layer is ensured by employing Cyclic Queuing and Forwarding (CQF), thereby providing deterministic service functions for carried services.
[0003] For ease of description, service flows with deterministic service functions (such as latency, packet loss rate, etc.) transmitted in a deterministic network are called deterministic flows. Other service flows that differ from deterministic flows can be forwarded using a best-effort forwarding method; therefore, these other service flows are called best-effort flows. Summary of the Invention
[0004] This application provides a message transmission method applied to a network device, wherein the network device includes at least an output forwarding processing unit and an output interface unit, and the method includes:
[0005] After acquiring a packet, if the packet belongs to a deterministic flow, the output forwarding processing unit stores the packet in the deterministic flow input queue; for each packet in the deterministic flow input queue, it determines the encapsulation information corresponding to the packet, the encapsulation information including at least CQ queue information, encapsulates the packet based on the encapsulation information, and stores the encapsulated packet in the deterministic flow output queue.
[0006] The output interface unit obtains a message from the deterministic stream output queue and stores the message in the CQ queue corresponding to the CQ queue information based on the CQ queue information corresponding to the message.
[0007] The output interface unit determines the target CQ queue corresponding to the current scheduling period, and sends the messages in the target CQ queue to the external device within the current scheduling period.
[0008] This application provides a network device, including an output forwarding processing unit and an output interface unit;
[0009] The output forwarding processing unit is used to, after acquiring a packet, if the packet belongs to a deterministic flow, store the packet in a deterministic flow input queue; for each packet in the deterministic flow input queue, determine the encapsulation information corresponding to the packet, the encapsulation information including at least CQ queue information, encapsulate the packet based on the encapsulation information, and store the encapsulated packet in a deterministic flow output queue.
[0010] The output interface unit is used to obtain a message from the deterministic stream output queue, and store the message in the CQ queue corresponding to the CQ queue information based on the CQ queue information corresponding to the message.
[0011] The output interface unit is used to determine the target CQ queue corresponding to the current scheduling period, and send the messages in the target CQ queue to the external device within the current scheduling period.
[0012] As can be seen from the above technical solutions, the embodiments of this application can ensure that deterministic flow forwarding is not affected by best-effort flow forwarding, and guarantee the mutual compatibility of best-effort flow forwarding and deterministic flow forwarding. Wide-area deterministic network packet transmission is achieved based on CSQF (Cycle-Specified Queuing and Forwarding), enabling the coexistence of deterministic and best-effort flows, facilitating the full-service convergence of shared networks and shared paths. When the bandwidth reserved for deterministic flows is not used by deterministic traffic, it can be used by best-effort flows. When congestion occurs, deterministic flows are unaffected, and congestion is resolved by controlling the number of best-effort flows. HQOS (Hierarchical Quality of Service) scheduling is maintained for best-effort flows, but HQOS scheduling is not implemented for deterministic flows. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments of this application or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings of the embodiments of this application.
[0014] Figure 1 This is a schematic diagram illustrating the working principle of CSQF in one embodiment of this application;
[0015] Figure 2 This is a comparative schematic diagram of CSQF and CQF in one embodiment of this application;
[0016] Figure 3This is a schematic diagram of the structure of a network device according to one embodiment of this application;
[0017] Figure 4A and Figure 4B This is a schematic diagram of the structure of a network device according to one embodiment of this application;
[0018] Figure 5A This is a schematic diagram of the structure of the input interface unit in one embodiment of this application;
[0019] Figure 5B This is a schematic diagram of the structure of the input forwarding processing unit in one embodiment of this application;
[0020] Figure 5C This is a schematic diagram of the output forwarding processing unit in one embodiment of this application;
[0021] Figure 5D This is a schematic diagram of the structure of the output interface unit in one embodiment of this application;
[0022] Figure 6 This is a flowchart illustrating a message transmission method in one embodiment of this application. Detailed Implementation
[0023] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “the,” and “the” as used in this application and claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to any and all possible combinations comprising one or more of the associated listed items.
[0024] It should be understood that although the terms first, second, third, etc., may be used to describe various information in embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" may also be interpreted as "when," "when," or "in response to a determination."
[0025] TSN is a deterministic network implemented based on a local area network. In TSN, deterministic transmission at the forwarding layer is ensured by using CQF (Confirmation-Qualified Frequency), thereby providing deterministic service functions for the carried services. Of course, CQF is just an example of providing deterministic services; other methods can also be used to ensure deterministic transmission at the forwarding layer, and there are no restrictions on this. As a technology similar to CSQF, this embodiment uses CQF as an example. The basic working principle of CQF is: each network device's outgoing interface is associated with two queues, and the time domain is divided into two periods. These two queues alternately send and receive within these two periods. For example, let's denote these two queues as queue Q1 and queue Q2, and these two periods as period T0 and period T1. During period T0, queue Q1 sends data and queue Q2 receives data (receive is off for queue Q1, receive is on for queue Q2, send is on for queue Q1, and send is off for queue Q2). During period T1, queue Q1 receives data and queue Q2 sends data, and so on. In this way, queues Q1 and Q2 can alternate according to odd and even periods.
[0026] CQF requires that each hop transmits one cycle. A message is received in one cycle by a network device and sent out in the next cycle, and the next network device receives the message in the next cycle, and so on. Thus, when the cycle T is a fixed value, the transmission delay of the message on the path (end-to-end transmission delay) is also fixed. The minimum transmission delay is (H-1)*T, and the maximum transmission delay is (H+1)*T, where H is the number of hops, representing the total number of network devices traversed on the path.
[0027] Since CQF is a LAN-based technology, it cannot be implemented in WANs. To achieve deterministic transmission over WANs, CSQF (Cycle Specified Queuing and Forwarding) was proposed based on CQF. CSQF is combined with SR (Segment Routing) or SRv6 applications to achieve deterministic transmission over WANs. SR can be based on MPLS (Multi-Protocol Label Switching), and SRv6 can be based on IPv6.
[0028] See Figure 1 The diagram illustrates the working principle of CSQF. Controller 10 collects information from various network devices, such as transmission capacity, interface, cycle count, and maximum jitter within a node. For deterministic transmission requirements between the sender and receiver, controller 10 calculates and, if sufficient transmission resources are found, allocates a transmission path and distributes the transmission path information to the edge nodes. See [link to relevant documentation]. Figure 1As shown, the transmission path between the sender and the receiver can be: network device 11 - network device 12 - network device 13 - network device 14, and the edge node (i.e. the first network device) of this transmission path is network device 11.
[0029] After receiving a packet that needs to be forwarded, network device 11 adds information about each network device in the transmission path to the packet, such as the node identifier of the network device in the path (e.g., the Locator in the SID (Segment Identifier) of SRv6), the sending interface of the network device, and the period that the network device needs to send. In this way, when the packet arrives at a certain network device, the network device can retrieve the corresponding interface and period information, and then store the packet in the queue corresponding to that period.
[0030] For each network device, messages in each queue can be sent in a cycle according to a certain period. That is, each queue corresponds to a period, and messages in that queue can be sent within that period. Since the cycle of the network device is in a fixed pattern, the specified period for each message sent by the sender in network device 11 remains unchanged. The period for the message from sender to receiver to be forwarded by each network device is determined. Therefore, the entire delay of the message is also determined, thus achieving deterministic transmission.
[0031] In summary, CSQF and CQF are similar in implementation. The key difference lies in their implementation methods: CSQF requires at least three queues (e.g., 3, 6, 8, 9, 10, 12, 15 queues, etc., with 15 queues as an example). In each cycle, only one queue is in the transmitting state, while the others are in the receiving state. CQF requires strict synchronization of the cycle cycles of all network devices, including phase synchronization. CSQF, on the other hand, only requires frequency synchronization of the cycle cycles, not phase synchronization. Furthermore, if a hop's transmission delay cannot be completed within one cycle, the queue for transmission in the next cycle can be specified, thus adapting to the transmission delays of different network devices in the wide area network.
[0032] See Figure 2The diagram illustrates a comparison between CSQF and CQF. For CQF, during the transmission of a specific message, network device 11 sends the message in cycle 1, network device 12 receives the message in cycle 1, and sends the message in cycle 2. Network device 13 receives the message in cycle 2, and sends the message in cycle 3. Network device 14 receives the message in cycle 3, and sends the message in cycle 4. For CSQF, taking the requirement of three queues as an example, during the transmission of a specific message, network device 11 sends the message in cycle 1, network device 12 receives the message in either cycle 1 or cycle 2, and sends the message in cycle 3. Network device 13 receives the message in cycle 3, and sends the message in cycle 4. Network device 14 receives the message in either cycle 4 or cycle 5, and sends the message in cycle 6.
[0033] The reason why CSQF can guarantee the overall delay of a packet is that each network device is allocated a time slice with a fixed period, and deterministic traffic flows are uniformly scheduled to be forwarded within a defined time slice. The sending time of each network device on the transmission path is limited to a specific time slice, making the packet's delay jitter within that network device deterministic. No matter how many network devices are added, the jitter of the previous network device will not increase the jitter delay of the next network device. Of course, as the total number of network devices increases, the total packet forwarding delay will also increase.
[0034] For the last network device, packets are only received and sent within a defined time slice; that is, the jitter range of packets in the last network device is limited to a defined time slice.
[0035] While CSQF enables deterministic transmission over wide area networks (WANs) and provides deterministic service functionality, there is no reasonable solution in related technologies regarding how network devices should implement CSQF. To address this issue, this application proposes a CSQF-based method for deterministic WAN transmission, applicable to network devices, also known as network nodes or forwarding nodes. See [link to relevant documentation]. Figure 3 The diagram shown is a structural schematic of a network device, which may include an input interface unit 31, an input forwarding processing unit 32, an internal switching unit 33, an output forwarding processing unit 34, and an output interface unit 35.
[0036] The input interface unit 31 can perform auxiliary processing for receiving deterministic streams. The functions of the input interface unit 31 may include, but are not limited to: identifying deterministic streams; assisting the input forwarding processing unit 32 to classify traffic so that deterministic streams enter the deterministic stream input queue; timestamp function; and traffic scheduling function.
[0037] The input forwarding processing unit 32 may have the following functions, including but not limited to: traffic classification, distinguishing between packets belonging to deterministic flows and packets belonging to best-effort flows; storing packets belonging to deterministic flows in the deterministic flow input queue and packets belonging to best-effort flows in the best-effort flow input queue; priority scheduling, prioritizing packets in the deterministic flow input queue and processing packets in the best-effort flow input queue only after processing is complete; and deterministic flow input channel processing, separating the deterministic flow transmission channel from the best-effort flow transmission channel, sending deterministic flow packets through the deterministic flow transmission channel and best-effort flow packets through the best-effort flow transmission channel, ensuring that when the best-effort flow transmission channel is backpressured (i.e., rate-limited), the deterministic flow transmission channel is not backpressured.
[0038] The function of the internal switching unit 33 is to ensure the high priority channel for deterministic flows. That is, the internal switching unit 33 prioritizes sending the packets of deterministic flows to the output forwarding processing unit 34. Only after the packets of deterministic flows have been sent will the packets of best-effort flows be sent to the output forwarding processing unit 34.
[0039] For example, the internal switching unit 33 may include a high-priority switching channel and a normal-priority switching channel. The internal switching unit 33 can send deterministic flow messages through the high-priority switching channel and send best-effort flow messages through the normal-priority switching channel.
[0040] The output forwarding processing unit 34 may have the following functions, including but not limited to: implementing best-effort output pipeline processing, i.e., processing best-effort flow packets; performing HQOS scheduling on best-effort flow packets, i.e., performing HQOS scheduling on best-effort flow packets, but not on deterministic flow packets; implementing best-effort flow rate limiting, i.e., rate limiting processing on best-effort flow packets, but not on deterministic flow packets; and implementing deterministic flow output pipeline processing, i.e., processing deterministic flow packets.
[0041] The output interface unit 35 may have the following functions, including but not limited to: implementing a best-effort buffer queue to store best-effort flow packets; implementing backpressure functionality for the best-effort buffer queue, for example, controlling the output forwarding processing unit 34 to stop storing best-effort flow packets in the best-effort buffer queue when the number of packets in the best-effort buffer queue reaches a threshold; implementing a deterministic flow CSQF queue to store deterministic flow packets; and implementing combined scheduling of deterministic and best-effort flows, i.e., scheduling deterministic flow packets and best-effort flow packets. For example, sending deterministic flow packets first, followed by best-effort flow packets.
[0042] For example, a CSQF queue can include an SQ (Sending Queue), an RQ (Receiving Queue), and a TQ (Tolerating Queue). The SQ is the queue currently being sent in the CSQF, and the RQ is the queue currently being received in the CSQF. If a received packet fails to enter the RQ due to jitter or other reasons, such a packet enters the TQ. In this embodiment, SQ, RQ, and TQ are referred to as CQ (Cyclic Queuing) queues. In summary, the output interface unit 35 can implement a deterministic flow CQ queue, storing deterministic flow packets through the CQ queue.
[0043] In one possible implementation, see Figure 4A As shown, the input interface unit 31 can be implemented using an FPGA (Field Programmable Gate Array), the input forwarding processing unit 32 can be implemented using an NP (Network Processor), and for ease of distinction, this NP is called an Ingress NP. The internal switching unit 33 can be implemented using a switching fabric, the output forwarding processing unit 34 can be implemented using an NP, and for ease of distinction, this NP is called an Egress NP. The output interface unit 35 can be implemented using an FPGA.
[0044] Two channels are created between the input interface unit 31 and the input forwarding processing unit 32. Specifically, two channels are created within the physical interface between the two units. For ease of distinction, these two channels are referred to as the third channel and the fourth channel. For example, assuming the physical interface between the input interface unit 31 and the input forwarding processing unit 32 is an Interlaken physical interface, the third channel and the fourth channel are created within the same Interlaken physical interface. The third channel is used to transmit packets belonging to deterministic flows, and the fourth channel is used to transmit packets belonging to best-effort flows.
[0045] Two channels are created between the output forwarding processing unit 34 and the output interface unit 35. Specifically, two channels are created within the physical interface between the output forwarding processing unit 34 and the output interface unit 35. For ease of distinction, these two channels are referred to as the first channel and the second channel. For example, assuming the physical interface between the output forwarding processing unit 34 and the output interface unit 35 is an Interlaken physical interface, then the first channel and the second channel are created within the same Interlaken physical interface. The first channel is used to transmit packets belonging to deterministic flows, and the second channel is used to transmit packets belonging to best-effort flows.
[0046] In another possible implementation, see Figure 4B As shown, the input interface unit 31 and the input forwarding processing unit 32 can be implemented by the same device. For example, the input interface unit 31 and the input forwarding processing unit 32 can be implemented by the Ingress NP. The internal switching unit 33 can be implemented by the switching network board. The output forwarding processing unit 34 and the output interface unit 35 can be implemented by the same device. For example, the output forwarding processing unit 34 and the output interface unit 35 can be implemented by the Egress NP.
[0047] certainly, Figure 4A and Figure 4B These are just two examples. The implementation of the input interface unit 31, input forwarding processing unit 32, internal switching unit 33, output forwarding processing unit 34, and output interface unit 35 is not limited, as long as the functions of these units are achieved. Further details will follow... Figure 4A Let's take an example to illustrate.
[0048] The functions of the input interface unit 31, the input forwarding processing unit 32, the internal switching unit 33, the output forwarding processing unit 34, and the output interface unit 35 will be described below with reference to specific embodiments.
[0049] First, the input interface unit 31. After receiving a packet from an external device, the input interface unit 31 determines whether the packet belongs to a deterministic flow or a best-effort flow. If the packet belongs to a deterministic flow, it is stored in the deterministic flow output queue; if the packet belongs to a best-effort flow, it is stored in the best-effort flow output queue. Based on this, the input interface unit 31 sends packets from the deterministic flow output queue to the input forwarding processing unit 32 via a third channel. The input interface unit 31 also sends packets from the best-effort flow output queue to the input forwarding processing unit 32 via a fourth channel.
[0050] For example, after receiving a message from an external device, the input interface unit 31 parses the flow characteristics from the message. If the flow characteristics match the deterministic flow characteristics in the configured ACL, the message is determined to belong to a deterministic flow; if the flow characteristics do not match the deterministic flow characteristics in the ACL, the message is determined to belong to a best-effort flow. The ACL may include at least one deterministic flow characteristic.
[0051] For example, the input interface unit 31 may preferentially obtain packets from the deterministic flow output queue and send the obtained packets to the input forwarding processing unit 32 through the third channel; after all packets in the deterministic flow output queue have been obtained, the input interface unit 31 obtains packets from the best-effort flow output queue and sends the obtained packets to the input forwarding processing unit 32 through the fourth channel.
[0052] See Figure 5A The diagram shown is a structural schematic of the input interface unit 31. The input interface unit 31 may include an Ethernet interface controller 311, a receive buffer 312, a deterministic flow ACL (Access Control Lists) unit 313, a control logic unit 314, a deterministic flow output queue 315, a best-effort flow output queue 316, and a transmit DMA (Direct Memory Access) unit 317.
[0053] The Ethernet interface controller 311 receives messages from external devices through the Ethernet interface and sends the messages to the receive buffer 312, which then buffers the messages.
[0054] The deterministic flow ACL unit 313 is used to obtain ACLs for deterministic flows. For example, an upper-layer application can send an ACL for a deterministic flow to the deterministic flow ACL unit 313. The ACL may include at least one deterministic flow feature, and the deterministic flow can be identified based on the ACL.
[0055] For example, the deterministic flow characteristic could be a destination IP address, indicating that packets corresponding to this destination IP address belong to a deterministic flow. Another example is a destination IP network segment, indicating that packets corresponding to this IP network segment belong to a deterministic flow. Of course, these are just two examples of deterministic flow characteristics, and there are no restrictions on these characteristics, as long as deterministic flows can be distinguished based on them.
[0056] After obtaining the ACL for the deterministic flow, the deterministic flow ACL unit 313 can also store the ACL so that the control logic unit 314 can query the ACL from the deterministic flow ACL unit 313.
[0057] The control logic unit 314 can obtain packets from the receive buffer 312 and parse the flow characteristics (i.e., the keywords required by the ACL) from the packets. If the flow characteristics match any deterministic flow characteristics in the ACL, the packets can be determined to belong to a deterministic flow. If the flow characteristics do not match any deterministic flow characteristics in the ACL, the packets can be determined to belong to a best-effort flow.
[0058] For example, if the deterministic flow characteristic is the destination IP address, the control logic unit 314 can parse the destination IP address from the packet. If the destination IP address of the packet is the same as a destination IP address in the ACL, it can be determined that the packet belongs to a deterministic flow. If the destination IP address in the packet is different from all destination IP addresses in the ACL, it can be determined that the packet belongs to a best-effort flow.
[0059] If the message is determined to be a deterministic flow, the control logic unit 314 can add auxiliary information such as a timestamp to the message header and store the message in the deterministic flow output queue 315. The timestamp is used to indicate the time when the Ethernet interface controller 311 receives the message from the external device. If the message is determined to be a best-effort flow, the control logic unit 314 stores the message in the best-effort flow output queue 316.
[0060] In summary, each time a message belonging to a deterministic flow is received, the message can be stored in the deterministic flow output queue 315. That is, the deterministic flow output queue 315 can include multiple messages belonging to a deterministic flow.
[0061] Each time a message belonging to the best-effort flow is received, the message can be stored in the best-effort flow output queue 316. That is, the best-effort flow output queue 316 can include multiple messages belonging to the best-effort flow.
[0062] Specifically, the sending DMA317 can read packets from the deterministic stream output queue 315 and send the packets in the deterministic stream output queue 315 to the input forwarding processing unit 32 through the third channel.
[0063] The DMA317 can read packets from the best-effort stream output queue 316 and send the packets in the best-effort stream output queue 316 to the input forwarding processing unit 32 through the fourth channel.
[0064] For example, the transmit DMA317 can preferentially read packets from the deterministic stream output queue 315 and send the packets to the input forwarding processing unit 32 through the third channel. Only after all packets in the deterministic stream output queue 315 have been sent can the transmit DMA317 read packets from the best-effort stream output queue 316 and send the packets to the input forwarding processing unit 32 through the fourth channel.
[0065] For example, the sending DMA317 can read a portion of a packet from the deterministic stream output queue 315 and send it to the input forwarding processing unit 32 via the third channel. Then, the sending DMA317 reads a portion of a packet from the best-effort stream output queue 316 and sends it to the input forwarding processing unit 32 via the fourth channel. Then, the sending DMA317 continues to read a portion of a packet from the deterministic stream output queue 315 and send it to the input forwarding processing unit 32 via the third channel. This process continues until all packets in both the deterministic stream output queue 315 and the best-effort stream output queue 316 have been sent.
[0066] Second, the input forwarding processing unit 32. After acquiring a packet, the input forwarding processing unit 32 stores the packet in the deterministic flow input queue if the packet belongs to a deterministic flow, and in the best-effort flow input queue if the packet belongs to a best-effort flow. Specifically, when the input forwarding processing unit 32 acquires a packet from the third channel, it can determine that the packet belongs to a deterministic flow. When the input forwarding processing unit 32 acquires a packet from the fourth channel, it can determine that the packet belongs to a best-effort flow.
[0067] For example, the queue priority corresponding to the deterministic flow input queue is higher than the queue priority corresponding to the best-effort flow input queue, so that the input forwarding processing unit 32 prioritizes processing packets in the deterministic flow input queue. When the input forwarding processing unit 32 processes a packet in the deterministic flow input queue, if the packet includes CQ queue indication information, the CQ queue corresponding to the CQ queue indication information is determined; otherwise, the CQ queue corresponding to the packet is determined based on the timestamp corresponding to the packet. Based on this, the CQ queue information corresponding to the CQ queue is added to the packet, and the packet is sent to the internal switching unit 33.
[0068] Specifically, when determining the CQ queue corresponding to the message based on the timestamp, the input forwarding processing unit 32 can query the interface based on the forwarding information corresponding to the message and determine multiple CQ queues corresponding to the interface, with each CQ queue corresponding to a scheduling period; based on the timestamp corresponding to the message, the scheduling period corresponding to the timestamp is selected from all scheduling periods, and the CQ queue corresponding to the scheduling period is determined.
[0069] When the input forwarding processing unit 32 sends a packet from the deterministic flow input queue to the internal switching unit 33, it adds a high-priority flag to the packet and sends the high-priority packet to the internal switching unit 33. When the input forwarding processing unit 32 sends a packet from the best-effort flow input queue to the internal switching unit 33, it adds a low-priority flag to the packet and sends the low-priority packet to the internal switching unit 33.
[0070] See Figure 5B The diagram shown is a structural schematic of the input forwarding processing unit 32, which may include a traffic classification unit 321, a deterministic flow input queue 322, a best-effort flow input queue 323, a pipeline scheduling unit 324, and a deterministic flow input pipeline processing unit 325.
[0071] When the traffic classification unit 321 receives a packet from the third channel, it determines that the packet belongs to a deterministic flow and stores the packet in the deterministic flow input queue 322. When the traffic classification unit 321 receives a packet from the fourth channel, it determines that the packet belongs to a best-effort flow and stores the packet in the best-effort flow input queue 323.
[0072] The input forwarding processing unit 32 can support multiple physical queues with different priorities. Based on this, high-priority physical queues can be used as deterministic flow input queues 322, and low-priority physical queues can be used as best-effort flow input queues 323. Clearly, since the deterministic flow input queue 322 uses high-priority physical queues and the best-effort flow input queue 323 uses low-priority physical queues, the queue priority corresponding to the deterministic flow input queue 322 can be higher than the queue priority corresponding to the best-effort flow input queue 323. This ensures that packets in the deterministic flow input queue 322 are processed first; that is, packets belonging to deterministic flows are processed first.
[0073] The pipeline scheduling unit 324 can forward packets in the deterministic flow input queue 322 and packets in the best-effort flow input queue 323. When forwarding packets, the pipeline scheduling unit 324 can be a PMU (Processor Management Unit), that is, the PMU forwards the packets, and there are no restrictions on the packet forwarding process.
[0074] Because the priority of the deterministic flow input queue 322 is higher than that of the best-effort flow input queue 323, the pipeline scheduling unit 324 prioritizes forwarding packets in the deterministic flow input queue 322. Only after the packets in the deterministic flow input queue 322 have been processed does the pipeline scheduling unit 324 forward packets in the best-effort flow input queue 323. When the pipeline scheduling unit 324 forwards packets, it can allocate packets to forwarding pipelines (allocate processor resources for corresponding pipeline processing), and there are no restrictions on the pipeline processing procedure.
[0075] The deterministic flow input pipeline processing unit 325 is used to perform deterministic forwarding processing, that is, based on the regular forwarding processing (the forwarding processing implemented by the pipeline scheduling unit 324 is called regular forwarding processing), the deterministic flow input pipeline processing unit 325 implements deterministic forwarding processing.
[0076] For example, for edge nodes, such as Figure 1 When the network device 11 processes the packets in the deterministic flow input queue 322 in the deterministic flow input pipeline processing unit 325, the packets do not include CQ queue indication information (CQ queue indication information needs to be added to the packets by the edge nodes). Therefore, the timestamp (added to the packets by the input interface unit 31 to indicate the timestamp when the network device receives the packets) can be parsed from the packets, and the CQ queue corresponding to the packets can be determined based on the timestamp.
[0077] When determining the CQ queue corresponding to a packet based on the timestamp, the forwarding table entry (used to record the correspondence between forwarding information and outgoing interfaces) can be queried based on the forwarding information (such as the destination IP address) corresponding to the packet to obtain the outgoing interface corresponding to the forwarding information. Since each outgoing interface of a network device can correspond to multiple CQ queues, meaning that packets in these CQ queues can be forwarded through this outgoing interface, after obtaining the outgoing interface corresponding to the forwarding information, the multiple CQ queues corresponding to that outgoing interface can be determined.
[0078] For each CQ queue, there is a corresponding scheduling period, indicating that messages in that CQ queue need to be sent within that scheduling period. Based on the timestamp of the message, a scheduling period corresponding to that timestamp can be selected from all scheduling periods; that is, the timestamp can fall within that scheduling period. Then, the CQ queue corresponding to that scheduling period is determined. This CQ queue is also the CQ queue corresponding to the message, and in subsequent processes, the message needs to be added to this CQ queue.
[0079] To determine the CQ queue corresponding to a scheduling period, a timeslot table can be obtained, which includes the mapping relationship between scheduling periods and CQ queues. Based on this, after obtaining the scheduling period corresponding to a given timestamp, the corresponding CQ queue can be obtained by querying the timeslot table through that scheduling period.
[0080] In summary, for edge nodes, the deterministic flow input pipeline processing unit 325 can obtain the CQ queue corresponding to the message and add the CQ queue information corresponding to the CQ queue, such as the queue identifier, to the message.
[0081] For edge nodes, the CQ queues of packets at each intermediate node (such as network device 12, network device 13, network device 14, etc.) can also be determined. The determination process will not be elaborated further; please refer to the working principle of CSQF. After obtaining the CQ queues of packets at each intermediate node, CQ queue indication information can be added to the packets. This CQ queue indication information includes the CQ queue information corresponding to each intermediate node, such as the CQ queue information for the packet at network device 12, the CQ queue information for the packet at network device 13, and the CQ queue information for the packet at network device 14.
[0082] For example, regarding intermediate nodes, such as Figure 1 When network devices 12, 13, and 14, etc., process packets in the deterministic flow input queue 322 in the deterministic flow input pipeline processing unit 325, the packets may include CQ queue indication information (CQ queue indication information is added to the packet by the edge node; for example, it can be carried in the SID of SRv6, which is just an example). Therefore, the CQ queue indication information can be parsed from the packet, and the CQ queue corresponding to the CQ queue indication information can be determined. For example, for network device 12, the CQ queue indication information may include the CQ queue information of the packet in the CQ queue corresponding to network device 12. Therefore, the CQ queue corresponding to the CQ queue information can be directly determined, and this CQ queue is the CQ queue corresponding to the packet. In subsequent processes, the packet needs to be added to this CQ queue.
[0083] In summary, for intermediate nodes, the deterministic flow input pipeline processing unit 325 can obtain the CQ queue corresponding to the message and add the CQ queue information corresponding to the CQ queue, such as the queue identifier, to the message.
[0084] Referring to the above embodiments, for packets in the deterministic flow input queue 322, after processing by the pipeline scheduling unit 324 and the deterministic flow input pipeline processing unit 325, the packets can be sent to the internal switching unit 33. When sending the packets to the internal switching unit 33, a high-priority flag can be added to the packets, and the high-priority flagged packets are sent to the internal switching unit 33. For packets in the best-effort flow input queue 323, after processing by the pipeline scheduling unit 324, the packets can be sent to the internal switching unit 33. When sending the packets to the internal switching unit 33, a low-priority flag can be added to the packets, and the low-priority flagged packets are sent to the internal switching unit 33.
[0085] Third, internal switching unit 33. After receiving a packet marked with a high priority (i.e., a packet belonging to a deterministic flow), internal switching unit 33 sends the packet to output forwarding processing unit 34 based on the high priority mark. After receiving a packet marked with a low priority (i.e., a packet belonging to a best-effort flow), internal switching unit 33 sends the packet to output forwarding processing unit 34 based on the low priority mark.
[0086] For example, based on high-priority and low-priority tags, the internal switching unit 33 prioritizes sending packets with high-priority tags to the output forwarding processing unit 34. Only after the high-priority tags have been sent is the internal switching unit 33 sending packets with low-priority tags to the output forwarding processing unit 34.
[0087] Fourth, the output forwarding processing unit 34. After acquiring a packet, the output forwarding processing unit 34 stores the packet in the deterministic flow input queue if the packet belongs to a deterministic flow, and in the best-effort flow input queue if the packet belongs to a best-effort flow. For each packet in the deterministic flow input queue, the output forwarding processing unit 34 determines the encapsulation information corresponding to the packet. This encapsulation information includes at least CQ queue information. Based on this encapsulation information, the packet is encapsulated, and the encapsulated packet is stored in the deterministic flow output queue. For each packet in the best-effort flow input queue, the output forwarding processing unit 34 performs HQOS scheduling on the packet and stores the HQOS-scheduled packet in the best-effort flow output queue. A first channel and a second channel exist between the output interface unit 35 and the output forwarding processing unit 34. The output forwarding processing unit 34 can send packets from the deterministic flow output queue to the output interface unit 35 through the first channel, and the output forwarding processing unit 34 can send packets from the best-effort flow output queue to the output interface unit 35 through the second channel.
[0088] See Figure 5C The diagram shown is a structural schematic of the output forwarding processing unit 34, which may include a traffic classification unit 341, a deterministic flow input queue 342, a best-effort flow input queue 343, a pipeline scheduling unit 344, a deterministic flow input pipeline processing unit 345, a best-effort flow input pipeline processing unit 346, an HQOS scheduling unit 347, a deterministic flow output queue 348, a best-effort flow output queue 349, and a transmit DMA 340.
[0089] The internal switching unit 33 may include a high-priority switching channel and a normal-priority switching channel. The internal switching unit 33 can send deterministic flow packets through the high-priority switching channel and best-effort flow packets through the normal-priority switching channel. Based on this, when the traffic classification unit 341 obtains a packet from the high-priority switching channel, it determines that the packet belongs to a deterministic flow and stores the packet in the deterministic flow input queue 342. When the traffic classification unit 341 obtains a packet from the normal-priority switching channel, it determines that the packet belongs to a best-effort flow and stores the packet in the best-effort flow input queue 343.
[0090] The output forwarding processing unit 34 can support multiple physical queues with different priorities. Based on this, high-priority physical queues can be used as deterministic flow input queues 342, and low-priority physical queues as best-effort flow input queues 343. Clearly, since deterministic flow input queues 342 use high-priority physical queues and best-effort flow input queues 343 use low-priority physical queues, the queue priority corresponding to deterministic flow input queues 342 can be higher than that corresponding to best-effort flow input queues 343. This ensures that packets in deterministic flow input queues 342 are processed first; in other words, packets belonging to deterministic flows are processed first.
[0091] Specifically, the pipeline scheduling unit 344 forwards packets in the deterministic flow input queue 342 and packets in the best-effort flow input queue 343, without imposing any restrictions on the packet forwarding process. Since the queue priority corresponding to the deterministic flow input queue 342 is higher than that corresponding to the best-effort flow input queue 343, the pipeline scheduling unit 344 prioritizes forwarding packets in the deterministic flow input queue 342. Only after the packets in the deterministic flow input queue 342 have been processed does the pipeline scheduling unit 344 forward packets in the best-effort flow input queue 343.
[0092] The deterministic flow input pipeline processing unit 345 is used to perform deterministic forwarding processing, that is, based on the regular forwarding processing (the forwarding processing implemented by the pipeline scheduling unit 344 is called regular forwarding processing), the deterministic flow input pipeline processing unit 345 implements deterministic forwarding processing.
[0093] For example, for each packet in the deterministic flow input queue 342, the deterministic flow input pipeline processing unit 345 can parse the CQ queue information (added to the packet by the input forwarding processing unit 32) from the packet and determine the CQ queue information as the encapsulation information corresponding to the packet. Of course, the above is just an example of encapsulation information, and there are no limitations on this encapsulation information. For example, it is also possible to query the MAC address of the outgoing interface of this network device, the MAC address of the next-hop network device, etc., and use the MAC address of the outgoing interface of this network device and the MAC address of the next-hop network device as encapsulation information.
[0094] After obtaining the encapsulation information, the deterministic flow input pipeline processing unit 345 can encapsulate the packet based on this information. For example, it can encapsulate CQ queue information and other content on the outer layer of the packet and store the encapsulated packet in the deterministic flow output queue 348. Furthermore, after encapsulating the packet, the deterministic flow input pipeline processing unit 345 can bypass the HQOS scheduling unit 347 implemented for best-effort flow. That is, the HQOS scheduling unit 347 is not required to perform HQOS scheduling on the packets in the deterministic flow input queue 342. Since the packets in the deterministic flow input queue 342 are not subject to HQOS scheduling, they are not affected by best-effort scheduling, allowing the packets in the deterministic flow input queue 342 to be forwarded quickly.
[0095] The best-effort flow input pipeline processing unit 346 is used to perform best-effort related forwarding processing, that is, to implement best-effort related forwarding processing on the basis of regular forwarding processing. For example, for each packet in the best-effort flow input queue 343, the best-effort flow input pipeline processing unit 346 determines the encapsulation information corresponding to the packet, such as the MAC address of the outgoing interface of this network device, the MAC address of the next-hop network device, etc., and encapsulates the packet based on the encapsulation information, for example, by encapsulating this encapsulation information on the outer layer of the packet, and then sends the encapsulated packet to the HQOS scheduling unit 347.
[0096] The HQOS scheduling unit 347 is used to perform HQOS scheduling on each packet in the best-effort stream input queue 343. There are no restrictions on the HQOS scheduling process. After the HQOS scheduling process of the packet is completed, the HQOS scheduling unit 347 can store the packet in the best-effort stream output queue 349.
[0097] Specifically, the transmitting DMA340 can read packets from the deterministic stream output queue 348 and send the packets from the deterministic stream output queue 348 to the output interface unit 35 through the first channel. The transmitting DMA340 can also read packets from the best-effort stream output queue 349 and send the packets from the best-effort stream output queue 349 to the output interface unit 35 through the second channel. Since the packets in the deterministic stream output queue 348 and the best-effort stream output queue 349 are transmitted through different channels, when congestion occurs in the output interface unit 35, only the best-effort stream transmission channel (i.e., the second channel) is pressured, while the deterministic stream transmission channel (i.e., the first channel) is not pressured, thus providing strong support for delay determinism.
[0098] For example, the sending DMA340 can first read packets from the deterministic stream output queue 348 and send the packets to the output interface unit 35 through the first channel. Only after all packets in the deterministic stream output queue 348 have been sent can the sending DMA340 read packets from the best-effort stream output queue 349 and send the packets to the output interface unit 35 through the second channel.
[0099] For example, the sending DMA340 can read some packets from the deterministic stream output queue 348 and send the packets to the output interface unit 35 through the first channel. Then, the sending DMA340 can read some packets from the best-effort stream output queue 349 and send the packets to the output interface unit 35 through the second channel. Then, the sending DMA340 can continue to read some packets from the deterministic stream output queue 348 and send the packets to the output interface unit 35 through the first channel, and so on, until all packets in the deterministic stream output queue 348 and the best-effort stream output queue 349 have been sent.
[0100] Fifth, output interface unit 35. Output interface unit 35 can obtain packets from deterministic stream output queue 348, and store the packets in the CQ queue corresponding to the CQ queue information based on the CQ queue information corresponding to the packets. Output interface unit 35 can also obtain packets from best-effort stream output queue 349 and store the packets in the BEQ (Best EffortQueue) queue.
[0101] For each scheduling cycle, the currently running scheduling cycle is referred to as the current scheduling cycle. The output interface unit 35 determines the target CQ queue corresponding to the current scheduling cycle and sends packets from the target CQ queue to the external device within the current scheduling cycle. If there is still a remaining time slice in the current scheduling cycle after all packets in the target CQ queue have been sent, the output interface unit 35 sends packets from the BEQ queue to the external device within the remaining time slice of the current scheduling cycle. For example, the output interface unit 35 determines the length of packets that can be sent within the remaining time slice. If the packet length is greater than the configured length (which can be configured based on experience), then a packet from the BEQ queue is sent to the external device within the remaining time slice of the current scheduling cycle; if the packet length is not greater than the configured length, then sending packets from the BEQ queue to the external device is stopped within the remaining time slice of the current scheduling cycle. For example, after sending a packet from the BEQ queue to the external device, the remaining time slice of the current scheduling cycle can be updated, and based on the updated remaining time slice, the operation of determining the length of packets that can be sent within the remaining time slice is returned.
[0102] For example, when the number of packets in the BEQ queue exceeds a first preset threshold, the output interface unit 35 can output a flow control signal for the second channel; when the number of packets in the BEQ queue is less than the second preset threshold, the output interface unit 35 can cancel the flow control signal for the second channel. The second preset threshold can be less than or equal to the first preset threshold, and its value is not restricted. Based on this, when a flow control signal exists for the second channel, packet transmission through the second channel is suspended; that is, the output forwarding processing unit 34 no longer transmits packets from the best-effort flow output queue 349 to the output interface unit 35 through the second channel. When no flow control signal exists for the second channel, packet transmission continues through the second channel; that is, the output forwarding processing unit 34 transmits packets from the best-effort flow output queue 349 to the output interface unit 35.
[0103] See Figure 5D The diagram shows the structure of the output interface unit 35. The output interface unit 35 may include a control unit 351, a classification unit 352, a cycle selection unit 353, an SP (Stream Processor) unit 354, and a MAC layer forwarding unit 355. Furthermore, the output interface unit 35 may also include a BEQ queue and a CQ queue, with at least one BEQ queue. Figure 5D Taking a BEQ queue as an example, the number of CQ queues must be at least three. Figure 5D Taking 15 CQ queues as an example, these 15 CQ queues are denoted as CQ1, CQ2, ..., CQ15. When there are 15 CQ queues, there are also 15 SP units 354, and each SP unit 354 corresponds to a CQ queue.
[0104] Specifically, when the control unit 351 receives a message from the first channel (i.e., a message in the deterministic flow output queue 348), it can determine that the message belongs to a deterministic flow and send the message to the classification unit 352. When the control unit 351 receives a message from the second channel (i.e., a message in the best-effort flow output queue 349), it can determine that the message belongs to a best-effort flow and store the message in the BEQ queue.
[0105] The BEQ queue is a best-effort buffer queue used to buffer best-effort flow packets, which have already been scheduled in the HQOS scheduling unit 347. The BEQ queue is designed with two levels of waterlines: when the number of packets buffered in the BEQ queue exceeds the set high waterline (i.e., the first preset threshold), a flow control signal for the second channel can be output. When the number of packets buffered in the BEQ queue falls below the set low waterline (i.e., the second preset threshold), the flow control signal for the second channel can be canceled.
[0106] Based on this, when a flow control signal is present for the second channel, the transmitting DMA340 will no longer send messages through the second channel, meaning it will not send messages from the best-effort flow output queue 349 to the output interface unit 35, and the control unit 351 will not receive messages from the best-effort flow output queue 349. When the flow control signal for the second channel is cancelled, the transmitting DMA340 will continue to send messages through the second channel, meaning it will send messages from the best-effort flow output queue 349 to the output interface unit 35, and the control unit 351 will be able to receive messages from the best-effort flow output queue 349 and store the messages in the BEQ queue.
[0107] The classification unit 352 is used to decentralize deterministic flow packets, thereby storing the packets in one of the CQ queues CQ1 to CQ15. Since there are a total of 15 CQ queues, such as CQ1 to CQ15, for a deterministic flow packet, the classification unit 352 needs to determine which CQ queue the packet belongs to and store the packet in that CQ queue. For example, since the packet encapsulates CQ queue information, which may be a queue identifier or something similar, indicating a specific CQ queue, the classification unit 352 can parse the CQ queue information from the packet, determine the CQ queue corresponding to that information, and store the packet in that CQ queue. For example, if the CQ queue information corresponds to CQ5, then the packet is stored in CQ5.
[0108] The period selection unit 353, under the control of the clock source, periodically provides selection signals, and the length of two adjacent selection signals is one scheduling cycle of CSQF. For example, assuming that scheduling cycle 1 corresponds to CQ1, scheduling cycle 2 corresponds to CQ2, and so on, scheduling cycle 15 corresponds to CQ15.
[0109] Based on this, when the current scheduling period is scheduling period 1, at the beginning of scheduling period 1, the period selection unit 353 sends a selection signal to the SP unit 354 connected to CQ1. After receiving the selection signal, the SP unit 354 determines that the target CQ queue corresponding to the current scheduling period is CQ1, reads packets from CQ1, and sends the read packets to the MAC layer forwarding unit 355. At the end of scheduling period 1, the period selection unit 353 sends a new selection signal to the SP unit 354 connected to CQ1. After receiving the selection signal, the SP unit 354 can stop sending packets.
[0110] When the current scheduling period is scheduling period 2, at the start of scheduling period 2 (the start of scheduling period 2 is the end of scheduling period 1), the period selection unit 353 sends a selection signal to the SP unit 354 connected to CQ2. Upon receiving this selection signal, the SP unit 354 determines that the target CQ queue corresponding to the current scheduling period is CQ2, reads packets from CQ2, and sends the read packets to the MAC layer forwarding unit 355. At the end of scheduling period 2, the period selection unit 353 sends a new selection signal to the SP unit 354 connected to CQ2, causing the SP unit 354 to stop sending packets.
[0111] Similarly, in each scheduling cycle, the cycle selection unit 353 can send a selection signal to a certain SP unit 354 so that the SP unit 354 can send a message or stop sending a message based on the selection signal.
[0112] The SP unit 354 is used to forward messages according to priority under the control of the selection signal. That is, it first sends the messages in the target CQ queue. After the messages in the target CQ queue are sent, if there is still a time slice remaining in the current scheduling period, it sends the messages in the BEQ queue within the remaining time slice.
[0113] For example, assuming the current scheduling period is scheduling period n, and scheduling period n corresponds to CQn (1≤n≤15), for the SP unit 354 connected to CQn, after receiving the selection signal, the SP unit 354 determines that the target CQ queue is CQn, reads the packet from CQn, and sends the read packet to the MAC layer forwarding unit 355. The SP unit 354 can also start a timer after receiving the selection signal.
[0114] After a message is sent in CQn, if there is still a remaining time slice in the current scheduling period, the length of the remaining time slice is determined. The length of the remaining time slice is the difference between the duration of the scheduling period and the duration of the timer. After obtaining the length of the remaining time slice, the length of the message that can be sent in that remaining time slice is determined.
[0115] Based on the packet length of a packet in the BEQ queue, a pre-configured length can be set, such as 9600 bytes, representing the specified packet length. If the packet length that can be sent in the remaining time slice is greater than the pre-configured length, then within the remaining time slice of the current scheduling period, SP unit 354 reads a packet from the BEQ queue and sends the read packet to MAC layer forwarding unit 355. If the packet length that can be sent in the remaining time slice is not greater than the pre-configured length, then within the remaining time slice of the current scheduling period, SP unit 354 will not send any more packets from the BEQ queue.
[0116] After SP unit 354 reads a packet from the BEQ queue and sends the read packet to MAC layer forwarding unit 355, if the packet length that can be sent in the remaining time slice of the current scheduling period is still greater than the configured length, then SP unit 354 continues to read a packet from the BEQ queue and send the read packet to MAC layer forwarding unit 355 in the remaining time slice of the current scheduling period, and so on.
[0117] Assuming scheduling period 1 corresponds to CQ1, packets are retrieved from CQ1 and sent during scheduling period 1. When CQ1 is empty, the remaining time slice is calculated based on the duration of the scheduling period and the timer value. If the remaining time slice is sufficient to send a packet of a set length (e.g., 9600 bytes), a packet is retrieved from the BEQ queue and sent. Otherwise, scheduling period 1 stops sending packets and waits for the next scheduling period, i.e., scheduling period 2. Assuming scheduling period 2 corresponds to CQ2, packets are retrieved from CQ2 and sent during scheduling period 2. When CQ2 is empty, the remaining time slice is calculated based on the duration of the scheduling period and the timer value. If the remaining time slice is sufficient to send a packet of a set length, a packet is retrieved from the BEQ queue and sent. Otherwise, scheduling period 2 stops sending packets and waits for the next scheduling period, and so on.
[0118] For example, if a message in CQn is being sent, but the remaining time slice of the current scheduling period is not enough to send all the messages in CQn, then after the current scheduling period ends, messages in CQn can continue to be sent until all the messages in CQn have been sent, and then the next message in CQn will be sent.
[0119] For example, for each SP unit 354, SP scheduling may not use the frame preemptive scheduling method to simplify the implementation. Of course, SP scheduling may also use the frame preemptive scheduling method, which will not be elaborated here.
[0120] The MAC layer forwarding unit 355 is used to send a received message to an external device. For example, when a message is received from the CQ queue, the message in the CQ queue is sent to the external device; when a message is received from the BEQ queue, the message in the BEQ queue is sent to the external device.
[0121] As can be seen from the above technical solutions, the embodiments of this application can ensure that deterministic flow forwarding is not affected by best-effort flow forwarding, and ensure the mutual compatibility of best-effort flow forwarding and deterministic flow forwarding. Based on CSQF, packet transmission in wide-area deterministic networks is implemented, achieving the coexistence of deterministic and best-effort flows, facilitating the full-service convergence of shared networks and shared paths. When the bandwidth reserved for deterministic flows is not used by deterministic traffic, it can be used by best-effort flows. When congestion occurs, deterministic flows are unaffected, and congestion is resolved by controlling the number of best-effort flows. HQOS scheduling for best-effort flows is maintained, but HQOS scheduling is not implemented for deterministic flows. SR or SRv6 can be constrained to carry deterministic flows, which can be IP data flows. Deterministic flows are identified as quickly as possible at the receiving end of the network device, and independent data pipelines or paths are established in the network device to ensure that deterministic flows are not impacted by best-effort flows.
[0122] This application provides a message transmission method, which can be applied to network devices. The network device may include an output forwarding processing unit and an output interface unit. (See also...) Figure 6 The diagram shown is a flowchart of a message transmission method proposed in an embodiment of this application. This method may include:
[0123] Step 601: After obtaining a packet, if the packet belongs to a deterministic flow, the output forwarding processing unit stores the packet in the deterministic flow input queue. For each packet in the deterministic flow input queue, the encapsulation information corresponding to the packet is determined. The encapsulation information includes at least CQ queue information. The packet is encapsulated based on the encapsulation information, and the encapsulated packet is stored in the deterministic flow output queue.
[0124] Step 602: The output interface unit obtains a message from the deterministic stream output queue and stores the message in the CQ queue corresponding to the CQ queue information based on the CQ queue information corresponding to the message.
[0125] Step 603: The output interface unit determines the target CQ queue corresponding to the current scheduling period, and sends the messages in the target CQ queue to the external device within the current scheduling period.
[0126] In one possible implementation, after acquiring a packet, the output forwarding processing unit stores the packet in the best-effort flow input queue if the packet belongs to the best-effort flow. For each packet in the best-effort flow input queue, HQOS scheduling can be performed on the packet, and the HQOS-scheduled packet is stored in the best-effort flow output queue. The output interface unit acquires packets from the best-effort flow output queue and stores the packets in the BEQ queue. Based on this, after the output interface unit sends packets in the target CQ queue to the external device within the current scheduling period, if there is still a time slice remaining in the current scheduling period after all packets in the target CQ queue have been sent, the output interface unit sends packets in the BEQ queue to the external device within the remaining time slice of the current scheduling period.
[0127] In one possible implementation, the network device may further include an input forwarding processing unit. Upon receiving a packet, the input forwarding processing unit stores the packet in a deterministic flow input queue if the packet belongs to a deterministic flow, and in a best-effort flow input queue if the packet belongs to a best-effort flow. The queue priority of the deterministic flow input queue is higher than that of the best-effort flow input queue, so that the input forwarding processing unit processes packets in the deterministic flow input queue first. When processing packets in the deterministic flow input queue, if the packet includes CQ queue indication information, the input forwarding processing unit determines the CQ queue corresponding to the CQ queue indication information; otherwise, it determines the CQ queue corresponding to the packet based on the timestamp corresponding to the packet, where the timestamp represents the timestamp at which the network device received the packet. The input forwarding processing unit adds the CQ queue information corresponding to the CQ queue to the packet and sends the packet to the output forwarding processing unit, which then retrieves the packet.
[0128] For example, the network device also includes an internal switching unit. When the input forwarding processing unit sends a packet from the deterministic flow input queue to the output forwarding processing unit, it adds a high-priority tag to the packet and sends it to the internal switching unit, so that the internal switching unit sends the packet to the output forwarding processing unit based on the high-priority tag. When the input forwarding processing unit sends a packet from the best-effort flow input queue to the output forwarding processing unit, it adds a low-priority tag to the packet and sends it to the internal switching unit, so that the internal switching unit sends the packet to the output forwarding processing unit based on the low-priority tag.
[0129] In one possible implementation, the network device may further include an input interface unit. After receiving a packet from an external device, the input interface unit determines whether the packet belongs to a deterministic flow or a best-effort flow. If the packet belongs to a deterministic flow, it stores the packet in a deterministic flow output queue; if the packet belongs to a best-effort flow, it stores the packet in a best-effort flow output queue. The input interface unit sends packets from the deterministic flow output queue to an input forwarding processing unit via a third channel, whereby the input forwarding processing unit retrieves the packet from the third channel; wherein the input forwarding processing unit determines that the packet it retrieves from the third channel belongs to a deterministic flow. The input interface unit also sends packets from the best-effort flow output queue to the input forwarding processing unit via a fourth channel, whereby the input forwarding processing unit retrieves the packet from the fourth channel; wherein the input forwarding processing unit determines that the packet it retrieves from the fourth channel belongs to a best-effort flow.
[0130] This application proposes a network device, including an output forwarding processing unit and an output interface unit. The output forwarding processing unit, upon receiving a packet, stores the packet in a deterministic flow input queue if the packet belongs to a deterministic flow; for each packet in the deterministic flow input queue, it determines the encapsulation information corresponding to the packet, the encapsulation information including at least CQ queue information, encapsulates the packet based on the encapsulation information, and stores the encapsulated packet in a deterministic flow output queue. The output interface unit retrieves packets from the deterministic flow output queue, stores the packets in the CQ queue corresponding to the CQ queue information based on the CQ queue information corresponding to the packet, and determines the target CQ queue corresponding to the current scheduling period, and sends packets in the target CQ queue to external devices within the current scheduling period.
[0131] In one possible implementation, the output forwarding processing unit is further configured to, after acquiring a packet, if the packet belongs to a best-effort flow, store the packet in the best-effort flow input queue; for each packet in the best-effort flow input queue, perform HQOS scheduling on the packet, and store the HQOS-scheduled packet in the best-effort flow output queue. The output interface unit is further configured to acquire packets from the best-effort flow output queue and store the packets in the BEQ queue. After sending packets in the target CQ queue to the external device within the current scheduling period, the output interface unit is further configured to: if, after the packets in the target CQ queue have been sent, there is still a remaining time slice in the current scheduling period, send packets in the BEQ queue to the external device within the remaining time slice of the current scheduling period.
[0132] For example, the network device further includes an input forwarding processing unit. The input forwarding processing unit, upon receiving a packet, stores the packet in a deterministic flow input queue if the packet belongs to a deterministic flow, and in a best-effort flow input queue if the packet belongs to a best-effort flow. The queue priority corresponding to the deterministic flow input queue is higher than the queue priority corresponding to the best-effort flow input queue, so that the input forwarding processing unit processes packets in the deterministic flow input queue first. The input forwarding processing unit is also configured to, when processing packets in the deterministic flow input queue, determine the CQ queue corresponding to the CQ queue indication information if the packet includes CQ queue indication information; otherwise, determine the CQ queue corresponding to the packet based on the timestamp corresponding to the packet, where the timestamp represents the timestamp at which the network device received the packet. The input forwarding processing unit is also configured to add the CQ queue information corresponding to the CQ queue to the packet and send the packet to the output forwarding processing unit for acquisition.
[0133] For example, the network device further includes an input interface unit. The input interface unit, upon receiving a packet from an external device, determines whether the packet belongs to a deterministic flow or a best-effort flow; if the packet belongs to a deterministic flow, it stores the packet in a deterministic flow output queue; if the packet belongs to a best-effort flow, it stores the packet in a best-effort flow output queue. The input interface unit is also configured to send packets from the deterministic flow output queue to an input forwarding processing unit via a third channel, whereby the input forwarding processing unit retrieves the packet from the third channel; wherein the input forwarding processing unit determines that the packet it retrieves from the third channel belongs to a deterministic flow. The input interface unit is also configured to send packets from the best-effort flow output queue to the input forwarding processing unit via a fourth channel, whereby the input forwarding processing unit retrieves the packet from the fourth channel; wherein the input forwarding processing unit determines that the packet it retrieves from the fourth channel belongs to a best-effort flow.
[0134] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.
[0135] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0136] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0137] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0138] Furthermore, these computer program instructions can also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0139] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0140] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A message transmission method, characterized in that, Applied to a network device, wherein the network device includes at least an output forwarding processing unit and an output interface unit, the method includes: After acquiring a packet, if the packet belongs to a deterministic flow, the output forwarding processing unit stores the packet in the deterministic flow input queue. For each packet in the deterministic flow input queue, it determines the encapsulation information corresponding to the packet. The encapsulation information includes at least the periodic queue (CQ) information. Based on the encapsulation information, the packet is encapsulated, and the encapsulated packet is stored in the deterministic flow output queue. The output interface unit obtains a message from the deterministic stream output queue and stores the message in the CQ queue corresponding to the CQ queue information based on the CQ queue information corresponding to the message. The output interface unit determines the target CQ queue corresponding to the current scheduling period, and sends the messages in the target CQ queue to the external device within the current scheduling period; Specifically, after acquiring a packet, the output forwarding processing unit stores the packet in the best-effort flow input queue if the packet belongs to the best-effort flow; for each packet in the best-effort flow input queue, it performs hierarchical quality of service (HQOS) scheduling on the packet and stores the HQOS-scheduled packet in the best-effort flow output queue; the output interface unit acquires a packet from the best-effort flow output queue and stores the packet in the best-effort buffer queue (BEQ queue); After the output interface unit sends the message in the target CQ queue to the external device within the current scheduling period, the method further includes: if there is still a remaining time slice in the current scheduling period after the message in the target CQ queue has been sent, then the output interface unit sends the message in the BEQ queue to the external device within the remaining time slice of the current scheduling period.
2. The method according to claim 1, characterized in that, There is a first channel and a second channel between the output interface unit and the output forwarding processing unit; The output interface unit obtains a message from the deterministic stream output queue, including: the output interface unit obtains a message from the deterministic stream output queue through the first channel; The output interface unit obtains packets from the best-effort stream output queue, including: the output interface unit obtains packets from the best-effort stream output queue through the second channel; Specifically, when the number of packets in the BEQ queue is greater than a first preset threshold, the output interface unit outputs a flow control signal for the second channel; when the number of packets in the BEQ queue is less than a second preset threshold, the output interface unit cancels the flow control signal for the second channel; when a flow control signal exists for the second channel, packet transmission through the second channel is suspended. Wherein, the second preset threshold is less than or equal to the first preset threshold.
3. The method according to claim 1, characterized in that, The output interface unit sends messages from the BEQ queue to external devices during the remaining time slice of the current scheduling period, including: The output interface unit determines the message length that can be sent in the remaining time slice. If the message length is greater than the configured length, a message in the BEQ queue is sent to the external device in the remaining time slice of the current scheduling period. If the message length is not greater than the configured length, the sending of messages in the BEQ queue to the external device is stopped in the remaining time slice of the current scheduling period. After sending a message from the BEQ queue to an external device, the remaining time slice of the current scheduling period is updated, and the process returns to determine the message length that can be sent with the updated remaining time slice.
4. The method according to any one of claims 1-3, characterized in that, The network device further includes an input forwarding processing unit, and the method further includes: After receiving a packet, the input forwarding processing unit stores the packet in the deterministic flow input queue if the packet belongs to a deterministic flow; or, if the packet belongs to a best-effort flow, it stores the packet in the best-effort flow input queue. The queue priority of the deterministic flow input queue is higher than that of the best-effort flow input queue, so that the input forwarding processing unit processes the packets in the deterministic flow input queue first. When the input forwarding processing unit processes a packet in the deterministic flow input queue, if the packet includes CQ queue indication information, it determines the CQ queue corresponding to the CQ queue indication information; otherwise, it determines the CQ queue corresponding to the packet based on the timestamp corresponding to the packet, where the timestamp represents the timestamp at which the network device received the packet; it adds the CQ queue information corresponding to the CQ queue to the packet and sends the packet to the output forwarding processing unit, which then obtains the packet.
5. The method according to claim 4, characterized in that, The input forwarding processing unit determines the CQ queue corresponding to the packet based on the timestamp corresponding to the packet, including: The input forwarding processing unit queries the outgoing interface based on the forwarding information corresponding to the message, and determines multiple CQ queues corresponding to the outgoing interface, with each CQ queue corresponding to a scheduling cycle; The input forwarding processing unit selects the scheduling period corresponding to the timestamp from all scheduling periods based on the timestamp corresponding to the message, and determines the CQ queue corresponding to the scheduling period.
6. The method according to claim 4, characterized in that, The network device further includes an internal switching unit, and the method further includes: When the input forwarding processing unit sends a packet from the deterministic stream input queue to the output forwarding processing unit, it adds a high-priority tag to the packet and sends the packet to the internal switching unit so that the internal switching unit sends the packet to the output forwarding processing unit based on the high-priority tag. When the input forwarding processing unit sends a packet from the best-effort stream input queue to the output forwarding processing unit, it adds a low-priority tag to the packet and sends the packet to the internal switching unit, so that the internal switching unit sends the packet to the output forwarding processing unit based on the low-priority tag.
7. The method according to claim 4, characterized in that, The network device further includes an input interface unit, and the method further includes: After receiving a message from an external device, the input interface unit determines whether the message belongs to a deterministic flow or a best-effort flow. If the message belongs to a deterministic flow, it stores the message in the deterministic flow output queue; if the message belongs to a best-effort flow, it stores the message in the best-effort flow output queue. The input interface unit sends packets from the deterministic flow output queue to the input forwarding processing unit through the third channel, and the input forwarding processing unit obtains the packets from the third channel; wherein, the input forwarding processing unit determines that the packets it obtains from the third channel belong to the deterministic flow; The input interface unit sends packets from the best-effort flow output queue to the input forwarding processing unit through the fourth channel, and the input forwarding processing unit obtains the packets from the fourth channel; wherein, the input forwarding processing unit determines that the packets it obtains from the fourth channel belong to the best-effort flow.
8. The method according to claim 7, characterized in that, The input interface unit determines whether the message belongs to a deterministic flow or a best-effort flow, including: The input interface unit parses the flow characteristics from the message; if the flow characteristics match the deterministic flow characteristics in the configured access control list (ACL), the message is determined to belong to a deterministic flow; if the flow characteristics do not match the deterministic flow characteristics in the ACL, the message is determined to belong to a best-effort flow. The ACL includes at least one deterministic flow feature.
9. The method according to claim 7, characterized in that, The input interface unit sends packets from the deterministic stream output queue to the input forwarding processing unit via a third channel, and sends packets from the best-effort stream output queue to the input forwarding processing unit via a fourth channel, including: The input interface unit preferentially obtains packets from the deterministic stream output queue and sends the obtained packets to the input forwarding processing unit through the third channel; After all packets in the deterministic flow output queue have been acquired, packets are retrieved from the best-effort flow output queue and sent to the input forwarding processing unit via the fourth channel.
10. A network device, characterized in that, It includes an output forwarding processing unit and an output interface unit; The output forwarding processing unit is used to, after acquiring a packet, if the packet belongs to a deterministic flow, store the packet in a deterministic flow input queue; for each packet in the deterministic flow input queue, determine the encapsulation information corresponding to the packet, the encapsulation information including at least periodic queue (CQ) information, encapsulate the packet based on the encapsulation information, and store the encapsulated packet in a deterministic flow output queue. The output interface unit is used to obtain a message from the deterministic stream output queue, and store the message in the CQ queue corresponding to the CQ queue information based on the CQ queue information corresponding to the message. The output interface unit is used to determine the target CQ queue corresponding to the current scheduling period, and send the messages in the target CQ queue to the external device within the current scheduling period; The output forwarding processing unit is further configured to, upon acquiring a packet, if the packet belongs to a best-effort flow, store the packet in the best-effort flow input queue; for each packet in the best-effort flow input queue, perform hierarchical quality of service (HQOS) scheduling on the packet, and store the HQOS-scheduled packet in the best-effort flow output queue; the output interface unit is further configured to acquire a packet from the best-effort flow output queue and store the packet in the best-effort buffer queue (BEQ queue); After sending the message in the target CQ queue to the external device during the current scheduling period, the output interface unit is further configured to: if there is still a remaining time slice in the current scheduling period after the message in the target CQ queue has been sent, then send the message in the BEQ queue to the external device during the remaining time slice of the current scheduling period.
11. The network device according to claim 10, characterized in that, The network device also includes an input forwarding processing unit; The input forwarding processing unit is configured to, upon receiving a packet, store the packet in a deterministic flow input queue if the packet belongs to a deterministic flow, or store the packet in a best-effort flow input queue if the packet belongs to a best-effort flow; wherein the queue priority corresponding to the deterministic flow input queue is higher than the queue priority corresponding to the best-effort flow input queue, so that the input forwarding processing unit processes the packets in the deterministic flow input queue first; The input forwarding processing unit is further configured to, when processing a packet in the deterministic flow input queue, determine the CQ queue corresponding to the CQ queue indication information if the packet includes CQ queue indication information, otherwise determine the CQ queue corresponding to the packet based on the timestamp corresponding to the packet, wherein the timestamp is used to represent the timestamp at which the network device receives the packet; The input forwarding processing unit is further configured to add CQ queue information corresponding to the CQ queue to the message, and send the message to the output forwarding processing unit, which then obtains the message.
12. The network device according to claim 11, characterized in that, When the input forwarding processing unit determines the CQ queue corresponding to the message based on the timestamp corresponding to the message, it specifically performs the following steps: querying the outgoing interface based on the forwarding information corresponding to the message, and determining multiple CQ queues corresponding to the outgoing interface, with each CQ queue corresponding to a scheduling period; selecting the scheduling period corresponding to the timestamp from all scheduling periods based on the timestamp corresponding to the message, and determining the CQ queue corresponding to the scheduling period.
13. The network device according to claim 11, characterized in that, The network device also includes an input interface unit; The input interface unit is used to determine whether a message belongs to a deterministic flow or a best-effort flow after receiving a message from an external device; if the message belongs to a deterministic flow, the message is stored in the deterministic flow output queue; if the message belongs to a best-effort flow, the message is stored in the best-effort flow output queue. The input interface unit is used to send packets in the deterministic flow output queue to the input forwarding processing unit through the third channel, and the input forwarding processing unit obtains the packets from the third channel; wherein, the input forwarding processing unit determines that the packets it obtains from the third channel belong to the deterministic flow; The input interface unit is used to send packets in the best-effort flow output queue to the input forwarding processing unit through the fourth channel, and the input forwarding processing unit obtains the packets from the fourth channel; wherein, the input forwarding processing unit determines that the packets it obtains from the fourth channel belong to the best-effort flow.
Citation Information
Patent Citations
Deterministic packet scheduling and DMA for time sensitive networking
US20210014177A1
Control device, switch device and methods
WO2021014180A1