CN115941540B - Message processing device, node equipment and method - Google Patents
Message processing device, node equipment and method Download PDFInfo
- Publication number
- CN115941540B CN115941540B CN202211412702.1A CN202211412702A CN115941540B CN 115941540 B CN115941540 B CN 115941540B CN 202211412702 A CN202211412702 A CN 202211412702A CN 115941540 B CN115941540 B CN 115941540B
- Authority
- CN
- China
- Prior art keywords
- message
- address
- receiving unit
- node
- processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims abstract description 222
- 238000000034 method Methods 0.000 title claims description 44
- 238000001514 detection method Methods 0.000 claims abstract description 41
- 238000004891 communication Methods 0.000 claims abstract description 33
- 238000012423 maintenance Methods 0.000 claims abstract description 14
- 238000003672 processing method Methods 0.000 claims abstract description 10
- 230000005540 biological transmission Effects 0.000 claims description 51
- 230000008569 process Effects 0.000 claims description 21
- 238000001914 filtration Methods 0.000 claims description 17
- 230000004044 response Effects 0.000 claims description 3
- 210000003311 CFU-EM Anatomy 0.000 description 71
- 201000000760 cerebral cavernous malformation Diseases 0.000 description 56
- 238000010586 diagram Methods 0.000 description 26
- 230000006870 function Effects 0.000 description 23
- 230000015654 memory Effects 0.000 description 16
- 238000004590 computer program Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 7
- 230000002159 abnormal effect Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 230000005291 magnetic effect Effects 0.000 description 3
- 238000003860 storage Methods 0.000 description 3
- 150000002085 enols Chemical class 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000005294 ferromagnetic effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000003012 network analysis Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000000523 sample Substances 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application discloses a message processing device, node equipment and a message processing method, wherein the device is arranged in the node equipment, the device comprises a control module and a message processing module, communication connection is established between the control module and the message processing module, the communication connection does not comprise a protocol stack used for processing network data packets in the node equipment, at least part of processing units in the message processing module are arranged in a kernel space of the node equipment, the message processing module is used for receiving and responding to a control instruction sent by the control module through the communication connection, sending a detection message to target equipment and receiving a reply message sent by the target equipment, processing the reply message and determining the link state between the node equipment and the target equipment, and the detection message and the reply message comprise network administration maintenance (OAM) messages.
Description
Technical Field
The present application relates to the field of network technologies, and in particular, to a message processing apparatus, a node device, and a method.
Background
In practical applications, the processing manner of the messages related to network management maintenance (Operation, administration, AND MANAGEMENT, OAM) is not flexible enough.
Disclosure of Invention
Based on the above problems, the embodiment of the application provides a message processing device, node equipment and a method.
The technical scheme provided by the embodiment of the application is as follows:
the embodiment of the application provides a message processing device, which comprises a device arranged in node equipment, a control module and a message processing module, wherein the device comprises the following components:
The communication connection does not comprise a protocol stack for processing network data packets in the node equipment;
the message processing module is used for receiving and responding to a control instruction sent by the control module through the communication connection, sending a detection message to a target device, receiving a reply message sent by the target device, processing the reply message, and determining the link state between the node device and the target device, wherein the detection message and the reply message comprise network management maintenance OAM messages.
In some embodiments, the message processing module includes a message sending unit and a message sending unit, where:
The message sending unit is used for sending a first message to the target equipment, and the message sending unit is arranged in the kernel space, wherein the first message at least comprises a loopback detection message (Loop Back Message, LBM), a connectivity detection message (Continuity CHECK MESSAGE, CCM) and a link tracking message (LINK TRACE MESSAGE, LTM);
The message receiving unit is configured to receive the reply message, obtain additional data carried by the reply message, and determine the link state based on the additional data.
In some embodiments, the message receiving unit is configured to determine, based on time information in the additional data, a transmission delay and/or a packet loss rate between the node device and the target device when the reply message is a second message, where the second message at least includes a connectivity detection message CCM.
In some embodiments, the message receiving unit is configured to determine a transmission delay between the node device and the target device based on time information in the additional data when the Reply message is a third message, where the third message at least includes a Loop Back Reply (LBR).
In some embodiments, the message receiving unit is configured to determine, based on the device information in the additional data, link path information between the node device and the target device when the reply message is a fourth message, where the fourth message includes at least a link tracking response message (LINK TRACE REPLY, LTR);
The message receiving unit is further configured to obtain a first address and a second address when a fifth message is received, set a source address of the fifth message as the first address, set a destination address of the fifth message as the second address, set a message type of the fifth message as LTR, and send the LTR through a fast data path (eXpress Data Path, XDP), where the fifth message at least includes an LTM, the first address includes an address of the node device, and the second address includes an address of the device sending the LTM.
In some embodiments, the message receiving unit is configured to obtain a first address and a third address when a sixth message is received, set a source address of the sixth message as the first address, set a destination address of the sixth message as the third address, set a message type of the sixth message as an LBR, and send the LBR through XDP, where the sixth message includes at least an LBM, the first address includes an address of the node device, and the third address includes an address of the device that sends the LBM.
In some embodiments, the message receiving unit includes a general execution engine (Extended Berkeley PACKET FILTER, EBPF) XDP of a Berkeley packet filter (Berkeley PACKET FILTER, BPF), and the control module is configured to load the eBPF XDP network card to the node device.
In some embodiments, the message receiving unit and the control module are disposed in the user space, and the message processing module further includes a message filtering unit disposed in the kernel space, configured to send the OAM message to the message receiving unit through an address family fast data path (ADDRESS FAMILY Express Data Path, af_xdp).
In some embodiments, the control module is configured to load the packet processing module to the network card if it is determined that the network card of the node device is a designated network card.
The embodiment of the application also provides node equipment, which comprises the message processing device.
The embodiment of the application also provides a message processing method which is applied to a message processing device arranged in the node equipment, wherein the message processing device comprises a control module and a message processing module, communication connection is established between the control module and the message processing module, the communication connection does not comprise a protocol stack used for processing network data packets in the node equipment, at least part of processing units in the message processing module are arranged in a kernel space of the node equipment, and the method comprises the following steps:
The message processing module receives and responds to a control instruction sent by the control module through the communication connection, sends a detection message to target equipment, and receives a reply message sent by the target equipment;
the message processing module processes the reply message to determine the link state between the node equipment and the target equipment, wherein the detection message and the reply message comprise OAM messages.
The message processing device provided by the embodiment of the application has the advantages that at least part of the processing units of the message processing module are arranged in the kernel space of the node equipment, so that the efficiency of processing the detection message and replying the message by the message processing module can be greatly improved, the communication connection between the control module and the message processing module does not comprise a protocol stack for processing a network data packet, so that the link of data transmission between the control module and the message processing module can be reduced, the instruction transparent transmission and the time delay of data transmission between the control module and the message processing module can be shortened, the message processing module can directly process the replying message after receiving the replying message, and the link state between the node equipment and the target equipment can be determined, thereby improving the efficiency of processing OAM message and improving the determination efficiency of the link state.
Therefore, the message processing device provided by the embodiment of the application not only gets rid of the dependence on the special hardware chip, the special network card equipment and the special data processing suite such as DPDK, but also improves the OAM message processing efficiency of the message processing device compared with the software OAM message processing scheme in the related technology.
Drawings
Fig. 1 is a schematic structural diagram of an OAM packet processing method according to the related art;
Fig. 2 is a schematic diagram of another structure for processing OAM messages according to the related art;
FIG. 3 is a schematic diagram of a message processing apparatus according to an embodiment of the present application;
FIG. 4 is a schematic diagram of another structure of a message processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a message sending unit sending an LBM according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a message sending unit sending CCM according to an embodiment of the present application;
Fig. 7 is a schematic structural diagram of a message sending unit sending an LTM according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of OAM packet transmission between a first device and a second device according to an embodiment of the present application;
Fig. 9 is another schematic structural diagram of OAM packet transmission between a first device and a second device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a node device according to an embodiment of the present application;
fig. 11 is a flow chart of a message processing method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In practical applications, the OAM message processing logic is typically implemented by a dedicated hardware chip such as an Application SPECIFIC INTEGRATED Circuit (ASIC), a field programmable gate array (Field Programmable GATE ARRAY, FPGA), or a network processor (Network Processor, NP). However, the scheme has strong dependence on the special hardware chip, and if the support of the special hardware chip is lost, the OAM message processing function cannot be realized.
In order to get rid of the dependence on a special hardware chip, a method for implementing OAM message processing by a software manner is also proposed in the related art, and OAM message processing logic is set in a user space, fig. 1 is a schematic structural diagram of OAM message processing provided in the related art, as shown in fig. 1, a user space of a source device 101 is provided with an active device OAM 1011, a kernel space is provided with an active device network protocol stack 1012 and a source device network card 1013, a user space of a target device 102 is provided with a target device OAM1021, and a kernel space is provided with a target device network protocol stack 1022 and a target device network card 1023. The source device OAM 1011 and the destination device OAM1021 are capable of implementing OAM message processing logic.
In fig. 1, whether the source device 101 sends an OAM packet or the destination device 102 receives an OAM packet, the OAM packet needs to be copied by copying between the source device OAM 1011 and the source device network protocol stack 1012, and between the destination device OAM1021 and the destination device network protocol stack 1022, which occupies a large amount of data processing resources.
In order to get rid of dependence on a hardware chip, reduce occupation of data processing resources, and improve the defect of insufficient time delay precision of the traditional software implementation scheme, a scheme for processing an OAM message by adopting a data plane Development Kit (DATA PLANE Development Kit, DPDK) is also provided in the related technology, wherein the DPDK mainly operates based on a Linux system, is used for a function library and a driving set for fast data packet processing, can greatly improve data processing performance and throughput, and improves the working efficiency of a data plane application program.
Fig. 2 is a schematic diagram of another structure for processing OAM messages according to the related art. As shown in fig. 2, the source device DPDK 1014 in the source device 101 is set in the kernel space in the same manner as in fig. 1, and the target device DPDK 1024 in the target device 102 is set in the kernel space in the same manner as in fig. 1. In fig. 2, data sharing can be directly performed between the source device DPDK 1014 and the source device OAM1011, and between the target device DPDK 1024 and the target device OAM1011 through the memory, so that OAM message processing efficiency is improved. However, in the above scheme, DPDK needs specific network card support, so the versatility is not enough.
In summary, the OAM message processing in the related art is not flexible enough, and the actual OAM message processing requirement cannot be satisfied.
Based on the above problems, the embodiments of the present application provide a message processing apparatus, a node device, and a method, where the message processing apparatus may be disposed in the node device.
In one embodiment, the node devices may comprise computer devices, such as server devices or personal computer devices, illustratively the node devices may comprise physical or virtual machine devices, illustratively the node devices may comprise maintenance endpoints (MAINTENANCE ASSOCIATION END POINT, MEPs) or maintenance intermediate points (MAINTENANCE ASSOCIATION INTERMEDIATE POINT, MIPs) in a maintenance domain (MAINTENANCE DOMAIN, MD), wherein the MEPs are used to determine the scope and boundary of the MD, are edge nodes of a maintenance alliance (MAINTENANCE ASSOCIATION, MA), multiple MAs may be configured in the MD, and the MIPs are located inside the MD, and the manageability of the MD network may be improved by the multiple MIPs deployed between the MEPs.
In one embodiment, the node device may include a device with data packet receiving, transmitting, and processing functions.
Fig. 3 is a schematic structural diagram of a message processing apparatus 3 according to an embodiment of the present application, where, as shown in fig. 3, the apparatus may include a control module 301 and a message processing module 302, where:
the communication connection is established between the control module 301 and the message processing module 302, and does not comprise a protocol stack for processing network data packets in the node equipment;
At least a part of processing units in the message processing module 302 are disposed in the kernel space of the node device, and are configured to receive and respond to a control instruction sent by the control module 301 through a communication connection, send a detection message to the target device, and receive a reply message sent by the target device.
The detection message and the reply message comprise OAM messages.
Illustratively, the user space may comprise a runtime space of a user application in the node device.
In one embodiment, the control module 301 may be disposed in a user space and/or a kernel space of the node device, and the control module 301 may include a plurality of control units, at least some of which may be disposed in the user space of the node device, for example.
In one embodiment, the control module 301 and the message processing module 302 may be software modules capable of implementing a control function and a message processing function, respectively, where, for example, a communication connection between them may include a data transmission interface and/or a function call relationship between the software modules, for example, the communication connection may include an electrical connection channel capable of implementing data transmission between the two modules, which is not limited in the embodiment of the present application.
In one embodiment, the protocol stack for processing the network data packet may include a source device network protocol stack and a destination device network protocol stack as shown in fig. 1 and 2, where the protocol stack may have a function of encapsulating the source data based on a data communication protocol to obtain the data packet and parsing the data packet based on the data communication protocol to obtain the source data, where the data communication protocol may include a standard communication protocol, such as a transmission control protocol/internet protocol (Transmission Control Protocol/Internet Protocol, TCP/IP), for example.
In one embodiment, the kernel space of the node device may include space for kernel processes running and/or managed in the node device.
In one embodiment, the control instruction sent by the control module 301 may include at least one instruction data in triggering the message processing module 302 to start running, sending a message, receiving a message, parsing a message, a message processing period, a message processing duration, and a target message associated with the message processing.
In one embodiment, the control module 301 may also send data to the message processing module 302 through a communication connection, and the message processing module 302 may process the data received by the message processing module 302, thereby generating a detection message.
In one embodiment, the message processing module 302 may include a plurality of processing units, at least one of which may be disposed in the kernel space, and illustratively all of the processing units in the message processing module 302 may be disposed in the kernel space.
In one embodiment, the message processing module 302 may generate a detection message according to the control instruction and determine device information of the target device according to the control instruction when the control instruction is a sending message, and then send the detection message to the target device based on the device information of the target device, where the message processing module 302 may switch to a message receiving state after sending the detection message and process the reply message after receiving the reply message to determine the link state, where the message processing module 302 may switch to the message receiving state directly when the control instruction is a message interception to receive the reply message or receive the detection message sent by other devices.
In one embodiment, the link state may include at least one of a link transmission delay, a packet loss rate, a number of links between the node device and the target device, and a number of device nodes included in each link, and the message processing module 302 may send the determined link state to the control module 301 through a communication connection for management or output of the link state.
In one embodiment, the node device and the target device may be located in the same MA or MD, illustratively the node device and the target device may be the same type, such as both MEPs, or both MIPs, illustratively the node device and the target device may be different types, such as the node device being a MEP and the target device being a MIP.
In one embodiment, the detection message and the reply message may include a connection fault management (Connectivity Fault Management, CFM) message in OAM, where the CFM is used to implement network end-to-end connectivity fault detection, fault notification, and fault location functions, and the CFM technology is combined with the protection switching technology, so that the reliability of the network can be improved.
It can be seen from the foregoing that, the message processing apparatus provided in the embodiment of the present application is disposed in a node device, the communication connection between the control module and the message processing module does not include a protocol stack for processing a network packet disposed in the node device, at least some processing units in the message processing module are disposed in a kernel space of the node device, and are capable of receiving and responding to a control instruction sent by the control module, sending a detection message to a target device, receiving a reply message sent by the target device, and then processing the reply message to determine a link state between the node device and the target device, where the detection message and the reply message include an OAM message.
In the message processing device provided by the embodiment of the application, at least part of processing units in the message processing module are arranged in the kernel space of the node equipment, so that the efficiency of processing detection messages and replying messages by the message processing module can be greatly improved, and secondly, the communication connection between the control module and the message processing module does not comprise a protocol stack for processing network data packets, so that the links of data transmission between the control module and the message processing module can be reduced, the time delay of command transparent transmission and data transmission between the control module and the message processing module can be shortened, and the message processing module can directly process the replying messages after receiving the replying messages, so that the link state between the node equipment and the target equipment is determined, thereby improving the efficiency of processing OAM messages and the determination efficiency of the link state. Therefore, the message processing state provided by the embodiment of the application not only gets rid of the dependence on the special hardware chip, the special network card equipment and the special data processing suite such as DPDK, but also improves the OAM message processing efficiency of the message processing device compared with the software OAM message processing scheme in the related technology.
Fig. 4 is another schematic structural diagram of a message processing apparatus according to an embodiment of the present application, as shown in fig. 4, a message processing module 302 includes a message sending unit 3021 and a message receiving unit 3022, where:
a message sending unit 3021, configured to send a first message to the target device, where the message sending unit 3021 is disposed in the kernel space, and the first message includes at least an LBM, a CCM, and an LTM;
The message receiving unit 3022 is configured to receive the reply message, obtain additional data carried in the reply message, and determine the link state based on the additional data.
In an embodiment, the message sending unit 3021 may parse the control instruction, generate the LBM and obtain a timestamp in the LBM when it is determined that the control instruction indicates that the first message required to be sent is the LBM, and then send the LBM to the target device, where two layers of Ping (macping/ethping) detection may be implemented by the LBM, and where the first message is the LBM, the target device may be at least one device.
Fig. 5 is a schematic structural diagram of a sending LBM of a message sending unit according to an embodiment of the present application, as shown in fig. 5, a first MEP 501 may be a node device, and the LBM sent by the first MEP 501 may be transmitted to a second MEP 504 after passing through a first MIP 502 and a second MIP 503, where, in an exemplary embodiment, 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 by:
Sending CFM LBM to b4:96:91:98:4e:2c。
In the above control instructions, b4:96:91:98:4e:2c may represent the address of the target device, i.e. the second MEP 504.
The message transmitting unit 3021 may output the following information when transmitting the LBM:
64bytes from b4:96:91:98:4e:2c:cfm_seq=2017870625time=0.267ms
64bytes from b4:96:91:98:4e:2c:cfm_seq=2017870626time=0.239ms
64bytes from b4:96:91:98:4e:2c:cfm_seq=2017870627time=0.234ms
in the above information, 64bytes may represent the data amount of the transmitted LBM, cfm_seq may represent the message identifier of each LBM, time may represent the timestamp of each LBM, and it can be seen from the above data that the node device, i.e. the first MEP 501, may continuously transmit the LBM to the target device, i.e. the second MEP 504.
For example, the message sending unit 3021 may timestamp the first message by means of the eBPF traffic classifier (TRAFFIC CLASSIFIER, TC), where TC is a eBPF hook in the Linux network processing flow, and can mount eBPF programs, which provide multiple functions including modifying packets, rerouting (reroute), and dropping packets (drop), where these functions affect the traffic statistics of the core, and thus affect the queuing rules (Queueing Discipline, QD) of the data packets, and eBPF TC is a ring of the sending end closest to the hardware, so that the timestamp setting efficiency can be improved, and the OAM message sending time can be shortened.
In practical applications, the CCM may implement a connectivity detection function, where the connectivity detection function is configured to detect a connectivity status between maintenance endpoints, and generally, the MEP may periodically send the CCM, and other MEPs and MIPs in the same MA receive the message, and if the MEP does not receive the CCM message in 3.5 periods, it may determine that the link status is abnormal.
In an embodiment, the message sending unit 3021 may obtain, when it is determined that the control instruction indicates that the first message sent is a CCM, time information of the CCM, such as a timestamp in the CCM, and send the CCM, where the target device is a plurality of devices, that is, the message sending unit 3021 may broadcast the CCM to the plurality of devices, and where the message sending unit 3021 may multicast at least one group of devices in the CCM to the MA, for example.
Illustratively, any of the MA devices, such as MEPs, may be the target device for node devices in the MA to multicast CCMs.
Fig. 6 is a schematic structural diagram of a message sending unit sending CCM according to an embodiment of the present application. As shown in fig. 6, 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 may be located in the same MA, where each of the first MEP 501, the second MEP 504 and the third MEP 505 may be node devices for sending CCMs, and meanwhile, the target devices corresponding to the first MEP 501 may include the second MEP 504 and the third MEP 505, that is, the target devices in the MA for sending the MEPs of the CCMs may include other MEPs in the MA except for the MEPs for sending the CCMs.
Illustratively, the message sending unit 3021 may send CCMs continuously at specified time intervals.
In one embodiment, when it is determined that the control instruction indicates that the first message sent is an LTM, the message sending unit 3021 may acquire time information of the LTM, such as a timestamp in the LTM, and send the LTM out, where the target device may be a plurality of devices, that is, the message sending unit 3021 may broadcast the LTM to a plurality of devices, and where any MEP may be used as the target device for broadcasting the LTM by the node device, for example.
Fig. 7 is a schematic structural diagram of a message sending unit sending LTM according to an embodiment of the present application. As shown in fig. 7, a first MEP 501 may be a node device transmitting an LTM, and a second MEP 504 and a third MEP 505 may be target devices receiving the LTM.
Illustratively, the control module of the first MEP 501 may trigger the message sending unit 3021 to send the LTM to the target device by controlling the following.
Sending CFM LTM probe to 78:ac:44:1b:33:90
Wherein 78:ac:44:1b:33:90 may represent the address of any target device.
In one embodiment, the message receiving unit 3022 may be disposed in the kernel space.
In one embodiment, 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, where the intermediate device may include a first MIP and a second MIP as in fig. 5-7.
In one embodiment, the additional data may include data parsed from the reply message by the message receiving unit 3022, such as a timestamp and device information of a device that sent the reply message.
In one embodiment, the message receiving unit 3022 may obtain the detection message corresponding to the reply message and then determine the link state based on the detection message and the additional data, and the message receiving unit 3022 may determine the link state based on at least part of the data and the additional data carried in the detection message, and the at least part of the data carried in the detection message may include data such as an address of the node device, a timestamp of the detection message, and the like.
In one embodiment, after determining the link state, the message receiving unit 3022 may send the link state to the control module 301 through a communication connection.
In one embodiment, the packet receiving unit 3022 may further determine that the link state is in an abnormal state if the reply packet is not received within a specified time.
It can be seen from the above that, the message processing module of the message processing apparatus provided in the embodiment of the present application includes a message sending unit and a message receiving unit, where the message sending unit is configured to obtain time information of a first message, and send the first message to a target device, and the first message includes at least an LBM, a CCM, and an LTM, and the message receiving unit is configured to receive a reply message, obtain additional data in the reply message, and then determine a link state based on the additional data.
Therefore, the message sending unit included in the message processing module in the message processing device provided by the embodiment of the application can flexibly send various CFM messages; meanwhile, the message receiving unit can directly determine the link state based on the additional data in the reply message after receiving the reply message, thereby shortening the time for determining the link state and improving the efficiency for determining the link state.
Based on the foregoing embodiments, the message receiving unit 3022 in the embodiments of the present application is configured to determine, based on time information in the additional data, a transmission delay and/or a packet loss rate between the node device and the target device when the reply message is a second message, where the second message at least includes a CCM.
The second message may be a reply message of the CCM, for example.
For example, the packet receiving unit 3022 may not perform operations of acquiring additional data and determining a transmission delay and/or a packet loss rate between the node apparatus and the target apparatus in the case where the reply packet is not the second packet.
In one embodiment, the message receiving unit 3022 may update the reception timer of the CCM when receiving the CCM, and determine the transmission time of the data packet between the node device and the target device, that is, the transmission delay of the link, according to the time information in the additional data of the CCM and the time information when sending the CCM.
For example, the node device may trigger, by the control module 301, the message receiving unit 3022 to switch to the CCM receiving mode after sending the CCM by the message sending unit 3021.
Illustratively, the control module 301 may output the following instruction to trigger the message receiving unit 3022 to switch to the CCM receiving mode, where LISTENING ON INTERFACE ENOL FOR CFM FRAMES indicates waiting for the CFM frame reply.
Listening on interface enol for CFM frames。
For example, the message receiving unit 3022 may output the following information in the process of receiving the CCM, wherein revd CCM:78:ac:44:1b:21:a8,level 0,MD"mdl ″ MA" mal "indicates that the CCM is received from a device with an address of 78:ac:44:1b:21:a8 in the MD named mal, and the priority level of receiving the CCM is 0, and the meaning of other command lines is the same as the above, and will not be repeated here.
revd CCM:78:ac:44:1b:21:a8,level 0,MD"mdl",MA"mal"
revd CCM:9c:dc:71:c3:85:68,level 0,MD"md1",MA"mal"
revd CCM:78;ac:44:1b:21:a8,level 0,MD"mdl",MA"mal"
revd CCM:9c:dc:71:c3:85:68,level 0,MD"mdl",MA"mal"
Illustratively, as shown in fig. 6, since CCMs are multicast messages, a node device, such as a first MEP 501, may receive CCMs from at least one target device, such as a second MEP 504 corresponding to ac:44:1b:21:a8 and a third MEP 505 corresponding to 9c: dc:71: c3:85:68 in the command line. In practical application, if the node device does not receive the CCM within 3.5 periods, the message receiving unit 3022 may determine that the link is in an abnormal state.
For example, the packet receiving unit 3022 may count the number of CCMs it sends and the number of CCMs it receives, so as to determine the packet loss rate between the node device and the target device.
As can be seen from the above, in the case that the reply message is the second message, the message receiving unit of the message processing apparatus provided in the embodiment of the present application can determine the transmission delay and/or the packet loss rate between the node device and the target device based on the timestamp in the additional data, where the second message includes at least the CCM.
Therefore, the message processing device provided by the embodiment of the application can directly receive the CCM through the message receiving unit and determine the transmission delay and/or the packet loss rate based on the time stamp in the CCM, thereby realizing the efficient determination of the transmission delay and/or the packet loss rate of the link state between the node equipment and the target equipment.
Based on the foregoing embodiments, in the packet processing device provided in the embodiments of the present application, the packet receiving unit 3022 is configured to determine, based on time information in the additional data, a transmission delay between the node device and the target device when the reply packet is a third packet, where the third packet includes at least an LBR.
For example, 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.
In practical application, the LBR is a reply message of the LBM.
In one embodiment, the device node that sends the LBR may include a target device, and may further include an intermediate device between the device node that sends the LBR and the target device, for example, in fig. 5, the first MEP 501 may be a device node that sends the LBM, the second MEP 504 may be a target device, and a first MIP 502 and a second MIP 503 are further disposed between the first MEP 501 and the second MEP 504, where the two node devices may be intermediate devices, and after receiving the LBM, both of the two intermediate devices may send the LBR to the first MEP 501, and the two intermediate devices may also forward the LBM to the next node at the same time until the LBM reaches the second MEP 504, and when the second MEP 504 receives the LBM, may also send the LBR to the first MEP 501 through the first MIP 502 and the second MIP 503.
Illustratively, when receiving the LBR, the message receiving unit 3022 may obtain the identification information and the time information of the LBR from the additional data of the LBR, determine the LBM corresponding to the LBR based on the identification information, 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, and may determine the transmission delay between the node device and the intermediate device, so as to obtain the overall transmission delay distribution state of the link from the node device to the target device.
As can be seen from the foregoing, in the packet processing device provided in the embodiment of the present application, when the reply packet is a third packet, the packet 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, where the third packet includes the LBR.
Therefore, the message processing device provided by the embodiment of the application can efficiently and rapidly process the LBR through the message receiving unit, thereby efficiently determining the data transmission delay between the node equipment and the target equipment.
Based on the foregoing embodiments, in the packet processing device provided in the embodiments of the present application, the packet receiving unit 3022 is configured to determine, based on device information in the additional data, link path information between the node device and the target device when the reply packet is a fourth packet, where the fourth packet includes at least an LTR;
The message receiving unit 3022 is further configured to obtain a first address and a second address when the fifth message is received, set a source address of the fifth message as the first address, set a destination address of the fifth message as the second address, set a message type of the fifth message as LTR, and send the LTR through XDP, where the fifth message includes at least an LTM, the first address includes an address of a node device, and the second address includes an address of a device that sends the LTM.
For example, 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.
For example, if the message received by the message receiving unit 3022 is not the fifth message, the operation of acquiring the first address and the second address, setting the original 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.
In practical application, the LTR is a reply message of the LTM.
In one embodiment, the message receiving unit 3022 may obtain and record information such as a Time To Live (TTL) and a Replay Action of the LTR message from the additional data, and determine link path information between the node device and the peripheral device according To the TTL and the Replay Action, such as whether a communication link between the node device and the target device is connected, whether an intermediate device exists between the node device and the target device, and the number and types of the intermediate devices.
It should be noted that, in fig. 7, the LTM is a multicast packet, and the LTR is a unicast packet, for example, the first MEP 501 may send the LTM to the second MEP 504 and the third MEP 505 through an intermediary device, and in the LTM transmission process, the intermediary device associated with the second MEP 504 may include the first MIP 502 and the second MIP 503, and the third MIP 506 directly transmits the LTM to the second MEP 504 without the LTM processing function, that is, the first MEP 501 may multicast the LTM to at least one MEP, and the intermediary device, the second MEP 504 and the third MEP 505 are unicast operations when sending the LTR, that is, the node device only sends the LTR to the first MEP 501 through the intermediary device, and does not send the LTR to other node devices.
In one embodiment, the first address may include a network protocol (Internet Protocol, IP) address or a media access Control address (MEDIA ACCESS Control, MAC) of the node device, and the second address may be parsed from the fifth message, for example, and the second address may include an IP address or a MAC address of the device transmitting the LTM.
In one embodiment, when the message receiving unit 3022 receives the LTM, the node device where the message receiving unit 3022 is located may be a target device, and the node device that actively sends the LTM may be a source device, and illustratively, a device node that sends the LTM to the target device may include an MEP in the MA and may further include an MIP in the MA, where the node level of the device that receives the LTM is the same as the node level of the node that sends the LTM.
For example, LTMs sent by the same node device may be routed to different devices, for example, in fig. 7, in the process of sending the LTMs by the first MEP 501, the first MIP 502 and the second MIP 503 may receive the LTMs, and when the first MIP 502 receives the LTMs, the first MIP 502 may send the LTMs to the second MIP 503, and when the second MIP 503 may send the LTMs to the second MEP 504 through the third MIP 506, since the third MIP 506 does not support the LTM processing function, the third MIP 506 directly and transparently sends the LTMs sent by the node device to the second MEP 504 when receiving the LTMs sent by the node device, in which, the first MIP 502, the second MIP 503 and the second MEP 504 may be node devices provided with the message receiving unit 3022, and similarly, the third MEP 505 in fig. 7 may also be node devices provided with the message receiving unit 3022.
Illustratively, in a network, a node device transmitting an LTM may include a plurality of node devices, and the LTMs transmitted by the plurality of different node devices may be routed to the same node device, such as the second MEP 504 and the third MEP 505 in FIG. 7 may transmit the LTM to the first MEP 501 at the same time, and illustratively, the target device transmitting the LTM and the node device receiving the LTM may be located in the same MA or different MA.
For example, after setting the source address and the destination address of the LTM and modifying the message type of the LTM to be the LTR, the LTR may be transmitted by the XDP according to the transmission path of the LTM.
The XDP is a general execution engine (Extended Berkeley PACKET FILTER, EBPF) of a Berkeley packet filter (Berkeley PACKET FILTER, BPF) in a Linux network processing flow, and is operated based on a Linux system, and the data processing performance and throughput can be greatly improved through a function library and a driving set of fast data packet processing, so that the data processing efficiency of a data plane application program is improved. The BFP is a network filter, which is not only used for network analysis after being upgraded to eBPF, but also developed into tools and platforms with various functions including development performance analysis, system tracking, network optimization, and the like, and the Linux kernel is loaded with eBPF.
It can be seen from the above that, when the received reply message is an LTR, the message receiving unit in the message processing apparatus provided by the embodiment of the present application can determine the link path information between the node device and the target device based on the device information in the additional data, so that the message processing apparatus provided by 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, and the message receiving unit can quickly set the source address and the destination address of the LTM received by the message receiving unit, and can quickly modify the type of the LTM message, thereby realizing quick conversion of the LTM, and can also realize efficient transmission processing of the LTR by quickly transmitting the LTR through XDP, thereby realizing efficient processing of the LTM through the message receiving unit.
Based on the foregoing embodiments, in the packet processing device provided in the embodiments of the present application, the packet receiving unit 3022 is configured to obtain the first address and the third address when receiving the sixth packet, set the source address of the sixth packet as the first address, set the destination address of the sixth packet as the third address, set the packet type of the sixth packet as the LBR, and send the LBR through the XDP.
The sixth message comprises an LBM, the first address comprises an address of the node device, and the third address comprises an address of the device sending the LBM.
For example, if the packet received by the packet receiving unit 3022 is not the sixth packet, the operation of acquiring the first address and the third address may not be performed.
In one embodiment, the third address may include an IP address or a MAC address of the device that transmits the LTM, which is not limited by the embodiment of the present application.
Illustratively, when the message receiving unit 3022 receives the LBM and modifies the message type of the LBM to be LBR, the node device where the message receiving unit 3022 is located may be the first MIP 502, the second MIP 503, and the second MEP 504 in fig. 5, and illustratively, the first MEP 501 may be a source device sending the LBM, and after the first MEP 501 sends the LBM, may obtain time information in the LBR sent by the first MIP 502, the second MIP 503, and the second MEP 504 according to the echo result when the 802.1ag MAC ping operation, and determine a transmission delay between each node device between the first MEP 501 and the second MEP 504 according to the time information.
As can be seen from the above, after receiving the LBM, the message receiving unit in the message processing apparatus provided by the embodiment of the present application can modify the source address and the destination address for the LBM in real time, and can also modify the message type of the LBM into the LBR and quickly send the LBR through the XDP, thereby providing data support for quickly and accurately determining the network transmission delay for any node device in the network.
Fig. 8 is a schematic structural diagram of OAM packet transmission between a first device and a second device according to an embodiment of the present application. As shown in fig. 8, the first device 801 may be a node device in the foregoing embodiment, and the second device 802 may be a target device such as an MEP in the foregoing embodiment, or may be an intermediate device such as MIP.
For example, the user space of the first device 801 may be provided with a first control module 8011, where the first control module 8011 may be a control module in the foregoing embodiment, the kernel space is provided with a first sending unit 8012, a first receiving unit 8013, a first protocol stack 8014, and a first driving module 8015, where the first sending unit 8012 and the first receiving unit 8013 may be a packet sending unit and a packet receiving unit in the foregoing embodiment, respectively, the first protocol stack 8014 may be a network protocol stack set in the first device 801, and the first driving module 8015 may be a network driving module set in the first device 801.
The second control module 8021, the second transmitting unit 8022, the second receiving unit 8023, the second protocol stack 8024, and the second driving module 8025 in the second device 802 are respectively the same as the first control module 8011, the first transmitting unit 8012, the first receiving unit 8013, the first protocol stack 8014, and the first driving module 8015, and are not described herein.
For example, the first control module 8011 disposed in the user space of the first device 801 may bypass the first protocol stack 8014 to directly control the first sending unit 8012 to send the LBM, CCM and LTM to the second device 802 via the first driving module 8015 through the XDP integrated in the first receiving unit 8013, such as xdp_ eBPF.
Illustratively, when the second receiving unit 8023 of the second device 802 receives the CCM, it is able to determine the data transmission delay between the first device 801 and the second device 802 based on the time when it receives the CCM and the timestamp in the CCM sent before it, and also set time information for the CCM, and send the CCM to the first device 801, so that the first device 801 determines the transmission delay and/or packet loss rate between it and the second device 802 based on the CCM sent by it and the received CCM.
The second receiving unit 8023 is capable of setting the message type of the LBM as the LBR when receiving the LBM, setting the destination address of the LBM as the address of the first device 801, setting the source address of the LBM as the address of the second device 802, and transmitting the LBR to the first device 801 through the XDP in the second receiving unit 8023, and the first receiving unit 8013 is capable of determining the transmission delay between the first receiving unit 8023 and the second device 802 according to the time information of the LBM and the time stamp in the LBR after receiving the LBR transmitted by the second device 802.
For example, when the second receiving unit 8023 receives the LTM, it may modify the message type of the LTM into an LTR, set the source address of the LTR as the address of the second device 802, set the destination address of the LTR as the address of the first device 801, and then send the LTR to the first device 801 through XDP, where, for example, when the first receiving unit 8013 receives the LTR, it is able to determine the link path information between the first device 801 and the second device 802 according to the TTL and the Action Reply in the LTR.
For example, if the second device 802 is an intermediate device, such as MIP in the foregoing embodiment, the second device 802 may transmit the message sent by the first device 801 to the node device in the direction of the target device, or may simultaneously send the reply message to the first device.
For example, 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 perform any processing on the messages, and may transmit the messages to the target device or the target application indicated by the messages.
As can be seen from the above, since the control module is disposed in the user space, and the message processing modules related to the actual sending and receiving of the message, such as the message sending unit and the message receiving unit, are disposed in the kernel space, the message sending can be implemented by XDP, etc., so as to implement operations of bypassing the protocol stack for fast sending, receiving, processing, etc. of the OAM data packet.
Based on the foregoing embodiment, in the processing apparatus provided by the embodiment of the present application, the message receiving unit includes eBFP XDP and a control module, which is configured to load eBFP XDP to a network card of the node device.
In one embodiment, the control module may obtain performance parameter information of the network card of the node device, and load eBFP XDP to the network card of the node device when determining that the network card of the node device supports the XDP offload mode (offload) function according to the performance parameter information.
As can be seen from the above, the message processing apparatus provided in the embodiment of the present application can load eBFP XDP of the message receiving unit to the network card of the node device, and since eBPF XDP is a ring of the closest hardware in the node device, the message can be directly operated, and zero copy is performed, so that the resource overhead in the data copying process can be reduced, and the processing efficiency of the message processing apparatus for receiving and transmitting the message can be further improved.
Based on the foregoing embodiments, in the packet processing device provided in the embodiments of the present application, the packet receiving unit is disposed in the user space, and the packet processing module further includes a packet filtering unit disposed in the kernel space, configured to send an OAM packet to the packet receiving unit through af_xdp.
Fig. 9 is another schematic structural diagram of OAM packet transmission between a first device and a second device according to an embodiment of the present application. The elements and modules in fig. 9 that are the same name as those in fig. 8 will not be described again.
As shown in fig. 9, the first receiving unit 8013 and the second receiving unit 8023 are respectively disposed in a user space of the first device 801 and a user space of the second device 802, and a first filtering unit 8016 is added in the first device 801, and a second filtering unit 8026 is added in the second device 802, where the first filtering unit 8016 and the second filtering unit 8026 may be the above-mentioned message filtering units.
The first filtering unit 8016 and the second filtering unit 8026 may determine the message type when receiving the message, and if the message is of an OAM type, for example LTM, CCM, LBR and LTR, the OAM message may be 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 may further process the OAM message, and if the message is not of an OAM type, the message may be transmitted to the target applications in the first device 801 and the second device 802.
For example, the first filtering unit 8016 and the second filtering unit 8026 may transmit OAM packets to the first receiving unit 8013 and the second receiving unit 8023 through an AF-XDP socket, respectively. The af_xdp belongs to one of ADDRESS FAMILY as af_inet and af_packet, and the af_xdp socket directly reroutes a data PACKET received by the network card to the user space through the XDP, so that rapid data transmission bypassing the network protocol stack and the user space is realized, and therefore, high-performance network report processing between the network card and the user space can be realized.
As can be seen from the above, when the message processing device provided by the embodiment of the present application sets the message receiving unit in the user space, the OAM message can still be received through the message filtering unit set in the kernel space, and because the message filtering unit is set in the kernel space, and the fast data transmission can be performed between the message filtering unit and the message receiving unit by bypassing the protocol stack through the af_xdp, thereby enabling fast receiving processing of the OAM message.
Based on the foregoing embodiments, in the packet processing device provided in the embodiments of the present application, the control module may load the packet processing module to the network card under the condition that it is determined that the network card of the node device is a designated network card.
In an exemplary embodiment, the control module may implement the message processing function by using the method provided in the foregoing embodiment when it is determined that the network card of the node device is not a designated network card.
The appointed network card can comprise an OAM message high-efficiency receiving and transmitting function, and can process the OAM message rapidly to determine a link state, the appointed network card can comprise an intelligent network card, and message processing logic of the message processing module can be realized through microcode in the intelligent network card after the message processing module is loaded to the intelligent network card.
As can be seen from the above, in the packet processing device provided by the embodiment of the present application, when the network card of the node device is a designated network card, the packet processing module can be loaded to the network card, and when the designated network card is an intelligent network card, the efficiency and the intelligence of OAM packet processing can be further improved by means of the efficient data processing capability and the intelligent data determination logic of the intelligent network card.
Based on the foregoing embodiments, the present application further provides a node device 10, and fig. 10 is a schematic structural diagram of the node device 10 provided in the embodiment of the present application, as shown in fig. 10, where the node device may include the message processing apparatus 3 provided in any one of the foregoing embodiments.
It can be seen from the above that the node device provided by the embodiment of the application comprises a message processing device, wherein at least part of processing units of a message processing module in the message processing device are arranged in a kernel space of the node device, so that the efficiency of processing detection messages and replying messages by the message processing module can be greatly improved, and secondly, the communication connection between the control module and the message processing module does not comprise a protocol stack for processing network data packets, so that the link of data transmission between the control module and the message processing module can be reduced, the time delay of command transparent transmission and data transmission between the control module and the message processing module is shortened, and the message processing module can directly process the replying messages after receiving the replying messages, so that the link state between the node device and the target device is determined, thereby improving the efficiency of processing OAM messages and the determination efficiency of the link state.
Based on the foregoing embodiment, the embodiment of the present application further provides a message processing method, where the method is applied to a message processing device provided in a node device, where the message processing device includes a control module and a message processing module, where communication connection is established between the control module and the message processing module, where the communication connection does not include a protocol stack in the node device for processing a network data packet, and at least part of processing units of the message processing module are provided in a kernel space of the node device. Fig. 11 is a flow chart of a message processing method according to an embodiment of the present application, as shown in fig. 11, the method may include the following flows:
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.
Step 1102, a message processing module processes the reply message to determine a link state between the node device and the target device.
The detection message and the reply message comprise OAM messages.
In one embodiment, the message processing apparatus may be a message processing apparatus provided in any one of the foregoing embodiments.
In some embodiments, the message processing module includes a message sending unit and a message receiving unit, wherein:
the message sending unit is arranged in the kernel space, wherein the first message at least comprises an LBM, a CCM and an LTM;
the message receiving unit receives the reply message, acquires additional data carried by the reply message, and determines a link state based on the additional data.
In some embodiments, the message receiving unit determines, based on time information in the additional data, a transmission delay and/or a packet loss rate between the node device and the target device when the reply message is a second message, where the second message at least includes a CCM.
In some embodiments, the message receiving unit determines a 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, where the third message includes at least an LBR.
In some embodiments, the message receiving unit determines link path information between the node device and the target device based on device information in the additional data when the reply message is a fourth message, where the fourth message includes at least an LTR;
Under the condition that a fifth message is received, the message receiving unit obtains a first address and a second address, sets a source address of the fifth message as the first address, sets a destination address of the fifth message as the second address, sets a message type of the fifth message as LTR, and sends the LTR through XDP, wherein the fifth message at least comprises LTM, the first address comprises an address of node equipment, and the second address comprises an address of equipment for sending the LTM.
In some embodiments, the message receiving unit obtains a first address and a third address when receiving the sixth message, sets a source address of the sixth message as the first address, sets a destination address of the sixth message as the third address, sets a message type of the sixth message as an LBR, and sends the LBR through XDP, where the sixth message includes at least an LBM, the first address includes an address of a node device, and the third address includes an address of a device that sends the LBM.
In some embodiments, the message receiving unit comprises eBPF XDP of a Berkeley packet filter, and the control module loads eBPF XDP the network card of the node device.
In some embodiments, the message receiving unit and the control module are disposed in the user space, and the message processing module further includes a message filtering unit disposed in the kernel space, where the message filtering unit sends the OAM message to the message receiving unit through af_xdp.
In the message processing method provided by the embodiment of the application, at least part of the processing units of the message processing module are arranged in the kernel space of the node equipment, so that the efficiency of processing the detection message and replying the message by the message processing module can be greatly improved, and secondly, the communication connection between the control module and the message processing module does not comprise a protocol stack for processing a network data packet, so that the link of data transmission between the control module and the message processing module can be reduced, the time delay of command transparent transmission and data transmission between the control module and the message processing module can be shortened, and the message processing module can directly process the replying message after receiving the replying message to determine the link state between the node equipment and the target equipment, thereby improving the efficiency of processing the OAM message and improving the determination efficiency of the link state.
Therefore, the message processing method provided by the embodiment of the application not only gets rid of the dependence on the special hardware chip, the special network card equipment and the special data processing suite such as DPDK, but also improves the OAM message processing efficiency of the message processing method compared with the software OAM message processing scheme in the related technology.
Based on the foregoing embodiments, the embodiments of the present application further provide a computer readable storage medium, where a computer program is stored, where the computer program can implement the foregoing method for processing a message when executed by a processor of an electronic device.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
The methods disclosed in the method embodiments provided by the application can be arbitrarily combined under the condition of no conflict to obtain a new method embodiment.
The features disclosed in the embodiments of the products provided by the application can be combined arbitrarily under the condition of no conflict to obtain new embodiments of the products.
The features disclosed in the embodiments of the method or the device provided by the application can be arbitrarily combined under the condition of no conflict to obtain a new embodiment of the method or the device.
The computer readable storage medium may be a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable programmable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable programmable Read Only Memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, EEPROM), a magnetic random access Memory (Ferromagnetic Random Access Memory, FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a compact disk Read Only Memory (Compact Disc Read-Only Memory, CD-ROM), or any electronic device including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, or the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus necessary general hardware nodes, or of course by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (10)
1. The message processing device is characterized by being arranged in node equipment, comprising a control module and a message processing module, wherein:
The communication connection does not comprise a protocol stack for processing network data packets in the node equipment;
The message processing module is used for receiving and responding to a control instruction sent by the control module through the communication connection and used for indicating to send a message, generating and sending a detection message to target equipment based on the control instruction and receiving a reply message sent by the target equipment, processing the reply message and determining the link state between the node equipment and the target equipment, wherein the detection message and the reply message comprise network management maintenance OAM messages.
2. The apparatus of claim 1, wherein the message processing module comprises a message sending unit and a message receiving unit, wherein:
the message sending unit is used for sending a first message to the target equipment, and is arranged in the kernel space, wherein the first message at least comprises a loopback detection message LBM, a connectivity detection message CCM and a link tracking message LTM;
The message receiving unit is configured to receive the reply message, obtain additional data carried by the reply message, and determine the link state based on the additional data.
3. The apparatus of claim 2, wherein the message receiving unit is configured to determine, based on time information in the additional data, a transmission delay and/or a packet loss rate between the node device and the target device when the reply message is a second message, where the second message at least includes a connectivity detection message CCM.
4. The apparatus of claim 2, wherein the message receiving unit is configured to determine a transmission delay between the node device and the target device based on time information in the additional data if the reply message is a third message, where the third message includes at least a loopback response message LBR.
5. The apparatus of claim 2, wherein the message receiving unit is configured to determine link path information between the node device and the target device based on device information in the additional data, where the reply message is a fourth message, and the fourth message at least includes a link tracking response message LTR;
The message receiving unit is further configured to obtain a first address and a second address when a fifth message is received, set a source address of the fifth message as the first address, set a destination address of the fifth message as the second address, set a message type of the fifth message as an LTR, and send the LTR through a fast data path XDP, where the fifth message at least includes an LTM, the first address includes an address of the node device, and the second address includes an address of the device that sends the LTM.
6. The apparatus of claim 2, wherein the message receiving unit is configured to obtain a first address and a third address when a sixth message is received, set a source address of the sixth message as the first address, set a destination address of the sixth message as the third address, set a message type of the sixth message as an LBR, and send the LBR through XDP, where the sixth message includes at least an LBM, the first address includes an address of the node device, and the third address includes an address of the device that sends the LBM.
7. The apparatus of claim 2, wherein the message receiving unit comprises a generic execution engine eBPF XDP of a berkeley packet filter, and the control module is configured to load the eBPF XDP to a network card of the node device.
8. The apparatus of claim 2, wherein the message receiving unit and the control module are disposed in a user space, and the message processing module further comprises a message filtering unit disposed in the kernel space, configured to send the OAM message to the message receiving unit through an address family fast data path af_xdp.
9. A node device, characterized in that it comprises a message processing apparatus according to any of claims 1 to 8.
10. The message processing method is characterized by being applied to a message processing device arranged in node equipment, wherein the message processing device comprises a control module and a message processing module, communication connection is established between the control module and the message processing module, the communication connection does not comprise a protocol stack used for processing network data packets in the node equipment, at least part of processing units in the message processing module are arranged in a kernel space of the node equipment, and the method comprises the following steps:
The message processing module receives and responds to a control instruction which is sent by the control module through the communication connection and is used for indicating to send a message, generates and sends a detection message to target equipment based on the control instruction, and receives a reply message sent by the target equipment;
The message processing module processes the reply message to determine the link state between the node equipment and the target equipment, wherein the detection message and the reply message comprise network management maintenance OAM messages.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211412702.1A CN115941540B (en) | 2022-11-11 | 2022-11-11 | Message processing device, node equipment and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211412702.1A CN115941540B (en) | 2022-11-11 | 2022-11-11 | Message processing device, node equipment and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115941540A CN115941540A (en) | 2023-04-07 |
CN115941540B true CN115941540B (en) | 2024-12-03 |
Family
ID=86653174
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211412702.1A Active CN115941540B (en) | 2022-11-11 | 2022-11-11 | Message processing device, node equipment and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115941540B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101317372A (en) * | 2006-11-09 | 2008-12-03 | 华为技术有限公司 | Transmission method, system and node device of Ethernet connection fault management message |
CN114157684A (en) * | 2020-08-18 | 2022-03-08 | 华为终端有限公司 | Message processing method, device and storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7177325B2 (en) * | 2002-07-25 | 2007-02-13 | Micrel, Incorporated | Operations, administration and maintenance (OAM) systems and methods for packet switched data networks |
CN103716172B (en) * | 2012-09-28 | 2018-06-12 | 中兴通讯股份有限公司 | A kind of OAM method and devices based on multiprotocol label switching |
CN103368849A (en) * | 2013-07-05 | 2013-10-23 | 盛科网络(苏州)有限公司 | OAM (Operations, Administration and Management) message processing method and device |
KR102024902B1 (en) * | 2015-05-22 | 2019-09-25 | 한국전자통신연구원 | Packet transmission apparatus of processing oam packets and protection messages |
CN105591844B (en) * | 2016-03-08 | 2019-03-08 | 烽火通信科技股份有限公司 | The method for realizing OAM automatic Verification based on PTN chip frequency reducing |
CN111988158B (en) * | 2019-05-23 | 2023-04-18 | 北京物芯科技有限责任公司 | Chip-level OAM message sending method, device, system and storage medium |
CN114531375A (en) * | 2020-11-03 | 2022-05-24 | 中兴通讯股份有限公司 | Message forwarding method and device and computer readable storage medium |
-
2022
- 2022-11-11 CN CN202211412702.1A patent/CN115941540B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101317372A (en) * | 2006-11-09 | 2008-12-03 | 华为技术有限公司 | Transmission method, system and node device of Ethernet connection fault management message |
CN114157684A (en) * | 2020-08-18 | 2022-03-08 | 华为终端有限公司 | Message processing method, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115941540A (en) | 2023-04-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11237858B2 (en) | Software-defined data center, and deployment method for service cluster therein | |
US10601728B2 (en) | Software-defined data center and service cluster scheduling and traffic monitoring method therefor | |
CN101605103B (en) | Method and apparatus for static forwarding multicast data | |
EP1919138B1 (en) | A method for implementing backup of the uplink | |
DK2544406T3 (en) | Procedure and event notification correlation handling agent | |
WO2015149481A1 (en) | Method and system for service chain routing and device in system | |
CN111970137A (en) | Method, device and system for communication among controllers in TSN (traffic service network) | |
WO2011157145A2 (en) | Main/backup switching method between communication device, communication device, system and service request device | |
CN115733720A (en) | Method, device and system for sending and receiving messages for OAM | |
US20080267080A1 (en) | Fault Verification for an Unpaired Unidirectional Switched-Path | |
WO2011157146A2 (en) | Main/backup switching method between communication devices, communication device, system and service request device | |
CN114189893B (en) | O-RAN capability opening method, communication system, device and storage medium | |
CN105763463B (en) | Method and device for transmitting link detection message | |
CN115941540B (en) | Message processing device, node equipment and method | |
CN117221138A (en) | Core network simulation method, device, equipment and storage medium | |
CN114760225B (en) | Fault diagnosis method, system and storage medium | |
CN113824595B (en) | Link switching control method and device and gateway equipment | |
CN111884950B (en) | Data transmission method, target switch, designated switch and switch system | |
CN105763347A (en) | Method for obtaining parameter, network equipment and system | |
CN106559838B (en) | business processing optimization method and device | |
CN107104837B (en) | Method and control device for path detection | |
CN115767576A (en) | Method and device for detecting network connection of equipment, storage medium and electronic device | |
CN111953786A (en) | System, method and device for recording messages in whole network, network equipment and storage medium | |
CN119996161A (en) | A method, device and system for realizing service path detection | |
CN116017581B (en) | 5G flow splitting method, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |