Packet transmission method and network device
By adopting CSQF technology in network devices, the compatibility issues of deterministic streams and optimal effort streams are solved, predictable transmission of deterministic streams is achieved, and the transmission quality of deterministic streams is protected in the event of network congestion.
Patent Information
- Application Number
- JP2023572986
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2041-12-29
AI Technical Summary
The prior art is difficult to effectively compatible and separate the transmission of deterministic streams and optimal effort streams in deterministic networks, resulting in deterministic streaming being affected by optimal effort streaming transmission.
By introducing periodic designated queueing and forwarding (CSQF) technology into network devices, it ensures that the transmission of deterministic streams is not affected by the optimal effort stream, and that compatibility is achieved by separating the transmission channels of the deterministic stream and the optimal effort stream.
Compatible transmission of deterministic streams and optimal effort streams is achieved, ensuring predictability of the delay and packet loss rate of deterministic streams, and does not affect the transmission of deterministic streams when the network is congested.
Smart Images

Figure 0007654835000001 
Figure 0007654835000002 
Figure 0007654835000003
Abstract
Description
[Technical field]
[0001] The present invention relates to the field of communication technology, and in particular to a packet transmission method and a network device. [Background technology]
[0002] A Deterministic Network (DetNet) can provide deterministic service functions for bearer services within a network domain, and these deterministic service functions may include delay, packet loss rate, etc. Time Sensitive Networking (TSN) is a deterministic network realized based on local area networks. TSN provides deterministic service functions for bearer services by using Cyclic Queuing and Forwarding (CQF) to ensure deterministic transmission at the forwarding layer.
[0003] For simplicity, a service flow that has deterministic service capabilities (such as delay and packet loss rate) and is transmitted through a deterministic network is called a deterministic flow. Other service flows that are different from the deterministic flow can be forwarded in a best-effort manner. Therefore, other service flows that are different from the deterministic flow are called best-effort flows. Summary of the Invention
[0004] The present invention provides a packet transmission method, the method being applied to a network device, the network device including at least an output forwarding processing unit and an output interface unit, the method comprising: After the output forwarding processing unit obtains a packet, if the packet belongs to a deterministic flow, storing the packet in a deterministic flow input queue, and for each packet in the deterministic flow input queue, determining encapsulation information corresponding to the packet, the encapsulation information including at least CQ queue information, encapsulating the packet according to the encapsulation information, and storing the encapsulated packet in a deterministic flow output queue; the output interface unit acquiring a packet from the deterministic flow output queue, and storing the packet in a CQ queue corresponding to the CQ queue information according to the CQ queue information corresponding to the packet; The output interface unit determines a target CQ queue corresponding to a current scheduling period, and transmits packets in the target CQ queue to an external device in the current scheduling period.
[0005] The present invention provides a network device, the network device including an output forwarding processing unit and an output interface unit; After the output forwarding processing unit obtains 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 encapsulation information corresponding to the packet, where the encapsulation information includes at least CQ queue information, and is used to encapsulate the packet according to the encapsulation information and store the encapsulated packet in a deterministic flow output queue; The output interface unit is used to obtain a packet from the deterministic flow output queue, and, based on CQ queue information corresponding to the packet, store the packet in a CQ queue corresponding to the CQ queue information; The output interface unit determines a target CQ queue corresponding to a current scheduling period, and is used to transmit packets in the target CQ queue to an external device in the current scheduling period. Effect of the Invention
[0006] As can be seen from the above technical solutions, the embodiment of the present invention can ensure that the forwarding of deterministic flows is not affected by the forwarding of best-effort flows, and the forwarding of best-effort flows and the forwarding of deterministic flows are compatible. Based on Cycle Specified Queuing and Forwarding (CSQF), packet transmission in a wide-area deterministic network and the coexistence of deterministic flows and best-effort flows are realized, which promotes full-service full integration of common networks and common paths. When the reserved bandwidth of a deterministic flow is not used by the deterministic flow, it can be used by the best-effort flow, and when congestion occurs, the congestion situation can be resolved by controlling the number of best-effort flows without affecting the deterministic flow. Hierarchical Quality of Service (HQOS) scheduling of best-effort flows is maintained, but HQOS scheduling of deterministic flows is not performed. [Brief description of the drawings]
[0007] In order to more clearly describe the embodiments of the present invention or the technical solutions of the prior art, the drawings required in the description of the embodiments of the present invention or the prior art are briefly described below. The drawings described below are only some embodiments described in the present invention, and those skilled in the art can obtain other drawings based on these drawings of the embodiments of the present invention.
[0008] [Figure 1] FIG. 1 is a schematic diagram illustrating the working principle of a CSQF according to one embodiment of the present invention. [Diagram 2]FIG. 1 is a schematic diagram showing a comparison of CSQF and CQF according to one embodiment of the present invention. [Diagram 3] FIG. 2 is a structural schematic diagram of a network device according to an embodiment of the present invention; [Figure 4A] FIG. 2 is a structural schematic diagram of a network device according to an embodiment of the present invention; [Figure 4B] FIG. 2 is a structural schematic diagram of a network device according to an embodiment of the present invention; [Figure 5A] FIG. 2 is a structural schematic diagram of an input interface unit according to an embodiment of the present invention; [Figure 5B] FIG. 2 is a structural schematic diagram of an input forwarding processing unit according to an embodiment of the present invention; [Figure 5C] FIG. 2 is a structural schematic diagram of an output forwarding processing unit according to an embodiment of the present invention; [Figure 5D] FIG. 2 is a structural schematic diagram of an output interface unit according to an embodiment of the present invention; [Figure 6] 4 is a flowchart of a packet transmission method according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] The terms used in the examples of the present invention are not intended to limit the embodiments of the present invention, but are used only to describe specific examples. The singular forms "a," "the," and "the" used in the examples and claims of the present invention are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein means any or all possible combinations including one or more of the associated listed items.
[0010] In the embodiments of the present invention, terms such as first, second, and third may be used to describe various pieces of information, but it should be understood that these pieces of information should not be limited to these terms. These terms are used only to distinguish the same types of information from one another. For example, the first information may be referred to as the second information, and similarly, the second information may be referred to as the first information, without departing from the scope of the present invention. Depending on the context, the word "when..." may be interpreted as "when..." or "in the course of..." or "in response to...".
[0011] TSN is a deterministic network realized based on a local area network. In TSN, CQF is used to ensure deterministic transmission in the transport layer, thereby providing deterministic service function for bearer services. Of course, CQF is only one example for providing deterministic service, and other methods can be used to ensure deterministic transmission in the transport layer, and are not limited here. CQF is a technology close to CSQF. In this embodiment, CQF is taken as an example for explanation. The basic operating principle of CQF is that the egress interface of each network device is associated with two queues, the time domain is divided into two periods, and the two queues alternate between transmission and reception in these two periods. For example, the two queues are queue Q1 and queue Q2, respectively, and the two periods are period T0 and period T1, respectively. In period T0, queue Q1 transmits and queue Q2 receives (queue Q1 receive is off, queue Q2 receive is on, queue Q1 transmit is on, queue Q2 transmit is off), and in period T1, queue Q1 receives and queue Q2 transmits. In this way, queue Q1 and queue Q2 can alternate between transmitting and receiving in odd and even periods.
[0012] CQF requires one transmission cycle per hop. A packet is received by a network device in one cycle and transmitted in the next cycle. The network device at the next hop receives the packet in the next cycle, and so on. In this way, when the cycle T is a determined value, the transmission delay of the packet on the path (end-to-end transmission delay) is determined. The minimum value of the transmission delay is (H-1)*T, and the maximum value is (H+1)*T. Here, H is the number of hops, which represents the total number of network devices passed through on the path.
[0013] CQF is a technology based on local area networks and cannot be realized in wide area networks. To realize deterministic transmission in wide area networks, cycle specified queuing and forwarding (CSQF) is proposed based on CQF. CSQF is combined with segment routing (SR) applications and SRv6 applications to realize deterministic transmission in wide area networks. Here, SR can be Multi-Protocol Label Switching (MPLS)-based SR, and SRv6 can be IPV6-based SRv6.
[0014] FIG. 1 is a schematic diagram showing the working principle of CSQF. The controller 10 is used to collect information of each network device, such as transmission capability, interface, periodicity, maximum jitter in the node, etc. For a deterministic transmission request between a sender and a receiver, the controller 10 allocates a transmission path when it determines that there are sufficient transmission resources based on calculation, and delivers the information of the transmission path to the edge node. As shown in FIG. 1, 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 the transmission path is network device 11.
[0015] When the network device 11 receives a packet to be transferred, it adds to the packet information about each network device on the transmission path, such as the node identifier of the network device on the transmission path (e.g., the position (Locator) in the SRv6 segment identifier (SID)), the transmission interface of the network device, the transmission period of each network device, etc. In this way, when a packet reaches a certain network device, the network device can obtain information about the corresponding interface and period, and store the packet in a queue corresponding to the period.
[0016] Each network device may transmit packets in each queue according to a fixed period, i.e., each queue corresponds to one period and transmits packets in the queue in the period. Since the period of the network device is performed in a fixed pattern, the designated period of each packet on the sending side is determined in the network device 11, and the period in which each network device transfers packets from the sending side to the receiving side is also determined. Therefore, the delay of the entire packet is also determined, and deterministic transmission is realized.
[0017] As can be seen from the above, the realization processes of CSQF and CQF are similar, and the differences between CSQF and CQF are as follows. CSQF requires at least three queues (for example, 3, 6, 8, 9, 10, 12, 15 queues, hereinafter, 15 queues are taken as an example). In each period, only one queue is in a sending state, and all other queues are in a receiving state. CQF requires that the periods of each network device are strictly synchronized, including phase synchronization, whereas CSQF only requires frequency synchronization, not phase synchronization. In addition, when the transmission delay of a certain hop does not fall within one period, the transmission queue of the next period can be specified, thereby adapting to the transmission delay of different network devices in the wide area network.
[0018] 2 is a schematic diagram showing a comparison between CSQF and CQF. For CQF, in a transmission process of a certain packet, the network device 11 transmits the packet in period 1, the network device 12 receives the packet in period 1 and transmits the packet in period 2, the network device 13 receives the packet in period 2 and transmits the packet in period 3, and the network device 14 receives the packet in period 3 and transmits the packet in period 4. For CSQF, taking as an example that CSQF requires three queues, in a transmission process of a certain packet, the network device 11 transmits the packet in period 1, the network device 12 receives the packet in period 1 or period 2 and transmits the packet in period 3, the network device 13 receives the packet in period 3 and transmits the packet in period 4, and the network device 14 receives the packet in period 4 or period 5 and transmits the packet in period 6.
[0019] In the process of realizing CSQF, each network device divides a time slice with a fixed period and performs unified flow scheduling for deterministic service flows, so that the service flow is transferred in the determined time slice, and it is guaranteed that the delay of the entire packet is determined. The transmission time of each network device on the transmission path is limited within a specific time slice, so that the delay jitter of the packet in the network device is determined. Even if the number of network devices increases, the jitter of the previous network device does not increase the delay jitter of the next network device. Of course, as the total number of network devices increases, the total delay of packet transfer also increases.
[0020] At the last network device, the packets are transmitted and received only within the determined time slice, i.e., the jitter range of the packets at the last network device is limited to within one determined time slice.
[0021] Although CSQF can realize deterministic transmission of wide area network and provide deterministic service function for bearer service, the prior art has not proposed a reasonable solution for how each network device should realize CSQF. In response to the above problem, an embodiment of the present invention provides a wide-area deterministic network transmission method realized based on CSQF, which is applied to a network device. The network device is also called a network node or a forwarding node. Figure 3 is a structural schematic diagram of a network device. The network device 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.
[0022] Here, the input interface unit 31 can realize receiving auxiliary processing of deterministic flows, and the functions of the input interface unit 31 include, but are not limited to, a function of identifying deterministic flows, a function of assisting the input forwarding processing unit 32 to realize flow classification so that the deterministic flows enter the deterministic flow input queue, a time stamp function, and a flow scheduling function.
[0023] Here, the functions of the input forwarding processing unit 32 include, but are not limited to, a flow classification function, a priority scheduling function, and a deterministic flow input channel processing function. The realization of the flow classification function is to distinguish between packets belonging to a deterministic flow and packets belonging to a best effort flow, and for packets belonging to a deterministic flow, store the packets in a deterministic flow input queue, and for packets belonging to a best effort flow, store the packets in a best effort flow input queue. The realization of the priority scheduling function is to process packets in a deterministic flow input queue with priority, and process packets in a best effort flow input queue after the processing of packets in the deterministic flow input queue is completed. Realizing a deterministic flow input channel processing function means, in other words, separating a transmission channel of a deterministic flow from a transmission channel of a best-effort flow, transmitting packets of the deterministic flow through the transmission channel of the deterministic flow and transmitting packets of the best-effort flow through the transmission channel of the best-effort flow, and by separating the transmission channel of the deterministic flow from the transmission channel of the best-effort flow, back-pressed (i.e., rate-limited processing) is allowed on the transmission channel of the best-effort flow and back-pressed is not allowed on the transmission channel of the deterministic flow.
[0024] Here, the function of the internal switching unit 33 is to reserve a high priority channel for the deterministic flow, i.e., the internal switching unit 33 sends packets of the deterministic flow to the output transfer processing unit 34 with priority, and sends packets of the best effort flow to the output transfer processing unit 34 after the transmission of the packets of the deterministic flow is completed.
[0025] For example, the internal switching unit 33 may include a high priority switching channel and a normal priority switching channel, and the internal switching unit 33 may transmit packets of the deterministic flow via the high priority switching channel and transmit packets of the best effort flow via the normal priority switching channel.
[0026] Here, the functions of the output forwarding processing unit 34 include, but are not limited to, a best effort output pipe processing function, an HQOS scheduling function for a best effort flow, a rate limiting function for a best effort flow, and a deterministic flow output pipe processing function. Implementing the best effort output pipe processing function, i.e., processes packets of a best effort flow. Implementing the HQOS scheduling function for a best effort flow, i.e., performs HQOS scheduling on packets of a best effort flow, and does not perform HQOS scheduling on packets of a deterministic flow. Implementing the rate limiting function for a best effort flow, i.e., performs rate limiting processing on packets of a best effort flow, and does not perform rate limiting processing on packets of a deterministic flow. Implementing the deterministic flow output pipe processing function, i.e., processes packets of a deterministic flow.
[0027] Here, the function of the output interface unit 35 is best effort. Japanese crested ibis Realize the best effort Japanese crested ibis The best effort flow packets are stored in the queue, and the best effort Japanese crested ibis To realize the back pressure function of the queue, e.g., best effort Japanese crested ibis When the number of packets in the queue reaches a threshold, the packets of the best effort flow are Japanese crested ibis The scheduling methods include, but are not limited to, controlling the output forwarding processing unit 34 not to store packets of the deterministic flow in a queue; implementing a CSQF queue for the deterministic flow and storing packets of the deterministic flow through the CSQF queue; and implementing a combined scheduling of the deterministic flow and the best-effort flow, i.e., scheduling packets of the deterministic flow and packets of the best-effort flow, for example, first transmitting packets of the deterministic flow and then transmitting packets of the best-effort flow.
[0028] Exemplarily, the CSQF queue may include a sending queue (SQ), a receiving queue (RQ), and a tolerating queue (TQ). The SQ is a queue being sent by the CSQF, and the RQ is a queue being received by the CSQF. When a received packet does not normally enter the RQ due to jitter or the like, the packet enters the TQ. In this embodiment, the SQ, RQ, and TQ are collectively called CQ (Cyclic Queuing) queues. That is, the output interface unit 35 realizes a CQ queue for a deterministic flow, and the CQ queue can store packets of the deterministic flow.
[0029] In one possible embodiment, as shown in FIG. 4A, the input interface unit 31 may be realized by a Field Programmable Gate Array (FPGA), and the input forwarding processing unit 32 may be realized by a Network Processor (NP). To facilitate the distinction, this NP is called an Ingress NP. The internal switching unit 33 may be realized by a switching fabric, and the output forwarding processing unit 34 may be implemented by an NP. To facilitate the distinction, this NP is called an Egress NP. The output interface unit 35 may be realized by an FPGA.
[0030] Two channels are created between the input interface unit 31 and the input forwarding processing unit 32. That is, two channels are created in the physical interface between the input interface unit 31 and the input forwarding processing unit 32. For ease of distinction, these two channels are referred to as a third channel and a fourth channel, respectively. For example, if 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 in the same Interlaken physical interface. Here, the third channel is used to transmit packets belonging to a deterministic flow, and the fourth channel is used to transmit packets belonging to a best effort flow.
[0031] Two channels are created between the output forwarding processing unit 34 and the output interface unit 35. That is, two channels are created in the physical interface between the output forwarding processing unit 34 and the output interface unit 35. For ease of distinction, the two channels are referred to as a first channel and a second channel, respectively. For example, when the physical interface between the output forwarding processing unit 34 and the output interface unit 35 is an Interlaken physical interface, the first channel and the second channel are created in the same Interlaken physical interface. Here, the first channel is used to transmit packets belonging to a deterministic flow, and the second channel is used to transmit packets belonging to a best effort flow.
[0032] In another possible embodiment, as shown in Fig. 4B, the input interface unit 31 and the input forwarding processing unit 32 may be realized by the same device, for example, simultaneously by an Ingress NP. The internal switching unit 33 may be realized by a switching fabric. The output forwarding processing unit 34 and the output interface unit 35 may be realized by the same device, for example, simultaneously by an Egress NP.
[0033] Of course, Figures 4A and 4B are just two examples, and the implementation of the input interface unit 31, the input transfer processing unit 32, the internal switching unit 33, the output transfer processing unit 34, and the output interface unit 35 is not limited as long as the functions of these units can be realized. The following description will be given taking Figure 4A as an example.
[0034] The functions of the input interface unit 31, the input transfer processing unit 32, the internal switching unit 33, the output transfer processing unit 34, and the output interface unit 35 will be described below in combination with specific embodiments.
[0035] First, the input interface unit 31. After receiving a packet from an external device, the input interface unit 31 judges whether the packet belongs to a deterministic flow or a best-effort flow. If the packet belongs to a deterministic flow, the input interface unit 31 stores the packet in a deterministic flow output queue, and if the packet belongs to a best-effort flow, the input interface unit 31 stores the packet in a best-effort flow output queue. Based on this, the input interface unit 31 sends the packets in the deterministic flow output queue to the input transfer processing unit 32 via a third channel, and sends the packets in the best-effort flow output queue to the input transfer processing unit 32 via a fourth channel.
[0036] Exemplarily, after receiving a packet from an external device, the input interface unit 31 analyzes flow characteristics from the packet. If the flow characteristics match the deterministic flow characteristics in the configured ACL, it determines that the packet belongs to a deterministic flow. If the flow characteristics do not match the deterministic flow characteristics in the ACL, it determines that the packet belongs to a best effort flow. Here, the ACL may include at least one deterministic flow characteristic.
[0037] Exemplarily, the input interface unit 31 may preferentially retrieve packets from the deterministic flow output queue and send the retrieved packets to the input forwarding processing unit 32 via a third channel, and after all packets in the deterministic flow output queue have been retrieved, retrieve packets from the best effort flow output queue and send the retrieved packets to the input forwarding processing unit 32 via a fourth channel.
[0038] 5A is a structural schematic diagram 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) 317.
[0039] Here, the Ethernet interface controller 311 receives packets from an external device via the Ethernet interface and transmits the packets to the receive buffer 312, which receives and buffers the packets.
[0040] Here, the deterministic flow ACL unit 313 is used to obtain an ACL of a deterministic flow. For example, an upper application may send an ACL of a deterministic flow to the deterministic flow ACL unit 313. The ACL may include at least one characteristic of the deterministic flow and may be used to identify the deterministic flow.
[0041] For example, the characteristic of the deterministic flow may be a destination Internet Protocol (IP) address, which indicates that a packet corresponding to the destination IP address belongs to the deterministic flow. As another example, the characteristic of the deterministic flow may be a destination IP network segment, which indicates that a packet corresponding to the destination IP network segment belongs to the deterministic flow. Of course, the above are only two examples of the characteristics of a deterministic flow, and the characteristics of a deterministic flow are not limited as long as the deterministic flow can be determined based on the characteristics of the deterministic flow.
[0042] The deterministic flow ACL unit 313 may also store the ACL for a deterministic flow, so that the control logic unit 314 queries the ACL from the deterministic flow ACL unit 313 after obtaining the ACL.
[0043] Here, the control logic unit 314 can obtain a packet from the receiving buffer 312 and analyze the flow characteristics (i.e., keywords required for the ACL) from the packet. If the flow characteristics match any of the deterministic flow characteristics in the ACL, the packet is determined to belong to the deterministic flow, and if the flow characteristics do not match all of the deterministic flow characteristics in the ACL, the packet is determined to belong to the best effort flow.
[0044] For example, if the characteristic of a deterministic flow is a destination IP address, the control logic unit 314 may analyze the destination IP address from the packet, and if the destination IP address of the packet is the same as a destination IP address in the ACL, the packet is determined to belong to a deterministic flow, and if the destination IP address of the packet is not the same as all of the destination IP addresses in the ACL, the packet is determined to belong to a best effort flow.
[0045] If it is determined that the packet belongs to a deterministic flow, the control logic unit 314 may add auxiliary information, such as a timestamp, to the packet's header and store the packet in the deterministic flow output queue 315, where the timestamp is used to indicate the time when the Ethernet interface controller 311 received the packet from an external device. If it is determined that the packet belongs to a best effort flow, the control logic unit 314 stores the packet in the best effort flow output queue 316.
[0046] Thus, each time a packet belonging to a deterministic flow is received, the packet may be stored in the deterministic flow output queue 315, i.e., the deterministic flow output queue 315 may contain multiple packets belonging to the deterministic flow.
[0047] Each time a packet belonging to a best effort flow is received, the packet may be stored in the best effort flow output queue 316, i.e., the best effort flow output queue 316 may contain multiple packets belonging to the best effort flow.
[0048] Here, the transmit DMA 317 may read packets from the deterministic flow output queue 315 and transmit the packets in the deterministic flow output queue 315 to the input transfer processing unit 32 via a third channel.
[0049] The transmit DMA 317 may read packets from the best effort flow output queue 316 and transmit the packets in the best effort flow output queue 316 to the input transfer processing unit 32 via a fourth channel.
[0050] For example, the transmit DMA 317 may preferentially read packets from the deterministic flow output queue 315 and send the packets to the input transfer processing unit 32 via a third channel. After all packets in the deterministic flow output queue 315 have been sent, the transmit DMA 317 may read packets from the best effort flow output queue 316 and send the packets to the input transfer processing unit 32 via a fourth channel.
[0051] In another example, transmit DMA 317 may read a portion of the packet from deterministic flow output queue 315 and send the packet to ingress transfer processing unit 32 via a third channel. Then, transmit DMA 317 may read a portion of the packet from best effort flow output queue 316 and send the packet to ingress transfer processing unit 32 via a fourth channel. Then, DMA 317 may continue to read a portion of the packet from deterministic flow output queue 315 and send the packet to ingress transfer processing unit 32 via the third channel. This is repeated until all packets in deterministic flow output queue 315 and best effort flow output queue 316 have been sent.
[0052] Next, there is the input transfer processing unit 32. After the input transfer processing unit 32 obtains a packet, if the packet belongs to a deterministic flow, the input transfer processing unit 32 stores the packet in a deterministic flow input queue, and if the packet belongs to a best effort flow, the input transfer processing unit 32 stores the packet in a best effort flow input queue. Here, when the input transfer processing unit 32 obtains a packet from a third channel, the input transfer processing unit 32 may determine that the packet belongs to a deterministic flow. When the input transfer processing unit 32 obtains a packet from a fourth channel, the input transfer processing unit 32 may determine that the packet belongs to a best effort flow.
[0053] 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 transfer processing unit 32 preferentially processes packets in the deterministic flow input queue. When processing a packet in the deterministic flow input queue, if the packet includes CQ queue indication information, the input transfer processing unit 32 determines a CQ queue corresponding to the CQ queue indication information, and if the packet does not include CQ queue indication information, the input transfer processing unit 32 determines a CQ queue corresponding to the packet based on a timestamp corresponding to the packet. Based on this, the input transfer processing unit 32 adds CQ queue information corresponding to the CQ queue to the packet, and transmits the packet to the internal switching unit 33.
[0054] Here, when determining the CQ queue corresponding to the packet based on the timestamp, the input forwarding processing unit 32 may inquire about an egress interface based on forwarding information corresponding to the packet, determine multiple CQ queues corresponding to the egress interface, each CQ queue having one corresponding scheduling period, and based on the timestamp corresponding to the packet, select a scheduling period corresponding to the timestamp from all scheduling periods and determine the CQ queue corresponding to the scheduling period.
[0055] When the input transfer processing unit 32 transmits a packet in the deterministic flow input queue to the internal switching unit 33, it marks the packet with a high priority and transmits the high priority packet to the internal switching unit 33. When the input transfer processing unit 32 transmits a packet in the best effort flow input queue to the internal switching unit 33, it marks the packet with a low priority and transmits the low priority packet to the internal switching unit 33.
[0056] 5B is a structural schematic diagram of the input forwarding processing unit 32. The input forwarding processing unit 32 may include a flow classification unit 321, a deterministic flow input queue 322, a best effort flow input queue 323, a pipe scheduling unit 324, and a deterministic flow input pipe processing unit 325.
[0057] When the flow 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 flow 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.
[0058] The input forwarding processing unit 32 may support multiple physical queues, and the priorities of different physical queues may be different. Based on this, the high-priority physical queue may be the deterministic flow input queue 322, and the low-priority physical queue may be the best-effort flow input queue 323. Obviously, since the deterministic flow input queue 322 uses a high-priority physical queue and the best-effort flow input queue 323 uses a low-priority physical queue, the queue priority corresponding to the deterministic flow input queue 322 is made higher than the queue priority corresponding to the best-effort flow input queue 323, thereby ensuring that packets in the deterministic flow input queue 322 are processed preferentially, i.e., ensuring that packets belonging to a deterministic flow are processed preferentially.
[0059] Here, the pipe scheduling unit 324 may forward packets in the deterministic flow input queue 322 and packets in the best effort flow input queue 323. When forwarding packets, the pipe scheduling unit 324 may be a PMU (Processor Management Unit), that is, the PMU forwards packets, and the forwarding process of the packets is not limited in this specification.
[0060] Since the queue priority corresponding to the deterministic flow input queue 322 is higher than the queue priority corresponding to the best effort flow input queue 323, the pipe scheduling unit 324 preferentially transfers the packets in the deterministic flow input queue 322, and transfers the packets in the best effort flow input queue 323 after the packets in the deterministic flow input queue 322 are transferred. In addition, when transferring a packet, the pipe scheduling unit 324 can assign the packet to a transfer pipe (allocate processor resources to perform corresponding pipe processing), and this pipe processing process is not limited in this specification.
[0061] Here, the deterministic flow input pipe processing unit 325 is used to perform deterministic transfer processing. That is, the deterministic flow input pipe processing unit 325 realizes deterministic transfer processing based on normal transfer processing (the transfer processing performed by the pipe scheduling unit 324 is called normal transfer processing).
[0062] For example, in an edge node such as the network device 11 shown in FIG. 1, when the deterministic flow input pipe processing unit 325 processes a packet in the deterministic flow input queue 322, if the packet does not contain CQ queue indication information (the CQ queue indication information needs to be added to the packet by the edge node), the deterministic flow input pipe processing unit 325 may analyze a timestamp (added to the packet by the input interface unit 31 and representing the timestamp when the network device received the packet) from the packet and determine the CQ queue corresponding to the packet based on the timestamp.
[0063] When determining the CQ queue corresponding to the packet based on the timestamp, a forwarding entry (an entry for recording the correspondence between forwarding information and egress interfaces) may be queried based on forwarding information (such as a destination IP address) corresponding to the packet to obtain the egress interface corresponding to the forwarding information. Each egress interface of a network device may correspond to multiple CQ queues, indicating that packets in these CQ queues can be forwarded through these egress interfaces. Therefore, after obtaining the egress interface corresponding to the forwarding information, the multiple CQ queues corresponding to the egress interface may be determined.
[0064] For each CQ queue, the CQ queue may correspond to one scheduling period, which indicates that the packets in the CQ queue need to be transmitted within the scheduling period. Furthermore, based on the timestamp corresponding to the packet, the scheduling period corresponding to the timestamp may be selected from all scheduling periods, i.e., the timestamp may be located in the scheduling period. Then, the CQ queue corresponding to the selected scheduling period is determined, and the CQ queue is set as the CQ queue corresponding to the packet. In the subsequent process, the packet needs to be added to this CQ queue.
[0065] To determine the CQ queue corresponding to the scheduling period, a time slot table may be obtained. The time slot table includes a correspondence relationship between the scheduling period and the CQ queue. Based on this, the scheduling period corresponding to the timestamp may be obtained, and then the time slot table may be queried based on the scheduling period to obtain the CQ queue corresponding to the scheduling period.
[0066] Thus, in the edge node, the deterministic flow input pipe processing unit 325 may obtain a CQ queue corresponding to a packet, and add CQ queue information, for example a queue identifier, corresponding to the CQ queue to the packet.
[0067] For edge nodes, the CQ queue of the packet in each intermediate node (e.g., network device 12, network device 13, network device 14, etc.) may be determined, and the determination process is not limited in this specification and may refer to the operation principle of CSQF. After obtaining the CQ queue of the packet in each intermediate node, CQ queue indication information may be added to the packet, and the CQ queue indication information includes CQ queue information corresponding to the packet in each intermediate node, for example, CQ queue information of the CQ queue corresponding to the packet in network device 12, CQ queue information of the CQ queue corresponding to the packet in network device 13, and CQ queue information of the CQ queue corresponding to the packet in network device 14.
[0068] For example, in an intermediate node such as the network device 12, the network device 13, and the network device 14 shown in FIG. 1, when the deterministic flow input pipe processing unit 325 processes a packet in the deterministic flow input queue 322, the packet may include CQ queue indication information (the CQ queue indication information is added to the packet by the edge node, and for example, the CQ queue indication information may be added to the SID of SRv6, of course, this is only an example). Therefore, the CQ queue indication information may be analyzed from the packet, and the CQ queue corresponding to the CQ queue indication information may be determined. For example, for the network device 12, the CQ queue indication information may include information of the CQ queue corresponding to the packet in the network device 12. Therefore, the CQ queue corresponding to the CQ queue information may be directly determined, and this CQ queue becomes the CQ queue corresponding to the packet. In the subsequent process, the packet needs to be added to this CQ queue.
[0069] Thus, in the intermediate node, the deterministic flow input pipe processing unit 325 may obtain a CQ queue corresponding to the packet, and add CQ queue information, such as a queue identifier, corresponding to the CQ queue to the packet.
[0070] As described in the above embodiment, after a packet in the deterministic flow input queue 322 is processed by the pipe scheduling unit 324 and the deterministic flow input pipe processing unit 325, the packet may be sent to the internal switching unit 33. When the packet is sent to the internal switching unit 33, a high priority mark may be added to the packet, and the packet with the high priority mark added may be sent to the internal switching unit 33. Also, after a packet in the best effort flow input queue 323 is processed by the pipe scheduling unit 324, the packet may be sent to the internal switching unit 33. Also, when a packet is sent to the internal switching unit 33, a low priority mark may be added to the packet, and the packet with the low priority mark added may be sent to the internal switching unit 33.
[0071] Third, the internal switching unit 33. After receiving a packet with a high priority mark (i.e., a packet belonging to a deterministic flow), the internal switching unit 33 sends the packet to the output forwarding processing unit 34 based on the high priority mark, and after receiving a packet with a low priority mark (i.e., a packet belonging to a best effort flow), the internal switching unit 33 sends the packet to the output forwarding processing unit 34 based on the low priority mark.
[0072] For example, based on the high priority mark and the low priority mark, the internal switching unit 33 preferentially transmits packets marked with the high priority mark to the output transfer processing unit 34, and after the packets marked with the high priority mark are transmitted, transmits packets marked with the low priority mark to the output transfer processing unit 34.
[0073] Fourth, the output forwarding processing unit 34. After obtaining a packet, the output forwarding processing unit may store the packet in a deterministic flow input queue if the packet belongs to a deterministic flow, and may store the packet in a 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 may determine 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. Also, for each packet in the best effort flow input queue, the output forwarding processing unit 34 may perform HQOS scheduling on the packet, and store the HQOS scheduled packet in a best effort flow output queue. Here, there are a first channel and a second channel between the output interface unit 35 and the output forwarding processing unit 34. The output forwarding processing unit 34 may transmit packets in the deterministic flow output queue to the output interface unit 35 via a first channel and transmit packets in the best effort flow output queue to the output interface unit 35 via a second channel.
[0074] 5C is a structural schematic diagram of the output transfer processing unit 34. The output transfer processing unit 34 may include a flow classification unit 341, a deterministic flow input queue 342, a best effort flow input queue 343, a pipe scheduling unit 344, a deterministic flow input pipe processing unit 345, a best effort flow input pipe 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.
[0075] Here, the internal switching unit 33 may include a high-priority switching channel and a normal-priority switching channel. The internal switching unit 33 may transmit packets of a deterministic flow via the high-priority switching channel and transmit packets of a best-effort flow via the normal-priority switching channel. Based on this, when the flow 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. Also, when the flow 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.
[0076] Here, the output forwarding processing unit 34 may support multiple physical queues, and the priorities of different physical queues may be different. Based on this, the high-priority physical queue may be the deterministic flow input queue 342, and the low-priority physical queue may be the best-effort flow input queue 343. Obviously, since the deterministic flow input queue 342 uses a high-priority physical queue and the best-effort flow input queue 343 uses a low-priority physical queue, the queue priority corresponding to the deterministic flow input queue 342 is made higher than the queue priority corresponding to the best-effort flow input queue 343, thereby ensuring that packets in the deterministic flow input queue 342 are processed preferentially, i.e., ensuring that packets belonging to a deterministic flow are processed preferentially.
[0077] Here, the pipe scheduling unit 344 may forward packets in the deterministic flow input queue 342 and packets in the best effort flow input queue 343. The process of this packet forwarding process is not limited in this specification. Since the queue priority corresponding to the deterministic flow input queue 342 is higher than the queue priority corresponding to the best effort flow input queue 343, the pipe scheduling unit 344 preferentially forwards packets in the deterministic flow input queue 342, and forwards packets in the best effort flow input queue 343 after the packets in the deterministic flow input queue 342 are forwarded.
[0078] Here, the deterministic flow input pipe processing unit 345 is used to perform deterministic transfer processing. That is, the deterministic flow input pipe processing unit 345 realizes deterministic transfer processing based on normal transfer processing (the transfer processing performed by the pipe scheduling unit 344 is called normal transfer processing).
[0079] For example, for each packet in the deterministic flow input queue 342, the deterministic flow input pipe processing unit 345 may analyze 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 only an example of the encapsulation information, and the encapsulation information is not limited in this specification. For example, the MAC address of the egress interface of the own network device and the MAC address of the next hop network device may be inquired, and the MAC address of the egress interface of the own network device and the MAC address of the next hop network device may be determined as the encapsulation information.
[0080] After obtaining the encapsulation information, the deterministic flow input pipe processing unit 345 may encapsulate the packet based on the encapsulation information, for example, encapsulate CQ queue information in the outer layer of the packet, and store the encapsulated packet in the deterministic flow output queue 348. Here, after encapsulating the packet, the deterministic flow input pipe processing unit 345 may bypass the HQOS scheduling unit 347 realized for the best effort flow, that is, there is no need to use the HQOS scheduling unit 347 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 HQOS scheduled, they are not affected by best effort scheduling, and the packets in the deterministic flow input queue 342 can be quickly transferred.
[0081] Here, the best effort flow input pipe processing unit 346 is used to perform best effort-related forwarding processing. That is, the best effort-related forwarding processing is performed based on normal forwarding processing. For example, for each packet in the best effort flow input queue 343, the best effort flow input pipe processing unit 346 determines encapsulation information corresponding to the packet, such as the MAC address of the egress interface of the own network device or the MAC address of the next hop network device, encapsulates the packet based on the encapsulation information, for example, encapsulates these encapsulation information in the outer layer of the packet, and transmits the encapsulated packet to the HQOS scheduling unit 347.
[0082] Here, the HQOS scheduling unit 347 is used to perform HQOS scheduling for each packet in the best effort flow input queue 343, and this HQOS scheduling process is not limited in this specification. After completing the HQOS scheduling process for the packet, the HQOS scheduling unit 347 may store the packet in the best effort flow output queue 349.
[0083] Here, the transmit DMA 340 may read packets from the deterministic flow output queue 348 and transmit the packets in the deterministic flow output queue 348 to the output interface unit 35 via the first channel. The transmit DMA 340 may read packets from the best effort flow output queue 349 and transmit the packets in the best effort flow output queue 349 to the output interface unit 35 via the second channel. Since the packets in the deterministic flow output queue 348 and the packets in the best effort flow output queue 349 are transmitted via different channels, when congestion occurs in the output interface unit 35, only the transmission channel of the best effort flow, i.e., the second channel, can be backpressed without backpressing the transmission channel of the deterministic flow, i.e., the first channel, and delayed determinism can be strongly supported.
[0084] For example, transmit DMA 340 may preferentially read packets from deterministic flow output queue 348 and send the packets over a first channel to output interface unit 35. After all packets in deterministic flow output queue 348 have been sent, transmit DMA 340 may read packets from best effort flow output queue 349 and send the packets over a second channel to output interface unit 35.
[0085] In another example, transmit DMA 340 may read a portion of the packet from deterministic flow output queue 348 and send the packet to output interface unit 35 via a first channel. Then, transmit DMA 340 may read a portion of the packet from best effort flow output queue 349 and send the packet to output interface unit 35 via a second channel. Then, transmit DMA 340 may continue to read a portion of the packet from deterministic flow output queue 348 and send the packet to output interface unit 35 via the first channel. This continues until all packets in deterministic flow output queue 348 and best effort flow output queue 349 have been sent.
[0086] Fifth, the output interface unit 35. The output interface unit 35 may obtain a packet from the deterministic flow output queue 348, and store the packet in a CQ queue corresponding to the CQ queue information based on the CQ queue information corresponding to the packet. The output interface unit 35 may also obtain a packet from the best effort flow output queue 349, and store the packet in a best effort queue (BEQ).
[0087] For each scheduling period, the currently ongoing scheduling period is called the current scheduling period, and the output interface unit 35 determines a target CQ queue corresponding to the current scheduling period, and transmits packets in the target CQ queue to an external device in the current scheduling period. If there is still a remaining time slice in the current scheduling period after all packets in the target CQ queue are transmitted, the output interface unit 35 transmits packets in the BEQ queue to an external device in the remaining time slice of the current scheduling period. For example, the output interface unit 35 determines the length of a packet that can be transmitted in the remaining time slice, and if the length of the packet is greater than a set length (set based on experience), transmits one packet in the BEQ queue to an external device in the remaining time slice of the current scheduling period, and if the length of the packet is not greater than the set length, stops transmitting packets in the BEQ queue to an external device in the remaining time slice of the current scheduling period. Exemplarily, after transmitting one packet in the BEQ queue to an external device, the operation of updating the remaining time slice of the current scheduling period and determining the length of a packet that can be transmitted in the remaining time slice based on the updated remaining time slice may be performed again.
[0088] Exemplarily, if the number of packets in the BEQ queue is greater than the first predetermined threshold, the output interface unit 35 may further output a flow control signal for the second channel, and if the number of packets in the BEQ queue is less than the second predetermined threshold, the output interface unit 35 may cancel the flow control signal for the second channel. Here, the second predetermined threshold may be equal to or less than the first predetermined threshold, and is not limited herein. Based on this, if there is a flow control signal for the second channel, the transmission of packets via the second channel is suspended, i.e., the output forwarding processing unit 34 will no longer transmit packets in the best effort flow output queue 349 to the output interface unit 35 via the second channel. If there is no flow control signal for the second channel, the transmission of packets via the second channel is continued, i.e., the output forwarding processing unit 34 transmits packets in the best effort flow output queue 349 to the output interface unit 35.
[0089] FIG. 5D is a structural schematic diagram 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, a stream processor (SP) unit 354, and a MAC layer forwarding unit 355. The output interface unit 35 may also include a BEQ queue and a CQ queue, and the number of the BEQ queue is at least one. In FIG. 5D, one BEQ queue is taken as an example, and the number of the CQ queue is at least three. In FIG. 5D, 15 CQ queues are taken as an example. The 15 CQ queues are respectively denoted as CQ1, CQ2, ..., CQ15. When there are 15 CQ queues, there are also 15 SP units 354, and the SP units 354 correspond one-to-one to the CQ queues.
[0090] Here, when the control unit 351 obtains a packet from the first channel, i.e., when the control unit 351 obtains a packet in the deterministic flow output queue 348, it may determine that the packet belongs to a deterministic flow and send the packet to the classification unit 352. Also, when the control unit 351 obtains a packet from the second channel, i.e., when the control unit 351 obtains a packet in the best effort flow output queue 349, it may determine that the packet belongs to a best effort flow and store the packet in the BEQ queue.
[0091] Here, the BEQ queue is a best effort queue for caching packets of best effort flows. Japanese crested ibis The BEQ queue is a high watermark queue, and these packets have already been scheduled in the HQOS scheduling unit 347. In the BEQ queue, two watermarks, high and low, are designed. If the number of packets cached in the BEQ queue is higher than a set high watermark (i.e., a first predetermined threshold), a flow control signal for the second channel may be output. If the number of packets cached in the BEQ queue is lower than a set low watermark (i.e., a second predetermined threshold), the flow control signal for the second channel may be canceled.
[0092] Based on this, if there is a flow control signal for the second channel, the transmit DMA 340 will not send packets through the second channel, i.e., will not send packets in the best effort flow output queue 349 to the output interface unit 35, and thus the control unit 351 will not retrieve packets in the best effort flow output queue 349. If the flow control signal for the second channel is cancelled, the transmit DMA 340 will continue to send packets through the second channel, i.e., will send packets in the best effort flow output queue 349 to the output interface unit 35, and thus the control unit 351 can retrieve packets in the best effort flow output queue 349 and store the packets in the BEQ queue.
[0093] Here, the classification unit 352 is used to classify a packet of a deterministic flow so as to store it in one of the CQ queues CQ1 to CQ15. Since there are a total of 15 CQ queues CQ1 to CQ15, the classification unit 352 must determine which CQ queue the packet belongs to for the packet of the deterministic flow and store the packet in this CQ queue. For example, the packet has CQ queue information encapsulated therein, and the CQ queue information may be a queue identifier or the like for indicating a certain CQ queue, so the classification unit 352 may analyze the CQ queue information from the packet, determine the CQ queue corresponding to the CQ queue information, and store the packet in this CQ queue. For example, if the CQ queue information corresponds to CQ5, the packet is stored in CQ5.
[0094] Here, the period selection unit 353 periodically provides a selection signal under the control of a clock source (Clock), and the length between two adjacent selection signals is one scheduling period of the CSQF. For example, scheduling period 1 corresponds to CQ1, scheduling period 2 corresponds to CQ2, and thus scheduling period 15 corresponds to CQ15.
[0095] Based on this, if the current scheduling period is scheduling period 1, the period selection unit 353 sends a selection signal to the SP unit 354 connected to CQ1 at the start time of scheduling period 1. Upon 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 transmits the read packets to the MAC layer forwarding unit 355. The period selection unit 353 sends one new selection signal to the SP unit 354 connected to CQ1 at the end time of scheduling period 1. After receiving the selection signal, the SP unit 354 may stop transmitting packets.
[0096] When the current scheduling cycle is the scheduling cycle 2, the cycle selection unit 353 transmits a selection signal to the SP unit 354 connected to CQ2 at the start time of the scheduling cycle 2 (the start time of the scheduling cycle 2 is the end time of the scheduling cycle 1). Upon receiving the selection signal, the SP unit 354 determines that the target CQ queue corresponding to the current scheduling cycle is CQ2, reads packets from CQ2, and transmits the read packets to the MAC layer forwarding unit 355. At the end time of the scheduling cycle 2, the cycle selection unit 353 transmits one new selection signal to the SP unit 354 connected to CQ2, causing the SP unit 354 to stop transmitting packets.
[0097] In this way, in each scheduling period, the period selection unit 353 may transmit a selection signal to a certain SP unit 354, causing the SP unit 354 to transmit a packet or stop transmitting a packet based on the selection signal.
[0098] Here, the SP unit 354 is used to forward packets according to priority under the control of the selection signal, i.e., send packets in the target CQ queue first, and after all packets in the target CQ queue are sent, if there is still a time slice remaining in the current scheduling period, the SP unit 354 will send packets in the BEQ queue in the remaining time slice.
[0099] For example, assume that the current scheduling period is scheduling period n, and scheduling period n corresponds to CQn (1≦n≦15). After receiving a selection signal, the SP unit 354 connected to CQn determines the target CQ queue to be CQn, reads packets from CQn, and transmits the read packets to the MAC layer forwarding unit 355. In addition, after receiving a selection signal, the SP unit 354 may perform timing using a timer.
[0100] If there is still a remaining time slice in the current scheduling period after all packets of CQn have been transmitted, determine the length of the remaining time slice, where the length of the remaining time slice is the difference between the time length of the scheduling period and the time count of the timer. After obtaining the length of the remaining time slice, determine the length of the packet that can be transmitted in the remaining time slice.
[0101] Based on the length of one packet in the BEQ queue, a set length may be preset, for example, 9600 bytes, where 9600 bytes represents the specified length of the packet. Based on this, if the length of the packet that can be transmitted in the remaining time slice is greater than the set length, the SP unit 354 reads the packet from the BEQ queue in the remaining time slice of the current scheduling period, and transmits the read packet to the MAC layer forwarding unit 355. If the length of the packet that can be transmitted in the remaining time slice is not greater than the set length, the SP unit 354 does not transmit the packet in the BEQ queue in the remaining time slice of the current scheduling period.
[0102] After reading one packet from the BEQ queue and sending the read packet to the MAC layer forwarding unit 355, if the length of the packet that can be transmitted in the remaining time slice of the current scheduling period is still greater than the set length, the SP unit 354 continues to read one packet from the BEQ queue in the remaining time slice of the current scheduling period and sends the read packet to the MAC layer forwarding unit 355. The same applies thereafter.
[0103] Assuming that scheduling period 1 corresponds to CQ1, in scheduling period 1, a packet is obtained from CQ1 and transmitted. When all packets in CQ1 are transmitted, the remaining time slice is calculated based on the time length of the scheduling period and the value of the timer. If one packet of the length set in the remaining time slice (e.g., 9600 bytes) can be transmitted, one packet is obtained from the BEQ queue and transmitted, otherwise, no packet is transmitted in scheduling period 1 and the next scheduling period, i.e., scheduling period 2, is waited for. Assuming that scheduling period 2 corresponds to CQ2, in scheduling period 2, a packet is obtained from CQ2 and transmitted. When all packets in CQ2 are transmitted, the remaining time slice is calculated based on the time length of the scheduling period and the value of the timer. If one packet of the length set in the remaining time slice can be transmitted, one packet is obtained from the BEQ queue and transmitted, otherwise, no packet is transmitted in scheduling period 2 and the next scheduling period is waited for. The same applies to the following.
[0104] As an example, if packets in CQn are currently being transmitted and the remaining time slices of the current scheduling period are not sufficient to transmit all packets in CQn, then after the current scheduling period ends, packets in CQn may continue to be transmitted until all packets in CQn have been transmitted, and then packets in the next CQ may be transmitted.
[0105] Illustratively, for each SP unit 354, SP scheduling may be implemented in a simplified manner rather than a frame preemption scheduling manner. Of course, SP scheduling may also be performed in a frame preemption scheduling manner, and will not be repeated here.
[0106] Here, the MAC layer forwarding unit 355 is used to receive a packet and then send the packet to an external device, for example, when a packet in a CQ queue is received, the packet in the CQ queue is sent to an external device, and when a packet in a BEQ queue is received, the packet in the BEQ queue is sent to an external device.
[0107] As can be seen from the above technical solutions, the embodiment of the present invention can ensure that the forwarding of the deterministic flow is not affected by the forwarding of the best-effort flow, and the forwarding of the best-effort flow and the forwarding of the deterministic flow are compatible. Based on the CSQF, the packet transmission of the wide-area deterministic network and the coexistence of the deterministic flow and the best-effort flow are realized, which promotes the full integration of the common network and the common path full service. When the reserved bandwidth of the deterministic flow is not used by the deterministic flow, it can be used by the best-effort flow, and when congestion occurs, the congestion situation can be resolved by controlling the number of the best-effort flows without affecting the deterministic flow. The HQOS scheduling of the best-effort flow is maintained, but the HQOS scheduling of the deterministic flow is not performed. The deterministic flow can be restricted from being transmitted on the SR or SRv6, and the deterministic flow may be an IP data flow. The deterministic flow is identified as soon as possible at the front end of the receiving side of the network device, and an independent data pipe or passage is established in the network device so that the deterministic flow is not affected by the best-effort flow.
[0108] An embodiment of the present invention provides a packet transmission method applied to a network device. The network device may include an output forwarding processing unit and an output interface unit. Figure 6 is a flowchart of a packet transmission method according to an embodiment of the present invention. The method may include steps 601-603. In step 601, after obtaining a packet, the output forwarding processing unit stores the packet in a deterministic flow input queue if the packet belongs to a deterministic flow, and for each packet in the deterministic flow input queue, determines encapsulation information corresponding to the packet, where the encapsulation information includes at least CQ queue information, encapsulates the packet based on the encapsulation information, and stores the encapsulated packet in a deterministic flow output queue. In step 602, the output interface unit retrieves a packet from the deterministic flow output queue, and, based on the CQ queue information corresponding to the packet, stores the packet in the CQ queue corresponding to the CQ queue information. In step 603, the output interface unit determines a target CQ queue corresponding to the current scheduling period, and transmits packets in the target CQ queue to an external device in the current scheduling period.
[0109] In one possible embodiment, after the output forwarding processing unit obtains a packet, if the packet belongs to a best effort flow, it stores the packet in a best effort flow input queue, and for each packet in the best effort flow input queue, it performs HQOS scheduling on the packet, and stores the HQOS scheduled packet in a best effort flow output queue. The output interface unit obtains a packet from the best effort flow output queue, and stores the packet in a BEQ queue. Based on this, after the output interface unit transmits the packet in the target CQ queue to an external device in 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 are transmitted, the output interface unit transmits the packet in the BEQ queue to an external device in the remaining time slice of the current scheduling period.
[0110] In one possible embodiment, the network device further includes an input forwarding processing unit, and after acquiring 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 stores the packet 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 preferentially processes the packet in the deterministic flow input queue. When the input forwarding processing unit processes the packet in the deterministic flow input queue, if the packet includes CQ queue indication information, the input forwarding processing unit determines a CQ queue corresponding to the CQ queue indication information, and if the packet does not include CQ queue indication information, the input forwarding processing unit determines a CQ queue corresponding to the packet based on a timestamp corresponding to the packet. The timestamp represents a timestamp when the network device receives the packet. The input forwarding processing unit adds CQ queue information corresponding to the CQ queue to the packet and sends the packet to the output forwarding processing unit, so that the output forwarding processing unit acquires the packet.
[0111] Exemplarily, the network device further includes an internal switching unit, when the input forwarding processing unit sends a packet in the deterministic flow input queue to the output forwarding processing unit, the internal switching unit sends the packet to the output forwarding processing unit based on the high priority mark by adding a high priority mark to the packet and sending the packet to the internal switching unit, when the input forwarding processing unit sends a packet in the best effort flow input queue to the output forwarding processing unit, the internal switching unit sends the packet to the output forwarding processing unit based on the low priority mark by adding a low priority mark to the packet and sending the packet to the internal switching unit.
[0112] In one possible embodiment, 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, and if the packet belongs to the deterministic flow, stores the packet in a deterministic flow output queue, and if the packet belongs to the best-effort flow, stores the packet in a best-effort flow output queue. The input interface unit sends the packet in the deterministic flow output queue to the input forwarding processing unit via a third channel, so that the input forwarding processing unit obtains the packet from the third channel. Here, the input forwarding processing unit determines that the packet obtained from the third channel belongs to the deterministic flow. The input interface unit sends the packet in the best-effort flow output queue to the input forwarding processing unit via a fourth channel, so that the input forwarding processing unit obtains the packet from the fourth channel. Here, the input forwarding processing unit determines that the packet obtained from the fourth channel belongs to the best-effort flow.
[0113] In an embodiment of the present invention, a network device is provided, the network device includes an output forwarding processing unit and an output interface unit. After obtaining a packet, the output forwarding processing unit is used to store the packet in a deterministic flow input queue if the packet belongs to a deterministic flow, and for each packet in the deterministic flow input queue, determine 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. The output interface unit is used to obtain a packet from the deterministic flow output queue, and based on the CQ queue information corresponding to the packet, store the packet in a CQ queue corresponding to the CQ queue information. The output interface unit is used to determine a target CQ queue corresponding to a current scheduling period, and send the packet in the target CQ queue to an external device in the current scheduling period.
[0114] In one possible embodiment, the output forwarding processing unit is further used for, after obtaining a packet, storing the packet in a best effort flow input queue if the packet belongs to a best effort flow, and for each packet in the best effort flow input queue, performing HQOS scheduling on the packet, and storing the HQOS scheduled packet in a best effort flow output queue. The output interface unit is further used for obtaining packets from the best effort flow output queue and storing the packets in a BEQ queue. After transmitting the packets in the target CQ queue to an external device in the current scheduling period, the output interface unit is further used for transmitting the packets in the BEQ queue to an external device in the remaining time slice of the current scheduling period if there is still a remaining time slice in the current scheduling period after all packets in the target CQ queue are transmitted.
[0115] Exemplarily, the network device further includes an input forwarding processing unit. After acquiring a packet, the input forwarding processing unit is used to store the packet in a deterministic flow input queue if the packet belongs to a deterministic flow, and to store the packet 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 preferentially processes the packet in the deterministic flow input queue. When processing a packet in the deterministic flow input queue, the input forwarding processing unit is further used to determine a CQ queue corresponding to the CQ queue indication information if the packet includes CQ queue indication information, and to determine a CQ queue corresponding to the packet based on a timestamp corresponding to the packet if the packet does not include CQ queue indication information. The timestamp represents a timestamp when the network device receives the packet. The input forwarding processing unit is further used for the output forwarding processing unit to acquire the packet by adding CQ queue information corresponding to the CQ queue to the packet and sending the packet to the output forwarding processing unit.
[0116] Exemplarily, the network device further includes an input interface unit. The input interface unit is used to receive a packet from an external device, and then determine whether the packet belongs to a deterministic flow or a best-effort flow, and if the packet belongs to the deterministic flow, store the packet in a deterministic flow output queue, and if the packet belongs to the best-effort flow, store the packet in a best-effort flow output queue. The input interface unit is used to send the packet in the deterministic flow output queue to the input forwarding processing unit via a third channel, so that the input forwarding processing unit acquires the packet from the third channel. Here, the input forwarding processing unit determines that the packet acquired from the third channel belongs to the deterministic flow. The input interface unit is used to send the packet in the best-effort flow output queue to the input forwarding processing unit via a fourth channel, so that the input forwarding processing unit acquires the packet from the fourth channel. Here, the input forwarding processing unit determines that the packet acquired from the fourth channel belongs to the best-effort flow.
[0117] The system, device, module or unit described in the above embodiments may be specifically realized by a computer chip, an entity, or a product having some function. A typical realizing device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a mobile phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, a game console, a tablet, a wearable device, or any combination of these devices.
[0118] For the sake of convenience, the above-mentioned device will be described by dividing it into various units according to their functions. Of course, when implementing the present invention, the functions of each unit can be realized by the same or multiple pieces of software and / or hardware.
[0119] As will be appreciated by those skilled in the art, embodiments of the present invention may be provided as a method, a system, or a computer program product. Thus, the present invention may employ an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware. Furthermore, embodiments of the present invention may take the form of a computer program product embodied in one or more computer usable storage media (including, but not limited to, magnetic disk memory, CD-ROM, optical memory, etc.) that contain computer usable program code.
[0120] The present invention will be described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, may be realized by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, whereby the instructions executed by the processor of the computer or other programmable data processing device generate an apparatus for implementing the functions specified in one or more flows of the flowcharts and / or one or more blocks of the block diagrams.
[0121] These computer program instructions may also be stored in a computer-readable memory that can instruct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture that includes an instruction apparatus for implementing the functions specified in one or more flows of the flowcharts and / or one or more blocks of the block diagrams.
[0122] These computer program instructions may be loaded into a computer or other programmable data processing device such that a series of operational steps are executed on the computer or other programmable device to generate a computer-implemented process, whereby the instructions executing on the computer or other programmable device provide steps for implementing the functions specified in one or more flows of the flowcharts and / or one or more blocks of the block diagrams.
[0123] The above is merely an embodiment of the present invention, and is not intended to limit the present invention. For those skilled in the art, the present invention is susceptible to various modifications and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A packet transmission method based on CSQF (Cycle Specified Queuing and Forwarding) applied to a network device, the network device including at least an output forwarding processing unit and an output interface unit; After the output forwarding processing unit obtains a packet, if the packet belongs to a deterministic flow, storing the packet in a deterministic flow input queue, and for each packet in the deterministic flow input queue, determining encapsulation information corresponding to the packet, encapsulating the packet according to the encapsulation information, and storing the encapsulated packet in a deterministic flow output queue, where the encapsulation information includes at least periodic queue (CQ) information; the output interface unit obtaining a packet from the deterministic flow output queue, and storing the packet in a CQ queue corresponding to the CQ queue information based on the CQ queue information corresponding to the packet; the output interface unit determining a target CQ queue corresponding to a current scheduling period, and transmitting packets in the target CQ queue to an external device in the current scheduling period; After the output forwarding processing unit obtains a packet, if the packet belongs to a best effort flow, storing the packet in a best effort flow input queue, and for each packet in the best effort flow input queue, performing Hierarchical Quality of Service (HQOS) scheduling on the packet, and storing the HQOS scheduled packet in a best effort flow output queue; the output interface unit taking packets from the best effort flow output queue and storing the packets in a best effort cache queue (BEQ queue); after the output interface unit transmits packets in the target CQ queue to an external device in the current scheduling period, if there is still a time slice remaining in the current scheduling period after the transmission of the packets in the target CQ queue is completed, the output interface unit transmits the packets in the BEQ queue to an external device in the remaining time slice of the current scheduling period; A packet transmission method comprising:
2. a first channel and a second channel between the output interface unit and the output transfer processing unit; the step of the output interface unit obtaining a packet from the deterministic flow output queue includes the step of the output interface unit obtaining a packet from the deterministic flow output queue via the first channel; the step of the output interface unit obtaining a packet from the best effort flow output queue includes the step of the output interface unit obtaining a packet from the best effort flow output queue via the second channel; wherein, when the number of packets in the BEQ queue is greater than a first predetermined 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 predetermined threshold, the output interface unit cancels the flow control signal for the second channel; and when there is a flow control signal for the second channel, transmission of packets via the second channel is suspended; the second predetermined threshold is equal to or less than the first predetermined threshold; 2. The method of claim 1 .
3. The step of transmitting packets in the BEQ queue to an external device by the output interface unit during a remaining time slice of the current scheduling period, comprising: the output interface unit determines a length of a packet that can be transmitted in the remaining time slice, and if the length of the packet is greater than a set length, transmits one packet in the BEQ queue to an external device in the remaining time slice of the current scheduling period, and if the length of the packet is not greater than a set length, stops transmitting packets in the BEQ queue to an external device in the remaining time slice of the current scheduling period; after transmitting one packet in the BEQ queue to an external device, updating a remaining time slice of the current scheduling period and returning to perform operations to determine a length of a packet that can be transmitted in the updated remaining time slice.
2. The method of claim 1 .
4. The network device further includes an input forwarding processing unit, and the method further comprises: After the input transfer processing unit obtains a packet, if the packet belongs to a deterministic flow, the input transfer processing unit stores the packet in a deterministic flow input queue, and if the packet belongs to a best effort flow, the input transfer processing unit stores the packet in a best effort flow input queue, where a queue priority corresponding to the deterministic flow input queue is higher than a queue priority corresponding to the best effort flow input queue, so that the input transfer processing unit preferentially processes the packets in the deterministic flow input queue; When the input forwarding processing unit processes a packet in the deterministic flow input queue, if the packet includes CQ queue indication information, determining a CQ queue corresponding to the CQ queue indication information, and if the packet does not include CQ queue indication information, determining a CQ queue corresponding to the packet based on a timestamp corresponding to the packet, the timestamp representing a timestamp when the network device receives the packet; adding CQ queue information corresponding to the CQ queue to the packet and sending the packet to an output transfer processing unit, thereby causing the output transfer processing unit to acquire the packet; The method according to any one of claims 1 to 3.
5. The step of the input forwarding processing unit determining a CQ queue corresponding to the packet based on a timestamp corresponding to the packet, the input forwarding processing unit queries an egress interface based on forwarding information corresponding to the packet, and determines a number of CQ queues corresponding to the egress interface, each CQ queue having a corresponding scheduling period; The input transfer processing unit selects a scheduling period corresponding to the timestamp from among all scheduling periods based on a timestamp corresponding to the packet, and determines a CQ queue corresponding to the scheduling period.
5. The method of claim 4.
6. The network device further includes an internal switching unit, and the method further comprises: when the input transfer processing unit transmits a packet in the deterministic flow input queue to an output transfer processing unit, the input transfer processing unit adds a high priority mark to the packet and transmits the packet to the internal switching unit, thereby causing the internal switching unit to transmit the packet to the output transfer processing unit based on the high priority mark; When the input transfer processing unit transmits a packet in the best effort flow input queue to an output transfer processing unit, the input transfer processing unit adds a low priority mark to the packet and transmits the packet to the internal switching unit, thereby causing the internal switching unit to transmit the packet to the output transfer processing unit based on the low priority mark.
5. The method of claim 4.
7. The network device further includes an input interface unit; a third channel and a fourth channel are between the input interface unit and the input transfer processing unit; The method further comprises: After the input interface unit receives a packet from an external device, determining whether the packet belongs to a deterministic flow or a best-effort flow, and if the packet belongs to a deterministic flow, storing the packet in a deterministic flow output queue, and if the packet belongs to a best-effort flow, storing the packet in a best-effort flow output queue; the input interface unit sending a packet in a deterministic flow output queue to the input forwarding processing unit via the third channel, thereby causing the input forwarding processing unit to retrieve the packet from the third channel, the input forwarding processing unit determining that the packet retrieved from the third channel belongs to a deterministic flow; the input interface unit sending a packet in a best effort flow output queue to the input transfer processing unit via the fourth channel, thereby causing the input transfer processing unit to retrieve the packet from the fourth channel, the input transfer processing unit determining that the packet retrieved from the fourth channel belongs to a best effort flow; 5. The method of claim 4.
8. The step of the input interface unit determining whether the packet belongs to a deterministic flow or a best effort flow comprises: The input interface unit analyzes flow characteristics from the packet, and if the flow characteristics match the deterministic flow characteristics in a configured access control list (ACL), determines that the packet belongs to a deterministic flow, and if the flow characteristics do not match the deterministic flow characteristics in the ACL, determines that the packet belongs to a best effort flow; The ACL includes at least one deterministic flow feature.
8. The method of claim 7.
9. The step of the input interface unit transmitting packets in a deterministic flow output queue to the input forwarding processing unit via the third channel and transmitting packets in a best effort flow output queue to the input forwarding processing unit via the fourth channel comprises: the input interface unit preferentially retrieving packets from the deterministic flow output queue and transmitting the retrieved packets to the input forwarding processing unit via the third channel; after all packets in the deterministic flow output queue have been retrieved, retrieving packets from the best effort flow output queue and sending the retrieved packets to the input forwarding processing unit via the fourth channel; 8. The method of claim 7.
10. A network device, the network device including an output forwarding processing unit and an output interface unit, After the output forwarding processing unit obtains a packet, if the packet belongs to a deterministic flow, the output forwarding processing unit stores the packet in a deterministic flow input queue, and for each packet in the deterministic flow input queue, determines encapsulation information corresponding to the packet, encapsulates the packet according to the encapsulation information, and stores the encapsulated packet in a deterministic flow output queue, where the encapsulation information includes at least periodic queue (CQ queue) information; The output forwarding processing unit is further used for: after obtaining a packet, if the packet belongs to a best effort flow, storing the packet in a best effort flow input queue; for each packet in the best effort flow input queue, performing Hierarchical Quality of Service (HQOS) scheduling on the packet; and storing the HQOS scheduled packet in a best effort flow output queue; The output interface unit is used to obtain a packet from the deterministic flow output queue, and store the packet in a CQ queue corresponding to the CQ queue information based on the CQ queue information corresponding to the packet; The output interface unit determines a target CQ queue corresponding to a current scheduling period, and is used to transmit packets in the target CQ queue to an external device in the current scheduling period; the output interface unit is further used for taking packets from the best effort flow output queue and storing the packets in a best effort queue (BEQ queue); after the output interface unit transmits packets in the target CQ queue to an external device in the current scheduling period, If there are still remaining time slices in the current scheduling period after the transmission of the packets in the target CQ queue is completed, the remaining time slices in the current scheduling period are used to transmit the packets in the BEQ queue to an external device; A network device comprising:
11. The network device further includes an input forwarding processing unit; After the input forwarding processing unit obtains a packet, if the packet belongs to a deterministic flow, the input forwarding processing unit is used to store the packet in a deterministic flow input queue, and if the packet belongs to a best effort flow, the input forwarding processing unit is used to store the packet in a best effort flow input queue, where a queue priority corresponding to the deterministic flow input queue is higher than a queue priority corresponding to the best effort flow input queue, so that the input forwarding processing unit preferentially processes the packets in the deterministic flow input queue; The input forwarding processing unit is further used, when processing a packet in the deterministic flow input queue, to determine a CQ queue corresponding to the CQ queue indication information if the packet includes CQ queue indication information, and to determine a CQ queue corresponding to the packet based on a timestamp corresponding to the packet if the packet does not include CQ queue indication information, where the timestamp represents a timestamp when the network device receives the packet; The input forwarding processing unit is further used to add CQ queue information corresponding to the CQ queue to the packet, and send the packet to an output forwarding processing unit, thereby causing the output forwarding processing unit to obtain the packet. The network device of claim 10 .
12. When the input forwarding processing unit determines a CQ queue corresponding to the packet based on a timestamp corresponding to the packet, Query an egress interface based on forwarding information corresponding to the packet, and determine a number of CQ queues corresponding to the egress interface, where each CQ queue has a corresponding scheduling period; A scheduling period corresponding to the timestamp of the packet is selected from among all scheduling periods, and the selected scheduling period is used to determine a CQ queue corresponding to the scheduling period. The network device of claim 11 .
13. The network device further includes an input interface unit; a third channel and a fourth channel are between the input interface unit and the input transfer processing unit; The input interface unit is used for, after receiving a packet from an external device, judging whether the packet belongs to a deterministic flow or a best-effort flow, and if the packet belongs to a deterministic flow, storing the packet in a deterministic flow output queue, and if the packet belongs to a best-effort flow, storing the packet in a best-effort flow output queue; The input interface unit is used to send packets in a deterministic flow output queue to the input forwarding processing unit via the third channel, thereby causing the input forwarding processing unit to retrieve the packets from the third channel, where the input forwarding processing unit determines that the packets retrieved from the third channel belong to a deterministic flow; the input interface unit is used to send a packet in a best effort flow output queue to the input forwarding processing unit via the fourth channel, thereby causing the input forwarding processing unit to retrieve the packet from the fourth channel, and the input forwarding processing unit determines that the packet retrieved from the fourth channel belongs to a best effort flow; The network device of claim 11 .
Citation Information
Patent Citations
Base station, method of radio communication, and base transmitter
JP2006157323A
Quality of service scheduler for wireless networks
JP2007512783A
Advanced network tracing in the data plane
US20200044931A1
Deterministic packet scheduling and DMA for time sensitive networking
US20210014177A1
Control device, switch device and methods
WO2021014180A1