A data packet transmission method and network device

CN122122876APending Publication Date: 2026-05-29NEW H3C TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2024-09-27
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies cannot achieve deterministic transmission in wide area networks and require clock synchronization between nodes, resulting in jitter that cannot be eliminated and thus failing to meet the needs of some applications.

Method used

By using CSQF in conjunction with SR or SRv6, the target scheduling period of the tail node is determined by the head node, which reduces jitter when data packets are transmitted across multiple network devices and enables deterministic transmission under cross-domain asynchronous clock.

Benefits of technology

It achieves deterministic transmission over wide area networks, reduces jitter, supports PREOCF functionality, and boasts high scalability and high precision, driving the large-scale deployment of DetNet.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122122876A_ABST
    Figure CN122122876A_ABST
Patent Text Reader

Abstract

The application provides a data packet transmission method and network equipment. The method comprises the following steps: an input interface unit determines a receiving timestamp of a first data packet, and adds the receiving timestamp to metadata of the first data packet; a classification analysis control unit adds a local flow identifier of the first data packet to the metadata; an input deterministic processing unit obtains the receiving timestamp and the local flow identifier from the metadata, obtains a time delay value corresponding to the local flow identifier, and converts the receiving timestamp into a receiving scheduling period; a target scheduling period is determined based on the receiving scheduling period and the time delay value; a forwarding unit encapsulates a segment routing header for the first data packet to obtain a second data packet, the segment routing header comprising the target scheduling period; and the second data packet is sent to a tail end node, and the tail end node stores the second data packet in a queue corresponding to the target scheduling period, and schedules data packets in the queue at the target scheduling period. Through the application, cross-node deterministic transmission is supported, and clock synchronization between nodes is not required.
Need to check novelty before this filing date? Find Prior Art

Description

Data packet transmission method and network device TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a data packet transmission method and a network device. BACKGROUND

[0002] DetNet (Deterministic Network) can provide accurate and predictable network performance within a network domain, which can include latency, packet loss rate, etc. TSN (Time Sensitive Networking) is a deterministic network implemented based on a local area network. In TSN, CQF (Cyclic Queuing and Forwarding) is used to ensure deterministic transmission at the forwarding layer, thereby providing accurate and predictable network performance within a network domain.

[0003] For ease of description, the data stream transmitted in the deterministic network is referred to as a deterministic stream. For other data streams different from the deterministic stream, they can be forwarded in a best effort manner, which are referred to as best effort streams.

[0004] SUMMARY

[0005] The present application provides a data packet transmission method applied to a network device, wherein the network device comprises an input interface unit, a classification analysis control unit, an input deterministic processing unit and a forwarding unit. The method comprises the following steps:

[0006] When the network device is a head-end node in a deterministic network, the input interface unit determines a receiving timestamp of a first data packet after receiving the first data packet, and adds the receiving timestamp to metadata of the first data packet.

[0007] The classification analysis control unit adds a local stream identifier of the first data packet to the metadata.

[0008] The input deterministic processing unit acquires the receiving timestamp and the local stream identifier from the metadata, acquires a time delay value corresponding to the local stream identifier, converts the receiving timestamp into a receiving scheduling period, and determines a target scheduling period based on the receiving scheduling period and the time delay value.

[0009] The forwarding unit encapsulates a segment routing header for the first data packet to obtain a second data packet, wherein the segment routing header comprises the target scheduling period, and sends the second data packet to a tail-end node in the deterministic network, so that the tail-end node stores the second data packet in a queue corresponding to the target scheduling period, and schedules data packets in the queue at the target scheduling period.

[0010] The application provides a network device, comprising: an input interface unit, a classification analysis control unit, an input deterministic processing unit and a forwarding unit, wherein:

[0011] When the network device is a head-end node in a deterministic network, the input interface unit is configured to determine a receiving timestamp of a first data packet after receiving the first data packet, and add the receiving timestamp to metadata of the first data packet;

[0012] The classification analysis control unit is configured to add a local flow identifier of the first data packet to the metadata;

[0013] The input deterministic processing unit is configured to obtain the receiving timestamp and the local flow identifier from the metadata, obtain a time delay value corresponding to the local flow identifier, convert the receiving timestamp into a receiving scheduling period, and determine a target scheduling period based on the receiving scheduling period and the time delay value;

[0014] The forwarding unit is configured to encapsulate a segment routing header for the first data packet to obtain a second data packet, the segment routing header comprising the target scheduling period, and send the second data packet to a tail-end node in the deterministic network, so that the tail-end node stores the second data packet in a queue corresponding to the target scheduling period, and schedules data packets in the queue at the target scheduling period.

[0015] As can be seen from the above technical solutions, in the embodiments of the application, a centralized transmission implementation method for a deterministic network (such as a wide-area deterministic network) is provided, which has flexible programmable capability, high scalability, can flexibly identify deterministic flows, and meets the expansion needs of DetNet. The method can support PREOCF (a collective name for Packet Replication, Elimination, Ordering and Compensation Functions, packet replication, packet duplication deletion, ordering and time delay compensation) implementation, support cross-node deterministic transmission, and does not need to perform clock synchronization between nodes (or between domains), thereby realizing deterministic transmission of a large-scale deterministic network under asynchronous clocks across domains. The method can provide high-precision indexes and has high scalability, which helps to promote large-scale landing of DetNet and ensure correct implementation of DetNet. BRIEF DESCRIPTION OF DRAWINGS

[0016] FIG. 1 is a schematic diagram of the working principle of a CSQF in an example of the application;

[0017] FIG. 2 is a comparative schematic diagram of a CSQF and a CQF in an example of the application;

[0018] Fig. 3 is a schematic diagram of the structure of a network device in one example of the present application;

[0019] Fig. 4 is a schematic diagram of the structure of a network device in one example of the present application;

[0020] Fig. 5A is a schematic diagram of the structure of an input deterministic processing unit in one example of the present application;

[0021] Fig. 5B is a schematic diagram of the data structure of a deterministic flow configuration data table in one example of the present application;

[0022] Fig. 5C is a schematic diagram of the processing procedure of an IDPP submodule in one example of the present application;

[0023] Fig. 5D is a schematic diagram of the processing of a PRF submodule and a PEF submodule in one example of the present application;

[0024] Fig. 5E is a schematic diagram of the processing of an output deterministic processing unit in one example of the present application;

[0025] Fig. 5F is a schematic diagram of the data transfer between two adjacent units in one example of the present application;

[0026] Fig. 6A is a schematic diagram of a network device as a head-end node in one example of the present application;

[0027] Fig. 6B is a schematic diagram of a network device as a tail-end node in one example of the present application;

[0028] Fig. 7 is a schematic diagram of the flow of a data packet transmission method in one example of the present application. DETAILED DESCRIPTION

[0029] TSN is a deterministic network based on a local area network, in which CQF is used to ensure deterministic transmission at the forwarding layer. CQF is only an example of providing deterministic transmission, and other ways can also be used to ensure deterministic transmission at the forwarding layer, which is not limited. As a technology close to CSQF (Cycle Specified Queuing and Forwarding), the basic working principle of CQF can include: each network device is associated with two queues at the outgoing interface, and the time domain is divided into two cycles, and the two queues alternately send and receive in the two cycles. For example, the two queues can be denoted as queue Q1 and queue Q2, and the two cycles can be denoted as T0 cycle and T1 cycle, in the T0 cycle, queue Q1 sends and queue Q2 receives (queue Q1 receives off, queue Q2 receives on, queue Q1 sends on, and queue Q2 sends off), in the T1 cycle, queue Q1 receives and queue Q2 sends, and so on. In this way, queue Q1 and queue Q2 can alternately send and receive in the odd and even cycles.

[0030] CQF requires transmission of one cycle at each hop, a data packet is received in a cycle at a network device, and is sent out in the next cycle, and the next network device receives the data packet in the next cycle, and so on. In this way, when the cycle T is a determined value, the transmission delay of the data 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 of the transmission delay is (H+1)*T, H is the number of hops, representing the total number of network devices on the path.

[0031] Since CQF is a technology based on a local area network, it cannot be implemented in a wide area network. In order to realize deterministic transmission in a wide area network, CSQF is proposed based on CQF, which combines SR (Segment Routing) application or SRv6 application to realize deterministic transmission in a wide area network. SR is SR based on MPLS (Multi-Protocol Label Switching), and SRv6 can be SRv6 based on IPV6.

[0032] Referring to FIG. 1, a schematic diagram of working principle of CSQF is shown. The controller 10 is configured to collect information of each network device, such as sending capability, interface, cycle number, maximum jitter in node, etc. For the deterministic transmission requirement between the sender and the receiver, the controller 10 calculates and finds that there is enough transmission resource, then allocates the transmission path and sends the information of the transmission path to the edge node. Referring to 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.

[0033] After the network device 11 receives the packet to be forwarded, the network device 11 adds the information of each network device in the transmission path in the packet, such as the node identifier (e.g. Locator in SRv6 SID (Segment identifier)) of the network device in the path, the sending interface of the network device, and the cycle to be sent in the network device. In this way, when the packet arrives at a network device, the network device takes out the corresponding interface and cycle information and stores the packet in the queue corresponding to the cycle.

[0034] For each network device, the packet in each queue can be sent according to a certain cycle, i.e. each queue corresponds to a cycle, and the packet in the queue can be sent in the cycle. Since the cycle of the network device is in a fixed mode, the specified cycle of each packet of the sender in the network device 11 is unchanged, and the cycle of the packet of the sender to the receiver forwarded by each network device is determined, so the entire time delay is also determined, thereby realizing deterministic transmission.

[0035] As can be seen from the above, the implementation process of CSQF and CQF is similar, and the difference between CSQF and CQF can be that CSQF needs at least 3 queues (e.g. 3, 6, 8, 9, 10, 12, 15 queues, etc., and 15 queues are taken as an example hereinafter), and only one queue is in the sending state in each cycle, while the other queues are in the receiving state. For CQF, the cycle of each network device needs to be strictly synchronized, including phase synchronization. For CSQF, only the frequency synchronization of the cycle is required, and phase synchronization is not required. Meanwhile, for the case that the transmission time delay of a hop cannot be completed in one cycle, the queue for transmission in the next cycle can be specified, and in this way, the transmission time delay of different network devices in a wide area network can be adapted.

[0036] Referring to Fig. 2, a comparison diagram of CSQF and CQF is shown. For CQF, for the transmission process of a certain data packet, network device 11 sends the data packet in period 1, network device 12 receives the data packet in period 1, and network device 12 sends the data packet in period 2, network device 13 receives the data packet in period 2, and network device 13 sends the data packet in period 3, network device 14 receives the data packet in period 3, and network device 14 sends the data packet in period 4. For CSQF, taking 3 queues as an example, for the transmission process of a certain data packet, network device 11 sends the data packet in period 1, network device 12 receives the data packet in period 1 or period 2, and network device 12 sends the data packet in period 3, network device 13 receives the data packet in period 3, and network device 13 sends the data packet in period 4, network device 14 receives the data packet in period 4 or period 5, and network device 14 sends the data packet in period 6.

[0037] In the implementation of CSQF, the entire time delay of the data packet can be guaranteed, because each network device divides the time slice with a fixed length as a period, and uniformly schedules the deterministic data flow to be forwarded in the determined time slice. At each network device on the transmission path, the sending time is limited in a specific time slice, so that the time delay jitter of the data packet at the network device is determined, regardless of the number of network devices. The jitter of the previous network device does not increase the jitter delay of the following network device. Of course, when the total number of network devices increases, the total forwarding delay also increases.

[0038] For the last network device, the data packet is only received and sent in a determined time slice, that is, the jitter range of the data packet at the last network device is limited in a determined time slice.

[0039] Although CSQF can realize deterministic transmission of a wide area network, because the data packet needs to cross multiple network devices, clock synchronization needs to be performed at all network devices in the deterministic network. In addition, when the data packet is transmitted across multiple network devices, jitter is generated, which exists in various aspects: jitter is generated when the network device implements flow admission control, jitter is generated when queuing and forwarding in the deterministic domain, and jitter is generated when flow aggregation. However, jitter cannot be eliminated by the forwarding mechanism of CSQF, and the jitter generated by various factors is accumulated, which cannot meet the requirements of some applications.

[0040] For the above finding, the embodiment of the present application proposes a data packet transmission method, which can be applied to a network device (also referred to as a network node, and the network device is a device in a deterministic network). The method can support cross-node deterministic transmission without the need for clock synchronization between nodes (or domains), thereby realizing deterministic transmission under asynchronous clock across domains in a large-scale deterministic network. By determining the target scheduling period of the tail-end node at the head-end node, the target scheduling period of the tail-end node can be determined at the head-end node, thereby reducing the jitter when the data packet is transmitted across multiple network devices.

[0041] Referring to FIG. 3, a structure diagram of a network device is shown. The network device can include a control unit (CU) and a management unit. The control unit cooperates with the management unit to complete the control and management required for deterministic network transmission. The function of the control unit is not limited, and the management unit is described below.

[0042] Referring to FIG. 3, the management unit can include, but is not limited to, the following sub-units: an input interface unit (IIF), a classification and parsing control unit (CPAS), an input deterministic processing unit (IDP), a forwarding unit (FWD), a queue management unit (QM), an output deterministic processing unit (EDP), a best-effort flow (BF) scheduling unit, an output interface unit (OIF), and a clock distribution unit (CD).

[0043] In one example, the network device can serve as a head-end node, the network device can also serve as an intermediate node, and the network device can also serve as a tail-end node. When the network device serves as different nodes, the functions of the sub-units are different, but the network structure shown in FIG. 3 is used for different nodes.

[0044] Referring to Fig. 4, it is a structural diagram of the network device. The control unit is realized by CPU (Central Processing Unit) and RAM (Random Access Memory). The management unit is realized by FPGA (Field Programmable Gate Array), TCAM (Ternary Content Addressable Memory) and RAM. The input interface unit, classification analysis control unit, input deterministic processing unit, forwarding unit, queue management unit, output deterministic processing unit, best effort flow scheduling unit, output interface unit and clock distribution unit are realized by FPGA. Of course, FPGA can be replaced by ASIC (Application Specific Integrated Circuit) or other devices (such as NP), without limitation.

[0045] The first input interface unit is used to receive the first data packet from the line (indicated by ① in Fig. 3). After receiving the first data packet, the receiving time stamp of the first data packet is determined (indicating that the first data packet is received at the time stamp), and the receiving time stamp is added to the metadata of the first data packet. The metadata of the first data packet and the first data packet itself are sent to the classification analysis control unit together (indicated by ② in Fig. 3).

[0046] The input interface unit needs to have the time stamp determination function, so that the input interface unit can determine the receiving time stamp of each first data packet. Only the input interface unit has the time stamp determination function, the time delay compensation scheme and the scheme requiring deterministic scheduling according to the receiving time stamp can be realized.

[0047] When other systems provide the synchronous clock for the system through the input interface unit, the input interface unit can provide the clock to the clock distribution unit, and the clock distribution unit distributes the clock to the classification analysis control unit and the output deterministic processing unit. The classification analysis control unit uses the clock for input shaping and rate limiting, and the output deterministic processing unit uses the clock for deterministic processing (such as PCF and CSQF scheduling).

[0048] When the system provides the synchronous clock to the outside, the clock distribution unit can provide the clock to the input interface unit, and the input interface unit uses the clock to determine the receiving time stamp of each first data packet. The clock distribution unit can provide the clock to the output interface unit, which is used for the output interface unit to send the data packet.

[0049] After the input interface unit receives the first data packet, the interface configuration information of the first data packet, such as QoS information and IP information, can be determined, and the interface configuration information is added to the metadata of the first data packet.

[0050] In summary, for the metadata (identified by ② in FIG. 3) sent by the input interface unit to the classification and analysis control unit, the metadata can include the following contents:

[0051] QoS (Quality of Service) information: TC (Traffic Class), DSCP (Differentiated Services Code Point), and DP (Drop Priority);

[0052] IP information: five-tuple for IPv4 or six-tuple for IPv6 (five-tuple plus Flow Label);

[0053] Receive timestamp (also referred to as time information), which is IngressT.

[0054] Second, the classification and analysis control unit (also referred to as the classification, analysis, access control, and integration unit) is configured to determine the local flow identifier of the first data packet and add the local flow identifier of the first data packet to the metadata.

[0055] The classification and analysis control unit has a classification function and can perform preliminary classification on the first data packet according to the metadata of the first data packet. For example, the first data packet is preliminarily classified based on the QoS information in the metadata, and the classified first data packet enters a queue corresponding to a different class to ensure the storage of high-priority data packets, i.e., the storage resources can be used to store high-priority first data packets.

[0056] The classification and analysis control unit has an analysis function and can obtain the target flow characteristics (such as five-tuple for IPv4 or six-tuple for IPv6, and of course, the target flow characteristics can also include the flow identifier of a deterministic flow and the scheduling algorithm identifier of the deterministic flow) of the first data packet from the first data packet (such as the header stack of the first data packet, such as the IP header and / or the SRH header) and add the target flow characteristics to the metadata.

[0057] The classification analysis control unit has an access control function and can determine whether the first data packet is a deterministic flow based on the target flow feature of the first data packet. For example, if the target flow feature matches the flow feature of a configured deterministic flow, the first data packet is a deterministic flow. If the target flow feature does not match the flow feature of a configured deterministic flow, the first data packet is not a deterministic flow. If the first data packet is a deterministic flow, the classification analysis control unit queries the target action parameter corresponding to the target flow feature from a configured ACL (Access Control List) and adds the target action parameter to the metadata.

[0058] For example, the ACL can be pre-configured, such as storing the ACL in the TCAM. The ACL can include a correspondence between a flow feature and an action parameter. Based on this, after obtaining the target flow feature of the first data packet, the target action parameter corresponding to the target flow feature can be obtained by querying the ACL with the target flow feature.

[0059] For example, the CPU can issue the ACL (i.e., the ACL entry of the deterministic flow), the flow feature as the KEY of the ACL (such as the five-tuple of IPv4 or the six-tuple for IPv6), and the flow feature corresponding to the action parameter.

[0060] The target action parameter corresponding to the target flow feature can include, but is not limited to, at least one of the following:

[0061] The fst flag indicates whether the node is a head node or not (such as an intermediate node or a tail node). For example, if the fst flag is a first value (such as 1), it indicates that the node is a head node. If the fst flag is a second value (such as 0), it indicates that the node is an intermediate node or a tail node.

[0062] The oam flag indicates whether the data packet is a service flow or an oam (Operation Administration Maintenance) flow. For example, if the oam flag is a first value (such as 1), it indicates that the data packet is an oam flow and an oam operation needs to be performed on the current data packet. If the oam flag is a second value (such as 0), it indicates that the data packet is a service flow and no additional oam operation is needed.

[0063] The relay flag indicates whether the delay compensation control function is enabled or not. For example, if the relay flag is a first value (such as 1), it indicates that the delay compensation control function is enabled and the delay compensation needs to be implemented using the technical solutions of the present application. If the relay flag is a second value (such as 0), it indicates that the delay compensation control function is not enabled and the delay compensation does not need to be implemented using the technical solutions of the present application.

[0064] lFlowID: local flow identifier of the first data packet, the local flow identifier can be determined and issued by the CPU, the local flow identifier is used for internal resource indexing and can uniquely identify the first data packet within the network device.

[0065] gFlowID_High: high bit field of the global flow identifier, gFlowID_High can be determined and issued by the CPU. gFlowID_High and the local flow identifier can constitute a global flow identifier (gFlowID), that is, the local flow identifier is added behind gFlowID_High to obtain the global flow identifier of the first data packet. The global flow identifier is used for global resource indexing and can uniquely identify the first data packet on multiple network devices.

[0066] For example, in order to save resources, lFlowID is the low bit of gFlowID, gFlowID_High and lFlowID jointly constitute gFlowID, that is, gFlowID = (gFlowID_High << 10) + lFlowID.

[0067] In summary, the metadata (identified by ③ in FIG. 3) sent by the classification analysis control unit to the input deterministic processing unit can include the following contents: QoS information, IP information, reception timestamp IngressT, target flow characteristics of the first data packet, target action parameters corresponding to the target flow characteristics. The target action parameters can include fst flag, oam flag, relay flag, lFlowID (internal deterministic flow identifier, value 0-1023, each value uniquely identifies a deterministic flow), gFlowID_High (or gFlowID, gFlowID_High is the high bit of the global flow identifier gFlowID).

[0068] If the node is a head node, the metadata does not include Sequence Number (packet sequence number), if the node is an intermediate node or a tail node, the classification analysis control unit can also parse the Sequence Number from the first data packet, and the metadata includes the Sequence Number.

[0069] Of course, the target action parameters can also include other information, such as whether to shape (i.e., shape or not), shaping mechanism selection (i.e., which shaping mode to use, such as delay compensation scheduling mode and CSQF scheduling mode, etc.), replacement priority, etc. The target action parameters are not limited and can be flexibly configured.

[0070] The classification analysis control unit has a shaping function, which can shape the flow (such as deterministic flow (DF: DetNet Flow) and best-effort flow (BF: Best-Effort Flow)), and color the BF. By coloring the BF, when congestion occurs, the colored BF can be preferentially discarded, so that the deterministic flow DF is not affected by the best-effort flow BF.

[0071] For the deterministic flow DF, the classification analysis control unit redirects the first data packet of the deterministic flow DF to the input deterministic processing unit (identified by ③ in FIG. 3). For the best-effort flow BF, the classification analysis control unit redirects the first data packet of the best-effort flow BF to the forwarding unit (identified by ⑨ in FIG. 3).

[0072] Third, the input deterministic processing unit is used to obtain the reception timestamp IngressT and the local flow identifier lFlowID from the metadata of the first data packet, obtain the delay value corresponding to the local flow identifier, and convert the reception timestamp into a reception scheduling period; determine the target scheduling period based on the reception scheduling period and the delay value.

[0073] The input deterministic processing unit has a deterministic flow configuration (DFC: DetNet-flow Configuration) function. Based on the deterministic flow configuration function, the forwarding layer and service sublayer functions of the node can be implemented, while considering the hardware performance and providing sufficient flexibility. The DFC provides programmable features.

[0074] The input deterministic processing unit has a packet replication function (PRF: Packet Replication Function). Based on the packet replication function, when the data packet adopts a multi-path transmission strategy, the data packet generates a sequence identifier, and generates multiple copies of the data packet. The sequence identifiers of the multiple copies of the same data packet are the same, and each copy is identified by an egress interface or a copy number, which is updated in the metadata.

[0075] The input deterministic processing unit has a packet elimination function (PEF: Packet Elimination Function). Based on the packet elimination function, when the data packet adopts a multi-path transmission strategy, the multiple copies of the same data packet are discarded. Considering that the sequence number of the data packet may be rolled back, a time window is needed to be implemented, and the sequence number of the data packet is only valid within the time window, that is, for the newly received data packet, only the sequence number of the data packet within the time window is compared. If it exists, the data packet is considered as a duplicate data packet and needs to be discarded.

[0076] Referring to FIG. 5A, a structure diagram of the input deterministic processing unit is shown. The input deterministic processing unit can include a DFC submodule, an IDPP submodule, a PEF submodule, and a PRF submodule. The IDPP submodule can select to perform only the duplicate packet deletion function (selection 1, selected for the tail-end node), i.e., the output of the PEF submodule is the output of the input deterministic processing unit. Alternatively, the IDPP submodule can select to perform only the packet replication function (selection 2, selected for the head-end node), i.e., the output of the PRF submodule is the output of the input deterministic processing unit. Alternatively, the IDPP submodule selects not to perform the duplicate packet deletion function nor the packet replication function (selection 3, selected for the head-end node or the tail-end node), i.e., the output of the IDPP submodule is the output of the input deterministic processing unit.

[0077] For the DFC submodule, the DFC submodule can store a deterministic flow configuration data table, which is configured by a control plane (CPU). The deterministic flow configuration data table includes a plurality of data table entries, each of which corresponds to a flow identifier (local flow identifier), i.e., the data table entries and the flow identifiers are in one-to-one correspondence.

[0078] Referring to FIG. 5B, a data structure diagram of the deterministic flow configuration data table is shown. The deterministic flow configuration data table can be stored in the external RAM of the FPGA. For each data table entry of the deterministic flow configuration data table, the pointer of the data table entry is stored in the FPGA, and the table entry content (i.e., the data table entry) pointed to by the pointer is stored in the external RAM of the FPGA, which is indexed by the lFlowID in the metadata.

[0079] For example, Pointer0 represents the pointer of the first data table entry. If the lFlowID in the metadata corresponds to Pointer0, the data table entry pointed to by Pointer0 can be obtained from the external RAM. Similarly, Pointer1 represents the pointer of the second data table entry. If the lFlowID in the metadata corresponds to Pointer1, the data table entry pointed to by Pointer1 can be obtained from the external RAM.

[0080] In each data table entry, Flags represents a flag bit. The Flags can include, but are not limited to, the following contents:

[0081] The fst flag indicates whether the current node is a head-end node or not (e.g., an intermediate node or a tail-end node). For example, if the fst flag is a first value (e.g., 1), it indicates that the current node is a head-end node. If the fst flag is a second value (e.g., 0), it indicates that the current node is an intermediate node or a tail-end node.

[0082] The tst flag indicates a path detection identifier.

[0083] The cp flag indicates whether the node supports the delay compensation scheduling mode. For example, if the cp flag is a first value (e.g., 1), it indicates that the node supports the delay compensation scheduling mode, and if the cp flag is a second value (e.g., 0), it indicates that the node does not support the delay compensation scheduling mode.

[0084] The csqf flag indicates whether the node supports the CSQF scheduling mode. For example, if the csqf flag is a first value (e.g., 1), it indicates that the node supports the CSQF scheduling mode, and if the csqf flag is a second value (e.g., 0), it indicates that the node does not support the CSQF scheduling mode.

[0085] The pef flag indicates whether the node enables the PEF function or the node does not enable the PEF function. For example, if the pef flag is a first value (e.g., 1), it indicates that the node enables the PEF function, and if the pef flag is a second value (e.g., 0), it indicates that the node does not enable the PEF function.

[0086] The prf flag indicates whether the node enables the PRF function or the node does not enable the PRF function. For example, if the prf flag is a first value (e.g., 1), it indicates that the node enables the PRF function, and if the prf flag is a second value (e.g., 0), it indicates that the node does not enable the PRF function.

[0087] The pof flag indicates whether the node enables the POF (Packet Ordering Function) function or the node does not enable the POF function. If the pof flag is a first value (e.g., 1), it indicates that the node enables the POF function, and if the pof flag is a second value (e.g., 0), it indicates that the node does not enable the POF function.

[0088] In each data table item, Counter represents the sequence number, i.e., the sequence number of the last data packet sent by the node (i.e., the maximum sequence number of all sent data packets), which is hereinafter referred to as the initial sequence number. gFlowID represents the global flow identifier of the data packet. Remark TC represents the discard priority of the deterministic flow. PathNum represents the number of paths, i.e., how many data packets are sent. For example, if PathNum is 3, it indicates that three identical data packets are sent. OutLifId1 and OutLifId2 represent the out interfaces, and the number of out interfaces corresponds to PathNum. For example, if PathNum is 3, there are three out interfaces, indicating that three data packets are sent through the three out interfaces.

[0089] RefT / Offset represents a time delay value, for the time delay compensation scheduling mode, RefT represents a reference time delay value, for the CSQF scheduling mode, Offset represents an offset time delay value. If the current node supports both the time delay compensation scheduling mode and the CSQF scheduling mode, the data table item includes the reference time delay value RefT and the offset time delay value Offset.

[0090] The reference time delay value RefT can represent a transmission time delay of a data packet from a head-end node to a tail-end node, the reference time delay value RefT can be acquired by a CPU and recorded in the data table item, and the acquisition manner of the reference time delay value RefT is not limited. The offset time delay value Offset can represent an offset time length from receiving a data packet to sending a data packet, the offset time delay value Offset can be acquired by a CPU and recorded in the data table item, and the acquisition manner of the offset time delay value Offset is not limited.

[0091] In order to acquire the reference time delay value RefT, one possible way is that the head-end node sends a measurement packet to the tail-end node, the measurement packet includes a sending time stamp (indicating that the head-end node sends the measurement packet at the time stamp). For each intermediate node, after receiving the measurement packet, if the relay flag of the intermediate node indicates that the time delay compensation control function is enabled, the intermediate node can add a receiving time stamp (indicating that the intermediate node receives the measurement packet at the time stamp) and a sending time stamp (indicating that the intermediate node sends the measurement packet at the time stamp) to the measurement packet. After receiving the measurement packet, the tail-end node can add a receiving time stamp (indicating that the tail-end node receives the measurement packet at the time stamp) to the measurement packet. Based on the above time stamp information in the measurement packet, the reference time delay value RefT can be determined.

[0092] For example, the controller can determine the reference time delay value RefT and configure the reference time delay value RefT to the deterministic flow configuration data table, and the determination manner of the reference time delay value RefT is not limited.

[0093] For the IDPP submodule, the IDPP submodule obtains the local flow identifier lFlowID from the metadata of the first data packet, and selects a target data table item corresponding to the local flow identifier from all data table items of the deterministic flow configuration data table (see FIG. 5B, the deterministic flow configuration data table includes a plurality of data table items, and each data table item corresponds to a flow identifier). For example, the IDPP submodule sends the local flow identifier to the DFC submodule, the DFC submodule determines the pointer (such as any one of Pointer0-Pointer1023) corresponding to the local flow identifier, obtains the data table item pointed to by the pointer from the external RAM, and sends the data table item to the IDPP submodule. This data table item is the target data table item corresponding to the local flow identifier.

[0094] After obtaining the target data table item, the IDPP submodule adds the configuration information in the target data table item to the metadata of the first data packet. For example, the configuration information includes at least one of the following: fst flag, tst flag, cp flag, csqf flag, pef flag, prf flag, pof flag, Counter, gFlowID, Remark TC, PathNum, a plurality of outgoing interfaces (such as OutLifId1 and OutLifId2), RefT, and Offset. Of course, the above is only an example of the configuration information in the target data table item, which is not limited.

[0095] As can be seen from the above, the IDPP submodule can select the target data table item corresponding to the local flow identifier lFlowID from all data table items of the deterministic flow configuration data table, and the target data table item can include the latency value, that is, the IDPP submodule can obtain the latency value corresponding to the local flow identifier lFlowID.

[0096] After the IDPP submodule obtains the receive timestamp IngressT from the metadata of the first data packet, the IDPP submodule can also convert the receive timestamp into a receive scheduling period RxCycle. For example, when the receive timestamp IngressT is in the scheduling period A, the receive scheduling period RxCycle is the scheduling period A. For example, as shown in FIGS. 1 and 2, a plurality of queues can be divided, each queue corresponds to a scheduling period, and the scheduling period in which the receive timestamp IngressT is located can be taken as the receive scheduling period RxCycle.

[0097] The IDPP submodule can obtain a relay flag from the metadata of the first data packet, and the relay flag can indicate that the delay compensation control function is enabled (e.g., the relay flag is 1) or the delay compensation control function is not enabled (e.g., the relay flag is 0). Based on this, if the relay flag indicates that the delay compensation control function is enabled, the IDPP submodule can further determine a target scheduling period based on the received scheduling period and the delay value, and the target scheduling period can include a compensation scheduling period and / or a sending scheduling period. After obtaining the target scheduling period, the IDPP submodule can add the target scheduling period to the metadata of the first data packet.

[0098] In one example, when the IDPP submodule obtains the target data entry, the target data entry can include a shaping mode (the shaping mode is added to the metadata), such as a delay compensation scheduling mode and / or a CSQF scheduling mode. For example, if the cp flag is a first value (e.g., 1), it indicates that the shaping mode includes the delay compensation scheduling mode, and if the cp flag is a second value (e.g., 0), it indicates that the shaping mode does not include the delay compensation scheduling mode. If the csqf flag is a first value (e.g., 1), it indicates that the shaping mode includes the CSQF scheduling mode, and if the csqf flag is a second value (e.g., 0), it indicates that the shaping mode does not include the CSQF scheduling mode.

[0099] If the shaping mode includes the delay compensation scheduling mode and the target data entry includes a reference delay value RefT, the target scheduling period is a compensation scheduling period. Based on this, the IDPP submodule can determine the compensation scheduling period based on the received scheduling period and the reference delay value RefT.

[0100] For example, the sum of the received scheduling period and the reference delay value is calculated, the sum is subjected to a modulo operation with the total number of scheduling periods, and the compensation scheduling period is determined based on the modulo result. For example, the compensation scheduling period is determined by the following formula: CpCycle = (RxCycle + DfcEntry.RefT) mod DfcEntry.cp_que_num; in the above formula, CpCycle represents the compensation scheduling period, RxCycle represents the received scheduling period, DfcEntry.RefT represents the reference delay value, and DfcEntry.cp_que_num represents the total number of scheduling periods, i.e., the total number of scheduling queues. For example, assuming that there are K compensation scheduling queues in total, the K compensation scheduling queues and the K compensation scheduling periods are in one-to-one correspondence, and DfcEntry.cp_que_num represents the total number K of compensation scheduling queues.

[0101] If the shaping mode includes the CSQF scheduling mode, and the target data entry includes the offset delay value Offset, the target scheduling period is the sending scheduling period. Based on this, the IDPP submodule can determine the sending scheduling period based on the receiving scheduling period and the offset delay value Offset. For example, the sum of the receiving scheduling period and the offset delay value is calculated, the sum is taken modulo the total number of scheduling periods, and the sending scheduling period is determined based on the modulo result. For example, the sending scheduling period can be determined using the following formula: TxCycle = (RxCycle + DfcEntry.Offset) mod DfcEntry.csqf_que_num; In the above formula, TxCycle represents the sending scheduling period, RxCycle represents the receiving scheduling period, DfcEntry.Offset represents the offset delay value, and DfcEntry.csqf_que_num represents the total number of scheduling periods, i.e., the total number of scheduling queues. Assuming that there are M CSQF scheduling queues in total, the M CSQF scheduling queues correspond to the M sending scheduling periods one-to-one, and DfcEntry.csqf_que_num represents the total number M of CSQF scheduling queues.

[0102] In summary, the IDPP submodule adds the configuration information in the target data entry and the target scheduling period (such as the compensation scheduling period CpCycle and / or the sending scheduling period TxCycle) in the metadata of the first data packet.

[0103] For the metadata (identified by ④ in FIG. 3) sent by the input deterministic processing unit to the forwarding unit, the metadata can include the following contents: QoS information, IP information, receiving timestamp IngressT, target flow characteristics of the first data packet, target action parameters corresponding to the target flow characteristics (such as fst flag, oam flag, relay flag, lFlowID, and gFlowID), configuration information in the target data entry (such as fst flag, tst flag, cp flag, csqf flag, pef flag, prf flag, pof flag, initial sequence number Counter, gFlowID, Remark TC, PathNum, multiple egress interfaces, RefT, and Offset), and target scheduling period (such as compensation scheduling period CpCycle and / or sending scheduling period TxCycle).

[0104] Referring to FIG. 5C, a flowchart of the processing procedure of the IDPP sub-module is shown. For the Configuration Parsing and Time Processing, the IDPP sub-module obtains the target data table item from the deterministic flow configuration data table, and obtains the target scheduling period (e.g. the compensation scheduling period and / or the sending scheduling period). The specific implementation can refer to the above-mentioned procedure. For the Metadata Management procedure, the IDPP sub-module adds the configuration information in the target data table item and the target scheduling period to the metadata.

[0105] For the Selector procedure, if the pef flag is the first value (e.g. 1), it indicates that the PEF function is enabled in the current node (for the tail node), and thus the IDPP sub-module performs selection 1, i.e. performs the duplicate packet deletion function, and inputs the metadata to the PEF sub-module. If the prf flag is the first value (e.g. 1), it indicates that the PRF function is enabled in the current node (for the head node), and thus the IDPP sub-module performs selection 2, i.e. performs the packet duplication function, and inputs the metadata to the PRF sub-module. If the pef flag is the second value (e.g. 0) and the prf flag is the second value (e.g. 0), i.e. neither the duplicate packet deletion function nor the packet duplication function is performed, the IDPP sub-module performs selection 3, and inputs the metadata to the forwarding module.

[0106] Referring to FIG. 5C, the input data of the IDPP sub-module also includes the Packet Header (packet header information) and the Packet Descriptor (packet header description information), and the output data of the IDPP sub-module also includes the Packet Header and the Packet Descriptor. No limitation is imposed on the information.

[0107] For the PRF sub-module, the target data table item further includes the prf flag, the initial sequence number, the path quantity and a plurality of outgoing interfaces. The PRF sub-module can obtain the information from the metadata. The prf flag indicates whether the PRF function is enabled or not. If the prf flag indicates that the PRF function is enabled, the PRF sub-module can add 1 to the initial sequence number to obtain the target sequence number, and obtain a plurality of first packets (i.e. a plurality of duplicated packets) corresponding to the path quantity. Then, the PRF sub-module updates the target sequence number to the initial sequence number in the target data table item (i.e. updates the Counter in the deterministic flow configuration data table), and adds the target sequence number to the metadata. In addition, the plurality of outgoing interfaces have been added to the metadata.

[0108] For example, the PRF submodule is used to replicate the packet and the packet header, and to generate the replicated descriptor. The configuration information provided to the DFC submodule includes the register address used to generate the packet sequence number, which stores the initial sequence number. After each packet processing, the PRF submodule adds one to the initial sequence number to obtain the target sequence number, which is used to identify the same packet delivered through different paths (note that this register address is used in the head node, and in the intermediate node or tail node, the target sequence number comes from the packet parsing and is stored in the metadata).

[0109] For the PEF submodule, the target data entry further includes a pef flag, which can be obtained by the PEF submodule from the metadata. The pef flag indicates whether the PEF function is enabled or not. If the pef flag indicates that the PEF function is enabled, the PEF submodule obtains the target sequence number from the metadata of the second packet (for the tail node, the second packet is received) after obtaining the second packet. The classification and parsing control unit obtains the target sequence number from the second packet and adds the target sequence number to the metadata. It is determined whether the target sequence number already exists in the historical time window. If yes, the second packet is determined to be a duplicate packet and is discarded. If not, the PEF submodule retains the second packet.

[0110] For example, the PEF submodule is used to perform packet deduplication, and determines whether to perform deduplication according to the identification indication parsed from the packet. The PEF submodule internally implements a history window, and queries whether the target sequence number of the packet is in the history window. If yes, the current packet is considered to be a duplicate and is deleted. Otherwise, the sequence number of the current packet is recorded (as a sequence number in the history window).

[0111] Referring to FIG. 5D, a processing schematic diagram of the PRF submodule and the PEF submodule is shown. The input data of the PRF submodule is Metadata, Packet Header and Packet Descriptor, and the output data of the PRF submodule is Metadata Replicas, Packet-Header Replicas and Packet-Descriptor Replicas, that is, the PRF submodule can replicate the input data to obtain the replicated output data.

[0112] The input data of the PEF sub-module is Metadata, Packet Header and Packet Descriptor, and the output data of the PEF sub-module is Metadata, Packet Header and Packet Descriptor, but the output data can be discarded or retained, that is, the duplicate packets are discarded, otherwise, the packets are retained.

[0113] The fourth forwarding unit encapsulates a Segment Routing Header (SRH) for the first data packet to obtain a second data packet. In addition to the Segment Routing Header, the forwarding unit can also encapsulate an Ethernet header (ETH) and an IPV6 header for the first data packet, without limitation. The Segment Routing Header can include a target scheduling period. For example, if the metadata includes a shaping mode, and the shaping mode includes a delay compensation scheduling mode, the target scheduling period in the Segment Routing Header includes a compensation scheduling period; and / or, if the metadata includes a shaping mode, and the shaping mode includes a CSQF scheduling mode, the target scheduling period in the Segment Routing Header includes a sending scheduling period.

[0114] In one example, when the forwarding unit encapsulates the Segment Routing Header for the first data packet to obtain the second data packet, the Segment Routing Header can also include a global flow identifier gFlowID of the first data packet.

[0115] In one example, when the forwarding unit encapsulates the Segment Routing Header for the first data packet to obtain the second data packet, if the metadata includes a prf flag and the prf flag indicates that the PRF function is enabled, the Segment Routing Header can also include a specified flag (for example, the flags.Bit[5] of the Segment Routing Header is set to 1, indicating the specified flag), and the specified flag indicates multi-transmission and selective reception information. The specified flag is used to enable the tail-end node to select one second data packet from multiple second data packets when receiving the multiple second data packets, that is, to send multiple data packet selection one data packet.

[0116] In one example, the forwarding unit can obtain a target sequence number from the metadata, and when the forwarding unit encapsulates the Segment Routing Header for the first data packet to obtain the second data packet, the second data packet includes the target sequence number.

[0117] In one example, if the metadata includes a prf flag and the prf flag indicates that the PRF function is enabled, the forwarding unit encapsulates the Segment Routing Header for each first data packet (the PRF sub-module has copied multiple first data packets) to obtain multiple second data packets, and each second data packet includes a target sequence number. The forwarding unit can obtain multiple outgoing interfaces from the metadata, and send the multiple second data packets through the multiple outgoing interfaces.

[0118] Fifth, a queue management unit for managing per-class queues (PCQ) and per-flow queues (PFQ), forwarding data packets provided by the forwarding unit into different queues according to a configuration policy and a forwarding mechanism, while taking congestion measures such as WRED (Weighted Random Early Discard) for data packets of certain priorities according to a coloring value of a shaper, etc., and the PCQ using the same queue for the same class of processing behavior.

[0119] Sixth, a best-effort flow scheduling unit (BF scheduling unit) for implementing hierarchical scheduling of best-effort flows, suspending sending data to the output deterministic processing unit when subjected to back pressure from the output deterministic processing unit, i.e., suspending scheduling data outwards. For example, the queue management unit can send a best-effort flow to the BF scheduling unit (shown as ⑩ in FIG. 3), and the BF scheduling unit sends the best-effort flow to the output deterministic processing unit (shown as ⑩ in FIG. 3). When traffic congestion occurs, the output deterministic processing unit notifies the BF scheduling unit to stop sending the best-effort flow (shown as ⑩ in FIG. 3).

[0120] Seventh, an output deterministic processing unit for obtaining a target scheduling period and a shaping mode from metadata of a second data packet (a data packet received by a tail node is referred to as a second data packet). If the shaping mode is a delay compensation scheduling mode and the target scheduling period is a compensation scheduling period, a first data packet corresponding to the second data packet (i.e., the first data packet obtained by decapsulating the second data packet) is stored in a compensation scheduling queue corresponding to the compensation scheduling period. If the shaping mode is a CSQF scheduling mode and the target scheduling period is a sending scheduling period, the first data packet is stored in a CSQF scheduling queue corresponding to the sending scheduling period.

[0121] For example, the classification analysis control unit can obtain a global flow identifier and a target scheduling period from the second data packet, and add the global flow identifier and the target scheduling period to metadata of the second data packet. The input deterministic processing unit obtains the global flow identifier from the metadata, determines a local flow identifier based on the global flow identifier, and selects a target data table item corresponding to the local flow identifier from all data table items of the deterministic flow configuration data table, and the target data table item includes a shaping mode, which is added to the metadata. On this basis, the output deterministic processing unit can obtain the target scheduling period and the shaping mode from the metadata.

[0122] ​For example, the target data table item further includes a pof flag, the input deterministic processing unit adds the pof flag to the metadata, and the pof flag indicates that the POF function is enabled or disabled. If the pof flag indicates that the POF function is enabled, the output deterministic processing unit can further obtain the target sequence number from the metadata of the second data packet after obtaining the second data packet; and sort the second data packets based on the target sequence numbers of the second data packets, i.e., sort the second data packets in ascending order.

[0123] Based on the sorted second data packets, the output deterministic processing unit sequentially traverses each second data packet. For the currently traversed second data packet, the output deterministic processing unit obtains the target scheduling period and the shaping mode from the metadata of the second data packet. If the shaping mode is the delay compensation scheduling mode and the target scheduling period is the compensation scheduling period, the first data packet corresponding to the second data packet is stored in the compensation scheduling queue corresponding to the compensation scheduling period. If the shaping mode is the CSQF scheduling mode and the target scheduling period is the sending scheduling period, the first data packet is stored in the CSQF scheduling queue corresponding to the sending scheduling period.

[0124] In one example, the output deterministic processing unit has the following functions: DF scheduling required calculation, such as calculating which queue to enter before enqueuing. DF and BF cache. According to the configuration, determine to implement the sorting function POF, sort the second data packets. According to the configuration, determine to implement the delay compensation function PCF, delay compensate the second data packet, i.e., if the shaping mode is the delay compensation scheduling mode, store the first data packet in the compensation scheduling queue corresponding to the compensation scheduling period. According to the configuration, determine to implement the CSQF compensation function, CSQF compensate the second data packet, i.e., if the shaping mode is the CSQF scheduling mode, store the first data packet in the CSQF scheduling queue corresponding to the sending scheduling period. According to the configuration, determine to implement the combined scheduling function, such as combined scheduling of DF data packets (shown as ⑥ in FIG. 3) and BF data packets (shown as ⑦ in FIG. 3). When combined scheduling is performed, the DF data packet is delay compensated and scheduled, and the DF data packet can also be CSQF compensated and scheduled. When combined scheduling is performed, the DF data packet is scheduled first, and then the BF data packet is scheduled after the scheduling is completed, or the DF data packet and the BF data packet are simultaneously scheduled. When traffic congestion occurs, back pressure is applied to the BF scheduling unit.

[0125] In one example, referring to FIG. 5E, a processing schematic diagram of the output deterministic processing unit is shown.

[0126] ​​For the second selector process (Selector), if the pof flag indicates that the POF function is enabled, and the shaping mode does not include the latency compensation scheduling mode, and the shaping mode does not include the CSQF scheduling mode, then according to the Metadata selection, only POF is performed (Selection 1), that is, each second data packet is sorted based on the target sequence number of the plurality of second data packets, and each second data packet is sequentially traversed. Then, the currently traversed DF data packet (i.e., the first data packet corresponding to the second data packet) and the BF data packet are combined and scheduled (Combined Schedule).

