Message processing device, node equipment and method
By setting up the message processing module in the kernel space and the control module in the user space in the node device, using eBPF XDP to realize OAM message processing, the problem of insufficient message processing flexibility and insufficient delay accuracy in the prior art is solved, and the problem of improved Processing efficiency and flexibility.
Patent Information
- Application Number
- CN202211412702.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-11-11
AI Technical Summary
The prior art lacks flexibility in network management and maintenance (OAM) packet processing, relies on dedicated hardware chips and specific network card equipment, and the delay accuracy achieved by the software is insufficient to meet actual needs.
Design a message processing device, including a control module and a message processing module, and does not use a protocol stack for network packet processing between the modules. Some processing units are set in the kernel space of the node device, and receive and respond to control instructions through communication connection. Send detection packets and process reply packets to determine link status, and use eBPF XDP to implement fast data paths.
It improves packet processing efficiency, reduces data transmission delay, gets rid of the dependence on dedicated hardware and specific network cards, and improves the flexibility and efficiency of OAM packet processing.
Smart Images

Figure CN115941540B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network technology, and in particular to a message processing device, node equipment and method. Background Art
[0002] In actual applications, the processing method for messages related to network operation, administration, and management (OAM) is not flexible enough. Summary of the invention
[0003] Based on the above problems, the embodiments of the present application provide a message processing device, a node device and a method.
[0004] The technical solution provided by the embodiment of the present application is as follows:
[0005] The embodiment of the present application provides a message processing device, the device comprising: the device is arranged in a node device; the device comprises a control module and a message processing module; wherein:
[0006] A communication connection is established between the control module and the message processing module; the communication connection does not include a protocol stack for processing network data packets in the node device;
[0007] At least part of the processing units in the message processing module are set in the kernel space of the node device; the message processing module is used to receive and respond to the control instructions sent by the control module through the communication connection, send a detection message to the target device, and receive a reply message sent by the target device; process the reply message to determine the link status between the node device and the target device; wherein the detection message and the reply message include a network management and maintenance OAM message.
[0008] In some embodiments, the message processing module includes a message sending unit and a message sending unit; wherein:
[0009] The message sending unit is used to send a first message to the target device; the message sending unit is set in the kernel space; wherein the first message at least includes a loop back message (Loop Back Message, LBM), a connectivity check message (Continuity Check Message, CCM) and a link trace message (Link Trace Message, LTM);
[0010] The message receiving unit is used to receive the reply message, obtain additional data carried by the reply message, and determine the link status based on the additional data.
[0011] In some embodiments, the message receiving unit is used to determine the transmission delay and / or packet loss rate between the node device and the target device based on the time information in the additional data when the reply message is a second message; wherein the second message includes at least a connectivity detection message CCM.
[0012] In some embodiments, the message receiving unit is used to determine the transmission delay between the node device and the target device based on the time information in the additional data when the reply message is a third message; wherein the third message at least includes a loop back response message (Loop Back Reply, LBR).
[0013] In some embodiments, the message receiving unit is used to determine the link path information between the node device and the target device based on the device information in the additional data when the reply message is a fourth message; wherein the fourth message at least includes a Link Trace Reply (LTR);
[0014] The message receiving unit is also used to obtain the first address and the second address when receiving the fifth message, and set the source address of the fifth message to the first address, set the destination address of the fifth message to the second address, set the message type of the fifth message to LTR, and send the LTR through the fast data path (eXpress DataPath, XDP); wherein the fifth message includes at least LTM; the first address includes the address of the node device; the second address includes the address of the device sending the LTM.
[0015] In some embodiments, the message receiving unit is used to obtain the first address and the third address when receiving the sixth message, and set the source address of the sixth message to the first address, set the destination address of the sixth message to the third address, set the message type of the sixth message to LBR, and send the LBR through XDP; wherein the sixth message includes at least LBM; the first address includes the address of the node device; and the third address includes the address of the device sending the LBM.
[0016] In some embodiments, the message receiving unit includes a general execution engine (Extended Berkeley Packet Filter, eBPF) XDP of a Berkeley Packet Filter (BPF); the control module is used to load the eBPF XDP to the network card of the node device.
[0017] In some embodiments, the message receiving unit and the control module are arranged in the user space; the message processing module also includes a message filtering unit arranged in the kernel space, which is used to send the OAM message to the message receiving unit through the Address Family Express Data Path (AF_XDP).
[0018] In some embodiments, the control module is used to load the message processing module to the network card when it is determined that the network card of the node device is a designated network card.
[0019] An embodiment of the present application also provides a node device, which includes a message processing device as described in any of the above.
[0020] The embodiment of the present application further provides a message processing method, which is applied to a message processing device arranged in a node device; the message processing device comprises a control module and a message processing module; a communication connection is established between the control module and the message processing module; the communication connection does not include a protocol stack for processing network data packets in the node device; at least part of the processing units in the message processing module are arranged in the kernel space of the node device; the method comprises:
[0021] The message processing module receives and responds to the control instruction sent by the control module through the communication connection, sends a detection message to the target device, and receives a reply message sent by the target device;
[0022] The message processing module processes the reply message to determine the link status between the node device and the target device; wherein the detection message and the reply message include OAM messages.
[0023] In the message processing device provided in the embodiment of the present application, at least part of the processing units of the message processing module are set in the kernel space of the node device, thereby greatly improving the efficiency of the message processing module in processing detection messages and reply messages; secondly, the communication connection between the control module and the message processing module does not include a protocol stack for processing network data packets, thereby reducing the data transmission link between the control module and the message processing module, and shortening the instruction transmission and data transmission delay between the two; and, after receiving the reply message, the message processing module can directly process the reply message and determine the link status between the node device and the target device, thereby improving the efficiency of OAM message processing and improving the efficiency of determining the link status.
[0024] Therefore, the message processing device provided in the embodiment of the present application not only gets rid of the dependence on dedicated hardware chips, specific network card devices and dedicated data processing kits such as DPDK, but also improves the efficiency of OAM message processing of the message processing device provided in the embodiment of the present application compared to the software OAM message processing solution in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A schematic diagram of the structure of processing OAM messages provided in the related art;
[0026] Figure 2 Another structural diagram of processing OAM messages provided for related technologies;
[0027] Figure 3 A schematic diagram of the structure of a message processing device provided in an embodiment of the present application;
[0028] Figure 4 Another structural schematic diagram of the message processing device provided in an embodiment of the present application;
[0029] Figure 5 A schematic diagram of a structure in which a message sending unit sends an LBM according to an embodiment of the present application;
[0030] Figure 6 A structural diagram of a message sending unit sending a CCM provided in an embodiment of the present application;
[0031] Figure 7 A schematic diagram of the structure of a message sending unit sending LTM provided in an embodiment of the present application;
[0032] Figure 8 A schematic diagram of the structure of OAM message transmission between a first device and a second device provided in an embodiment of the present application;
[0033] Fig. 9 Another structural schematic diagram of OAM message transmission between a first device and a second device provided in an embodiment of the present application;
[0034] Fig.10 A schematic diagram of the structure of a node device provided in an embodiment of the present application;
[0035] Fig.11 A flowchart of a message processing method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0037] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0038] In practical applications, OAM message processing logic is usually implemented through dedicated hardware chips such as Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or Network Processor (NP). However, such solutions rely heavily on dedicated hardware chips. If the support of dedicated hardware chips is lost, the OAM message processing function cannot be implemented.
[0039] In order to get rid of the dependence on dedicated hardware chips, the related technology also proposes a method of implementing OAM message processing by software, and setting the OAM message processing logic in the user space. Figure 1 The schematic diagram of the structure of processing OAM messages provided in the related art is as follows: Figure 1 As shown, the user space of the source device 101 is provided with a source device OAM 1011, and the kernel space is provided with a source device network protocol stack 1012 and a source device network card 1013; the user space of the target device 102 is provided with a target device OAM 1021, and the kernel space is provided with a target device network protocol stack 1022 and a target device network card 1023. Among them, the source device OAM 1011 and the target device OAM 1021 can implement OAM message processing logic.
[0040] exist Figure 1 In the process, whether the source device 101 sends an OAM message or the target device 102 receives an OAM message, it is necessary to copy the OAM message between the source device OAM 1011 and the source device network protocol stack 1012, and between the target device OAM 1021 and the target device network protocol stack 1022, which will occupy a large amount of data processing resources.
[0041] In order to get rid of the dependence on hardware chips, reduce the occupation of data processing resources, and improve the defect of insufficient delay accuracy of traditional software implementation solutions, the relevant technology also proposes a solution of using the Data Plane Development Kit (DPDK) to process OAM messages. Among them, DPDK is mainly based on the Linux system and is a collection of function libraries and drivers for fast data packet processing. It can greatly improve data processing performance and throughput, and improve the work efficiency of data plane applications.
[0042] Figure 2 Another structural diagram of processing OAM messages provided by the related technology. Figure 2As shown, the source device DPDK 1014 in the source device 101 is set in the kernel space, and the setting method of other modules is the same as Figure 1 Similarly, the target device DPDK 1024 in the target device 102 is set in the kernel space, and the setting method of other modules is the same as Figure 1 Same. Figure 2 In the embodiment, source device DPDK 1014 and source device OAM 1011, as well as target device DPDK 1024 and target device OAM 1011 can directly share data through memory, thereby improving OAM message processing efficiency. However, in the above solution, DPDK requires specific network card support, so it is not universal enough.
[0043] In summary, the OAM message processing in the related art is not flexible enough and cannot meet the actual OAM message processing requirements.
[0044] Based on the above problems, an embodiment of the present application provides a message processing device, a node device and a method. The message processing device can be set in the node device.
[0045] In one implementation, the node device may include a computer device, such as a server device or a personal computer device; exemplarily, the node device may include a physical machine device or a virtual machine device; exemplarily, the node device may include a maintenance endpoint (Maintenance Association EndPoint, MEP) or a maintenance intermediate point (Maintenance Association Intermediate Point, MIP) in a maintenance domain (Maintenance Domain, MD); wherein the MEP is used to determine the scope and boundary of the MD and is an edge node of the Maintenance Association (Maintenance Association, MA), and multiple MAs may be configured in the MD; the MIP is located inside the MD, and the manageability of the MD network may be improved by deploying multiple MIPs between MEPs.
[0046] In one implementation, the node device may include a device having the functions of receiving, sending, and processing data packets.
[0047] Figure 3 A schematic diagram of the structure of the message processing device 3 provided in the embodiment of the present application is shown as follows: Figure 3 As shown, the device may include a control module 301 and a message processing module 302; wherein:
[0048] A communication connection is established between the control module 301 and the message processing module 302; the communication connection does not include a protocol stack for processing network data packets in the node device;
[0049] At least part of the processing units in the message processing module 302 are set in the kernel space of the node device, and are used to receive and respond to the control instructions sent by the control module 301 through the communication connection, send the detection message to the target device, and receive the reply message sent by the target device; process the reply message to determine the link status between the node device and the target device.
[0050] The detection message and the reply message include an OAM message.
[0051] Exemplarily, the user space may include a running space of a user application in a node device.
[0052] In one implementation, the control module 301 may be disposed in the user space and / or kernel space of the node device; illustratively, the control module 301 may include multiple control units, and at least some of the multiple control units may be disposed in the user space of the node device.
[0053] In one embodiment, the control module 301 and the message processing module 302 can be software modules that can implement control functions and message processing functions, respectively; exemplarily, the communication connection between them can include a data transmission interface and / or a function call relationship between the software modules; exemplarily, the above-mentioned communication connection can include an electrical connection channel that can implement data transmission between the two modules, which is not limited to the embodiments of the present application.
[0054] In one embodiment, a protocol stack for processing network packets may include: Figure 1 as well as Figure 2 The source device network protocol stack and the target device network protocol stack shown in the figure; exemplarily, the above-mentioned protocol stack can have the function of encapsulating and packaging the source data based on the data communication protocol to obtain a data packet, and parsing the data packet based on the data communication protocol to obtain the source data; exemplarily, the above-mentioned data communication protocol can include a standard communication protocol, such as Transmission Control Protocol / Internet Protocol (TCP / IP).
[0055] In one implementation, the kernel space of the node device may include a space in which a kernel process in the node device runs and / or manages.
[0056] In one embodiment, the control instructions sent by the control module 301 may include at least one instruction data of triggering the message processing module 302 to start running, send messages, receive messages, parse messages, message processing cycle, message processing duration, and target messages associated with message processing.
[0057] In one implementation, the control module 301 may also send data to the message processing module 302 via a communication connection, and the message processing module 302 may process the received data to generate a detection message.
[0058] In one implementation, the message processing module 302 may include multiple processing units, at least one of which may be set in the kernel space; illustratively, all processing units in the message processing module 302 may be set in the kernel space.
[0059] In one embodiment, the message processing module 302 can generate a detection message according to the control instruction when the control instruction is to send a message, determine the device information of the target device according to the control instruction, and then send the detection message to the target device based on the device information of the target device; exemplarily, the message processing module 302 can switch to the message receiving state after sending the detection message, and after receiving the reply message, process the reply message to determine the link status; exemplarily, the message processing module 302 can directly switch to the message receiving state when the control instruction is message listening to receive the reply message or receive the detection message sent by other devices.
[0060] In one embodiment, the link status may include at least one of link transmission delay, packet loss rate, the number of links between the node device and the target device, and the number of device nodes contained in each link; exemplarily, after the link status is determined, the message processing module 302 can be sent to the control module 301 via a communication connection for it to manage or output the link status.
[0061] In one implementation, the node device and the target device may be located in the same MA or MD; exemplarily, the node device and the target device may be of the same type, such as both are MEPs or both are MIPs; exemplarily, the node device and the target device may be of different types, such as the node device is a MEP and the target device may be a MIP.
[0062] In one implementation, the detection message and the reply message may include a Connectivity Fault Management (CFM) message in OAM, wherein CFM is used to implement end-to-end connectivity fault detection, fault notification, and fault location functions in the network. CFM can monitor the connectivity of the entire network, and CFM technology combined with protection switching technology can improve network reliability.
[0063] From the above, it can be seen that the message processing device provided in the embodiment of the present application is arranged in the node device, and the communication connection between the control module and the message processing module does not include the protocol stack for processing network data packets set in the node device; at least part of the processing units in the message processing module are arranged in the kernel space of the node device, and are capable of receiving and responding to the control instructions sent by the control module, sending a detection message to the target device, and receiving a reply message sent by the target device, and then processing the reply message to determine the link status between the node device and the target device, and the detection message and the reply message include an OAM message.
[0064] Therefore, in the message processing device provided by the embodiment of the present application, at least part of the processing units in the message processing module are set in the kernel space of the node device, so that the efficiency of the message processing module in processing detection messages and reply messages can be greatly improved; secondly, the communication connection between the control module and the message processing module does not include the protocol stack for processing network data packets, so that the data transmission link between the control module and the message processing module can be reduced, and the instruction transmission and data transmission delay between the two can be shortened; and the message processing module can directly process the reply message after receiving the reply message, and determine the link status between the node device and the target device, thereby improving the efficiency of OAM message processing and the efficiency of link status determination. Therefore, the message processing state provided by the embodiment of the present application not only gets rid of the dependence on dedicated hardware chips, specific network card devices, and dedicated data processing kits such as DPDK, but also improves the efficiency of OAM message processing of the message processing device provided by the embodiment of the present application relative to the software OAM message processing scheme in the related art.
[0065] Figure 4 Another structural diagram of the message processing device provided in the embodiment of the present application is as follows Figure 4 As shown, the message processing module 302 includes a message sending unit 3021 and a message receiving unit 3022; wherein:
[0066] The message sending unit 3021 is used to send a first message to a target device; the message sending unit 3021 is set in the kernel space; wherein the first message includes at least LBM, CCM and LTM;
[0067] The message receiving unit 3022 is used to receive the reply message, obtain the additional data carried in the reply message, and determine the link status based on the additional data.
[0068] In one embodiment, the message sending unit 3021 can parse the control instruction, and when it is determined that the control instruction indicates that the first message to be sent is an LBM, it can generate an LBM and obtain the timestamp in the LBM, and then send the LBM to the target device; exemplarily, a Layer 2 Ping (macping / ethping) detection can be implemented through the LBM; exemplarily, when the first message is an LBM, the target device can be at least one device.
[0069] Figure 5 A schematic diagram of a structure of a message sending unit sending an LBM provided in an embodiment of the present application, such as Figure 5 As shown, the first MEP 501 may be a node device, and the LBM sent by the first MEP 501 may be transmitted to the second MEP 504 after passing through the first MIP 502 and the second MIP 503; illustratively, the second MEP 504 may be a target device. illustratively, the control module of the first MEP 501 may trigger the message sending unit 3021 to send the LBM through the following control instructions:
[0070] Sending CFM LBM to b4:96:91:98:4e:2c.
[0071] In the above control instruction, b4:96:91:98:4e:2c may represent the address of the target device, ie, the second MEP 504 .
[0072] When sending an LBM, the message sending unit 3021 may output the following information:
[0073] 64bytes from b4:96:91:98:4e:2c:cfm_seq=2017870625time=0.267ms
[0074] 64bytes from b4:96:91:98:4e:2c:cfm_seq=2017870626time=0.239ms
[0075] 64bytes from b4:96:91:98:4e:2c:cfm_seq=2017870627time=0.234ms
[0076] In the above information, 64bytes can represent the amount of LBM data sent, cfm_seq can represent the message identifier of each LBM; time can represent the timestamp of each LBM; from the above data, it can be seen that the node device, namely the first MEP501, can continuously send LBM to the target device, namely the second MEP 504.
[0077] Exemplarily, the message sending unit 3021 can timestamp the first message through the eBPF Traffic Classifier (TC), where TC is an eBPF hook in the Linux network processing flow, which can mount the eBPF program. It provides multiple functions including packet modification, rerouting, and dropping packets (dropping). These functions will affect the kernel's traffic statistics and therefore also affect the queuing discipline (QD) of the data packet; and the eBPF TC is the link closest to the hardware at the sending end, so it can improve the efficiency of timestamp setting and shorten the OAM message sending time.
[0078] In actual applications, CCM can realize the connectivity detection function, where the connectivity detection function is used to detect the connectivity status between maintenance endpoints. Usually, MEP can periodically send CCM, and other MEPs and MIPs in the same MA receive the message. If MEP does not receive the CCM message within 3.5 cycles, it can be determined that the link status is abnormal.
[0079] In one implementation, the message sending unit 3021 can obtain the time information of the CCM, such as the timestamp in the CCM, and send the CCM when determining that the control instruction indicates that the first message to be sent is a CCM; exemplarily, the target device at this time is multiple devices, that is, the message sending unit 3021 can broadcast the CCM to multiple devices; exemplarily, the message sending unit 3021 can multicast the CCM to at least one group of devices in the MA.
[0080] Exemplarily, any device in the MA, such as a MEP, can be used as a target device for multicasting CCM by node devices in the MA.
[0081] Figure 6 A schematic diagram of a structure in which a message sending unit sends a CCM according to an embodiment of the present application. Figure 6 As shown, the first MEP 501, the first MIP 502, the second MIP 503, the second MEP 504, the third MEP 505 and the third MIP 506 can be located in the same MA, wherein the first MEP 501, the second MEP 504 and the third MEP 505 can all serve as node devices for sending CCM. At the same time, the target device corresponding to the first MEP 501 may include the second MEP 504 and the third MEP 505, that is, the target device of the MEP that sends CCM in the MA may include other MEPs in the MA except the MEP that sends CCM.
[0082] Exemplarily, the message sending unit 3021 may continuously send CCM at specified time intervals.
[0083] In one implementation, when determining that the control instruction indicates that the first message to be sent is an LTM, the message sending unit 3021 can obtain the time information of the LTM, such as the timestamp in the LTM, and send the LTM out; exemplarily, the target device at this time can be multiple devices, that is, the message sending unit 3021 can broadcast the LTM to multiple devices; exemplarily, any MEP in the MA can be a target device for broadcasting the LTM as a node device.
[0084] Figure 7 This is a schematic diagram of the structure of the message sending unit sending LTM provided in the embodiment of the present application. Figure 7 As shown, the first MEP 501 may be a node device that sends an LTM, and the second MEP 504 and the third MEP 505 may be target devices that receive the LTM.
[0085] Exemplarily, the control module of the first MEP 501 may trigger the message sending unit 3021 to send the LTM to the target device through the following control instructions.
[0086] Sending CFM LTM probe to 78:ac:44:1b:33:90
[0087] Among them, 78:ac:44:1b:33:90 can represent the address of any target device.
[0088] In one implementation, the message receiving unit 3022 may be disposed in the kernel space.
[0089] In one implementation, the reply message may be sent by the target device, or may be sent by an intermediate device between the node device and the target device, wherein the intermediate device may include: Figures 5 to 7 The first MIP and the second MIP in.
[0090] In one implementation, the additional data may include data parsed by the message receiving unit 3022 from the reply message, such as a timestamp and device information of a device sending the reply message.
[0091] In one embodiment, the message receiving unit 3022 can obtain a detection message corresponding to the reply message, and then determine the link status based on the detection message and additional data; exemplarily, the message receiving unit 3022 can determine the link status based on at least part of the data carried in the detection message and additional data; exemplarily, at least part of the data carried in the detection message may include data such as the address of the node device and the timestamp of the detection message.
[0092] In one implementation, after determining the link status, the message receiving unit 3022 may send the message to the control module 301 via a communication connection.
[0093] In one implementation, the message receiving unit 3022 may also determine that the link status is in an abnormal state when no reply message is received within a specified time.
[0094] From the above, it can be seen that the message processing module of the message processing device provided in the embodiment of the present application includes a message sending unit and a message receiving unit. The message sending unit is used to obtain the time information of the first message and send the first message to the target device; wherein the first message includes at least LBM, CCM and LTM, and the message receiving unit is used to receive a reply message and obtain additional data in the reply message, and then determine the link status based on the additional data.
[0095] Therefore, the message sending unit included in the message processing module in the message processing device provided in the embodiment of the present application can realize flexible sending of multiple CFM messages; and, since the message sending unit is set in the kernel space of the node device, it can also realize efficient sending of multiple CFM messages; at the same time, after receiving the reply message, the message receiving unit can directly determine the link status based on the additional data in the reply message, thereby shortening the time for determining the link status and improving the efficiency of link status determination.
[0096] Based on the foregoing embodiments, the message receiving unit 3022 in the embodiments of the present application is used to determine the transmission delay and / or packet loss rate between the node device and the target device based on the time information in the additional data when the reply message is the second message; wherein the second message includes at least CCM.
[0097] Exemplarily, the second message may be a reply message of the CCM.
[0098] Exemplarily, the message receiving unit 3022 may not perform the operations of acquiring additional data and determining the transmission delay and / or packet loss rate between the node device and the target device when the reply message is not the second message.
[0099] In one embodiment, when receiving a CCM, the message receiving unit 3022 can update the CCM receiving timer and determine the data packet transmission time between the node device and the target device, that is, the transmission delay of the link, based on the time information in the CCM additional data and the time information when the CCM is sent.
[0100] Exemplarily, after sending the CCM through the message sending unit 3021 , the node device may trigger the message receiving unit 3022 to switch to the CCM receiving mode through the control module 301 .
[0101] Exemplarily, the control module 301 may output the following instruction to trigger the message receiving unit 3022 to switch to the CCM receiving mode. In the following instruction, Listening on interface enol for CFM frames indicates waiting for a CFM frame reply.
[0102] Listening on interface enol for CFM frames.
[0103] Exemplarily, the message receiving unit 3022 can output the following information during the process of receiving CCM, where revd CCM:78:ac:44:1b:21:a8,level 0,MD"mdl",MA"mal" means that CCM is received from the device with the name of mal, the name of mdl, and the address of 78:ac:44:1b:21:a8 in the MA, and the priority level of receiving CCM is 0; the meanings of other command lines are the same as above and will not be repeated here.
[0104] revd CCM:78:ac:44:1b:21:a8,level 0,MD"mdl",MA"mal"
[0105] revd CCM:9c:dc:71:c3:85:68,level 0,MD"md1",MA"mal"
[0106] revd CCM:78;ac:44:1b:21:a8,level 0,MD"mdl",MA"mal"
[0107] revd CCM:9c:dc:71:c3:85:68,level 0,MD"mdl",MA"mal"
[0108] For example, Figure 6 As shown, since CCM is a multicast message, a node device such as the first MEP 501 can receive CCM from at least one target device, for example, it can receive CCM from the second MEP 504 corresponding to ac:44:1b:21:a8 and the third MEP 505 corresponding to 9c:dc:71:c3:85:68 in the above command line. In actual applications, if the node device does not receive CCM within 3.5 cycles, the message receiving unit 3022 can determine that the link is in an abnormal state.
[0109] Exemplarily, the message receiving unit 3022 may count the number of CCMs it sends and received, thereby determining a packet loss rate between the node device and the target device.
[0110] From the above, it can be seen that the message receiving unit of the message processing device provided in the embodiment of the present application can determine the transmission delay and / or packet loss rate between the node device and the target device based on the timestamp in the additional data when the reply message is the second message, and the second message includes at least CCM.
[0111] Therefore, the message processing device provided in the embodiment of the present application can directly receive the CCM through the message receiving unit and determine the transmission delay and / or packet loss rate based on the timestamp in the CCM, thereby realizing efficient determination of the transmission delay and / or packet loss rate of the link status between the node device and the target device.
[0112] Based on the foregoing embodiments, in the message processing device provided by the embodiments of the present application, the message receiving unit 3022 is used to determine the transmission delay between the node device and the target device based on the time information in the additional data when the reply message is a third message; wherein the third message includes at least LBR.
[0113] Exemplarily, if the reply message received by the message receiving unit 3022 is not the third message, the operation of determining the transmission delay between the device node and the target device may not be performed.
[0114] In practical applications, LBR is the reply message of LBM.
[0115] In one embodiment, the device node sending the LBR may include the target device, and may also include an intermediate device between the device node sending the LBR and the target device, for example, Figure 5 In the figure, the first MEP 501 can be a device node that sends LBM, the second MEP 504 can be a target device, and a first MIP 502 and a second MIP 503 are also set between the first MEP 501 and the second MEP 504. The two node devices can be intermediate devices. After receiving the LBM, the two intermediate devices can send LBR to the first MEP 501, and the two intermediate devices can also forward the LBM to the next-level node at the same time until the LBM reaches the second MEP 504. When receiving the LBM, the second MEP 504 can also send LBR to the first MEP 501 through the first MIP 502 and the second MIP 503.
[0116] Exemplarily, when receiving the LBR, the message receiving unit 3022 can obtain the identification information and time information of the LBR from the additional data of the LBR, and determine the LBM corresponding to the LBR based on the identification information, and then determine the transmission delay between the node device and the target device based on the time information of the LBM corresponding to the LBR and the time information carried by the LBR. It can also determine the transmission delay between the node device and the intermediate device, thereby obtaining the overall transmission delay distribution status of the link from the node device to the target device.
[0117] From the above, it can be seen that in the message processing device provided in the embodiment of the present application, the message receiving unit can determine the data transmission delay between the device node and the target device based on the time information in the additional data when the reply message is the third message, wherein the third message includes LBR.
[0118] Therefore, the message processing device provided in the embodiment of the present application can efficiently and quickly implement the processing of LBR through the message receiving unit, thereby more efficiently determining the data transmission delay between the node device and the target device.
[0119] Based on the foregoing embodiment, in the message processing device provided in the embodiment of the present application, the message receiving unit 3022 is used to determine the link path information between the node device and the target device based on the device information in the additional data when the reply message is the fourth message; wherein the fourth message includes at least the LTR;
[0120] The message receiving unit 3022 is also used to obtain the first address and the second address when receiving the fifth message, and set the source address of the fifth message to the first address, set the destination address of the fifth message to the second address, set the message type of the fifth message to LTR, and send LTR through XDP; wherein the fifth message includes at least LTM; the first address includes the address of the node device, and the second address includes the address of the device sending the LTM.
[0121] Exemplarily, if the reply message received by the message receiving unit 3022 is not the fourth message, the operation of determining the link path information between the node device and the target device based on the device information in the additional data may not be performed.
[0122] Exemplarily, if the message received by the message receiving unit 3022 is not the fifth message, the operations of obtaining the first address and the second address, setting the source address of the fifth message as the first address, and setting the destination address of the fifth message as the second address may not be performed.
[0123] In practical applications, LTR is the reply message of LTM.
[0124] In one embodiment, the message receiving unit 3022 can obtain and record the survival time (Time To Live, TTL) and Replay Action of the LTR message from the additional data, and determine the link path information between the node device and the surrounding devices based on the TTL and Reply Action, such as whether the communication link between the node device and the target device is connected, whether there is an intermediate device between the node device and the target device, and the number and type of the intermediate devices.
[0125] It should be noted that LTM is a multicast message, while LTR is a unicast message. Figure 7 In the example, the first MEP 501 may send LTM to the second MEP 504 and the third MEP 505 through the intermediate device, and during the LTM transmission process, the intermediate device associated with the second MEP 504 may include the first MIP 502 and the second MIP 503. Since the third MIP 506 does not have the LTM processing function, it directly transparently transmits the LTM to the second MEP 504. That is, the first MEP 501 may multicast LTM to at least one MEP, and the intermediate device, the second MEP 504 and the third MEP 505 perform unicast operations when sending LTR. That is, the above-mentioned node devices only send LTR to the first MEP 501 through the intermediate device, and will not send LTR to other node devices.
[0126] In one embodiment, the first address may include an Internet Protocol (IP) address or a Media Access Control (MAC) address of the node device. Exemplarily, the second address may be parsed from the fifth message; the second address may include an IP address or a MAC address of a device sending the LTM.
[0127] In one embodiment, when the message receiving unit 3022 receives the LTM, the node device where the message receiving unit 3022 is located can be the target device, and the node device that actively sends the LTM can be the source device; illustratively, the device node that sends the LTM to the target device can include the MEP in the MA, and can also include the MIP in the MA, wherein the node level of the device receiving the LTM is the same as the node level of the node sending the LTM.
[0128] For example, LTMs sent by the same node device can be routed to different devices respectively, such as Figure 7In the process of the first MEP 501 sending the LTM, the first MIP 502 and the second MIP 503 can receive the LTM, and the first MIP 502 can send the LTM to the second MIP 503 when receiving the LTM, and the second MIP 503 can send the LTM to the second MEP 504 through the third MIP 506. Since the third MIP 506 does not support the LTM processing function, when the third MIP 506 receives the LTM sent by the node device, it directly transparently transmits it to the second MEP 504. In the above process, the first MIP 502, the second MIP 503 and the second MEP 504 can all be node devices provided with the message receiving unit 3022; similarly, Figure 7 The third MEP 505 in the example may also be a node device provided with a message receiving unit 3022 .
[0129] Exemplarily, in a network, there may be multiple node devices that send LTMs, and LTMs sent by multiple different node devices may be routed to the same node device, such as Figure 7 The second MEP 504 and the third MEP 505 in the MEP 504 may send the LTM to the first MEP 501 at the same time; illustratively, the target device sending the LTM and the node device receiving the LTM are located in the same MA or different MAs.
[0130] Exemplarily, after the source address and the destination address of the LTM are set and the message type of the LTM is modified to LTR, the LTR can be sent out through XDP according to the sending path of the LTM.
[0131] Among them, XDP is the general execution engine (Extended Berkeley Packet Filter, eBPF) of Berkeley Packet Filter (BPF) in the Linux network processing flow. It runs on the Linux system and can greatly improve data processing performance and throughput through the function library and driver set of fast data packet processing, thereby improving the data processing efficiency of data plane applications. Among them, BFP is a network filter. After being upgraded to eBPF, it is no longer used only for network analysis, but has developed into a tool and platform for various types of functions including development performance analysis, system tracing, network optimization, etc. The Linux kernel will load eBPF.
[0132] From the above, it can be seen that the message receiving unit in the message processing device provided in the embodiment of the present application, when the received reply message is LTR, can determine the link path information between the node device and the target device based on the device information in the additional data. Therefore, the message processing device provided in the embodiment of the present application can quickly and efficiently determine the link path information between any node device and the target device through the message receiving unit; the message receiving unit can quickly set the source address and destination address of the LTM it receives, and can realize the rapid modification of the LTM message type, thereby realizing the rapid conversion of the LTM; and, by quickly sending the LTR through XDP, it can also realize the efficient sending and processing of the LTR, thereby realizing the efficient processing of the LTM through the message receiving unit.
[0133] Based on the foregoing embodiments, in the message processing device provided in the embodiments of the present application, the message receiving unit 3022 is used to obtain the first address and the third address when receiving the sixth message, and set the source address of the sixth message to the first address, set the destination address of the sixth message to the third address, set the message type of the sixth message to LBR, and send the LBR through XDP.
[0134] Among them, the sixth message includes LBM, the first address includes the address of the node device; the third address includes the address of the device sending the LBM.
[0135] Exemplarily, if the message received by the message receiving unit 3022 is not the sixth message, the operation of obtaining the first address and the third address may not be performed.
[0136] In one implementation, the third address may include an IP address or a MAC address of a device that sends the LTM, which is not limited in this embodiment of the present application.
[0137] For example, when the message receiving unit 3022 receives the LBM and modifies the message type of the LBM to LBR, the node device where the message receiving unit 3022 is located may be: Figure 5 The first MIP 502, the second MIP 503 and the second MEP 504 in the LBM; exemplarily, the first MEP 501 can be a source device for sending an LBM. After the first MEP 501 sends the LBM, the time information in the LBR sent by the first MIP 502, the second MIP 503 and the second MEP 504 can be obtained according to the echo result of the 802.1ag MAC ping operation, and the transmission delay between each node device between the first MEP 501 and the second MEP 504 can be determined according to the time information.
[0138] From the above, it can be seen that the message receiving unit in the message processing device provided in the embodiment of the present application can modify the source address and destination address for the LBM in real time after receiving the LBM, and can also modify the message type of the LBM to LBR and quickly send the LBR through XDP, thereby providing data support for any node device in the network to quickly and accurately determine the network transmission delay.
[0139] Figure 8 A schematic diagram of the structure of OAM message transmission between the first device and the second device provided in the embodiment of the present application. Figure 8 As shown, the first device 801 may be a node device in the aforementioned embodiment, and the second device 802 may be a target device in the aforementioned embodiment, such as a MEP, or an intermediate device, such as a MIP.
[0140] Exemplarily, the user space of the first device 801 may be provided with a first control module 8011, wherein the first control module 8011 may be the control module in the aforementioned embodiment, and the kernel space may be provided with a first sending unit 8012, a first receiving unit 8013, a first protocol stack 8014 and a first driver module 8015; wherein the first sending unit 8012 and the first receiving unit 8013 may be the message sending unit and the message receiving unit in the aforementioned embodiment respectively; the first protocol stack 8014 may be a network protocol stack provided in the first device 801; and the first driver module 8015 may be a network driver module provided in the first device 801.
[0141] Exemplarily, the second control module 8021, the second sending unit 8022, the second receiving unit 8023, the second protocol stack 8024 and the second driver module 8025 in the second device 802 have the same functions as the first control module 8011, the first sending unit 8012, the first receiving unit 8013, the first protocol stack 8014 and the first driver module 8015, and are not repeated here.
[0142] Exemplarily, the first control module 8011 set in the user space of the first device 801 can bypass the first protocol stack 8014 and directly control the first sending unit 8012 to send LBM, CCM and LTM to the second device 802 via the first driver module 8015 through the XDP integrated in the first receiving unit 8013, such as XDP_eBPF.
[0143] Exemplarily, when the second receiving unit 8023 of the second device 802 receives the CCM, it can determine the data transmission delay between the first device 801 and the second device 802 based on the time when it received the CCM and the timestamp in the CCM it previously sent. It can also set time information for the CCM and send the CCM to the first device 801, so that the first device 801 can determine the transmission delay and / or packet loss rate between it and the second device 802 based on the CCM it sent and the CCM it received.
[0144] Exemplarily, when the second receiving unit 8023 receives the LBM, it can set the message type of the LBM to LBR, set the target address of the LBM to the address of the first device 801, and set the source address of the LBM to the address of the second device 802, and send the LBR to the first device 801 through the XDP in the second receiving unit 8023; exemplarily, after the first receiving unit 8013 receives the LBR sent by the second device 802, it can determine the transmission delay between it and the second device 802 based on the time information of its sending the LBM and the timestamp in the LBR.
[0145] Exemplarily, when the second receiving unit 8023 receives LTM, the message type of LTM can be modified to LTR, and the source address of LTR is set to the address of the second device 802, and the destination address of LTR is set to the address of the first device 801, and then the LTR is sent to the first device 801 via XDP; Exemplarily, when the first receiving unit 8013 receives LTR, it can determine the link path information between the first device 801 and the second device 802 based on the TTL and Action Reply in the LTR.
[0146] Exemplarily, if the second device 802 is the target device of the first device 801, then after receiving the OAM message, the second device 802 can generate a reply message and send it to the first device 801; exemplarily, if the second device 802 is an intermediate device such as the MIP in the aforementioned embodiment, the second device 802 can transmit the message sent by the first device 801 to the node device in the direction of the target device, and can also send a reply message to the first device at the same time.
[0147] Exemplarily, if the messages received by the first receiving unit 8013, the first sending unit 8012, the second sending unit 8022 and the second receiving unit 8023 are not OAM messages, they may not process the messages in any way, but transparently transmit the messages to the target device or target application indicated by the messages.
[0148] From the above, it can be seen that since the control module is set in the user space, and the message processing modules related to the actual sending and receiving of messages, such as the message sending unit and the message receiving unit, are set in the kernel space, and the message sending can be implemented through XDP and other methods, thereby realizing the rapid sending, receiving and processing of OAM data packets by bypassing the protocol stack.
[0149] Based on the foregoing embodiment, in the processing device provided by the embodiment of the present application, the message receiving unit includes eBFP XDP; and a control module, which is used to load the eBFP XDP to the network card of the node device.
[0150] In one implementation, the control module may obtain performance parameter information of the network card of the node device, and when determining according to the performance parameter information that the network card of the node device supports the XDP offload mode (offload) function, load eBFP XDP to the network card of the node device.
[0151] From the above, it can be seen that the message processing device provided in the embodiment of the present application can load the eBFPXDP of the message receiving unit into the network card of the node device. Since eBPF XDP is the link closest to the hardware in the node device and can directly operate on the message with zero copy, it can reduce the resource overhead in the data copy process, thereby further improving the processing efficiency of the message processing device in sending and receiving messages.
[0152] Based on the foregoing embodiments, in the message processing device provided in the embodiments of the present application, the message receiving unit is set in the user space, and the message processing module also includes a message filtering unit set in the kernel space, which is used to send the OAM message to the message receiving unit through AF_XDP.
[0153] Fig. 9 Another structural schematic diagram of OAM message transmission between a first device and a second device provided in an embodiment of the present application. Fig. 9 Zhongyu Figure 8 Units and modules with the same name will not be introduced again.
[0154] like Fig. 9 As shown, the first receiving unit 8013 and the second receiving unit 8023 are respectively arranged in the user space of the first device 801 and the user space of the second device 802; and, a first filtering unit 8016 is added to the first device 801, and a second filtering unit 8026 is added to the second device 802; wherein, the first filtering unit 8016 and the second filtering unit 8026 can be the above-mentioned message filtering units.
[0155] Exemplarily, the first filtering unit 8016 and the second filtering unit 8026 can judge the message type when receiving the message. If the message is of OAM type, such as LTM, CCM, LBR and LTR, the OAM message can be transparently transmitted to the first receiving unit 8013 and the second receiving unit 8023, so that the first receiving unit 8013 and the second receiving unit 8023 can further process the OAM message; exemplarily, if the message is not of OAM type, the message can be transparently transmitted to the target application in the first device 801 and the second device 802.
[0156] Exemplarily, the first filtering unit 8016 and the second filtering unit 8026 can transmit the OAM message to the first receiving unit 8013 and the second receiving unit 8023 respectively through the AF-XDP socket. Among them, AF_XDP, like AF_INET and AF_PACKET, belongs to a type of Address Family. The AF_XDP socket directly reroutes the data packets received by the network card to the user space through XDP, thereby realizing fast data transmission between the network protocol stack and the user space, so as to realize high-performance network message processing between the network card and the user space. In practical applications, AF_XDP is the user state interface of XDP.
[0157] From the above, it can be seen that the message processing device provided in the embodiment of the present application can still receive OAM messages through the message filtering unit set in the kernel space when the message receiving unit is set in the user space. Since the message filtering unit is set in the kernel space, and it and the message receiving unit can perform fast data transmission through AF_XDP bypassing the protocol stack, it can realize fast reception and processing of OAM messages.
[0158] Based on the aforementioned embodiment, in the message processing device provided in the embodiment of the present application, the control module can load the message processing module to the network card when it is determined that the network card of the node device is a designated network card.
[0159] Exemplarily, when the control module determines that the network card of the node device is not the designated network card, the control module can implement the message processing function by the method provided in the aforementioned embodiment.
[0160] Exemplarily, the designated network card may include a network card that has the function of efficiently sending and receiving OAM messages and can quickly process OAM messages to determine the link status; exemplary, the designated network card may include an intelligent network card; exemplary, after the message processing module is loaded into the intelligent network card, the message processing logic of the message processing module can be implemented by the microcode in the intelligent network card.
[0161] From the above, it can be seen that the message processing device provided in the embodiment of the present application can load the message processing module to the network card when the network card of the node device is a designated network card. When the designated network card is an intelligent network card, with the help of the efficient data processing capability and intelligent data judgment logic of the intelligent network card, the efficiency and intelligence of OAM message processing can be further improved.
[0162] Based on the above embodiments, the present application also provides a node device 10, Fig.10 A schematic diagram of the structure of the node device 10 provided in the embodiment of the present application is shown in FIG. Fig.10 As shown, the node device may include a message processing device 3 as provided in any of the previous embodiments.
[0163] From the above, it can be seen that the node device provided in the embodiment of the present application includes a message processing device, and at least part of the processing units of the message processing module in the message processing device are arranged in the kernel space of the node device, thereby greatly improving the efficiency of the message processing module in processing detection messages and reply messages; secondly, the communication connection between the control module and the message processing module does not include a protocol stack for processing network data packets, thereby reducing the data transmission link between the control module and the message processing module, and shortening the instruction transmission and data transmission delay between the two; and, the message processing module can directly process the reply message after receiving the reply message, and determine the link status between the node device and the target device, thereby improving the efficiency of OAM message processing and improving the efficiency of determining the link status.
[0164] Based on the foregoing embodiments, the embodiments of the present application also provide a message processing method, which is applied to a message processing device set in a node device; the message processing device includes a control module and a message processing module; a communication connection is established between the control module and the message processing module; the communication connection does not include a protocol stack for processing network data packets in the node device; at least part of the processing unit of the message processing module is set in the kernel space of the node device. Fig.11 A flow chart of a message processing method provided in an embodiment of the present application is shown in 11. The method may include the following process:
[0165] Step 1101: The message processing module receives and responds to the control instruction sent by the control module through the communication connection, sends a detection message to the target device, and receives a reply message sent by the target device.
[0166] Step 1102: The message processing module processes the reply message to determine the link status between the node device and the target device.
[0167] The detection message and the reply message include an OAM message.
[0168] In one implementation, the message processing device may be the message processing device provided by any of the aforementioned embodiments.
[0169] In some embodiments, the message processing module includes a message sending unit and a message receiving unit; wherein:
[0170] The message sending unit sends a first message to a target device; the message sending unit is arranged in a kernel space; wherein the first message includes at least an LBM, a CCM and an LTM;
[0171] The message receiving unit receives the reply message, obtains additional data carried in the reply message, and determines the link state based on the additional data.
[0172] In some embodiments, when the reply message is a second message, the message receiving unit determines the transmission delay and / or packet loss rate between the node device and the target device based on the time information in the additional data; wherein the second message includes at least CCM.
[0173] In some embodiments, when the reply message is a third message, the message receiving unit determines the transmission delay between the node device and the target device based on the time information in the additional data; wherein the third message includes at least the LBR.
[0174] In some embodiments, the message receiving unit determines the link path information between the node device and the target device based on the device information in the additional data when the reply message is the fourth message; wherein the fourth message includes at least the LTR;
[0175] When receiving the fifth message, the message receiving unit obtains the first address and the second address, sets the source address of the fifth message to the first address, sets the destination address of the fifth message to the second address, sets the message type of the fifth message to LTR, and sends LTR through XDP; wherein the fifth message includes at least LTM; the first address includes the address of the node device; and the second address includes the address of the device sending the LTM.
[0176] In some embodiments, when receiving the sixth message, the message receiving unit obtains the first address and the third address, sets the source address of the sixth message to the first address, sets the destination address of the sixth message to the third address, sets the message type of the sixth message to LBR, and sends the LBR through XDP; wherein the sixth message includes at least LBM; the first address includes the address of the node device; and the third address includes the address of the device sending the LBM.
[0177] In some embodiments, the message receiving unit includes an eBPF XDP of a Berkeley packet filter; and the control module loads the eBPF XDP to a network card of the node device.
[0178] In some embodiments, the message receiving unit and the control module are arranged in the user space; the message processing module further includes a message filtering unit arranged in the kernel space, and the message filtering unit sends the OAM message to the message receiving unit through AF_XDP.
[0179] In the message processing method provided in the embodiment of the present application, at least part of the processing units of the message processing module are arranged in the kernel space of the node device, thereby greatly improving the efficiency of the message processing module in processing detection messages and reply messages; secondly, the communication connection between the control module and the message processing module does not include a protocol stack for processing network data packets, thereby reducing the data transmission link between the control module and the message processing module, and shortening the instruction transmission and data transmission delay between the two; and, after receiving the reply message, the message processing module can directly process the reply message and determine the link status between the node device and the target device, thereby improving the efficiency of OAM message processing and improving the efficiency of determining the link status.
[0180] Therefore, the message processing method provided in the embodiment of the present application not only gets rid of the dependence on dedicated hardware chips, specific network card devices and dedicated data processing kits such as DPDK, but also improves the efficiency of OAM message processing of the message processing method provided in the embodiment of the present application compared to the software OAM message processing solution in the related art.
[0181] Based on the aforementioned embodiments, the embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor of an electronic device, the message processing method as described above can be implemented.
[0182] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0183] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0184] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0185] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0186] It should be noted that the above-mentioned computer-readable storage medium can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM) and other memories; it can also be various electronic devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0187] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0188] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0189] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus necessary general hardware nodes, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0190] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0191] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0192] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0193] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A message processing device, characterized in that: The device is arranged in a node device; the device comprises a control module and a message processing module; wherein: A communication connection is established between the control module and the message processing module; the communication connection does not include a protocol stack for processing network data packets in the node device; At least part of the processing units in the message processing module are set in the kernel space of the node device; the message processing module is used to receive and respond to the control instruction sent by the control module through the communication connection to instruct the sending of the message, generate and send a detection message to the target device based on the control instruction, and receive a reply message sent by the target device; process the reply message to determine the link status between the node device and the target device; wherein the detection message and the reply message include a network management and maintenance OAM message.
2. The device according to claim 1, characterized in that The message processing module includes a message sending unit and a message receiving unit; wherein: The message sending unit is used to send a first message to the target device; the message sending unit is set in the kernel space; wherein the first message at least includes a loopback detection message LBM, a connectivity detection message CCM and a link tracking message LTM; The message receiving unit is used to receive the reply message, obtain additional data carried by the reply message, and determine the link status based on the additional data.
3. The device according to claim 2, characterized in that The message receiving unit is used to determine the transmission delay and / or packet loss rate between the node device and the target device based on the time information in the additional data when the reply message is a second message; wherein the second message at least includes a connectivity detection message CCM.
4. The device according to claim 2, characterized in that: The message receiving unit is used to determine the transmission delay between the node device and the target device based on the time information in the additional data when the reply message is a third message; wherein the third message at least includes a loopback response message LBR.
5. The device according to claim 2, characterized in that: The message receiving unit is used to determine the link path information between the node device and the target device based on the device information in the additional data when the reply message is a fourth message; wherein the fourth message at least includes a link tracking response message LTR; The message receiving unit is also used to obtain the first address and the second address when receiving the fifth message, and set the source address of the fifth message to the first address, set the destination address of the fifth message to the second address, set the message type of the fifth message to LTR, and send the LTR through the fast data path XDP; wherein the fifth message includes at least LTM; the first address includes the address of the node device; and the second address includes the address of the device sending the LTM.
6. The device according to claim 2, characterized in that: The message receiving unit is used to obtain the first address and the third address when receiving the sixth message, and set the source address of the sixth message to the first address, set the destination address of the sixth message to the third address, set the message type of the sixth message to LBR, and send the LBR through XDP; wherein the sixth message includes at least LBM; the first address includes the address of the node device; and the third address includes the address of the device sending the LBM.
7. The device according to claim 2, characterized in that The message receiving unit includes a general execution engine eBPF XDP of the Berkeley packet filter; the control module is used to load the eBPF XDP to the network card of the node device.
8. The device according to claim 2, characterized in that The message receiving unit and the control module are arranged in the user space; the message processing module further comprises a message filtering unit arranged in the kernel space, which is used for sending the OAM message to the message receiving unit through the address family fast data path AF_XDP.
9. A node device, characterized in that: The node device includes the message processing device as described in any one of claims 1 to 8.
10. A message processing method, characterized in that: The method is applied to a message processing device arranged in a node device; the message processing device comprises a control module and a message processing module; a communication connection is established between the control module and the message processing module; the communication connection does not include a protocol stack for processing network data packets in the node device; At least part of the processing units in the message processing module are arranged in the kernel space of the node device; the method comprises: When the message processing module receives and responds to the control instruction for instructing to send a message sent by the control module through the communication connection, it generates and sends a detection message to the target device based on the control instruction, and receives a reply message sent by the target device; The message processing module processes the reply message to determine the link status between the node device and the target device; wherein the detection message and the reply message include a network management and maintenance OAM message.
Citation Information
Patent Citations
Transmission method, system and node device for linkage fault management packet of Ethernet
CN101317372A
OAM (Operations, Administration and Management) message processing method and device
CN103368849A
Multiple protocol label switching-based operation,?administration?and?maintenance (OAM) method and apparatus
CN103716172A
Method for realizing OAM automatic verification based on PTN chip frequency reduction
CN105591844A
Chip-level OAM message sending method, device and system and storage medium
CN111988158A
