A message processing method and device

By allocating unique DMA channels for TSN receive and transmit queues to each interface in the 5G TSN network and using interface information to update the forwarding table, the latency issue caused by NW-TT calculation of queue identifiers is resolved, enabling faster message transmission.

CN119095110BActive Publication Date: 2025-10-03NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411204865.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2025-10-03
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

In the 5G TSN network, NW-TT needs to calculate the queue identifiers of the TSN receive queue and send queue, resulting in a long message transmission delay.

Method used

In the 5G TSN network, the CPU cores of the NW-TT and UPF network elements determine the DMA receive/transmit channels of the different TSN receive and transmit queues corresponding to each interface, use the interface information to update the forwarding table, and directly determine the TSN transmit queue, reducing repeated calculations.

Benefits of technology

It shortens the message transmission delay and improves the message processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119095110B_ABST
    Figure CN119095110B_ABST
Patent Text Reader

Abstract

The present application provides a message processing method and apparatus. The method is applied to a NW-TT and includes: upon receiving a first message through a target interface, determining a queue identifier corresponding to a TSN receive queue to which the first message belongs; adding interface information of the target interface to the first message to obtain a second message, and caching the second message in a TSN receive queue; using a DMA receive channel corresponding to the queue identifier, writing the read second message into a DPDK receive queue corresponding to the DMA receive channel on a UPF network element; and after receiving a fourth message, processing the fourth message and caching the processed message into a TSN transmit queue corresponding to a DMA transmit channel on an interface corresponding to the outgoing interface information, awaiting transmission. The present application can shorten the message transmission latency of the NW-TT.
Need to check novelty before this filing date? Find Prior Art

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 typically used in scenarios with high real-time and reliability requirements, such as the Industrial Internet and automotive sectors. Furthermore, 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 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 in the figure, the 5G system (5G System, 5GS) as a TSN bridge can include user equipment (User Equipment, UE), device side TSN translator (Device Side TSN Translator, DS-TT) associated with the UE, user plane function (User Plane Function, UPF) network element, network side TSN translator (NetworkSide TSN Translator, NW-TT) associated with the UPF network element, session management function (Session Management Function, SMF) network element, policy control function (Policy Control Function, PCF) network element and time-sensitive network application function (Time-Sensitive Networking Application Function, TSN AF) network element, etc.

[0006] Currently, 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 transmit queue, it usually needs to calculate the queue ID of the TSN receive queue and the queue ID of the TSN transmit queue once because different TSN receive queues on the same interface mix DMA receive channels, and different TSN transmit queues on the same interface mix DMA transmit channels, 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 is applied to an NW-TT in a 5G TSN network, wherein different TSN receive queues corresponding to each interface on the NW-TT correspond to different direct memory access (DMA) receive channels, and different TSN send queues corresponding to each interface correspond to different DMA send channels. The method includes:

[0009] When a first message is received through a target interface, determining a queue identifier corresponding to a TSN receive 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;