[0127] If the pof flag indicates that the POF function is enabled, and the shaping mode includes the latency compensation scheduling mode, then according to the Metadata selection, POF is performed first and then PCF is performed (Selection 2), that is, each second data packet is sorted based on the target sequence number of the plurality of second data packets, and each second data packet is sequentially traversed. The first data packet corresponding to the currently traversed second data packet is stored in the compensation scheduling queue corresponding to the compensation scheduling period. Then, the currently traversed DF data packet and the BF data packet are combined and scheduled.

[0128] If the pof flag indicates that the POF function is enabled, and the shaping mode includes the CSQF scheduling mode, then according to the Metadata selection, POF is performed first and then CSQF is performed (Selection 3), that is, each second data packet is sorted based on the target sequence number of the plurality of second data packets, and each second data packet is sequentially traversed. The first data packet corresponding to the currently traversed second data packet is stored in the CSQF scheduling queue corresponding to the transmission scheduling period. Then, the currently traversed DF data packet and the BF data packet are combined and scheduled.

[0129] If the pof flag indicates that the POF function is not enabled, and the shaping mode includes the latency compensation scheduling mode, then according to the Metadata selection, PCF is performed (Selection 4), that is, the first data packet is stored in the compensation scheduling queue corresponding to the compensation scheduling period. The DF data packet and the BF data packet are combined and scheduled.

[0130] If the pof flag indicates that the POF function is not enabled, and the shaping mode includes the CSQF scheduling mode, then according to the Metadata selection, CSQF is performed (Selection 5), that is, the first data packet is stored in the CSQF scheduling queue corresponding to the transmission scheduling period. The DF data packet and the BF data packet are combined and scheduled.

[0131] If the pof flag indicates that the POF function is not enabled, and the shaping mode does not include the latency compensation scheduling mode, and the shaping mode does not include the CSQF scheduling mode, then according to the Metadata selection, no deterministic scheduling is performed (Selection 6), that is, the DF data packet and the BF data packet are directly combined and scheduled.

[0132] Eighth, the output interface unit is configured to schedule the first data packet in the compensation scheduling queue corresponding to each compensation scheduling period. For example, when the shaping mode includes the delay compensation scheduling mode, the output interface unit schedules the first data packet in the compensation scheduling queue corresponding to each compensation scheduling period. Alternatively, the output interface unit schedules the first data packet in the CSQF scheduling queue corresponding to each sending scheduling period. For example, when the shaping mode includes the CSQF scheduling mode, the output interface unit schedules the first data packet in the CSQF scheduling queue corresponding to each sending scheduling period.

[0133] For example, the output interface unit can send the mixed data of the scheduled DF data packet and the BF data packet to the line, and add the sending time information according to the configuration before sending, so as to realize the delay compensation scheme and the resident delay collection. Of course, the sending time information can also not be added.

[0134] Ninth, the clock distribution unit is configured to provide the clock to the clock distribution unit when the other system provides the synchronization clock to the system through the input interface unit. The clock distribution unit distributes the clock to the classification and analysis control unit and the output deterministic processing unit. The classification and analysis control unit uses the clock for input shaping and rate limiting, and the output deterministic processing unit uses the clock for deterministic processing. When the system provides the synchronization clock to the outside, the clock distribution unit can provide the clock to the input interface unit. The clock distribution unit can provide the clock to the output interface unit, which is used for the output interface unit to send the data packet.

[0135] In one example, referring to FIG. 5F, a schematic diagram of data transmission between adjacent units is shown. When data is transmitted between a previous unit (Pre-Module) and a current unit (Cur-Module), Metadata, Packet Header, Packet Descriptor and other data can be transmitted. For example, the classification and analysis control unit is the previous unit, and the input deterministic processing unit is the current unit. The input deterministic processing unit is the previous unit, and the forwarding unit is the current unit, and so on.

[0136] For example, the Metadata carries various attributes of the data packet, the processing result of the previous unit, data and operation instructions that need to be passed to the subsequent unit, and the content of the Metadata can refer to the above embodiments. The Packet Header can include but is not limited to the following: map: 32 bits, the map is a bitmap indicating whether the corresponding header in the header stack parsed from the data packet exists, such as whether there is a Vlan Tag, S-Tag, C-Tag, etc. in the Ethernet header, each corresponding to a bit. IPv6 Option field. HeadData: 256 bytes, the header stack data parsed from the data packet, which can be extended according to the supported applications. Packet Descriptor (PD) is a data packet descriptor. Since it is centralized forwarding, there are two storage locations for receiving data packets, 1 is the on-chip cache of the FPGA, in the FIFO between units, 2 is the off-chip RAM, the data packet is stored in the off-chip RAM, and it is read from the RAM only when a specific unit needs it, such as packet replication and sending out, and the rest of the time Packet Descriptor indicates the data packet, that is, the transmission of Packet Descriptor between units.

[0137] In one example, the network device shown in FIG. 3 can be applicable to the application scenario of SRV6 (i.e., in the SRV6 scenario, the network device adopts the above structure to process the data packet when transmitting a deterministic flow), of course, the network device shown in FIG. 3 can also be applicable to other application scenarios, which is not limited.

[0138] In the SRV6 scenario, it can include a head node, an intermediate node and a tail node, that is, the above network device can be used as a head node, can be used as an intermediate node, and can be used as a tail node. In the SRV6 scenario, the sender (Talker) can send a data packet to the receiver (Listener), the head node can receive the data packet and forward the data packet to the intermediate node, and the intermediate node forwards the data packet to the tail node.

[0139] Referring to FIG. 6A, a schematic diagram of the network device as a head-end node is shown, the input packet of the head-end node is the first packet, and the output packet of the head-end node is the second packet, that is, the head-end node needs to add ETH, IPV6_1 and SRH1 to the first packet to obtain the second packet. Referring to FIG. 6B, a schematic diagram of the network device as a tail-end node is shown, the input packet of the tail-end node is the second packet, and the output packet of the tail-end node is the first packet, that is, the tail-end node needs to remove ETH, IPV6_2 (which is the same as or different from IPV6_1) and SRH2 (which is the same as or different from SRH1) from the second packet to obtain the first packet.

[0140] The processing process of the head-end node and the processing process of the tail-end node are described below.

[0141] For the processing process of the head-end node (that is, the network device as a head-end node), when the network device determines to be a head-end node, the processing process can include the following steps:

[0142] In step S11, the input interface unit determines the receiving timestamp IngressT of the first packet after receiving the first packet, and parses the first packet to obtain the QoS information and IP information of the first packet, and adds the receiving timestamp, QoS information and IP information to the metadata of the first packet.

[0143] In step S12, the classification analysis control unit determines whether the first packet is a deterministic flow based on the target flow characteristics of the first packet. If the first packet is a deterministic flow, the target action parameter corresponding to the target flow characteristics is queried from the configured ACL, and the target action parameter is added to the metadata. For example, the target action parameter can include but is not limited to at least one of the following: fst flag, oam flag, relay flag, lFlowID, gFlowID_High (or gFlowID, gFlowID_High is the high bit of the global flow identifier gFlowID).

[0144] For the first packet of the deterministic flow, the classification analysis control unit redirects the first packet to the input deterministic processing unit to perform the processing steps of the input deterministic processing unit. For the first packet of the best-effort flow, the classification analysis control unit redirects the first packet to the forwarding unit.

[0145] Step S13, if the relay flag in the metadata is the first value (e.g., 1), the input deterministic processing unit obtains the local flow identifier lFlowID from the metadata, obtains the target data table entry (DfcEntry) corresponding to the lFlowID from the deterministic flow configuration data table, and adds the configuration information in the target data table entry to the metadata of the first data packet. For example, the configuration information can include at least one of the following: a fst flag, a tst flag, a cp flag, a csqf flag, a pef flag, a prf flag, a pof flag, a Counter, a gFlowID, a Remark TC, a PathNum, a plurality of out interfaces (e.g., OutLifId1 and OutLifId2), a RefT, and an Offset.

[0146] The input deterministic processing unit obtains the receive timestamp from the metadata of the first data packet, and converts the receive timestamp into a receive scheduling period RxCycle. For the delay compensation scheduling mode, the input deterministic processing unit calculates a compensation scheduling period CpCycle based on the receive scheduling period RxCycle and the reference delay value RefT, and adds the compensation scheduling period CpCycle to the metadata of the first data packet. For the CSQF scheduling mode, the input deterministic processing unit determines a transmit scheduling period TxCycle based on the receive scheduling period RxCycle and the offset delay value Offset, and adds the transmit scheduling period TxCycle to the metadata of the first data packet.

[0147] The input deterministic processing unit obtains the prf flag, the initial sequence number, the path quantity, and the plurality of out interfaces from the metadata. If the prf flag indicates that the PRF function is enabled, the input deterministic processing unit adds 1 to the initial sequence number to obtain a target sequence number (i.e., generates and updates the data packet sequence number, obtains the corresponding counter index based on the counter index offset, and adds 1 to the counter index as the target sequence number), obtains a plurality of first data packets corresponding to the path quantity, updates the target sequence number to the initial sequence number in the target data table entry, and adds the target sequence number to the metadata.

[0148] Step S14, if the relay flag in the metadata is the first value (e.g., 1), the forwarding unit encapsulates a segment routing header for each first data packet (one first data packet, or a plurality of first data packets obtained by copying) to obtain a plurality of second data packets. In addition to the segment routing header, the forwarding unit can also encapsulate an Ethernet header (ETH) and an IPV6 header for the first data packet, without limitation.

[0149] When the forwarding element encapsulates the segment routing header for the first data packet to obtain the second data packet, the forwarding element can obtain the target scheduling period, the global flow identifier gFlowID and the target sequence number from the metadata of the first data packet, and the second data packet includes the target scheduling period, the global flow identifier gFlowID and the target sequence number.

[0150] When the forwarding element encapsulates the segment routing header for the first data packet to obtain the second data packet, if the metadata includes the prf flag and the prf flag indicates that the PRF function is enabled, the segment routing header can further include a specified flag (for example, the flags.Bit[5] of the segment routing header is set to 1, indicating the specified flag), and the specified flag indicates the multi-transmission selective reception information. The specified flag is used to enable the tail end node to select one second data packet from multiple second data packets when receiving the multiple second data packets, that is, to send multiple data packet selection one data packet.

[0151] The forwarding element can obtain the OutlifID (that is, the out interface) from the metadata, search the outlif table, and if the outlif table is hit, enter the Srv6 tunnel flag for forwarding, and if not hit, end at the tunnel. The forwarding element also sets the IPv6.TC lowest 2 bits to 0b11, indicating that the first data packet is the first data packet of the deterministic flow.

[0152] For the delay compensation scheduling mode (for example, the cp flag in the metadata is 1), the target scheduling period in the segment routing header can include the compensation scheduling period. For example, the forwarding element encapsulates the compensation scheduling period into the Option position after SL=N of the SRH header in the TLV format. For the CSQF scheduling mode (for example, the csqf flag in the metadata is 1), the target scheduling period in the segment routing header can include the sending scheduling period. For example, the forwarding element encapsulates the sending scheduling period into the ARGV field of the SID (segment identifier).

[0153] The forwarding element obtains multiple out interfaces from the metadata, and sends multiple second data packets through the multiple out interfaces, that is, sends multiple second data packets to the tail end node. Alternatively, the forwarding element can send the second data packet to the queue management unit and continue to perform the subsequent step to send multiple second data packets to the tail end node.

[0154] In one example, in addition to the target scheduling period, the forwarding element can also encapsulate the reception timestamp IngressT and the delay value (such as the reference delay value or the offset delay value) into the segment routing header, or the forwarding element can encapsulate the sum of the reception timestamp IngressT and the delay value into the segment routing header.

