Message processing method and device
By determining the TSN receiving queue to which the message belongs and adding interface information in the 5G TSN network, and processing messages using specific DMA channels, the problem of message transmission delay in NW-TT is solved, and more efficient transmission is achieved.
Patent Information
- Application Number
- CN202411204865.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-29
AI Technical Summary
In 5G TSN network, when NW-TT receives and sends messages, the message transmission delay is long due to the mixed use of DMA channels between different TSN reception queues and send queues of the same interface.
By determining the queue identity of the TSN receiving queue to which the message belongs when receiving the message, and adding target interface information to the message, the message is written or read to the DPDK of the UPF network element using a specific DMA reception and transmission channel. In the receiving and sending queue, the re-determination of the TSN sending queue is reduced, and the messages are sent directly based on the DMA sending channel indicated by the CPU core.
It shortens the message transmission delay and improves the transmission efficiency of the 5G TSN network.
Smart Images

Figure CN119095110A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message processing method and device. Background Art
[0002] Time Sensitive Networking (TSN) is a network technology that meets the needs of real-time communication and aims to achieve precise time synchronization and low-latency transmission of data in the network.
[0003] TSN networks are usually used in scenarios with high requirements for real-time performance and reliability, such as the industrial Internet and the automotive field. In addition, traditional TSN networks are wired networks, but in many application scenarios, wired networks have limitations such as high cost and poor flexibility.
[0004] With the development of the new generation of fifth-generation mobile communication technology (5G), 5G technology can be applied to TSN networks, which are called 5G TSN networks.
[0005] like Figure 1 As shown, the 5G system (5G System, 5GS) as a TSN bridge may include a user equipment (UserEquipment, UE), a device side TSN translator (Device Side TSN Translator, DS-TT) associated with the UE, a user plane function (User Plane Function, UPF) network element, a network side TSN translator (NetworkSide TSN Translator, NW-TT) associated with the UPF network element, a session management function (Session Management Function, SMF) network element, a policy control function (Policy Control Function, PCF) network element, and a time-sensitive network application function (Time-Sensitive Networking Application Function, TSN AF) network element, etc.
[0006] At present, when NW-TT receives a GTP message or Ethernet message that needs to be cached in the corresponding TSN receive queue and needs to be sent out from the corresponding TSN send queue, it is usually because different TSN receive queues of the same interface mix DMA receive channels, and different TSN send queues of the same interface mix DMA send channels, so NW-TT needs to calculate the queue ID of the TSN receive queue once and the queue ID of the TSN send queue once, resulting in a long message transmission delay. Summary of the invention
[0007] In order to overcome the problems existing in the related art, the present application provides a message processing method and device.
[0008] According to a first aspect of an embodiment of the present application, a message processing method is provided, the method being applied to an NW-TT in a 5G TSN network, wherein different TSN receiving queues corresponding to each interface on the NW-TT correspond to different direct memory access (DMA) receiving channels, and different TSN sending queues corresponding to each interface correspond to different DMA sending channels, and the method comprises:
[0009] When a first message is received through a target interface, determining a queue identifier corresponding to a TSN receiving queue to which the first message belongs, wherein the first message is an Ethernet message or a General Packet Radio Service Tunneling Protocol (GPRSTunneling Protocol, GTP) message;
[0010] Adding the interface information of the target interface to the first message to obtain a second message, and caching the second message in the TSN receiving queue;
[0011] Using the DMA receiving channel corresponding to the queue identifier, the second message read from the TSN receiving queue is written into the data plane development kit (Data Plane Development Kit, DPDK) receiving queue corresponding to the DMA receiving channel on the UPF network element in the 5G TSN network, so that when the CPU core corresponding to the DPDK receiving queue in the UPF network element reads the second message, based on the interface information, the forwarding table is updated, the second message is processed to obtain a third message that does not carry the interface information, and when it is determined that the third message needs to be forwarded, the outbound interface information of the third message is determined, the third message is processed to obtain a fourth message, the fourth message is cached in the DPDK sending queue corresponding to the DPDK receiving queue, and then the DMA sending channel corresponding to the DPDK sending queue is used to send the fourth message read from the DPDK sending queue to the NW-TT, and the fourth message carries the outbound interface information;
[0012] After receiving the fourth message, the fourth message is processed, and the processed message is cached in a TSN sending queue corresponding to the DMA sending channel on the interface corresponding to the outgoing interface information to wait for being sent out.
[0013] According to a second aspect of an embodiment of the present application, a message processing method is provided, the method being applied to any CPU core in a UPF network element in a 5G TSN network, the method comprising:
[0014] When a first message is read from the DPDK receiving queue that needs to be processed, the forwarding table is updated based on the interface information carried in the first message;
[0015] Processing the first message to obtain a second message that does not carry the interface information, and when determining that the second message needs to be forwarded, determining the outbound interface information of the second message;
[0016] Processing the second message to obtain a third message, and caching the third message in a DPDK sending queue corresponding to the DPDK receiving queue, wherein the third message carries the outgoing interface information;
[0017] Using the DMA sending channel corresponding to the DPDK sending queue, the third message read from the DPDK sending queue is sent to the NW-TT, so that when the NW-TT receives the third message, it processes the third message and caches the processed message in the TSN sending queue corresponding to the DMA sending channel on the interface corresponding to the outgoing interface information to wait for sending out;
[0018] Among them, the first message is an Ethernet message or a GTP message, and the first message is when the NW-TT receives the fourth message through the target interface, determines the queue identifier corresponding to the TSN receive queue to which the fourth message belongs, adds the interface information of the target interface to the fourth message, obtains the first message, and uses the DMA receive channel corresponding to the queue identifier to write the first message read from the TSN receive queue into the DPDK receive queue;
[0019] Different TSN receiving queues corresponding to each interface on the NW-TT correspond to different DMA receiving channels, and different TSN sending queues corresponding to each interface correspond to different DMA sending channels.
[0020] According to a third aspect of an embodiment of the present application, a message processing device is provided, the device being applied to an NW-TT in a 5G TSN network, wherein different TSN receiving queues corresponding to each interface on the NW-TT correspond to different DMA receiving channels, and different TSN sending queues corresponding to each interface correspond to different DMA sending channels, and the device comprises:
[0021] A determination module, configured to determine, when a first message is received through a target interface, a queue identifier corresponding to a TSN receiving queue to which the first message belongs, wherein the first message is an Ethernet message or a GTP message;
[0022] A first processing module, configured to add the interface information of the target interface to the first message, obtain a second message, and cache the second message in the TSN receiving queue;
[0023] A second processing module is used to write the second message read from the TSN receiving queue into the DPDK receiving queue corresponding to the DMA receiving channel on the UPF network element in the 5G TSN network by using the DMA receiving channel corresponding to the queue identifier, so that when the CPU core corresponding to the DPDK receiving queue in the UPF network element reads the second message, based on the interface information, the forwarding table is updated, the second message is processed to obtain a third message that does not carry the interface information, and when the third message needs to be forwarded, the outbound interface information of the third message is determined, the third message is processed to obtain a fourth message, the fourth message is cached in the DPDK sending queue corresponding to the DPDK receiving queue, and then the fourth message read from the DPDK sending queue is sent to the NW-TT by using the DMA sending channel corresponding to the DPDK sending queue, and the fourth message carries the outbound interface information;
[0024] The third processing module is used to process the fourth message after receiving the fourth message, and cache the processed message in the TSN sending queue corresponding to the DMA sending channel on the interface corresponding to the output interface information to wait for sending out.
[0025] According to a fourth aspect of an embodiment of the present application, a message processing device is provided, the device being applied to any CPU core in a UPF network element in a 5G TSN network, the device comprising:
[0026] A reading and updating module, configured to update a forwarding table based on interface information carried in a first message when reading a first message from a DPDK receiving queue that needs to be processed by the module;
[0027] A first processing module, configured to process the first message to obtain a second message that does not carry the interface information, and determine the outbound interface information of the second message when it is determined that the second message needs to be forwarded;
[0028] A second processing module is used to process the second message to obtain a third message, and cache the third message in a DPDK sending queue corresponding to the DPDK receiving queue, wherein the third message carries the outgoing interface information;
[0029] A third processing module is used to send the third message read from the DPDK sending queue to the NW-TT in the 5G TSN network by using the DMA sending channel corresponding to the DPDK sending queue, so that the NW-TT processes the third message when receiving the third message, and caches the processed message in the TSN sending queue corresponding to the DMA sending channel on the interface corresponding to the outgoing interface information to wait for sending out;
[0030] Among them, the first message is an Ethernet message or a GTP message, and the first message is when the NW-TT receives the fourth message through the target interface, determines the queue identifier corresponding to the TSN receive queue to which the fourth message belongs, adds the interface information of the target interface to the fourth message, obtains the first message, and uses the DMA receive channel corresponding to the queue identifier to write the first message read from the TSN receive queue into the DPDK receive queue;
[0031] Different TSN receiving queues corresponding to each interface on the NW-TT correspond to different DMA receiving channels, and different TSN sending queues corresponding to each interface correspond to different DMA sending channels.
[0032] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0033] In an embodiment of the present application, when the NW-TT in the 5G TSN network receives an Ethernet message or a GTP message, the NW-TT carries the input interface information of the received Ethernet message or the GTP message in the Ethernet message or the GTP message, and interacts with the relevant CPU core in the UPF network element in the 5G TSN network. When it is necessary to send an Ethernet message or an original message with an Ethernet header added (i.e., the original message carried in the GTP message), the corresponding TSN sending queue is directly determined according to the DMA sending channel indicated by the relevant CPU core, and there is no need to redetermine the corresponding TSN sending queue. In this way, the message transmission delay is shortened.
[0034] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in the specification and constitute a part of this application, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
[0036] Figure 1 This is a schematic diagram of the existing 5G TSN network architecture;
[0037] Figure 2 One of the flow charts of a message processing method provided in an embodiment of the present application;
[0038] Figure 3 A schematic diagram of the message format of the first message provided in an embodiment of the present application;
[0039] Figure 4 A second flowchart of a message processing method provided in an embodiment of the present application;
[0040] Figure 5 A schematic diagram of the interaction between the NW-TT and the UPF network element provided in the embodiment of the present application;
[0041] Figure 6 One of the structural schematic diagrams of a message processing device provided in an embodiment of the present application;
[0042] Figure 7 The second structural diagram of a message processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0044] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0045] It should be understood that, although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" or "if" as used herein may be interpreted as "at the time of" or "when...".
[0046] Next, the embodiments of the present application are described in detail.
[0047] The embodiment of the present application provides a message processing method, which is applied to NW-TT in a 5G TSN network. Different TSN receiving queues corresponding to each interface on the NW-TT correspond to different direct memory access DMA receiving channels, and different TSN sending queues corresponding to each interface correspond to different DMA sending channels, such as Figure 2 As shown, the method may include the following steps:
[0048] S21. When a first message is received through a target interface, determine a queue identifier corresponding to a TSN receiving queue to which the first message belongs.
[0049] In this step, the first message may be an Ethernet message or a GTP message.
[0050] When the first message is an Ethernet message, the target interface may be the N3 interface or the N6 interface.
[0051] In the case where the first message is a GTP message, the target interface is the N3 interface.
[0052] S22: Add the interface information of the target interface to the first message to obtain a second message, and cache the second message in a TSN receiving queue.
[0053] S23. Use the DMA receiving channel corresponding to the queue identifier to write the second message read from the TSN receiving queue into the DPDK receiving queue corresponding to the DMA receiving channel on the UPF network element in the 5G TSN network, so that when the CPU core corresponding to the DPDK receiving queue in the UPF network element reads the second message, it updates the forwarding table based on the interface information, processes the second message, and obtains a third message that does not carry the interface information. When it is determined that the third message needs to be forwarded, the outgoing interface information of the third message is determined, the third message is processed to obtain a fourth message, and the fourth message is cached in the DPDK sending queue corresponding to the DPDK receiving queue. Then, use the DMA sending channel corresponding to the DPDK sending queue to send the fourth message read from the DPDK sending queue to NW-TT.
[0054] In this step, the fourth message carries outgoing interface information.
[0055] S24. After receiving the fourth message, the fourth message is processed, and the processed message is cached in a TSN sending queue corresponding to the DMA sending channel on the interface corresponding to the outgoing interface information to wait for being sent out.
[0056] Specifically, in the above step S21, the NW-TT may determine the queue identifier corresponding to the TSN receiving queue to which the first message belongs in the following manner:
[0057] When the first message is an Ethernet message, a hash operation is performed on the five-tuple information of the first message according to a preset hash algorithm to obtain an operation result, and the operation result is determined as the queue identifier corresponding to the TSN receiving queue to which the first message belongs; or
[0058] When the first message is a GTP message, a hash operation is performed on the five-tuple information of the original message carried in the first message according to a preset hash algorithm to obtain an operation result, and the operation result is determined as the queue identifier corresponding to the TSN receiving queue to which the first message belongs.
[0059] It should be noted that in the embodiment of the present application, the number of queues of all TSN receive queues and all TSN send queues corresponding to all interfaces on NW-TT are the same, and a TSN receive queue corresponding to any interface on NW-TT can be bound to the same DMA receive channel with a TSN receive queue corresponding to other interfaces.
[0060] In addition, one DMA receive channel uniquely corresponds to one DPDK receive queue, one DPDK receive queue uniquely corresponds to one DPDK send queue, and one DMA send channel uniquely corresponds to one DPDK send queue.
[0061] It should be further explained that the above-mentioned preset hash algorithm can be an MD5 algorithm or a SHA-1 algorithm, etc.
[0062] Specifically, in the above step S22, the NW-TT may implement the step of adding the interface information of the target interface in the first message in the following manner:
[0063] Add the interface information before the Ethernet header of the first message.
[0064] In one example, the interface information may be embodied in a private header (Private_header) in front of an Ethernet header (Eth_header) of the first message, and the interface information may be an interface identifier (PortIdentifier, Port ID) of the target interface. Figure 3 shown.
[0065] It should be noted that in the embodiment of the present application, the reason for adding the interface information of the target interface in the first message is mainly to facilitate the subsequent CPU core to determine the egress port information of the message in the above-mentioned DPDK receive queue, and carry the relevant egress port information in the message, thereby ultimately reducing the number of times the TSN sending queue is determined, thereby shortening the message transmission delay.
[0066] It should be further explained that in an embodiment of the present application, on the above-mentioned UPF network element, a pair of receiving queues and sending queues are bound to one CPU core, that is, the messages in this receiving queue and this sending queue are processed by the bound CPU core.
[0067] In addition, for the CPU core in step S23 above, whether the third message needs to be forwarded may be determined in the following manner:
[0068] When the third message is an Ethernet message, determining whether the destination MAC address of the third message is the MAC address of the target interface;
[0069] If the judgment result is yes, it is determined that there is no need to forward the third message;
[0070] If the judgment result is no, it is determined that the third message needs to be forwarded; or,
[0071] When the third message is a GTP message, determining whether the destination IP address of the third message is the IP address of the target interface;
[0072] If the judgment result is yes, it is determined that there is no need to forward the third message;
[0073] If the judgment result is no, it is determined that the third message needs to be forwarded.
[0074] It should be noted that, when the CPU core determines that the third message does not need to be forwarded, it performs subsequent processing according to the existing processing flow, which will not be described in detail here.
[0075] Furthermore, for the CPU core, when the second message is an Ethernet message, the step of processing the second message can be implemented in the following manner:
[0076] The interface information carried in the second message is deleted to obtain a third message.
[0077] The CPU core can also implement the step of processing the third message in the following manner:
[0078] The outgoing interface information is added before the Ethernet header of the third message to obtain a fourth message.
[0079] Here, the third message is actually the first message.
[0080] In the case where the second message is a GTP message, the CPU core may implement the step of processing the second message in the following manner:
[0081] The UPF thread is called to delete the interface information carried in the second message, and decapsulate the deleted message to obtain a third message.
[0082] The CPU core can also implement the step of processing the third message in the following manner:
[0083] An Ethernet header is added to the third message, and the outbound interface information is added before the Ethernet header of the message after the addition, so as to obtain a fourth message.
[0084] Here, the third message is actually the original message carried in the second message. Moreover, the specific process of adding the Ethernet header to the third message by the CPU core is a prior art and will not be described in detail here. Specifically, in the above step S24, the NW-TT implements the step of processing the fourth message in the following manner:
[0085] The outbound interface information carried in the fourth message is deleted.
[0086] It should be noted that when it is necessary to send the processed message in the TSN sending queue, the NW-TT sends the processed message.
[0087] The above content is the implementation process of the message processing method described on the NW-TT side. The following describes the implementation process of the message processing method on any CPU core in the UPF network element.
[0088] The embodiment of the present application also provides a message processing method, which is applied to any CPU core in a UPF network element in a 5G TSN network, such as Figure 4 As shown, the method may include the following steps:
[0089] S41. When a first message is read from a DPDK receiving queue that needs to be processed, the forwarding table is updated based on the interface information carried in the first message.
[0090] S42: Process the first message to obtain a second message that does not carry interface information, and when it is determined that the second message needs to be forwarded, determine the outbound interface information of the second message.
[0091] S43: Process the second message to obtain a third message, and cache the third message in a DPDK sending queue corresponding to the DPDK receiving queue.
[0092] In this step, the third message carries the outgoing interface information.
[0093] S44. Use the DMA sending channel corresponding to the DPDK sending queue to send the third message read from the DPDK sending queue to the NW-TT in the 5G TSN network, so that when the NW-TT receives the third message, it processes the third message and caches the processed message in the TSN sending queue corresponding to the DMA sending channel on the interface corresponding to the outgoing interface information, waiting to be sent out.
[0094] It should be noted that, in the embodiment of the present application, the first message is an Ethernet message or a GTP message.
[0095] When the first message is received by NW-TT through the target interface, the queue identifier corresponding to the TSN receive queue to which the fourth message belongs is determined, the interface information of the target interface is added to the fourth message, the first message is obtained, and the DMA receive channel corresponding to the queue identifier is used to write the first message read from the TSN receive queue into the DPDK receive queue.
[0096] Moreover, different TSN receiving queues corresponding to each interface on the NW-TT correspond to different DMA receiving channels, and different TSN sending queues corresponding to each interface correspond to different DMA sending channels.
[0097] Specifically, in the above step S42, when the first message is an Ethernet message, the CPU core can implement the step of processing the first message in the following manner:
[0098] The interface information carried in the first message is deleted to obtain a second message.
[0099] In this case, in the above step S43, the CPU core can implement the step of processing the second message in the following manner:
[0100] The outgoing interface information is added before the Ethernet header of the second message to obtain a third message.
[0101] Here, the second message is actually the fourth message.
[0102] In addition, when the first message is a GTP message, the CPU core may implement the step of processing the first message in the following manner:
[0103] The UPF thread is called to delete the interface information carried in the first message, and decapsulate the deleted message to obtain the second message.
[0104] In this case, the CPU core may implement the step of processing the second message in the following manner:
[0105] An Ethernet header is added to the second message, and the outbound interface information is added before the Ethernet header of the added message to obtain a third message.
[0106] Here, the second message is actually the original message carried in the first message. Moreover, the specific process of the CPU core adding the Ethernet header to the second message is prior art and will not be described in detail here.
[0107] It should be noted that, in the embodiment of the present application, for the CPU core, whether the second message needs to be forwarded can be determined in the following manner:
[0108] When the second message is an Ethernet message, determining whether the destination MAC address of the second message is the MAC address of the target interface;
[0109] If the judgment result is yes, it is determined that there is no need to forward the second message;
[0110] If the judgment result is no, it is determined that the second message needs to be forwarded; or,
[0111] When the second message is a GTP message, determining whether the destination IP address of the second message is the IP address of the target interface;
[0112] If the judgment result is yes, it is determined that there is no need to forward the second message;
[0113] If the judgment result is no, it is determined that the second message needs to be forwarded.
[0114] Here, when the CPU core determines that the second message does not need to be forwarded, it performs subsequent processing according to the existing processing flow, which will not be described in detail here.
[0115] It should be further noted that, in the embodiment of the present application, for NW-TT, when determining the second queue identifier corresponding to the TSN sending queue to which the fourth message belongs, it can be implemented in the following manner:
[0116] When the fourth message is an Ethernet message, a hash operation is performed on the quintuple information of the fourth message according to a preset hash algorithm to obtain an operation result, and the operation result is determined as the second queue identifier corresponding to the TSN sending queue to which the fourth message belongs; or
[0117] When the fourth message is a GTP message, a hash operation is performed on the five-tuple information of the original message carried in the fourth message according to a preset hash algorithm to obtain an operation result, and the operation result is determined as the second queue identifier corresponding to the TSN sending queue to which the fourth message belongs.
[0118] Here, the preset hash algorithm may be an MD5 algorithm or a SHA-1 algorithm, etc.
[0119] In addition, when NW-TT processes the third message, it can be implemented in the following ways:
[0120] Delete the outbound interface information carried in the third message.
[0121] The above message processing method is described in detail below in conjunction with specific embodiments.
[0122] by Figure 1 As an example, assume that there are 5 interfaces on NW-TT (such as Figure 5 As shown), they are Port1, Port2, Port3, Port4 and Port5. Assume that each interface corresponds to 8 TSN receive queues and 8 TSN transmit queues, and assume that the queue identifiers corresponding to the 8 TSN receive queues are 0, 1, 2, 3, 4, 5, 6 and 7, respectively, and the queue identifiers corresponding to the 8 TSN transmit queues are also 0, 1, 2, 3, 4, 5, 6 and 7, respectively. TSN receive queues with the same queue identifier correspond to the same DMA receive channel, and TSN transmit queues with the same queue identifier correspond to the same DMA transmit channel. Each DMA receive channel uniquely corresponds to a DPDK receive queue, and each DMA transmit channel uniquely corresponds to a DPDK transmit queue.
[0123] Assume that at the first moment, NW-TT receives Ethernet message 1 through Port 1. At this time, NW-TT determines the queue identifier corresponding to the TSN receiving queue to which Ethernet message 1 belongs.
[0124] Assuming that the determined queue identifier is 0, NW-TT adds the interface information of Port1 (for example, the Port ID of Port1) in front of the Ethernet header of Ethernet message 1 to obtain Ethernet message 2, and caches Ethernet message 2 into the TSN receiving queue corresponding to the queue identifier 0.
[0125] Next, NW-TT uses the DMA receive channel (e.g., DMA receive channel 0) corresponding to the queue identifier (i.e., 0) to write the Ethernet message 2 read from the TSN receive queue into the DPDK receive queue (e.g., DPDK receive queue 0) corresponding to DMA receive channel 0 on the UPF network element.
[0126] When the CPU core (for example, CPU core 1) corresponding to the DPDK receive queue 0 in the subsequent UPF network element reads Ethernet message 2, it updates the forwarding table based on the interface information carried in Ethernet message 2, deletes the interface information carried in Ethernet message 2, and obtains Ethernet message 1.
[0127] Assume that the destination MAC address of Ethernet message 1 is not the MAC address of Port 1. In this case, CPU core 1 continues to determine the outbound interface information of Ethernet message 1.
[0128] Assuming that the determined outgoing interface information is the interface information of Port2 (for example, the Port ID of Port2), at this time, CPU core 1 adds the interface information of Port2 in front of the Ethernet header of Ethernet message 1 to obtain Ethernet message 3, and caches Ethernet message 3 in the DPDK sending queue corresponding to DPDK receiving queue 0 (for example, DPDK sending queue 0), and then uses the DMA sending channel corresponding to DPDK sending queue 0 (for example, DMA sending channel 0) to send Ethernet message 3 read from DPDK sending queue 0 to NW-TT.
[0129] After receiving Ethernet message 3, NW-TT deletes the interface information of Port2 carried in Ethernet message 3, obtains Ethernet message 1, and caches it in the TSN sending queue corresponding to DMA sending channel 0 on Port2 (for example, the corresponding queue identifier is 0) waiting to be sent out.
[0130] Assume that at the second moment, NW-TT receives GTP message 1 through Port 2. At this time, NW-TT determines the queue identifier corresponding to the TSN receiving queue to which GTP message 1 belongs.
[0131] Assuming that the determined queue ID is 7, NW-TT adds the interface information of Port2 (for example, the Port ID of Port2) in front of the Ethernet header of GTP message 1, obtains GTP message 2, and caches GTP message 2 into the TSN receiving queue corresponding to the queue ID 7.
[0132] Next, NW-TT uses the DMA receive channel (for example, DMA receive channel 7) corresponding to the queue identifier (i.e., 7) to write the GTP message 2 read from the TSN receive queue corresponding to the queue identifier 7 to the DPDK receive queue (for example, DPDK receive queue 7) corresponding to the DMA receive channel 7 on the UPF network element.
[0133] When the CPU core (for example, CPU core 2) corresponding to DPDK receive queue 7 in the subsequent UPF network element reads GTP message 2, it updates the forwarding table based on the interface information carried in GTP message 2, deletes the interface information carried in GTP message 2, and decapsulates the deleted GTP message 2 to obtain the original message.
[0134] Assume that the destination IP address of the original message is not the IP address of Port2. In this case, CPU core 2 continues to determine the outbound interface information of the original message.
[0135] Assuming that the determined outgoing interface information is the interface information of Port5 (for example, the Port ID of Port5), at this time, CPU core 2 adds an Ethernet header to the original message, and adds the interface information of Port5 to the added message, obtains message 3 and caches message 3 in the DPDK sending queue corresponding to the DPDK receiving queue 7 (for example, DPDK sending queue 7), and then uses the DMA sending channel corresponding to the DPDK sending queue 7 (for example, DMA sending channel 7) to send the message 3 read from the DPDK sending queue 7 to NW-TT.
[0136] After receiving message 3, NW-TT deletes the interface information of Port 5 carried in message 3, and caches the deleted message in the TSN sending queue corresponding to DMA sending channel 7 on Port 5 (for example, the corresponding queue identifier is 7) waiting for sending.
[0137] It can be seen from the above technical solutions that when the NW-TT in the 5G TSN network receives an Ethernet message or a GTP message, it carries the input interface information of the received Ethernet message or the GTP message in the Ethernet message or the GTP message, and interacts with the relevant CPU core in the UPF network element in the 5G TSN network. When it is necessary to send an Ethernet message or an original message with an Ethernet header added (i.e., the original message carried in the GTP message), the corresponding TSN sending queue is directly determined according to the DMA sending channel indicated by the relevant CPU core, and there is no need to re-determine the corresponding TSN sending queue. In this way, the message transmission delay is shortened.
[0138] Based on the same inventive concept, the present application also provides a message processing device, which is applied to the NW-TT in the 5G TSN network. The DMA receiving channels corresponding to different TSN receiving queues corresponding to each interface on the NW-TT are different, and the DMA sending channels corresponding to different TSN sending queues corresponding to each interface are different. The structural diagram is as follows Figure 6 As shown, specifically including:
[0139] A determination module 61, configured to determine, when a first message is received through a target interface, a queue identifier corresponding to a TSN receiving queue to which the first message belongs, wherein the first message is an Ethernet message or a GTP message;
[0140] A first processing module 62, configured to add the interface information of the target interface to the first message, obtain a second message, and cache the second message in the TSN receiving queue;
[0141] The second processing module 63 is used to use the DMA receiving channel corresponding to the queue identifier to write the second message read from the TSN receiving queue into the data plane development kit DPDK receiving queue corresponding to the DMA receiving channel on the user plane function UPF network element in the 5G TSN network, so that when the CPU core corresponding to the DPDK receiving queue in the UPF network element reads the second message, based on the interface information, the forwarding table is updated, and the second message is processed to obtain a third message that does not carry the interface information. When it is determined that the third message needs to be forwarded, the outbound interface information of the third message is determined, and the third message is processed to obtain a fourth message, and the fourth message is cached in the DPDK sending queue corresponding to the DPDK receiving queue, and then the DMA sending channel corresponding to the DPDK sending queue is used to send the fourth message read from the DPDK sending queue to the NW-TT, and the fourth message carries the outbound interface information;
[0142] The third processing module 64 is used to process the fourth message after receiving the fourth message, and cache the processed message in the TSN sending queue corresponding to the DMA sending channel on the interface corresponding to the outgoing interface information to wait for sending out.
[0143] Preferably, the determining module 61 is specifically configured to determine the queue identifier corresponding to the TSN receiving queue to which the first message belongs in the following manner:
[0144] When the first message is an Ethernet message, a hash operation is performed on the five-tuple information of the first message according to a preset hash algorithm to obtain an operation result, and the operation result is determined as the queue identifier corresponding to the TSN receiving queue to which the first message belongs; or
[0145] When the first message is a GTP message, a hash operation is performed on the five-tuple information of the original message carried in the first message according to a preset hash algorithm to obtain an operation result, and the operation result is determined as the queue identifier corresponding to the TSN receiving queue to which the first message belongs.
[0146] Preferably, the first processing module 62 is specifically used for:
[0147] The interface information is added in front of the Ethernet header of the first message.
[0148] Preferably, the third processing module 64 is specifically configured to implement the step of processing the fourth message in the following manner:
[0149] The outbound interface information carried in the fourth message is deleted.
[0150] The present application also provides a message processing device, which is applied to any CPU core in a UPF network element in a 5G TSN network. Figure 7 As shown, specifically including:
[0151] The reading and updating module 71 is used to update the forwarding table based on the interface information carried in the first message when the first message is read from the data plane development kit DPDK receiving queue that needs to be processed by itself;
[0152] A first processing module 72 is used to process the first message to obtain a second message that does not carry the interface information, and when it is determined that the second message needs to be forwarded, determine the outbound interface information of the second message;
[0153] The second processing module 73 is used to process the second message to obtain a third message, and cache the third message in a DPDK sending queue corresponding to the DPDK receiving queue, wherein the third message carries the outgoing interface information;
[0154] The third processing module 74 is used to send the third message read from the DPDK sending queue to the NW-TT in the 5GTSN network by using the direct memory access DMA sending channel corresponding to the DPDK sending queue, so that the NW-TT processes the third message when receiving the third message, and caches the processed message in the TSN sending queue corresponding to the DMA sending channel on the interface corresponding to the outgoing interface information to wait for sending out;
[0155] Among them, the first message is an Ethernet message or a GTP message, and the first message is when the NW-TT receives the fourth message through the target interface, determines the queue identifier corresponding to the TSN receive queue to which the fourth message belongs, adds the interface information of the target interface to the fourth message, obtains the first message, and uses the DMA receive channel corresponding to the queue identifier to write the first message read from the TSN receive queue into the DPDK receive queue;
[0156] Different TSN receiving queues corresponding to each interface on the NW-TT correspond to different DMA receiving channels, and different TSN sending queues corresponding to each interface correspond to different DMA sending channels.
[0157] Preferably, when the first message is an Ethernet message, the first processing module 72 is specifically used to:
[0158] Deleting the interface information carried in the first message to obtain a second message;
[0159] The second processing module 73 is specifically used for:
[0160] Add the outgoing interface information in front of the Ethernet header of the second message to obtain a third message; or,
[0161] When the first message is a GTP message, the first processing module 72 is specifically configured to:
[0162] Calling the UPF thread to delete the interface information carried in the first message, and decapsulating the deleted message to obtain a second message;
[0163] The second processing module 73 is specifically used for:
[0164] An Ethernet header is added to the second message, and the outgoing interface information is added before the Ethernet header of the added message to obtain a third message.
[0165] It can be seen from the above technical solutions that when the NW-TT in the 5G TSN network receives an Ethernet message or a GTP message, it carries the input interface information of the received Ethernet message or the GTP message in the Ethernet message or the GTP message, and interacts with the relevant CPU core in the UPF network element in the 5G TSN network. When it is necessary to send an Ethernet message or an original message with an Ethernet header added (i.e., the original message carried in the GTP message), the corresponding TSN sending queue is directly determined according to the DMA sending channel indicated by the relevant CPU core, and there is no need to re-determine the corresponding TSN sending queue. In this way, the message transmission delay is shortened.
[0166] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A message processing method, characterized in that: The method is applied to a network-side TSN converter NW-TT in a 5G time-sensitive network TSN network, wherein different TSN receiving queues corresponding to each interface on the NW-TT correspond to different direct memory access DMA receiving channels, and different TSN sending queues corresponding to each interface correspond to different DMA sending channels, and the method includes: When a first message is received through the target interface, determining a queue identifier corresponding to a TSN receiving queue to which the first message belongs, wherein the first message is an Ethernet message or a General Packet Radio Service Tunneling Protocol GTP message; Adding the interface information of the target interface to the first message to obtain a second message, and caching the second message in the TSN receiving queue; Using the DMA receiving channel corresponding to the queue identifier, write the second message read from the TSN receiving queue into the data plane development kit DPDK receiving queue corresponding to the DMA receiving channel on the user plane function UPF network element in the 5G TSN network, so that when the CPU core corresponding to the DPDK receiving queue in the UPF network element reads the second message, based on the interface information, the forwarding table is updated, and the second message is processed to obtain a third message that does not carry the interface information. When it is determined that the third message needs to be forwarded, the outbound interface information of the third message is determined, and the third message is processed to obtain a fourth message, and the fourth message is cached in the DPDK sending queue corresponding to the DPDK receiving queue, and then the DMA sending channel corresponding to the DPDK sending queue is used to send the fourth message read from the DPDK sending queue to the NW-TT, and the fourth message carries the outbound interface information; After receiving the fourth message, the fourth message is processed, and the processed message is cached in a TSN sending queue corresponding to the DMA sending channel on the interface corresponding to the outgoing interface information to wait for being sent out.
2. The method according to claim 1, characterized in that The queue identifier corresponding to the TSN receiving queue to which the first message belongs is determined in the following manner: When the first message is an Ethernet message, a hash operation is performed on the five-tuple information of the first message according to a preset hash algorithm to obtain an operation result, and the operation result is determined as the queue identifier corresponding to the TSN receiving queue to which the first message belongs; or When the first message is a GTP message, a hash operation is performed on the five-tuple information of the original message carried in the first message according to a preset hash algorithm to obtain an operation result, and the operation result is determined as the queue identifier corresponding to the TSN receiving queue to which the first message belongs.
3. The method according to claim 1, characterized in that Adding the interface information of the target interface in the first message specifically includes: The interface information is added in front of the Ethernet header of the first message.
4. The method according to claim 1, characterized in that: Processing the fourth message specifically includes: The outbound interface information carried in the fourth message is deleted.
5. A message processing method, characterized in that: The method is applied to any CPU core in a user plane function UPF network element in a 5G time sensitive network TSN network, and the method includes: When a first message is read from a data plane development kit DPDK receiving queue that needs to be processed by itself, a forwarding table is updated based on the interface information carried in the first message; Processing the first message to obtain a second message that does not carry the interface information, and when determining that the second message needs to be forwarded, determining the outbound interface information of the second message; Processing the second message to obtain a third message, and caching the third message in a DPDK sending queue corresponding to the DPDK receiving queue, wherein the third message carries the outgoing interface information; Using the direct memory access DMA sending channel corresponding to the DPDK sending queue, the third message read from the DPDK sending queue is sent to the network-side TSN converter NW-TT in the 5G TSN network, so that the NW-TT processes the third message when receiving the third message, and caches the processed message in the TSN sending queue corresponding to the DMA sending channel on the interface corresponding to the outgoing interface information to wait for sending out; Among them, the first message is an Ethernet message or a General Packet Radio Service Tunneling Protocol GTP message, and the first message is when the NW-TT receives the fourth message through the target interface, determines the queue identifier corresponding to the TSN receive queue to which the fourth message belongs, adds the interface information of the target interface to the fourth message, obtains the first message, and uses the DMA receive channel corresponding to the queue identifier to write the first message read from the TSN receive queue into the DPDK receive queue; Different TSN receiving queues corresponding to each interface on the NW-TT correspond to different DMA receiving channels, and different TSN sending queues corresponding to each interface correspond to different DMA sending channels.
6. The method according to claim 5, characterized in that When the first message is an Ethernet message, processing the first message specifically includes: Deleting the interface information carried in the first message to obtain a second message; Processing the second message specifically includes: Add the outgoing interface information in front of the Ethernet header of the second message to obtain a third message; or, When the first message is a GTP message, processing the first message specifically includes: Calling the UPF thread to delete the interface information carried in the first message, and decapsulating the deleted message to obtain a second message; Processing the second message specifically includes: An Ethernet header is added to the second message, and the outgoing interface information is added before the Ethernet header of the added message to obtain a third message.
7. A message processing device, characterized in that: The device is applied to a network-side TSN converter NW-TT in a 5G time-sensitive network TSN network, and different TSN receiving queues corresponding to each interface on the NW-TT correspond to different direct memory access DMA receiving channels, and different TSN sending queues corresponding to each interface correspond to different DMA sending channels, and the device includes: A determination module, configured to determine, when a first message is received through a target interface, a queue identifier corresponding to a TSN receiving queue to which the first message belongs, wherein the first message is an Ethernet message or a General Packet Radio Service Tunneling Protocol GTP message; A first processing module, configured to add the interface information of the target interface to the first message, obtain a second message, and cache the second message in the TSN receiving queue; A second processing module is used to use the DMA receiving channel corresponding to the queue identifier to write the second message read from the TSN receiving queue into the data plane development kit DPDK receiving queue corresponding to the DMA receiving channel on the user plane function UPF network element in the 5G TSN network, so that when the CPU core corresponding to the DPDK receiving queue in the UPF network element reads the second message, based on the interface information, the forwarding table is updated, and the second message is processed to obtain a third message that does not carry the interface information. When it is determined that the third message needs to be forwarded, the outbound interface information of the third message is determined, and the third message is processed to obtain a fourth message, and the fourth message is cached in the DPDK sending queue corresponding to the DPDK receiving queue, and then the DMA sending channel corresponding to the DPDK sending queue is used to send the fourth message read from the DPDK sending queue to the NW-TT, and the fourth message carries the outbound interface information; The third processing module is used to process the fourth message after receiving the fourth message, and cache the processed message in the TSN sending queue corresponding to the DMA sending channel on the interface corresponding to the output interface information to wait for sending out.
8. The device according to claim 7, characterized in that The third processing module is specifically configured to implement the step of processing the fourth message in the following manner: The outbound interface information carried in the fourth message is deleted.
9. A message processing device, characterized in that: The device is applied to any CPU core in a user plane function UPF network element in a 5G time sensitive network TSN network, and the device includes: A reading and updating module, configured to update a forwarding table based on interface information carried in a first message when a first message is read from a receiving queue of a data plane development kit DPDK that needs to be processed by the module; A first processing module, configured to process the first message to obtain a second message that does not carry the interface information, and determine the outbound interface information of the second message when it is determined that the second message needs to be forwarded; a second processing module, configured to process the second message to obtain a third message, and cache the third message in a DPDK sending queue corresponding to the DPDK receiving queue, wherein the third message carries the outgoing interface information; The third processing module is used to send the third message read from the DPDK sending queue to the network-side TSN converter NW-TT in the 5GTSN network by using the direct memory access DMA sending channel corresponding to the DPDK sending queue, so that the NW-TT processes the third message when receiving the third message, and caches the processed message in the TSN sending queue corresponding to the DMA sending channel on the interface corresponding to the outgoing interface information to wait for sending out; Among them, the first message is an Ethernet message or a General Packet Radio Service Tunneling Protocol GTP message, and the first message is when the NW-TT receives the fourth message through the target interface, determines the queue identifier corresponding to the TSN receive queue to which the fourth message belongs, adds the interface information of the target interface to the fourth message, obtains the first message, and uses the DMA receive channel corresponding to the queue identifier to write the first message read from the TSN receive queue into the DPDK receive queue; Different TSN receiving queues corresponding to each interface on the NW-TT correspond to different DMA receiving channels, and different TSN sending queues corresponding to each interface correspond to different DMA sending channels.
10. The device according to claim 9, characterized in that When the first message is an Ethernet message, the first processing module is specifically configured to: Deleting the interface information carried in the first message to obtain a second message; The second processing module is specifically used for: Add the outgoing interface information in front of the Ethernet header of the second message to obtain a third message; or, When the first message is a GTP message, the first processing module is specifically configured to: Calling the UPF thread to delete the interface information carried in the first message, and decapsulating the deleted message to obtain a second message; The second processing module is specifically used for: An Ethernet header is added to the second message, and the outgoing interface information is added before the Ethernet header of the added message to obtain a third message.
Citation Information
Patent Citations
Multichannel network message transmission method
CN102780642A
Message forwarding method and device and electronic equipment
CN112585914A
Data processing method and device, nonvolatile storage medium and computer equipment
CN115665057A
Industrial internet message sending and receiving method based on 5G-TSN fusion
CN116192763A
Vehicle-mounted Ethernet data frame transmission method and device and electronic equipment
CN116633876A