[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 receive 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 (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, the forwarding table is updated based on the interface information, 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, 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, using the DMA sending channel corresponding to the DPDK sending queue, the fourth message read from the DPDK sending queue is sent 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, which is applied to any CPU core in a UPF network element in a 5G TSN network, and the method includes:

[0014] When a first message is read from the DPDK receive queue 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 outgoing interface information of the second message;

[0016] Processing the second message to obtain a third message, and caching the third message in a DPDK send queue corresponding to the DPDK receive queue, wherein the third message carries the outgoing interface information;

[0017] Using the DMA transmission channel corresponding to the DPDK transmission queue, the third message read from the DPDK transmission queue is sent to the NW-TT, so that the NW-TT processes the third message when receiving the third message, and caches the processed message in the TSN transmission queue corresponding to the DMA transmission channel on the interface corresponding to the outgoing interface information, waiting for sending out;

[0018] The first message is an Ethernet message or a GTP message, and the first message is received by the NW-TT through the target interface. When the NW-TT receives the fourth message through the target interface, it 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 is applied to an NW-TT in a 5G TSN network. Different TSN receive queues corresponding to each interface on the NW-TT correspond to different DMA receive channels, and different TSN transmit queues corresponding to each interface correspond to different DMA transmit channels. The device includes:

[0021] a determination module, configured to, when receiving a first message through a target interface, determine a queue identifier corresponding to a TSN receive 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 to obtain a second message, and cache the second message in the TSN receive queue;

[0023] a second processing module, configured to write the second message read from the TSN receive queue into the DPDK receive queue corresponding to the DMA receive channel on the UPF network element in the 5G TSN network by using the DMA receive channel corresponding to the queue identifier, so that when the CPU core corresponding to the DPDK receive queue in the UPF network element reads the second message, the forwarding table is updated based on the interface information, 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 send queue corresponding to the DPDK receive queue, and the fourth message read from the DPDK send queue is sent to the NW-TT by using the DMA send channel corresponding to the DPDK send queue, where the fourth message carries the outbound interface information;

[0024] The third processing module is used to process the fourth message after receiving it, 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.

[0025] According to a fourth aspect of an embodiment of the present application, a message processing device is provided, which is applied to any CPU core in a UPF network element in a 5G TSN network, and the device includes:

[0026] A reading and updating module, configured to update a forwarding table based on interface information carried in a first message when reading the first message from a DPDK receiving queue that the module needs to process;

[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 outgoing interface information of the second message when it is determined that the second message needs to be forwarded;

[0028] a second processing module, configured to process the second message to obtain a third message, and cache the third message in a DPDK transmit queue corresponding to the DPDK receive queue, wherein the third message carries the outgoing interface information;

[0029] a third processing module, configured to send the third message read from the DPDK send queue to the NW-TT in the 5G TSN network by using the DMA send channel corresponding to the DPDK send queue, so that the NW-TT processes the third message upon receiving the third message and caches the processed message in the TSN send queue corresponding to the DMA send channel on the interface corresponding to the outgoing interface information, waiting for sending out;

[0030] The first message is an Ethernet message or a GTP message, and the first message is received by the NW-TT through the target interface. When the NW-TT receives the fourth message through the target interface, it 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 solutions 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, it carries the input interface information of the received Ethernet message or 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), it directly determines the corresponding TSN sending queue 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.

[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 and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0036] Figure 1 This is a schematic diagram of the existing 5G TSN network architecture;

[0037] Figure 2 One of the flow diagrams 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 flow chart of a message processing method provided in an embodiment of the present application;

[0040] Figure 5 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 This is a schematic diagram of the structure of a message processing device provided in an embodiment of the present application;

[0042] Figure 7 This is a 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, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain 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. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0045] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words "if" or "if" as used herein may be interpreted as "when" 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 the NW-TT in the 5G TSN network. The direct memory access DMA receiving channel corresponding to the different TSN receiving queues corresponding to each interface on the NW-TT is different, and the DMA sending channel corresponding to the different TSN sending queues corresponding to each interface is different, 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] In the case that the first message is an Ethernet message, the target interface may be the N3 interface or the N6 interface.

[0051] In the case that 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 receive 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 transmit queues corresponding to all interfaces on the NW-TT is the same, and a TSN receive queue corresponding to any interface on the NW-TT can be bound to the same DMA receive channel with a TSN receive queue corresponding to other interfaces.

[0060] In addition, a DMA receive channel uniquely corresponds to a DPDK receive queue, a DPDK receive queue uniquely corresponds to a DPDK transmit queue, and a DMA transmit channel uniquely corresponds to a DPDK transmit 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 to the first message in the following manner:

[0063] Add 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) preceding the Ethernet header (Eth_header) of the first message, and the interface information may be an interface identifier (Port Identifier, Port ID) of the target interface. For example, the message format of the first message is as follows: 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 determination of the output port information of the message in the above-mentioned DPDK receive queue by the CPU core, and carry the relevant output 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 all 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 can 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 process the third message in the following ways:

[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] When 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 the deleted message is decapsulated to obtain the third message.

[0082] The CPU core can also process the third message in the following ways:

[0083] An Ethernet header is added to the third message, and outbound interface information is added before the Ethernet header of the message after the addition, to obtain a fourth message.

[0084] Here, the third message is actually the original message carried in the second message. Furthermore, the specific process by which the CPU core adds the Ethernet header to the third message is conventional and will not be described in detail here. Specifically, in step S24 above, the NW-TT processes the fourth message in the following manner:

[0085] Delete the outgoing interface information carried in the fourth message.

[0086] It should be noted that when the processed message in the TSN sending queue needs to be sent, the NW-TT sends the processed message.

[0087] The above content is the implementation process of the message processing method described from the NW-TT side. The following describes the implementation process of the message processing method from the perspective of 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 the DPDK receiving queue 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 the interface information, and when it is determined that the second message needs to be forwarded, determine the outgoing 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 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] The first message is that when NW-TT receives the fourth message through the target interface, it 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.

[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 may 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] Call the UPF thread 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 outbound interface information is added before the Ethernet header of the message after the addition, 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 the 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 processing the third message, NW-TT can implement it 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 with reference to specific embodiments.

[0122] by Figure 1 As an example, assume that there are 5 interfaces on NW-TT (such as Figure 5 As shown in the figure), they are Port1, Port2, Port3, Port4, and Port5 respectively. 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 packet 1 through Port 1. At this time, NW-TT determines the queue identifier corresponding to the TSN receive queue to which Ethernet packet 1 belongs.