[0155] In this way, after receiving the second data packet, if the sum of the ingress time stamp IngressT and the delay value (indicating that the second data packet should be sent in the scheduling period corresponding to this time) is less than the current time (i.e., the receiving time of the second data packet), the tail node can discard the second data packet.

[0156] In step S15, the queue management unit allocates the second data packet to the corresponding queue and schedules the second data packet in each queue. For the second data packet of the best effort flow, the second data packet is sent to the BF scheduling unit. For the second data packet of the deterministic flow, the second data packet is sent to the output deterministic processing unit.

[0157] In step S16, the BF scheduling unit sends the second data packet of the best effort flow to the output deterministic processing unit. When traffic congestion occurs, the sending of the second data packet of the best effort flow is stopped.

[0158] In step S17, the output deterministic processing unit schedules the second data packet of the best effort flow and the second data packet of the deterministic flow. The output deterministic processing unit can first schedule the second data packet of the deterministic flow, and after the scheduling of the second data packet of the deterministic flow is completed, the second data packet of the best effort flow is scheduled. Alternatively, the output deterministic processing unit can simultaneously schedule the second data packet of the deterministic flow and the second data packet of the best effort flow. When traffic congestion occurs, the BF scheduling unit is notified to stop sending the second data packet of the best effort flow.

[0159] In step S18, the output interface unit sends the second data packet of the best effort flow and the second data packet of the deterministic flow. When the output deterministic processing unit schedules the second data packet of the best effort flow, the second data packet is stored in a queue, and the output interface unit sends the second data packet in the queue. When the output deterministic processing unit schedules the second data packet of the deterministic flow, the second data packet is stored in a queue, and the output interface unit sends the second data packet in the queue. When sending the second data packet, the output interface unit obtains a plurality of output interfaces from the metadata and sends a plurality of second data packets through the plurality of output interfaces to the tail node.

[0160] For the processing process of the tail node (i.e., the network device as a tail node), i.e., the above-mentioned units when the network device is determined as a tail node, the processing process can include:

[0161] In step S21, after receiving the second data packet, the input interface unit determines the receiving time stamp IngressT of the second data packet, and parses the second data packet to obtain the QoS information and IP information of the second data packet, and adds the receiving time stamp, the QoS information and the IP information to the metadata of the second data packet.

[0162] Step S22, the classification and analysis control unit determines whether the second data packet is a deterministic flow based on the QoS information. If the second data packet is a deterministic flow, step S23 is executed, otherwise, the lowest 2 bits of the IPv6.TC of the second data packet are read, if the lowest 2 bits are 0b11, the second data packet is a deterministic flow, step S23 is executed, otherwise, the second data packet is not a deterministic flow, and the best effort flow processing mode is adopted.

[0163] Step S23, the classification and analysis control unit analyzes the relay flag from the segment routing header of the second data packet (e.g., the relay flag is carried by flags.Bit[5] of the SRH header, and the head-end node adds the relay flag to flags.Bit[5] of the SRH header). If the relay flag is a first value (e.g., 1), it indicates that the service sub-layer function PRECOF is needed, the classification and analysis control unit analyzes the gFlowID (global flow identifier) and the Sequence Number (target sequence number) from the segment routing header of the second data packet, e.g., the gFlowID and the Sequence Number are analyzed from the option field (the position of SRH SL=N, encapsulated in TLV) of the segment routing header. The classification and analysis control unit analyzes the target scheduling period (e.g., the compensation scheduling period CpCycle and / or the transmission scheduling period TxCycle) from the segment routing header of the second data packet. The classification and analysis control unit adds the relay flag, the gFlowID, the Sequence Number, and the target scheduling period to the metadata.

[0164] Step S24, if the relay flag in the metadata is a first value (e.g., 1), the input deterministic processing unit obtains the global flow identifier gFlowID and the target sequence number Sequence Number from the metadata, and determines the local flow identifier lFlowID based on the global flow identifier gFlowID. The target data table entry (DfcEntry) corresponding to the lFlowID is obtained from the deterministic flow configuration data table, and the configuration information in the target data table entry is added to the metadata of the first data packet. For example, the configuration information can include at least one of the following: the fst flag, the tst flag, the cp flag, the csqf flag, the pef flag, the prf flag, the pof flag, the Remark TC, the PathNum, a plurality of outgoing interfaces (e.g., OutLifId1 and OutLifId2), the RefT, and the Offset.

[0165] The input deterministic processing unit obtains a pef flag from the metadata of the second data packet. If the pef flag indicates that the PEF function is enabled, the input deterministic processing unit determines whether the target sequence number of the second data packet exists in the historical time window based on the target sequence number of the second data packet. If yes, the input deterministic processing unit determines that the second data packet is a duplicate data packet, discards the second data packet, and releases the memory resource. If no, the input deterministic processing unit retains the second data packet, and the target sequence number of the second data packet is located in the historical time window.

[0166] In step S25, the forwarding unit sends the second data packet to the queue management unit.

[0167] In step S26, the queue management unit allocates the second data packet to the corresponding queue, and schedules the second data packet in each queue. For the second data packet of the best-effort flow, the queue management unit sends the second data packet to the BF scheduling unit. For the second data packet of the deterministic flow, the queue management unit sends the second data packet to the output deterministic processing unit.

[0168] In step S27, the BF scheduling unit sends the second data packet of the best-effort flow to the output deterministic processing unit. When traffic congestion occurs, the BF scheduling unit stops sending the second data packet of the best-effort flow.

[0169] In step S28, the output deterministic processing unit obtains the target scheduling period and the shaping mode (such as a cp flag and a csqf flag) from the metadata of the second data packet. If the shaping mode is the delay compensation scheduling mode and the target scheduling period is the compensation scheduling period, the output deterministic processing unit stores the first data packet corresponding to the second data packet in the compensation scheduling queue corresponding to the compensation scheduling period. If the shaping mode is the CSQF scheduling mode and the target scheduling period is the sending scheduling period, the output deterministic processing unit stores the first data packet in the CSQF scheduling queue corresponding to the sending scheduling period.

[0170] For example, the output deterministic processing unit obtains a pof flag, a cp flag, and a csqf flag from the metadata of the second data packet. If the pof flag is 1, the output deterministic processing unit sorts the multiple second data packets based on the target sequence numbers of the multiple second data packets, that is, sorts the multiple second data packets in ascending order. Based on the sorted multiple second data packets, the output deterministic processing unit sequentially traverses each second data packet.

[0171] If the cp flag is 1, for the currently traversed second data packet, the output deterministic processing unit stores the first data packet corresponding to the second data packet in the compensation scheduling queue DF_Que1 corresponding to the compensation scheduling period, that is, performs the compensation queue periodic scheduling, and the compensation scheduling queue DF_Que1 is the deterministic sending queue.

[0172] If the csqf flag is 1, the output deterministic processing unit stores the first data packet corresponding to the second data packet into the CSQF scheduling queue DF_Que1 corresponding to the sending scheduling period, i.e. performs CSQF scheduling, and the CSQF scheduling queue DF_Que1 is a deterministic sending queue.

[0173] If the cp flag is not 1 and the csqf flag is not 1, the output deterministic processing unit stores the first data packet corresponding to the second data packet into the BF_Que1, i.e. the scheduling queue of the best effort flow.

[0174] If the pof flag is not 1 and the cp flag is 1, the multiple second data packets are not sorted, and the output deterministic processing unit stores the first data packet corresponding to the second data packet into the compensation scheduling queue DF_Que1 corresponding to the compensation scheduling period, i.e. performs compensation queue periodic scheduling, and the compensation scheduling queue DF_Que1 is a deterministic sending queue.

[0175] If the pof flag is not 1 and the csqf flag is 1, the multiple second data packets are not sorted, and the output deterministic processing unit stores the first data packet corresponding to the second data packet into the CSQF scheduling queue DF_Que1 corresponding to the sending scheduling period, i.e. performs CSQF scheduling, and the CSQF scheduling queue DF_Que1 is a deterministic sending queue.

[0176] If the pof flag is not 1, the cp flag is not 1, and the csqf flag is not 1, the multiple second data packets are not sorted, and the output deterministic processing unit stores the first data packet corresponding to the second data packet into DF_Que2, i.e. the scheduling queue of the non-control flow in the deterministic flow.

[0177] After the output deterministic processing unit performs strict priority scheduling on the first data packets in DF_Que1, DF_Que2 and BF_Que1, the first data packets are delivered to the output interface unit.

[0178] In step S29, the output interface unit performs scheduling on the first data packets in the compensation scheduling queue corresponding to the compensation scheduling period in each compensation scheduling period. Alternatively, the output interface unit performs scheduling on the first data packets in the CSQF scheduling queue corresponding to the sending scheduling period in each sending scheduling period.

[0179] In one example, the processing procedure for the intermediate node (i.e. the network device as an intermediate node) is that the above-mentioned units perform the following processing when determining that the network device is an intermediate node:

[0180] The ingress interface unit determines a receiving time stamp IngressT of the second data packet after receiving the second data packet, and parses the second data packet to obtain QoS information and IP information of the second data packet, and adds the receiving time stamp, the QoS information and the IP information to metadata of the second data packet. The classification and parsing control unit determines whether the second data packet is a deterministic flow based on the QoS information. Alternatively, the lowest 2 bits of IPv6.TC of the second data packet are read to determine whether the second data packet is a deterministic flow. If yes, the relay flag, gFlowID, Sequence Number and target scheduling period are parsed from the segment routing header of the second data packet. The relay flag, gFlowID, Sequence Number and target scheduling period are added to the metadata.

[0181] The ingress deterministic processing unit obtains the relay flag from the metadata. If the relay flag is a second value (such as 0), it indicates that the current node is an intermediate node, and the data is directly sent to the forwarding unit.

[0182] The forwarding unit obtains the relay flag from the metadata. If the relay flag is a second value (such as 0), it indicates that the current node is an intermediate node, and the forwarding unit can perform intermediate node SRv6 forwarding processing.

[0183] In one example, for a measurement message, the measurement message does not go through multi-transmission selection, and the hash value is not calculated again. The head node directly uses the hash value obtained from the SRH header to select the equivalent link.

[0184] As can be seen from the above technical solutions, in the embodiments of the present application, a centralized transmission implementation method for a deterministic network (such as a wide-area deterministic network) is proposed, which has flexible programmable ability, high scalability, can flexibly identify deterministic flows, and meets the expansion needs of DetNet. It can support PREOCF implementation, support cross-node deterministic transmission, and does not need to perform clock synchronization between nodes (or between domains), thereby realizing deterministic transmission of large-scale deterministic networks under cross-domain asynchronous clocks. It can provide high-precision indicators and has high scalability, centralized low cost, and is suitable for different specifications of access network routers, which helps to promote the large-scale landing of DetNet and ensures the correct implementation of DetNet.

[0185] Based on the same application concept as the network device described above, the embodiments of the present application also propose a network device, which can include: an input interface unit, a classification analysis control unit, an input deterministic processing unit and a forwarding unit, wherein: when the network device is a head node in a deterministic network, the input interface unit is configured to determine a receiving timestamp of a first data packet after receiving the first data packet, and add the receiving timestamp to the metadata of the first data packet; the classification analysis control unit is configured to add a local flow identifier of the first data packet to the metadata; the input deterministic processing unit is configured to obtain the receiving timestamp and the local flow identifier from the metadata, obtain a time delay value corresponding to the local flow identifier, and convert the receiving timestamp into a receiving scheduling period; determine a target scheduling period based on the receiving scheduling period and the time delay value; and the forwarding unit is configured to encapsulate a segment routing header for the first data packet to obtain a second data packet, the segment routing header including the target scheduling period; and send the second data packet to a tail node in a wide-area deterministic network, so that the tail node stores the second data packet in a queue corresponding to the target scheduling period, and schedules data packets in the queue at the target scheduling period.

