CN115941540A - Message processing device, node equipment and method - Google Patents

Message processing device, node equipment and method Download PDF

Info

Publication number
CN115941540A
CN115941540A CN202211412702.1A CN202211412702A CN115941540A CN 115941540 A CN115941540 A CN 115941540A CN 202211412702 A CN202211412702 A CN 202211412702A CN 115941540 A CN115941540 A CN 115941540A
Authority
CN
China
Prior art keywords
message
address
packet
node
receiving unit
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.)
Pending
Application number
CN202211412702.1A
Other languages
Chinese (zh)
Inventor
郑南成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202211412702.1A priority Critical patent/CN115941540A/en
Publication of CN115941540A publication Critical patent/CN115941540A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a message processing device, node equipment and a method; wherein the apparatus is provided 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 in the node device for processing network data packets; at least part of processing units in the message processing module are arranged in the 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 the 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; wherein, the detection message and the reply message comprise network management and maintenance OAM messages.

Description

Message processing device, node equipment and method
Technical Field
The present application relates to the field of network technologies, and in particular, to a packet processing apparatus, a node device, and a method.
Background
In practical applications, the processing method of the messages related to network Administration and maintenance (OAM) is not flexible enough.
Disclosure of Invention
Based on the foregoing problems, embodiments of the present application provide a packet processing apparatus, a node device, and a method.
The technical scheme provided by the embodiment of the application is as follows:
an embodiment of the present application provides a packet processing apparatus, where the apparatus includes: 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 in the node device for processing network packets;
at least part of processing units in the message processing module are arranged in the 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 the 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; wherein, the detection message and the reply message comprise network management and maintenance OAM messages.
In some embodiments, the message processing module comprises a message sending unit and a message sending unit; wherein:
the message sending unit is used for sending a first message to the target device; the message sending unit is arranged in the kernel space; the first Message at least comprises a Loop Back Message (LBM), a Connectivity Check Message (CCM) and a Link Trace Message (LTM);
and the message receiving unit is used for receiving the reply message, acquiring additional data carried by the reply message, and determining the link state based on the additional data.
In some embodiments, the packet receiving unit is configured to, when the reply packet is a second packet, 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; wherein the second message at least comprises a connectivity check message CCM.
In some embodiments, the packet receiving unit is configured to, when the reply packet is a third packet, determine, based on time information in the additional data, a transmission delay between the node device and the target device; wherein the third message at least comprises a Loop Back Response (LBR) message.
In some embodiments, the packet receiving unit is configured to, when the reply packet is a fourth packet, determine, based on device information in the additional data, link path information between the node device and the target device; wherein the fourth message at least comprises a Link Trace response message (LTR);
the message receiving unit is further configured to, when a fifth message is received, obtain a first address and a second address, 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 (XDP); wherein, the fifth message at least comprises an LTM; the first address comprises an address of the node device; the second address includes an address of a device that transmitted the LTM.
In some embodiments, the message receiving unit is configured to, when a sixth message is received, obtain a first address and a third address, 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; wherein the sixth packet at least comprises an LBM; the first address comprises an address of the node device; the third address includes an address of a device that transmits the LBM.
In some embodiments, the message receiving unit includes an Extended Berkeley Packet Filter (BPF) XDP of a general execution engine of a Berkeley Packet Filter (BPF); the control module is used for loading the eBPF XDP to a network card of the node equipment.
In some embodiments, the message receiving unit and the control module are disposed in the user space; the message processing module further includes a message filtering unit configured in the kernel space, and is configured to send the OAM message to the message receiving unit through an Address Family fast Data Path (AF _ XDP).
In some embodiments, the control module is configured to load the message processing module to the network card when it is determined that the network card of the node device is the designated network card.
The embodiment of the present application further provides a node device, where the node device includes the packet processing apparatus as described in any of the foregoing.
The embodiment of the application also provides a message processing method, which is applied to a message processing device arranged in the node equipment; 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 in the node device for processing network data packets; at least part of processing units in the message processing module are arranged in the kernel space of the node equipment; 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 the target equipment, and receives a reply message sent by the target equipment;
the message processing module processes the reply message and determines the link state between the node equipment and the target equipment; wherein the detection message and the reply message include OAM messages.
In the message processing apparatus provided in the embodiment of the present application, at least part of the processing units of the message processing module are disposed in the kernel space of the node device, so that the efficiency of the message processing module in processing the detection message and replying the message can be greatly improved; 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 links of data transmission between the control module and the message processing module can be reduced, and the time delay of instruction transparent transmission and data transmission between the control module and the message processing module can be shortened; moreover, after receiving the reply message, the message processing module can directly process the reply message and determine the link state between the node device and the target device, thereby improving the efficiency of OAM message processing and the efficiency of determining the link state.
Therefore, the message processing apparatus provided in the embodiment of the present application not only gets rid of the dependence on the dedicated hardware chip, the specific network card device, and the dedicated data processing suite, such as the DPDK, but also improves the efficiency of OAM message processing of the message processing apparatus provided in the embodiment of the present application, compared with the software OAM message processing scheme in the related art.
Drawings
Fig. 1 is a schematic structural diagram of processing an OAM message provided in the related art;
fig. 2 is another schematic structural diagram of processing an OAM message provided in the related art;
fig. 3 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 4 is another schematic structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a packet sending unit sending an LBM according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a CCM sent by a message sending unit according to the embodiment of the present application;
fig. 7 is a schematic structural diagram of a LTM sent by a message sending unit according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of OAM message transmission between a first device and a second device according to the embodiment of the present application;
fig. 9 is another schematic structural diagram of OAM message transmission between a first device and a second device according to this 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 flowchart illustrating 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 drawings in the embodiments of the present application.
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In practical applications, the OAM message processing logic is usually implemented by a dedicated hardware chip, such as an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or a Network Processor (NP). However, such a scheme is highly dependent on a dedicated hardware chip, and if the support of the dedicated hardware chip is lost, the OAM message processing function cannot be realized.
In order to get rid of dependence on a dedicated hardware chip, a method for realizing OAM message processing in 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 diagram of a structure for processing OAM messages provided in the related art, as shown in fig. 1, a user space of a source device 101 is provided with an active device OAM1011, and a kernel space is provided with an active 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 OAM1021, and the kernel space is provided with a target device network protocol stack 1022 and a target device network card 1023. The source device OAM1011 and the target device OAM1021 can implement OAM message processing logic.
In fig. 1, no matter the source device 101 sends the OAM message or the target device 102 receives the OAM message, it is implemented only by copying the OAM message between the source device OAM1011 and the source device network protocol stack 1012 and between the target device OAM1021 and the target 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 delay precision of the conventional software implementation scheme, a scheme for processing an OAM message by using a Data Plane Development Kit (DPDK) is also proposed in the related art, wherein the DPDK is mainly operated based on a Linux system, and is used for a function library and a drive set for fast packet processing, so that Data processing performance and throughput can be greatly improved, and the working efficiency of a Data Plane application program is improved.
Fig. 2 is another schematic structural diagram of processing an OAM message provided in the related art. As shown in fig. 2, the source device DPDK 1014 in the source device 101 is set in the kernel space, the other modules are set in the same manner as in fig. 1, the target device DPDK 1024 in the target device 102 is set in the kernel space, and the other modules are set in the same manner as in fig. 1. In fig. 2, data sharing may 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 a memory, so that the OAM message processing efficiency is improved. However, the DPDK in the above scheme requires a specific network card for support, and therefore, the versatility is insufficient.
In summary, the OAM message processing in the related art is not flexible enough, and cannot meet the actual OAM message processing requirement.
Based on the above problems, embodiments of the present application provide a packet processing apparatus, a node device, and a method, where the packet processing apparatus may be disposed in the node device.
In one embodiment, a node device may comprise a computer device, such as a server device or a personal computer device; illustratively, a node device may comprise a physical machine device or a virtual machine device; illustratively, a node device may include a Maintenance End Point (MEP) or a Maintenance Intermediate Point (MIP) in a Maintenance Domain (MD); the MEP is used for determining the scope and boundary of the MD, and is an edge node of a Maintenance Association (MA), and a plurality of MAs may be configured in the MD; the MIPs are located inside the MD, and the manageability of the MD network can be improved through the plurality of MIPs deployed between MEPs.
In one embodiment, a node device may include a device having packet receiving, transmitting, and processing capabilities.
Fig. 3 is a schematic structural diagram of a message processing apparatus 3 according to an embodiment of the present application, and as shown in fig. 3, the apparatus may include a control module 301 and a message processing module 302; wherein:
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 in the node device for processing the network data packet;
at least part of the 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 the control instruction 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; and processing the reply message, and determining the link state between the node equipment and the target equipment.
The detection message and the reply message comprise OAM messages.
Illustratively, the user space may include an operating 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; illustratively, the control module 301 may include a plurality of control units, and at least some of the plurality of control units may be disposed in a user space of the node device.
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; illustratively, the communication connections therebetween may include data transfer interfaces and/or function call relationships between the software modules; for example, the communication connection may include an electrical connection channel capable of implementing data transmission between two modules, which is not limited in this embodiment of the present application.
In one embodiment, the protocol stack for processing network data packets may include a source device network protocol stack and a target device network protocol stack as shown in fig. 1 and 2; exemplarily, the protocol stack may have a function of encapsulating and packaging source data based on a data communication protocol to obtain a data packet, and analyzing the data packet based on the data communication protocol to obtain the source data; illustratively, the data communication Protocol may include a standard communication Protocol such as Transmission Control Protocol/Internet Protocol (TCP/IP).
In one embodiment, the kernel space of a node device may include space in the node device in which kernel processes run and/or are managed.
In an embodiment, the control instruction sent by the control module 301 may include at least one instruction data for triggering the message processing module 302 to start running, send a message, receive a message, parse a message, a message processing cycle, a message processing duration, and a target message associated with message processing.
In an embodiment, the control module 301 may further 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, so as to generate a detection message.
In one embodiment, the message processing module 302 may include a plurality of processing units, and at least one of the plurality of processing units may be disposed in the kernel space; for example, all processing units in the message processing module 302 may be disposed in the kernel space.
In an embodiment, the message processing module 302 may generate a detection message according to the control instruction when the control instruction is a transmission message, determine device information of the target device according to the control instruction, and then transmit the detection message to the target device based on the device information of the target device; for example, 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, thereby determining the link state; for example, when the control instruction is message interception, the message processing module 302 may directly switch to a message receiving state to receive a reply message or receive a detection message sent by another device.
In one embodiment, the link state may include at least one of a link transmission delay, a packet loss ratio, a number of links between the node device and the target device, and a number of device nodes included in each link; after link status determination, the message processing module 302 may send to the control module 301 via the communication connection for it to manage or output link status, for example.
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 of the same type, such as both MEPs or both MIPs; illustratively, the node device may be of a different type than the destination device, such as the node device being an MEP and the destination device being a MIP.
In an embodiment, the detection packet and the reply packet may include a Connection Fault Management (CFM) packet in OAM, where the CFM is configured to implement end-to-end Connectivity Fault detection, fault notification, and Fault location functions of a network, and the CFM is configured to monitor Connectivity of the entire network, and the CFM technology is combined with the protection switching technology, so as to improve reliability of the network.
As can be seen from the above, the message processing apparatus provided in the embodiment of the present application is disposed in a node device, and a communication connection between a control module and a message processing module does not include a protocol stack for processing a network data packet disposed in the node device; at least part of processing units in the message processing module are arranged in a kernel space of the node device, and can send a detection message to the target device after receiving and responding to a control instruction sent by the control module, receive a reply message sent by the target device, then process the reply message, determine a link state between the node device and the target device, and the detection message and the reply message include an OAM message.
Therefore, in the message processing apparatus provided in the embodiment of the present application, at least part of the processing units in the message processing module are disposed in the kernel space of the node device, so that the efficiency of the message processing module in processing the detection message and replying the message can be greatly improved; 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 links of data transmission between the control module and the message processing module can be reduced, and the time delay of instruction 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 reply message after receiving the reply message and determine the link state between the node equipment and the target equipment, thereby improving the OAM message processing efficiency and the link state determination efficiency. Therefore, the message processing state provided by the embodiment of the present application does not only get rid of the dependence on the dedicated hardware chip, the specific network card device, and the dedicated data processing suite, such as the DPDK, but also improves the efficiency of OAM message processing of the message processing apparatus provided by the embodiment of the present application, compared with the software OAM message processing scheme in the related art.
Fig. 4 is another schematic structural diagram of the message processing apparatus according to the embodiment of the present application, and as shown in fig. 4, the message processing module 302 includes a message sending unit 3021 and a message receiving unit 3022; wherein:
a message sending unit 3021, configured to send a first message to a target device; the message sending unit 3021 is disposed in the kernel space; the first message at least comprises an LBM, a CCM and an LTM;
the message receiving unit 3022 is configured to receive the reply message, acquire additional data carried in the reply message, and determine a link state based on the additional data.
In an embodiment, the message sending unit 3021 may parse the control instruction, and in a case that it is determined that the control instruction indicates that the first message that requires to be sent is an LBM, may generate the LBM and obtain a timestamp in the LBM, and then send the LBM to the target device; exemplarily, a two-layer Ping (macping/ethping) detection can be realized by LBM; for example, in the case that the first packet is an LBM, the target device may be at least one device.
Fig. 5 is a schematic structural diagram of a packet sending unit sending an LBM provided in this embodiment, as shown in fig. 5, a first MEP 501 may be a node device, and an LBM sent by the first MEP 501 may pass through a first MIP 502 and a second MIP 503 and then be transmitted to a second MEP 504; illustratively, the second MEP 504 may be a target device. For example, the control module of the first MEP 501 may trigger the message sending unit 3021 to send the LBM through the following control instruction:
Sending CFM LBM to b4:96:91:98:4e:2c。
in the above control command, b4: 96.
When sending the LBM, the message sending unit 3021 may output the following information:
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 LBM to be sent, and cfm _ seq may represent the packet identifier of each LBM; time may represent a timestamp for each LBM; as can be seen from the above data, the node device, i.e., the first MEP 501, can continuously send LBM to the target device, i.e., the second MEP 504.
Illustratively, the packet sending unit 3021 may timestamp the first packet through an eBPF Traffic Classifier (TC), where the TC is an eBPF hook in the Linux network processing flow, can mount an eBPF program, and provides a plurality of functions including modifying a packet, rerouting (rerouting), and dropping a packet (drop), and these functions all affect the Traffic statistics of the kernel and thus also affect the queuing rule (QD) of the packet; in addition, the eBPF TC is a ring of which the sending end is closest to hardware, so that the time stamp 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 state between the maintenance endpoints, and the MEP may send the CCM periodically, and receive the message by using other MEPs and MIPs in the same MA, and if the MEP does not receive the CCM message within 3.5 periods, it may determine that the link state is abnormal.
In one embodiment, the message sending unit 3021 may, in a case where it is determined that the control instruction indicates that the sent first message is CCM, obtain time information of CCM, such as a timestamp in CCM, and send the CCM; illustratively, the target device at this time is a plurality of devices, that is, the message transmitting unit 3021 may broadcast CCMs to the plurality of devices; illustratively, the messaging unit 3021 may multicast CCMs to at least one group of devices in the MA.
Illustratively, any device in the MA, such as a MEP, may act as a target device for multicast CCM by a node device in the MA.
Fig. 6 is a schematic structural diagram of a CCM sent by a message sending unit 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 the first MEP 501, the second MEP 504, and the third MEP 505 may all serve as node devices for sending CCMs, and meanwhile, the destination device corresponding to the first MEP 501 may include the second MEP 504 and the third MEP 505, that is, the destination device of the MEP sending CCMs in the MA may include other MEPs except the MEP sending CCMs in the MA.
Illustratively, the message transmitting unit 3021 may continuously transmit CCMs at specified time intervals.
In one embodiment, in a case that it is determined that the first message sent by the control instruction is an LTM, the message sending unit 3021 may obtain time information of the LTM, such as a timestamp in the LTM, and send the LTM; for example, the target device at this time may be a plurality of devices, that is, the packet sending unit 3021 may broadcast the LTM to the plurality of devices; illustratively, any MEP in an MA may be a target device for a node device to broadcast LTM.
Fig. 7 is a schematic structural diagram of a packet sending unit sending an LTM according to an embodiment of the present disclosure. As shown in fig. 7, a first MEP 501 may be a node device that transmits an LTM, and a second MEP 504 and a third MEP 505 may be target devices that receive the LTM.
For example, 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 instruction.
Sending CFM LTM probe to 78:ac:44:1b:33:90
Wherein, 78.
In one embodiment, the message receiving unit 3022 may be located in the kernel space.
In an embodiment, the reply packet 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 the first MIP and the second MIP as in fig. 5 to fig. 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 the device that sent the reply message.
In one embodiment, the message receiving unit 3022 may obtain a detection message corresponding to the reply message, and then determine a link status based on the detection message and the additional data; illustratively, the message receiving unit 3022 may determine the link status based on at least part of the data carried in the detection message and the additional data; for example, at least part of the data carried in the detection packet may include an address of the node device, a timestamp of the detection packet, and other data.
In one embodiment, after the message receiving unit 3022 determines the link status, it may send the link status to the control module 301 via the communication connection.
In one embodiment, the message receiving unit 3022 may also determine that the link status is in an abnormal status if a reply message is not received within a specified time.
As can be seen from the above, 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; the first message at least comprises an LBM, a CCM and an LTM, and the message receiving unit is used for receiving the reply message, acquiring additional data in the reply message and then determining the 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; moreover, because the message sending unit is arranged in the kernel space of the node equipment, the efficient sending of various CFM messages can be realized; meanwhile, after receiving the reply message, the message receiving unit can determine the link state directly based on the additional data in the reply message, so that the link state determination time can be shortened, and the link state determination efficiency can be improved.
Based on the foregoing embodiment, the message receiving unit 3022 in this embodiment is configured to determine, when the reply message is the second message, a transmission delay and/or a packet loss rate between the node device and the target device based on the time information in the additional data; wherein the second message comprises at least the CCM.
Illustratively, the second message may be a reply message to the CCM.
For example, the message receiving unit 3022 may not perform the operations of acquiring the additional data and determining the transmission delay and/or the packet loss rate between the node device and the target device when the reply message is not the second message.
In one embodiment, the message receiving unit 3022 may update the receiving timer of the CCM when receiving the CCM, and determine the packet transmission time between the node device and the target device, i.e., the transmission delay of the link, according to the time information in the CCM additional data and the time information when the CCM is transmitted.
Exemplarily, the node device may trigger the message receiving unit 3022 to switch to the CCM receiving mode by the control module 301 after transmitting the CCM by the message transmitting unit 3021.
For example, the control module 301 may output a command to trigger the message receiving unit 3022 to switch to the CCM receiving mode, where the command indicates waiting for CFM frame reply.
Listening on interface enol for CFM frames。
Illustratively, the message receiving unit 3022 may output the following information in the process of receiving CCM, where revd CCM is represented by a sequence of code; the meaning of the other command lines is the same as above and will not be described further 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"
Exemplarily, as shown in fig. 6, since CCM is a multicast message, a node device, such as the first MEP 501, may receive CCM from at least one target device, such as the third MEP 505 corresponding to ac: 44. In practical applications, if the node device does not receive the CCM within 3.5 cycles, the message receiving unit 3022 may determine that the link is in an abnormal state.
For example, the message receiving unit 3022 may count the number of CCMs sent and received by the message receiving unit to determine a packet loss rate between the node device and the target device.
As can be seen from the above, in the case that the reply packet is the second packet, the packet receiving unit of the packet processing apparatus according to the embodiment of the present application can determine, based on the timestamp in the additional data, the transmission delay and/or the packet loss rate between the node device and the target device, where the second packet at least includes the CCM.
Therefore, the message processing apparatus 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 the packet loss rate based on the timestamp in the CCM, thereby implementing efficient determination of the transmission delay and/or the packet loss rate of the link state between the node device and the target device.
Based on the foregoing embodiment, in the message processing apparatus provided in the embodiment of the present application, the message receiving unit 3022 is configured to determine, based on the time information in the additional data, a transmission delay between the node device and the target device when the reply message is the third message; wherein the third message at least comprises an LBR.
For example, if the reply packet received by the packet receiving unit 3022 is not the third packet, 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 an embodiment, the device node sending the LBR may include a target device, and may further include an intermediate device between the device node sending the LBR and the target device, for example, in fig. 5, the first MEP 501 may be a device node sending the LBM, the second MEP 504 may be a target device, a first MIP 502 and a second MIP 503 are further disposed between the first MEP 501 and the second MEP 504, the two node devices may be intermediate devices, both of the two intermediate devices may send the LBR to the first MEP 501 after receiving the LBM, and may also forward the LBM to a next-level node simultaneously until the LBM reaches the second MEP 504, and the second MEP 504 may also send the LBR to the first MEP 501 through the first MIP 502 and the second MIP 503 when receiving the LBM.
For example, 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 also 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 above, in the message processing apparatus provided in this embodiment of the application, when the reply message is the third message, the message receiving unit may determine, based on the time information in the additional data, the data transmission delay between the device node and the target device, where the third message includes an LBR.
Therefore, the message processing apparatus provided in the embodiment of the present application can efficiently and quickly process the LBR through the message receiving unit, so as to determine the data transmission delay between the node device and the target device more efficiently.
Based on the foregoing embodiment, in the message processing apparatus provided in the embodiment of the present application, the message receiving unit 3022 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 the fourth message; wherein, the fourth message at least comprises LTR;
the message receiving unit 3022, configured to, when the fifth message is received, obtain a first address and a second address, 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 LTR through XDP; wherein the fifth message at least comprises the LTM; the first address includes an address of a node device and the second address includes an address of a device that transmitted the LTM.
For example, if the reply packet received by the packet receiving unit 3022 is not the fourth packet, the operation of determining the link path information between the node apparatus and the target apparatus based on the apparatus 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 obtaining 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, LTR is a reply message of LTM.
In one embodiment, the packet receiving unit 3022 may obtain and record information such as Time To Live (TTL) of the LTR packet and Replay Action from the additional data, and determine link path information between the node device and the peripheral device according To the TTL and 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, the number and the type of the intermediate device, and the like.
It should be noted that the LTM is a multicast packet, and the LTR is a unicast packet, for example, in fig. 7, the first MEP 501 may send the LTM to the second MEP 504 and the third MEP 505 through an intermediate device, and in the LTM transmission process, the intermediate device associated with the second MEP 504 may include the first MIP 502 and the second MIP 503, and the third MIP 506 may directly pass through the LTM to the second MEP 504 because it does not have an LTM processing function, that is, the first MEP 501 may multicast the LTM to at least one MEP, and the intermediate 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 intermediate device, but does not send the LTR to other node devices.
In one embodiment, the first address may include an Internet Protocol (IP) address or a Media Access Control address (MAC) of the node device, and the second address may be obtained by parsing the fifth message, for example; the second address may include an IP address or a MAC address of the device that transmitted the LTM.
In an 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; illustratively, the device node sending the LTM to the target device may include an MEP in the MA and may also include an 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.
For example, in fig. 7, in the process of sending an LTM by a first MEP 501, a first MIP 502 and a second MIP 503 may receive the LTM, and when receiving the LTM, the first MIP 502 may send to the second MIP 503, and the second MIP 503 may send the LTM to a second MEP 504 through a third MIP 506, and because the third MIP 506 does not support the LTM processing function, when receiving the LTM sent by the node device, the third MIP 506 directly passes it through to the second MEP 504, and in the above process, the first MIP 502, the second MIP 503, and the second MEP 504 may all be node devices provided with a packet receiving unit 3022; similarly, the third MEP 505 in fig. 7 may also be a node device provided with a message receiving unit 3022.
For example, in the network, the node device that sends the LTM may include multiple node devices, and LTMs sent by multiple 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 send the LTM to the first MEP 501 at the same time; illustratively, the target device that sends the LTM is located in the same MA or a different MA than the node device that receives the LTM.
Illustratively, after setting the source address and the destination address of the LTM and modifying the message type of the LTM to LTR, the LTR may be sent out by the XDP according to the sending path of the LTM.
The XDP is an Extended Berkeley Packet Filter (eBPF) of a Berkeley Packet Filter (BPF) in a Linux network processing flow, and is operated based on a Linux system, and through a function library and a drive set for fast Packet processing, data processing performance and throughput can be greatly improved, so that data processing efficiency of a data plane application program is improved. Among them, BFP is a network filter which is not only used for network analysis after being upgraded to eBPF, but is developed into a tool and platform for various types of functions including development performance analysis, system tracing, network optimization, etc., and the Linux kernel is loaded with eBPF.
As can be seen from the above, when the received reply packet is LTR, the packet receiving unit in the packet processing apparatus provided in the embodiment of the present application can determine, based on the device information in the additional data, link path information between the node device and the target device, so that the packet processing apparatus provided in the embodiment of the present application can quickly and efficiently determine, by using the packet receiving unit, link path information between any node device and the target device; the message receiving unit can quickly set the source address and the destination address of the received LTM and can quickly modify the type of the LTM message, thereby realizing the quick conversion of the LTM; moreover, the LTR is quickly transmitted by the XDP, and the high-efficiency transmission processing of the LTR can be realized, so that the high-efficiency processing of the LTM by the message receiving unit is realized.
Based on the foregoing embodiment, in the message processing apparatus provided in this embodiment, the message receiving unit 3022 is configured to, when receiving the sixth message, obtain the first address and the third address, 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 LBR, and send the LBR through XDP.
The sixth message comprises an LBM, and the first address comprises an address of the node equipment; the third address includes an address of the device that sent the LBM.
For example, if the message received by the message receiving unit 3022 is not the sixth message, the operation of acquiring the first address and the third address may not be performed.
In one implementation, the third address may include an IP address or a MAC address of a device that transmits the LTM, which is not limited in this application.
For example, when the message receiving unit 3022 receives an LBM and modifies the message type of the LBM to an 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; illustratively, the first MEP 501 may be a source device sending an LBM, and after the first MEP 501 sends the LBM, time information in LBRs sent by the first MIP 502, the second MIP 503 and the second MEP 504 may be obtained according to an echo result in an 802.1ag MAC ping operation, and a transmission delay between node devices between the first MEP 501 and the second MEP 504 may be determined according to the time information.
As can be seen from the above, the message receiving unit in the message processing apparatus provided in the embodiment of the present application, after receiving the LBM, 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 to be LBR and quickly send the LBR through XDP, thereby providing data support for quickly and accurately determining network transmission delay for any node device in the network.
Fig. 8 is a schematic structural diagram of OAM message transmission between the first device and the second device according to the 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, and may also be an intermediate device such as an MIP.
Exemplarily, a first control module 8011 may be disposed in a user space of the first device 801, where the first control module 8011 may be the control module in the foregoing embodiment, and 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; the first sending unit 8012 and the first receiving unit 8013 may be a message sending unit and a message receiving unit in the foregoing embodiments, respectively; the first protocol stack 8014 may be a network protocol stack provided in the first device 801; the first driver module 8015 may be a network driver module provided in the first device 801.
For example, the second control module 8021, the second sending unit 8022, the second receiving unit 8023, the second protocol stack 8024, and the second driving 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 driving module 8015, respectively, and are not described herein again.
For example, the first control module 8011 provided in the user space of the first device 801 may directly control the first transmitting unit 8012 to transmit the LBM, CCM, and LTM to the second device 802 through the XDP integrated in the first receiving unit 8013, such as XDP _ eBPF, via the first driving module 8015, bypassing the first protocol stack 8014.
Illustratively, when the second receiving unit 8023 of the second device 802 receives the CCM, it may determine a data transmission delay between the first device 801 and the second device 802 based on the time when the CCM is received by the second receiving unit and a timestamp in a CCM sent before the CCM, and may also set time information for the CCM, and send the CCM to the first device 801, so that the first device 801 may determine a transmission delay and/or a packet loss rate and the like between the first device 801 and the second device 802 based on the CCM sent by the first device 801 and the received CCM.
Exemplarily, when the second receiving unit 8023 receives the LBM, the message type of the LBM can be set to be LBR, the destination address of the LBM is set to be the address of the first device 801, the source address of the LBM is set to be the address of the second device 802, and the LBR is sent to the first device 801 through the XDP in the second receiving unit 8023; for example, after receiving the LBR sent by the second device 802, the first receiving unit 8013 can determine the transmission delay between itself and the second device 802 according to the time information of sending the LBM and the timestamp in the LBR.
Illustratively, when the second receiving unit 8023 receives the LTM, it may modify the packet type of the LTM to LTR, set the source address of the LTR to the address of the second device 802, set the destination address of the LTR to the address of the first device 801, and then transmit the LTR to the first device 801 through XDP; illustratively, when the first receiving unit 8013 receives the LTR, the link path information between the first device 801 and the second device 802 can be determined according to TTL and Action Reply in the LTR.
Exemplarily, if the second device 802 is a target device of the first device 801, after receiving the OAM message, the second device 802 may generate a reply message and send the reply message to the first device 801; 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, and may also send a reply message to the first device at the same time.
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 pass through the messages to the target device or the target application indicated by the messages without performing any processing on 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 actual sending and receiving of the message, such as the message sending unit and the message receiving unit, are disposed in the kernel space, and the message sending can be implemented by means of XDP and the like, operations such as fast sending, receiving, and processing of OAM packets by bypassing the protocol stack are implemented.
Based on the foregoing embodiment, in the processing apparatus provided in this embodiment of the present application, the message receiving unit includes an eBFP XDP; and the control module is used for loading the eBFP XDP to a network card of the node equipment.
In an embodiment, the control module may obtain performance parameter information of a network card of the node device, and load the ebbp XDP to the network card of the node device when determining that the network card of the node device supports an 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 the ebbp XDP of the message receiving unit to the network card of the node device, and since the ebbp XDP is a ring closest to hardware in the node device and can directly operate and zero copy the message, the resource overhead in the data copy process can be reduced, so that the message processing efficiency of the message processing apparatus for receiving and sending the message can be further improved.
Based on the foregoing embodiment, in the message processing apparatus provided in this embodiment of the present application, the message receiving unit is disposed in the user space, and the message processing module further includes a message filtering unit disposed in the kernel space, and configured to send the OAM message to the message receiving unit through the AF _ XDP.
Fig. 9 is another schematic structural diagram of OAM message transmission between the first device and the second device according to this embodiment. The same names of units and modules in fig. 9 as those in fig. 8 will not be repeated.
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; moreover, 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; the first filter unit 8016 and the second filter unit 8026 may be the message filter units described above.
For example, the first filtering unit 8016 and the second filtering unit 8026 may determine the type of the message when receiving the message, and if the message is of an OAM type, such as 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; for example, if the message is not of the OAM type, the message may be transparently passed to the target application in the first device 801 and the second device 802.
Exemplarily, the first filter unit 8016 and the second filter unit 8026 may transmit OAM messages to the first receiving unit 8013 and the second receiving unit 8023 through an AF-XDP socket, respectively. The AF _ XDP is one of Address Family, like AF _ INET and AF _ PACKET, and the AF _ XDP socket directly reroutes a data PACKET received by the network card to a user space through the XDP, so that rapid data transmission bypassing a network protocol stack and the user space is realized, high-performance network report processing between the network card and the user space can be realized, and in practical application, the AF _ XDP is a user mode interface of the XDP.
As can be seen from the above, when the message receiving unit is disposed in the user space, the message processing apparatus provided in the embodiment of the present application may still receive the OAM message through the message filtering unit disposed in the kernel space, and since the message filtering unit is disposed in the kernel space and the message receiving unit and the message filtering unit may bypass the protocol stack through the AF _ XDP to perform fast data transmission, the fast receiving and processing of the OAM message may be implemented.
Based on the foregoing embodiment, in the message processing apparatus provided in this embodiment, the control module may load the message processing module to the network card when it is determined that the network card of the node device is the designated network card.
For example, the control module may implement the message processing function by the method provided in the foregoing embodiment when determining that the network card of the node device is not the designated network card.
Illustratively, the designated network card may include a network card that has an efficient OAM message transceiving function and can quickly process an OAM message so as to determine a link state; illustratively, the designated network card may include a smart network card; for example, after the message processing module is loaded into the intelligent network card, the message processing logic of the message processing module may be implemented by microcode in the intelligent network card.
As can be seen from the above, the message processing apparatus provided in this embodiment of the application can load the message processing module to the network card when the network card of the node device is the designated network card, and can further improve the efficiency and intelligence of OAM message processing by means of the efficient data processing capability of the intelligent network card and the intelligent data determination logic when the designated network card is the intelligent network card.
Based on the foregoing embodiment, an embodiment of the present application further provides a node device 10, fig. 10 is a schematic structural diagram of the node device 10 provided in the embodiment of the present application, and as shown in fig. 10, the node device may include the message processing apparatus 3 provided in any one of the foregoing embodiments.
As can be seen from the above, the node device provided in the embodiment of the present application includes a message processing apparatus, where at least part of processing units of a message processing module in the message processing apparatus is disposed in a kernel space of the node device, so that efficiency of the message processing module in processing a detection message and replying a message can be greatly improved; 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 links of data transmission between the control module and the message processing module can be reduced, and the time delay of instruction 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 reply message after receiving the reply message and determine the link state between the node equipment and the target equipment, thereby improving the OAM message processing efficiency and the link state determination efficiency.
Based on the foregoing embodiment, the present application further provides a message processing method, where the method is applied to a message processing apparatus arranged in a node device; 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 include a protocol stack in the node device for processing the network data packet; at least part of the processing units of the message processing module are arranged in the kernel space of the node equipment. Fig. 11 is a schematic flow diagram of a message processing method provided in the embodiment of the present application, and 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 the detection message to the target device, and receives the reply message sent by the target device.
Step 1102, the message processing module processes the reply message and determines a link state between the node device and the target device.
The detection message and the reply message comprise OAM messages.
In an implementation manner, the message processing apparatus may be the message processing apparatus provided in any of the foregoing embodiments.
In some embodiments, the message processing module comprises a message sending unit and a message receiving unit; wherein:
the message sending unit sends the first message to the target device; the message sending unit is arranged in the kernel space; the first message at least comprises an LBM, a CCM and an LTM;
and the message receiving unit receives the reply message, acquires the additional data carried by the reply message and determines the link state based on the additional data.
In some embodiments, when the reply packet is the second packet, the packet receiving unit determines, based on the time information in the additional data, a transmission delay and/or a packet loss rate between the node device and the target device; wherein the second message comprises at least the CCM.
In some embodiments, the message receiving unit determines, based on the time information in the additional data, a transmission delay between the node device and the target device when the reply message is the third message; wherein the third message at least comprises an LBR.
In some embodiments, when the reply message is a fourth message, the message receiving unit determines, based on the device information in the additional data, link path information between the node device and the target device; wherein, the fourth message at least comprises LTR;
the message receiving unit acquires a first address and a second address under the condition of receiving a fifth message, 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 the message type of the fifth message as LTR, and sends LTR through XDP; wherein the fifth message at least comprises the LTM; the first address comprises an address of a node device; the second address includes an address of the device that sent the LTM.
In some embodiments, when receiving a sixth message, the message receiving unit obtains the first address and the third address, 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 LBR, and sends the LBR through XDP; wherein, the sixth message at least comprises an LBM; the first address comprises an address of a node device; the third address comprises an address of the device sending the LBM.
In some embodiments, the message receiving unit comprises an eBPF XDP of a berkeley packet filter; and the control module loads the eBPF XDP to a network card of the node equipment.
In some embodiments, the message receiving unit and the control module are arranged in a user space; the message processing module also comprises 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.
In the message processing method provided by the embodiment of the application, at least part of processing units of the message processing module are arranged in the kernel space of the node device, so that the efficiency of the message processing module in processing detection messages and replying messages can be greatly improved; 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 links of data transmission between the control module and the message processing module can be reduced, and the time delay of instruction 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 reply message after receiving the reply message and determine the link state between the node equipment and the target equipment, thereby improving the OAM message processing efficiency and the link state determination efficiency.
Therefore, the message processing method provided by the embodiment of the present application does not only get rid of the dependence on the dedicated hardware chip, the specific network card device, and the dedicated data processing suite, such as the DPDK, but also improves the efficiency of OAM message processing of the message processing method provided by the embodiment of the present application, compared with the software OAM message processing schemes in the related art.
Based on the foregoing embodiments, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor of an electronic device, the message processing method as described above can be implemented.
The foregoing description of the various embodiments is intended to highlight various differences between the embodiments, and the same or similar parts may be referred to each other, and for brevity, will not be described again herein.
The methods disclosed in the method embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in various product embodiments provided by the application can be combined arbitrarily to obtain new product embodiments without conflict.
The features disclosed in the various method or apparatus embodiments provided herein may be combined in any combination to arrive at new method or apparatus embodiments without conflict.
The computer-readable storage medium may 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 the like; and may be various electronic devices such as mobile phones, computers, tablet devices, personal digital assistants, etc., including one or any combination of the above-mentioned memories.
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 phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus necessary general hardware nodes, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application may 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 instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. A message processing device is characterized in that the device is arranged in a node device; the device comprises a control module and a message processing module; wherein:
the control module and the message processing module are in communication connection; the communication connection does not include a protocol stack in the node device for processing network data packets;
at least part of processing units in the message processing module are arranged in the 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 the 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; wherein, the detection message and the reply message comprise network management and 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 device; the message sending unit is arranged in the kernel space; the first message at least comprises a loopback detection message LBM, a connectivity detection message CCM and a link tracking message LTM;
and the message receiving unit is used for receiving the reply message, acquiring additional data carried by the reply message, and determining the link state based on the additional data.
3. The apparatus according to claim 2, wherein the packet receiving unit is configured to, when the reply packet is a second packet, determine a transmission delay and/or a packet loss rate between the node device and the target device based on time information in the additional data; wherein the second message at least comprises a connectivity check message CCM.
4. The apparatus according to claim 2, wherein the packet receiving unit is configured to, in a case that the reply packet is a third packet, determine a transmission delay between the node device and the target device based on time information in the additional data; wherein the third message at least comprises a loopback response message LBR.
5. The apparatus according to claim 2, wherein the packet receiving unit is configured to, if the reply packet is a fourth packet, determine link path information between the node device and the target device based on device information in the additional data; wherein the fourth message comprises at least a link tracking response message LTR;
the message receiving unit is further configured to, when a fifth message is received, obtain a first address and a second address, 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 XDP; wherein, the fifth message at least comprises an LTM; the first address comprises an address of the node device; the second address includes an address of a device that transmitted the LTM.
6. The apparatus according to claim 2, wherein the message receiving unit is configured to, in a case that a sixth message is received, obtain a first address and a third address, 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 LBR, and send the LBR through XDP; wherein the sixth packet at least comprises an LBM; the first address comprises an address of the node device; the third address comprises an address of a device sending 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; the control module is used for loading the eBPF XDP to a network card of the node equipment.
8. The apparatus of claim 2, wherein the message receiving unit and the control module are disposed in the user space; the message processing module further includes a message filtering unit configured in the kernel space, and is 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. A message processing method is characterized in that the method is applied to a message processing device arranged in node equipment; the message processing device comprises a control module and a message processing module; the control module and the message processing module are in communication connection; the communication connection does not include a protocol stack in the node device for processing network data packets; at least part of processing units in the message processing module are arranged in the kernel space of the node equipment; 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 the target equipment, and receives a reply message sent by the target equipment;
the message processing module processes the reply message and determines the link state between the node equipment and the target equipment; wherein, the detection message and the reply message comprise network management and maintenance OAM messages.
CN202211412702.1A 2022-11-11 2022-11-11 Message processing device, node equipment and method Pending CN115941540A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211412702.1A CN115941540A (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 CN115941540A (en) 2022-11-11 2022-11-11 Message processing device, node equipment and method

Publications (1)

Publication Number Publication Date
CN115941540A true CN115941540A (en) 2023-04-07

Family

ID=86653174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211412702.1A Pending CN115941540A (en) 2022-11-11 2022-11-11 Message processing device, node equipment and method

Country Status (1)

Country Link
CN (1) CN115941540A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040165534A1 (en) * 2002-07-25 2004-08-26 Claseman George R. Operations, administration and maintenance (OAM) systems and methods for packet switched data networks
WO2008055426A1 (en) * 2006-11-09 2008-05-15 Huawei Technologies Co., Ltd. Method, system and node apparatus for transmitting ethernet connectibvity fault management message
CN103368849A (en) * 2013-07-05 2013-10-23 盛科网络(苏州)有限公司 OAM (Operations, Administration and Management) message processing method and device
CN103716172A (en) * 2012-09-28 2014-04-09 中兴通讯股份有限公司 Multiple protocol label switching-based operation, administration and maintenance (OAM) method and apparatus
CN105591844A (en) * 2016-03-08 2016-05-18 烽火通信科技股份有限公司 Method for realizing OAM automatic verification based on PTN chip frequency reduction
US20160344630A1 (en) * 2015-05-22 2016-11-24 Electronics And Telecommunications Research Institute Packet transmission apparatus for processing operations, administration, and maintenance (oam) packet and protection switching message
CN111988158A (en) * 2019-05-23 2020-11-24 北京物芯科技有限责任公司 Chip-level OAM message sending method, device, system and storage medium
CN114157684A (en) * 2020-08-18 2022-03-08 华为终端有限公司 Message processing method, device and storage medium
WO2022095571A1 (en) * 2020-11-03 2022-05-12 中兴通讯股份有限公司 Message forwarding method and device, and computer readable storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040165534A1 (en) * 2002-07-25 2004-08-26 Claseman George R. Operations, administration and maintenance (OAM) systems and methods for packet switched data networks
WO2008055426A1 (en) * 2006-11-09 2008-05-15 Huawei Technologies Co., Ltd. Method, system and node apparatus for transmitting ethernet connectibvity fault management message
CN101317372A (en) * 2006-11-09 2008-12-03 华为技术有限公司 Method, system and node device for transmitting connection fault management message of Ethernet
CN103716172A (en) * 2012-09-28 2014-04-09 中兴通讯股份有限公司 Multiple protocol label switching-based operation, administration and maintenance (OAM) method and apparatus
CN103368849A (en) * 2013-07-05 2013-10-23 盛科网络(苏州)有限公司 OAM (Operations, Administration and Management) message processing method and device
US20160344630A1 (en) * 2015-05-22 2016-11-24 Electronics And Telecommunications Research Institute Packet transmission apparatus for processing operations, administration, and maintenance (oam) packet and protection switching message
CN105591844A (en) * 2016-03-08 2016-05-18 烽火通信科技股份有限公司 Method for realizing OAM automatic verification based on PTN chip frequency reduction
CN111988158A (en) * 2019-05-23 2020-11-24 北京物芯科技有限责任公司 Chip-level OAM message sending method, device, system and storage medium
CN114157684A (en) * 2020-08-18 2022-03-08 华为终端有限公司 Message processing method, device and storage medium
WO2022095571A1 (en) * 2020-11-03 2022-05-12 中兴通讯股份有限公司 Message forwarding method and device, and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
裴广超;叶兵;: "网络连通性快速检测系统的实现", 电子科技, no. 02, 15 February 2011 (2011-02-15), pages 87 - 89 *

Similar Documents

Publication Publication Date Title
WO2019184433A1 (en) Method and device for monitoring network data
US10305822B2 (en) Service chain routing method and system, and equipment in system
CN101132320B (en) Method for detecting interface trouble and network node equipment
CN112751733B (en) Link detection method, device, equipment, system and switch
DK2544406T3 (en) Procedure and event notification correlation handling agent
US20080101362A1 (en) Method and device for making uplink standby
WO2023030417A1 (en) Packet processing method and device, storage medium, and computer program product
CN108632099B (en) Fault detection method and device for link aggregation
CN110519079B (en) Data forwarding method and device, network board, network equipment and storage medium
EP3742786A1 (en) Network alarm method, device, system and terminal
CN111142878A (en) SDN operation and maintenance method, device, equipment and readable storage medium
CN111614505B (en) Message processing method and gateway equipment
KR100950212B1 (en) Software development system for testing mobile communications applications, method of arranging data transfer between software components in such system, data processing device comprising such system, and computer-readable storage medium embodying computer program for controlling such device
CN111263377B (en) Network configuration method, device, equipment and system and distribution network testing method and system
CN105763463B (en) Method and device for transmitting link detection message
CN114553707B (en) Method and device for generating topology information of network and delimiting network faults
CN110958170B (en) Network interconnection method and device
CN110855528B (en) Message processing method and test equipment
CN115941540A (en) Message processing device, node equipment and method
CN114760225A (en) Fault diagnosis method, system and storage medium
CN106559838B (en) business processing optimization method and device
CN111884950B (en) Data transmission method, target switch, designated switch and switch system
CN110324202B (en) Method and device for detecting line quality
CN107104837B (en) Method and control device for path detection
CN114520778A (en) Connectivity detection method, connectivity detection device, electronic equipment 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