[0124] Assuming that the determined queue ID is 0, NW-TT adds the interface information of Port 1 (for example, the Port ID of Port 1) to the front of the Ethernet header of Ethernet message 1 to obtain Ethernet message 2, and caches Ethernet message 2 into the TSN receive queue corresponding to queue ID 0.

[0125] Next, NW-TT uses the DMA receive channel (for example, 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 (for example, DPDK receive queue 0) corresponding to the DMA receive channel 0 on the UPF network element.

[0126] When the CPU core (for example, CPU core 1) corresponding to 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 packet 1 is not the MAC address of Port 1. In this case, CPU core 1 continues to determine the outgoing interface information of Ethernet packet 1.

[0128] Assume that the determined outgoing interface information is the interface information of Port 2 (for example, the Port ID of Port 2). At this time, CPU core 1 adds the interface information of Port 2 in front of the Ethernet header of Ethernet message 1 to obtain Ethernet message 3, and caches Ethernet message 3 in the DPDK send queue corresponding to DPDK receive queue 0 (for example, DPDK send queue 0). Then, using the DMA send channel corresponding to DPDK send queue 0 (for example, DMA send channel 0), Ethernet message 3 read from DPDK send queue 0 is sent to NW-TT.

[0129] After receiving Ethernet message 3, NW-TT deletes the interface information of Port 2 carried in Ethernet message 3, obtains Ethernet message 1, and caches it in the TSN sending queue corresponding to DMA sending channel 0 on Port 2 (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 receive 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 in the TSN receive queue corresponding to 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 the DPDK receive queue 7 in the subsequent UPF network element reads out 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 Port 2. In this case, CPU core 2 continues to determine the outgoing interface information of the original message.

[0135] Assume that the determined outgoing interface information is the interface information of Port 5 (for example, the Port ID of Port 5). At this time, CPU core 2 adds an Ethernet header to the original message, and adds the interface information of Port 5 to the added message to obtain message 3 and caches message 3 in the DPDK send queue corresponding to DPDK receive queue 7 (for example, DPDK send queue 7). Then, using the DMA send channel corresponding to DPDK send queue 7 (for example, DMA send channel 7), message 3 read from DPDK send queue 7 is sent 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 to be sent out.

[0137] It can be seen from the above technical solution 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 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 the original message with an Ethernet header added (that is, the original message carried in the GTP message), it directly determines the corresponding TSN sending queue based on 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 different TSN receive queues corresponding to each interface on the NW-TT have different DMA receive channels, and the different TSN send queues corresponding to each interface have different DMA send channels. The structural diagram is shown in FIG. Figure 6 As shown, specifically including:

[0139] A determination module 61 is configured to, when receiving a first message through a target interface, determine a queue identifier corresponding to a TSN receive 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 is configured to add the interface information of the target interface to the first message to obtain a second message, and cache the second message in the TSN receiving queue;

[0141] The second processing module 63 is configured to write the second message read from the TSN receive queue into the data plane development kit DPDK receive queue corresponding to the DMA receive channel on the user plane function UPF network element in the 5G TSN network, so that when the CPU core corresponding to the DPDK receive queue in the UPF network element reads the second message, it updates the forwarding table based on the interface information, processes the second message 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, determines the outbound interface information of the third message, processes the third message to obtain a fourth message, caches the fourth message in the DPDK send queue corresponding to the DPDK receive queue, and then uses the DMA send channel corresponding to the DPDK send queue to send the fourth message read from the DPDK send queue to the NW-TT, where the fourth message carries the outbound interface information.

[0142] The third processing module 64 is configured to process the fourth message after receiving the fourth message, and cache the processed message in a 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 by:

[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 receive 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 configured to:

[0147] The interface information is added before 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] Delete the outgoing interface information carried in the fourth message.

[0150] This application also provides a message processing device, which is applied to any CPU core in the UPF network element in the 5G TSN network. Its structural diagram is as follows Figure 7 As shown, specifically including:

[0151] The reading and updating module 71 is configured to update the forwarding table based on the interface information carried in the first message when reading the first message from the data plane development kit DPDK receiving queue that the module needs to process.

[0152] a first processing module 72 configured to process the first message to obtain a second message that does not carry the interface information, and determine the outgoing interface information of the second message when it is determined that the second message needs to be forwarded;

[0153] a second processing module 73 configured to process the second message to obtain a third message, and cache the third message in a DPDK transmit queue corresponding to the DPDK receive queue, wherein the third message carries the outgoing interface information;

[0154] A third processing module 74 is configured to send the third message read from the DPDK send queue to the NW-TT in the 5GTSN network by using the direct memory access (DMA) send channel corresponding to the DPDK send queue, so that the NW-TT processes the third message upon receiving the third message and caches the processed message in the TSN send queue corresponding to the DMA send channel on the interface corresponding to the outgoing interface information, waiting for sending.

[0155] The first message is an Ethernet message or a GTP message, and the first message is received by the NW-TT through the target interface. When the NW-TT receives the fourth message through the target interface, it 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 configured to:

[0158] Deleting the interface information carried in the first message to obtain a second message;

[0159] The second processing module 73 is specifically configured to:

[0160] Add the outgoing interface information before 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 configured to:

[0164] An Ethernet header is added to the second message, and the outgoing interface information is added before the Ethernet header of the message after the addition, to obtain a third message.

[0165] It can be seen from the above technical solution 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 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 the original message with an Ethernet header added (that is, the original message carried in the GTP message), it directly determines the corresponding TSN sending queue based on 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 replacements, 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 receive queues corresponding to each interface on the NW-TT correspond to different direct memory access (DMA) receive channels, and different TSN transmit queues corresponding to each interface correspond to different DMA transmit channels. The method includes: When a first message is received through the target interface, determining a queue identifier corresponding to a TSN receive 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 receive queue; 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 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, the forwarding table is updated based on the interface information, 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, 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, using the DMA sending channel corresponding to the DPDK sending queue, the fourth message read from the DPDK sending queue is sent 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 Determine the queue identifier corresponding to the TSN receive queue to which the first message belongs 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 receive 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 to the first message specifically includes: The interface information is added before the Ethernet header of the first message.

4. The method according to claim 1, wherein Processing the fourth message specifically includes: Delete the outgoing interface information carried in the fourth message.

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 the device, the 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 outgoing interface information of the second message; Processing the second message to obtain a third message, and caching the third message in a DPDK send queue corresponding to the DPDK receive queue, wherein the third message carries the outgoing interface information; Using the direct memory access (DMA) transmit channel corresponding to the DPDK transmit queue, the third message read from the DPDK transmit 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 upon receiving the third message, and caches the processed message in the TSN transmit queue corresponding to the DMA transmit channel on the interface corresponding to the outgoing interface information, waiting for sending out; The first message is an Ethernet message or a General Packet Radio Tunneling Protocol (GTP) message, and the first message is received by the NW-TT through the target interface. When the NW-TT receives the fourth message through the target interface, it 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 before 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 message after the addition, 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, wherein different TSN receive queues corresponding to each interface on the NW-TT correspond to different direct memory access DMA receive channels, and different TSN transmit queues corresponding to each interface correspond to different DMA transmit channels. The device includes: a determination module, configured to, when receiving a first message through a target interface, determine a queue identifier corresponding to a TSN receive 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 to obtain a second message, and cache the second message in the TSN receive queue; A second processing module is configured to write the second message read from the TSN receive queue into the data plane development kit DPDK receive queue corresponding to the DMA receive channel on the user plane function UPF network element in the 5G TSN network, so that when the CPU core corresponding to the DPDK receive queue in the UPF network element reads the second message, it updates the forwarding table based on the interface information, processes the second message 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, determines the outbound interface information of the third message, processes the third message to obtain a fourth message, caches the fourth message into the DPDK send queue corresponding to the DPDK receive queue, and then uses the DMA send channel corresponding to the DPDK send queue to send the fourth message read from the DPDK send queue to the NW-TT, where the fourth message carries the outbound interface information; The third processing module is used to process the fourth message after receiving it, 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.

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: Delete the outgoing interface information carried in the fourth message.

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 includes: A reading and updating module, configured to update a forwarding table based on interface information carried in a first message when reading the first message from a data plane development kit DPDK receiving queue that the module needs to process; 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 outgoing 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 transmit queue corresponding to the DPDK receive queue, wherein the third message carries the outgoing interface information; a third processing module, configured to use the direct memory access (DMA) transmit channel corresponding to the DPDK transmit queue to send the third message read from the DPDK transmit queue to a network-side TSN converter NW-TT in the 5G TSN network, so that the NW-TT processes the third message upon receiving the third message, and caches the processed message in a TSN transmit queue corresponding to the DMA transmit channel on the interface corresponding to the outgoing interface information, waiting for sending out; The first message is an Ethernet message or a General Packet Radio Tunneling Protocol (GTP) message, and the first message is received by the NW-TT through the target interface. When the NW-TT receives the fourth message through the target interface, it 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 configured to: Add the outgoing interface information before 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 configured to: An Ethernet header is added to the second message, and the outgoing interface information is added before the Ethernet header of the message after the addition, to obtain a third message.

Citation Information

Patent Citations

  • Multichannel network message transmission method

    CN102780642A

  • Message forwarding method and device and electronic equipment

    CN112585914A