[0186] In one example, the classification analysis control unit adds the local flow identifier of the first data packet to the metadata by: if it is determined that the first data packet is a deterministic flow based on a target flow feature of the first data packet, querying a target action parameter corresponding to the target flow feature from a configured ACL; wherein the ACL includes a correspondence between flow features and action parameters; and adding the target action parameter to the metadata; wherein the target action parameter includes the local flow identifier, a global flow identifier of the first data packet, and a relay flag indicating whether the time delay compensation control function is enabled or not; and wherein, if the relay flag indicates that the time delay compensation control function is enabled, the input deterministic processing unit performs the operation of determining the target scheduling period based on the receiving scheduling period and the time delay value; and wherein, when the forwarding unit encapsulates the segment routing header for the first data packet to obtain the second data packet, the segment routing header further includes the global flow identifier of the first data packet.

[0187] The input deterministic processing unit obtains the time delay value corresponding to the local flow identifier by: obtaining a configured deterministic flow configuration data table, the deterministic flow configuration data table including a plurality of data table entries, each data table entry corresponding to a flow identifier; and selecting a target data table entry corresponding to the local flow identifier from all data table entries of the deterministic flow configuration data table, the target data table entry including the time delay value corresponding to the local flow identifier.

[0188] In one example, the input deterministic processing unit determines the target scheduling period based on the receiving scheduling period and the time delay value by: calculating a sum of the receiving scheduling period and the time delay value, and performing a modulo operation on the sum and a total number of scheduling periods, and determining the target scheduling period based on the modulo result.

[0189] In an example, if the target data table item further comprises a shaping mode, and the shaping mode comprises a latency compensation scheduling mode, the latency value is a reference latency value, and the reference latency value represents a transmission latency of a data packet from a head-end node to a tail-end node, and the target scheduling period is a compensation scheduling period.

[0190] In an example, if the target data table item further comprises a shaping mode, and the shaping mode comprises a CSQF scheduling mode, the latency value is an offset latency value, and the offset latency value represents an offset duration from receiving a data packet to sending the data packet, and the target scheduling period is a sending scheduling period.

[0191] In an example, the network device further comprises an output deterministic processing unit and an output interface unit, wherein: when the network device is a tail-end node in the deterministic network, the output deterministic processing unit is configured to obtain a target scheduling period and a shaping mode from metadata of the second data packet; if the shaping mode is a latency compensation scheduling mode and the target scheduling period is a compensation scheduling period, the first data packet corresponding to the second data packet is stored in a compensation scheduling queue corresponding to the compensation scheduling period; if the shaping mode is a CSQF scheduling mode and the target scheduling period is a sending scheduling period, the first data packet is stored in a CSQF scheduling queue corresponding to the sending scheduling period; and the output interface unit is configured to schedule the first data packet in the compensation scheduling queue corresponding to each compensation scheduling period, or schedule the first data packet in the CSQF scheduling queue corresponding to each sending scheduling period.

[0192] In an example, when the network device is the tail-end node, the classification and analysis control unit is configured to obtain a global flow identifier and a target scheduling period from the second data packet, and add the global flow identifier and the target scheduling period to metadata of the second data packet; and when the network device is the tail-end node, the input deterministic processing unit is configured to obtain the global flow identifier from the metadata, determine a local flow identifier based on the global flow identifier, obtain a configured deterministic flow configuration data table, determine that the deterministic flow configuration data table comprises a plurality of data table items, select a target data table item corresponding to the local flow identifier from all data table items of the deterministic flow configuration data table, and add a shaping mode to the metadata, wherein the target data table item comprises the shaping mode.

[0193] Based on the same application concept as the network device described above, a data packet transmission method is further provided in the embodiments of the present application, and is applied to a network device, the network device comprises an input interface unit, a classification and analysis control unit, an input deterministic processing unit and a forwarding unit, as shown in FIG. 7, which is a flowchart of the method, and the method can comprise:

[0194] Step 701, when the device is a head-end node in a deterministic network, the input interface unit, after receiving the first data packet, determines a receiving timestamp of the first data packet, and adds the receiving timestamp to metadata of the first data packet.

[0195] Step 702, the classification and analysis control unit adds a local flow identity of the first data packet to the metadata.

[0196] Step 703, the input deterministic processing unit obtains the receiving timestamp and the local flow identity from the metadata, obtains a time delay value corresponding to the local flow identity, converts the receiving timestamp into a receiving scheduling period, and determines a target scheduling period based on the receiving scheduling period and the time delay value.

[0197] Step 704, the forwarding unit encapsulates a segment routing header for the first data packet to obtain a second data packet, the segment routing header including the target scheduling period, and sends the second data packet to the tail-end node, so that the tail-end node stores the second data packet in a queue corresponding to the target scheduling period, and schedules data packets in the queue at the target scheduling period.

[0198] In one example, the classification and analysis control unit adds the local flow identity of the first data packet to the metadata, including: if the classification and analysis control unit determines that the first data packet is a deterministic flow based on a target flow feature of the first data packet, querying a target action parameter corresponding to the target flow feature from an already configured ACL; wherein the ACL includes a corresponding relationship between a flow feature and an action parameter; the classification and analysis control unit adds the target action parameter to the metadata; the target action parameter includes the local flow identity, a global flow identity of the first data packet, and a relay flag, the relay flag indicating that the time delay compensation control function is enabled or not enabled; if the relay flag indicates that the time delay compensation control function is enabled, the input deterministic processing unit performs the operation of determining the target scheduling period based on the receiving scheduling period and the time delay value; wherein when the forwarding unit encapsulates the segment routing header for the first data packet to obtain the second data packet, the segment routing header further includes the global flow identity of the first data packet.

[0199] In one example, the input deterministic processing unit obtains the time delay value corresponding to the local flow identity, including: the input deterministic processing unit obtains a deterministic flow configuration data table, the deterministic flow configuration data table including a plurality of data table entries; the input deterministic processing unit selects a target data table entry corresponding to the local flow identity from all data table entries of the deterministic flow configuration data table, the target data table entry including the time delay value corresponding to the local flow identity.

[0200] In one example, the input deterministic processing unit determines the target scheduling period based on the received scheduling period and the delay value, including: calculating a sum value of the received scheduling period and the delay value, and performing a modulo operation on the sum value and a total number of scheduling periods, and determining the target scheduling period based on a result of the modulo operation; wherein, if the target data table entry further includes a shaping mode, and the shaping mode includes a delay-compensated scheduling mode, the delay value is a reference delay value, and the reference delay value represents a transmission delay of the data packet from the head-end node to the tail-end node, and the target scheduling period is a compensated scheduling period; and / or, if the target data table entry further includes a shaping mode, and the shaping mode includes a CSQF scheduling mode, the delay value is an offset delay value, the offset delay value represents an offset duration from receiving the data packet to sending the data packet, and the target scheduling period is a sending scheduling period.

[0201] In one example, the target data table entry further includes a prf flag, an initial sequence number, a path quantity, and a plurality of outgoing interfaces, and the prf flag indicates whether the PRF function is enabled or not enabled; if the prf flag indicates that the PRF function is enabled, the input deterministic processing unit can further include: adding 1 to the initial sequence number to obtain a target sequence number, and obtaining a plurality of first data packets corresponding to the path quantity; updating the target sequence number as the initial sequence number in the target data table entry, and adding the target sequence number and the plurality of outgoing interfaces to the metadata; wherein, the forwarding unit obtains the target sequence number from the metadata, and the forwarding unit encapsulates a segment routing header for each first data packet to obtain a plurality of second data packets, and each second data packet includes the target sequence number; wherein, the forwarding unit obtains the plurality of outgoing interfaces from the metadata, and sends the plurality of second data packets through the plurality of outgoing interfaces.

[0202] In one example, when the forwarding unit encapsulates the segment routing header for the first data packet, if the metadata includes the prf flag and the prf flag indicates that the PRF function is enabled, the segment routing header includes a specified flag, and the specified flag indicates multiple sending and selective receiving information, and the specified flag is used to enable the tail-end node to select one second data packet from the plurality of second data packets when the plurality of second data packets are received; if the metadata includes the shaping mode, and the shaping mode includes the delay-compensated scheduling mode, the target scheduling period in the segment routing header includes a compensated scheduling period; and / or, if the shaping mode includes the CSQF scheduling mode, the target scheduling period includes a sending scheduling period.

[0203] In one example, the network device further comprises an output deterministic processing unit and an output interface unit, and the method further comprises: when the network device is a tail-end node in the deterministic network, the output deterministic processing unit obtains the target scheduling period and the shaping mode from the metadata of the second data packet; if the shaping mode is the delay compensation scheduling mode and the target scheduling period is the compensation scheduling period, the first data packet corresponding to the second data packet is stored in the compensation scheduling queue corresponding to the compensation scheduling period; if the shaping mode is the CSQF scheduling mode and the target scheduling period is the sending scheduling period, the first data packet is stored in the CSQF scheduling queue corresponding to the sending scheduling period; in each compensation scheduling period, the output interface unit schedules the first data packet in the compensation scheduling queue corresponding to the compensation scheduling period; or, in each sending scheduling period, the output interface unit schedules the first data packet in the CSQF scheduling queue corresponding to the sending scheduling period.

[0204] In one example, when the network device is the tail-end node, the classification and analysis control unit obtains the global flow identifier and the target scheduling period from the second data packet, and adds the global flow identifier and the target scheduling period to the metadata of the second data packet; when the network device is the tail-end node, the input deterministic processing unit obtains the global flow identifier from the metadata, and determines the local flow identifier based on the global flow identifier; obtains the configured deterministic flow configuration data table, the deterministic flow configuration data table comprising a plurality of data table entries; selects the target data table entry corresponding to the local flow identifier from all data table entries of the deterministic flow configuration data table, the target data table entry comprising the shaping mode; and adds the shaping mode to the metadata.

[0205] When the network device is the tail-end node, the classification and analysis control unit obtains the target sequence number from the second data packet, and adds the target sequence number to the metadata; the target data table entry further comprises a pef flag, the pef flag indicating that the PEF function is enabled or disabled; when the network device is the tail-end node, if the pef flag indicates that the PEF function is enabled, the input deterministic processing unit obtains the target sequence number from the metadata of the second data packet after obtaining the second data packet; and determines whether the target sequence number has existed in a historical time window, if yes, determines that the second data packet is a duplicate data packet, and discards the second data packet.

[0206] The target data table entry further includes a pof flag, the pof flag indicating enabling or disabling a POF function; if the pof flag indicates enabling the POF function, the output deterministic processing unit, after obtaining the second data packet, acquires a target sequence number from metadata of the second data packet; sorts each second data packet based on target sequence numbers of the plurality of second data packets; and based on the plurality of second data packets that have been sorted, traverses each second data packet in sequence to cause the output deterministic processing unit to store a first data packet corresponding to the second data packet to a compensation scheduling queue or a CSQF scheduling queue based on a target scheduling period of the second data packet.

[0207] The above description is merely illustrative of the embodiments of the present application and is not intended to limit the present application. The present application can be modified and changed by those skilled in the art in various ways. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims

A data packet transmission method, characterized in that, The method is applied to a network device, and the network device comprises an input interface unit, a classification analysis control unit, an input deterministic processing unit and a forwarding unit, and the method comprises the following steps: When the network device is a head-end node in a deterministic network, the input interface unit determines a receiving timestamp of a first data packet after receiving the first data packet, and adds the receiving timestamp to metadata of the first data packet; The classification analysis control unit adds a local flow identifier of the first data packet to the metadata; The input deterministic processing unit acquires the receiving timestamp and the local flow identifier from the metadata, acquires a time delay value corresponding to the local flow identifier, converts the receiving timestamp into a receiving scheduling period, and determines a target scheduling period based on the receiving scheduling period and the time delay value; The forwarding unit encapsulates a segment routing header for the first data packet to obtain a second data packet, the segment routing header comprising the target scheduling period, and sends the second data packet to a tail-end node in the deterministic network, so that the tail-end node stores the second data packet in a queue corresponding to the target scheduling period and schedules data packets in the queue at the target scheduling period. The method of claim 1, wherein The classification analysis control unit adds a local flow identifier of the first data packet to the metadata, comprising: If the classification analysis control unit determines that the first data packet is a deterministic flow based on a target flow feature of the first data packet, the classification analysis control unit queries a target action parameter corresponding to the target flow feature from an access control list (ACL) configured by the classification analysis control unit, wherein the ACL comprises a corresponding relationship between a flow feature and an action parameter; The classification analysis control unit adds the target action parameter to the metadata, wherein the target action parameter comprises the local flow identifier, a global flow identifier of the first data packet and a relay flag, and the relay flag indicates that the time delay compensation control function is enabled or not enabled; If the relay flag indicates that the time delay compensation control function is enabled, the input deterministic processing unit performs the operation of determining the target scheduling period based on the receiving scheduling period and the time delay value; When the forwarding unit encapsulates a segment routing header for the first data packet to obtain a second data packet, the segment routing header further comprises the global flow identifier of the first data packet. According to the method of claim 1, wherein The input deterministic processing unit acquires the time delay value corresponding to the local flow identifier, comprising: The input deterministic processing unit acquires a deterministic flow configuration data table configured by the input deterministic processing unit, wherein the deterministic flow configuration data table comprises a plurality of data table entries, and each data table entry corresponds to a flow identifier; The input deterministic processing unit selects a target data table entry corresponding to the local flow identifier from all data table entries of the deterministic flow configuration data table, wherein the target data table entry comprises the time delay value corresponding to the local flow identifier. The method according to claim 3, characterized in that The input deterministic processing unit determines the target scheduling period based on the receiving scheduling period and the time delay value, comprising: calculating a sum value of the receiving scheduling period and the latency value, and performing a modulo operation on the sum value and a total number of scheduling periods, determining the target scheduling period based on a result of the modulo operation; wherein, if the target data table entry further comprises a shaping mode, and the shaping mode comprises a latency compensation scheduling mode, the latency value is a reference latency value, the reference latency value represents a transmission latency of a data packet from a head-end node to a tail-end node, and the target scheduling period is a compensation scheduling period; and / or, if the target data table entry further comprises a shaping mode, and the shaping mode comprises a specified period queuing forwarding (CSQF) scheduling mode, the latency value is an offset latency value, the offset latency value represents an offset duration from receiving a data packet to sending the data packet, and the target scheduling period is a sending scheduling period. The method of claim 3, wherein the target data table entry further comprises a prf flag, an initial sequence number, a path number, and a plurality of egress interfaces, the prf flag indicating whether a data packet replication (PRF) function is enabled or not enabled; if the prf flag indicates that the PRF function is enabled, the method further comprises: the input deterministic processing unit increments the initial sequence number by 1 to obtain a target sequence number, and obtains a plurality of first data packets corresponding to the path number; the input deterministic processing unit updates the target sequence number as the initial sequence number in the target data table entry, and adds the target sequence number and the plurality of egress interfaces to the metadata; wherein, the forwarding unit obtains the target sequence number from the metadata, encapsulates a segment routing header for each first data packet to obtain a plurality of second data packets, and each second data packet comprises the target sequence number; and the forwarding unit obtains the plurality of egress interfaces from the metadata, and sends the plurality of second data packets through the plurality of egress interfaces. The method of claim 1, wherein when the forwarding unit encapsulates a segment routing header for the first data packet to obtain a second data packet, if the metadata comprises a prf flag and the prf flag indicates that the PRF function is enabled, the segment routing header comprises a specified flag, and the specified flag indicates multiple transmission and selective reception information, the specified flag being used to enable the tail-end node to select one second data packet from the plurality of second data packets when the plurality of second data packets are received; if the metadata comprises a shaping mode, and the shaping mode comprises a latency compensation scheduling mode, the target scheduling period in the segment routing header comprises a compensation scheduling period; and / or, if the shaping mode comprises a CSQF scheduling mode, the target scheduling period comprises a sending scheduling period. The method of claim 1, wherein the network device further comprises an output deterministic processing unit and an output interface unit, and the method comprises: When the network device is the tail node in the deterministic network, the output deterministic processing unit obtains a target scheduling period and a shaping mode from metadata of the second data packet; if the shaping mode is a delay compensation scheduling mode and the target scheduling period is a compensation scheduling period, the first data packet corresponding to the second data packet is stored in a compensation scheduling queue corresponding to the compensation scheduling period; if the shaping mode is a CSQF scheduling mode and the target scheduling period is a sending scheduling period, the first data packet is stored in a CSQF scheduling queue corresponding to the sending scheduling period. In each compensation scheduling period, the output interface unit schedules the first data packet in the compensation scheduling queue corresponding to the compensation scheduling period; or in each sending scheduling period, the output interface unit schedules the first data packet in the CSQF scheduling queue corresponding to the sending scheduling period. The method of claim 7, wherein The method further comprises: When the network device is the tail node, the classification and analysis control unit obtains a global flow identifier and a target scheduling period from the second data packet, and adds the global flow identifier and the target scheduling period to metadata of the second data packet. When the network device is the tail node, the input deterministic processing unit obtains the global flow identifier from the metadata, and determines a local flow identifier based on the global flow identifier; obtains a configured deterministic flow configuration data table, the deterministic flow configuration data table comprising a plurality of data table entries, each data table entry corresponding to a flow identifier; selects a target data table entry corresponding to the local flow identifier from all data table entries of the deterministic flow configuration data table, the target data table entry comprising a shaping mode; and adds the shaping mode to the metadata. The method of claim 8, wherein The method further comprises: When the network device is the tail node, the classification and analysis control unit obtains a target sequence number from the second data packet, and adds the target sequence number to the metadata. The target data table entry further comprises a pef flag, the pef flag indicating that a PEF function is enabled or disabled; If the pef flag indicates that the PEF function is enabled, the method further comprises: When the network device is the tail node, the input deterministic processing unit obtains the target sequence number from metadata of the second data packet after obtaining the second data packet; and determines whether the target sequence number has existed in a historical time window, and if so, determines that the second data packet is a duplicate data packet, and discards the second data packet. According to the method of claim 8, wherein The target data table entry further comprises a pof flag, the pof flag indicating that a POF function is enabled or disabled; If the pof flag indicates that the POF function is enabled, the method further comprises: When the network device is the tail node, the output deterministic processing unit obtains a target sequence number from metadata of the second data packet after obtaining the second data packet; and ​ The second data packets are sorted based on target sequence numbers of the second data packets; and each of the second data packets is traversed in sequence based on the sorted second data packets, so that the output deterministic processing unit stores a first data packet corresponding to the second data packet into a compensation scheduling queue or a CSQF scheduling queue based on a target scheduling period of the second data packet. A network device, characterized in that The network device comprises: an input interface unit, a classification analysis control unit, an input deterministic processing unit, and a forwarding unit, wherein: when the network device is a head-end node in a deterministic network, the input interface unit is configured to determine a receiving timestamp of a first data packet after receiving the first data packet, and add the receiving timestamp to metadata of the first data packet; the classification analysis control unit is configured to add a local flow identifier of the first data packet to the metadata; the input deterministic processing unit is configured to obtain the receiving timestamp and the local flow identifier from the metadata, obtain a time delay value corresponding to the local flow identifier, convert the receiving timestamp into a receiving scheduling period, and determine a target scheduling period based on the receiving scheduling period and the time delay value; the forwarding unit is configured to encapsulate a segment routing header for the first data packet to obtain a second data packet, the segment routing header comprising the target scheduling period, and send the second data packet to a tail-end node in the deterministic network, so that the tail-end node stores the second data packet into a queue corresponding to the target scheduling period, and schedules data packets in the queue at the target scheduling period. The network device of claim 11, wherein The classification analysis control unit adds a local flow identifier of a first data packet to metadata, and is specifically configured to: if it is determined that the first data packet is a deterministic flow based on a target flow feature of the first data packet, query a target action parameter corresponding to the target flow feature from an access control list (ACL) configured, wherein the ACL comprises a corresponding relationship between a flow feature and an action parameter; add the target action parameter to the metadata, wherein the target action parameter comprises the local flow identifier, a global flow identifier of the first data packet, and a relay flag, and the relay flag indicates whether a time delay compensation control function is enabled or not; wherein, if the relay flag indicates that the time delay compensation control function is enabled, the input deterministic processing unit performs the operation of determining the target scheduling period based on the receiving scheduling period and the time delay value; wherein, when the forwarding unit encapsulates a segment routing header for the first data packet to obtain a second data packet, the segment routing header further comprises a global flow identifier of the first data packet. The network device according to claim 11, wherein: the input deterministic processing unit obtains a time delay value corresponding to the local flow identifier, and is specifically configured to: obtain a deterministic flow configuration data table configured, wherein the deterministic flow configuration data table comprises a plurality of data table entries, and each data table entry corresponds to a flow identifier; ​ select a target data table item corresponding to the local flow identifier from all data table items of the deterministic flow configuration data table, the target data table item including a time delay value corresponding to the local flow identifier. The network device of claim 13, wherein The input deterministic processing unit is specifically configured to determine a target scheduling period based on the received scheduling period and the time delay value in the following manner: calculate a sum of the received scheduling period and the time delay value, and perform a modulo operation on the sum and a total number of scheduling periods, and determine the target scheduling period based on a modulo result; wherein, if the target data table item further includes a shaping mode, and the shaping mode includes a time delay compensation scheduling mode, the time delay value is a reference time delay value, the reference time delay value represents a transmission time delay of a data packet from a head-end node to a tail-end node, and the target scheduling period is a compensation scheduling period; and / or, if the target data table item further includes a shaping mode, and the shaping mode includes a specified period queuing forwarding (CSQF) scheduling mode, the time delay value is an offset time delay value, the offset time delay value represents an offset time length from receiving a data packet to sending the data packet, and the target scheduling period is a sending scheduling period. The network device of claim 11, wherein The network device further includes an output deterministic processing unit and an output interface unit, wherein: when the network device is a tail-end node in the deterministic network, the output deterministic processing unit is configured to acquire a target scheduling period and a shaping mode from metadata of a second data packet; if the shaping mode is a time delay compensation scheduling mode and the target scheduling period is a compensation scheduling period, store a first data packet corresponding to the second data packet into a compensation scheduling queue corresponding to the compensation scheduling period; if the shaping mode is a CSQF scheduling mode and the target scheduling period is a sending scheduling period, store the first data packet into a CSQF scheduling queue corresponding to the sending scheduling period. The output interface unit is configured to schedule the first data packet in the compensation scheduling queue corresponding to each compensation scheduling period, or schedule the first data packet in the CSQF scheduling queue corresponding to each sending scheduling period. The network device according to claim 15, wherein: when the network device is the tail-end node, the classification and analysis control unit is configured to acquire a global flow identifier and a target scheduling period from a second data packet, and add the global flow identifier and the target scheduling period to metadata of the second data packet; when the network device is the tail-end node, the input deterministic processing unit is configured to acquire the global flow identifier from the metadata, and determine a local flow identifier based on the global flow identifier; acquire a configured deterministic flow configuration data table, the deterministic flow configuration data table including a plurality of data table items, each data table item corresponding to a flow identifier; select a target data table item corresponding to the local flow identifier from all data table items of the deterministic flow configuration data table, the target data table item including a shaping mode; and add the shaping mode to the metadata.