CN113098774A - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN113098774A
CN113098774A CN202110319656.XA CN202110319656A CN113098774A CN 113098774 A CN113098774 A CN 113098774A CN 202110319656 A CN202110319656 A CN 202110319656A CN 113098774 A CN113098774 A CN 113098774A
Authority
CN
China
Prior art keywords
message
forwarded
network card
target
information
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.)
Granted
Application number
CN202110319656.XA
Other languages
Chinese (zh)
Other versions
CN113098774B (en
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202110319656.XA priority Critical patent/CN113098774B/en
Publication of CN113098774A publication Critical patent/CN113098774A/en
Application granted granted Critical
Publication of CN113098774B publication Critical patent/CN113098774B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a message forwarding method and a message forwarding device, relates to the technical field of network communication, and is applied to a network card installed on a computing node, wherein the method comprises the following steps: receiving a message to be forwarded; judging whether target processing information matched with the message to be forwarded exists in the message processing information stored by the network card according to the message information of the message to be forwarded, wherein each message processing information comprises: the corresponding relation between the message information and the message processing mode; if so, processing the message to be forwarded according to a message processing mode included in the target processing information to obtain a first message, and forwarding the first message according to a destination address of the first message. When the scheme provided by the embodiment of the invention is applied to message forwarding, the problem of computing resource shortage is relieved.

Description

Message forwarding method and device
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method and an apparatus for forwarding a packet.
Background
With the advent of the big data era, more and more data are required to be processed in various application scenes, and on the basis, more and more computing resources are required in the data processing process. For this reason, cloud computing networks are becoming more and more widely used. The cloud computing network generally includes a plurality of computing nodes, each computing node may be deployed with a plurality of virtual machines, and available computing resources of each virtual machine are generally configured according to user requirements. Therefore, the user can use the virtual machine provided by the cloud computing network according to the own computing resource requirement to complete data processing.
In addition, when the user uses the virtual machine, in addition to performing data processing, the user may need to perform message interaction with other virtual machines in the cloud computing network or other network devices in the internet. Therefore, each computing node is generally deployed with a virtualized gateway, so that when a message interaction requirement exists in a virtual machine, the message is forwarded through the virtualized gateway deployed in the computing node where the virtual machine is located, thereby implementing the message interaction.
Taking a virtual machine receiving a message as an example, in the related art, after a virtualized gateway deployed in a computing node receives the message, the virtualized gateway determines a message processing mode of the message, processes the message according to the obtained message processing mode by using computing resources of devices such as a CPU and a memory on the computing node, and forwards the processed message to a destination virtual machine corresponding to the message.
However, when the message is processed by using the computing resources of the devices such as the CPU and the memory on the computing node, a large amount of computing resources of the devices are consumed, and the devices also need to provide computing resources for other data processing tasks, so that the message forwarding is implemented by using the above method, which is prone to cause shortage of computing resources of the computing node.
Disclosure of Invention
The embodiment of the invention aims to provide a message forwarding method and a message forwarding device so as to relieve the problem of shortage of computing resources of a computing node. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a packet forwarding method, which is applied to a network card installed on a computing node, where the method includes:
receiving a message to be forwarded;
judging whether target processing information matched with the message to be forwarded exists in the message processing information stored by the network card according to the message information of the message to be forwarded, wherein each message processing information comprises: the corresponding relation between the message information and the message processing mode;
if so, processing the message to be forwarded according to a message processing mode included in the target processing information to obtain a first message, and forwarding the first message according to a destination address of the first message.
In a second aspect, an embodiment of the present invention provides a data forwarding method, which is applied to a virtualized gateway deployed on a compute node, and the method includes:
receiving a message to be forwarded sent by a network card installed on the computing node;
and under the condition of receiving an instruction of directly forwarding the message to be forwarded, which is sent by the network card, forwarding the message to be forwarded to a virtual machine corresponding to the destination address of the message to be forwarded.
In a third aspect, the present invention provides a packet forwarding method applied to a virtualized gateway deployed on a compute node, where the method includes:
receiving a message to be forwarded sent by a virtual machine deployed on the computing node;
sending the message to be forwarded to a network card installed on the computing node, so that the network card forwards the processed message after successfully processing the message to be forwarded;
under the condition that the network card does not successfully process the message to be forwarded, determining a message processing mode of the message to be forwarded according to message information of the message to be forwarded;
processing the message to be forwarded according to the message processing mode to obtain a first message;
forwarding the first message according to the destination address of the first message, and sending target processing information to the network card, so that the network card stores the target processing information, wherein the target processing information includes: and the corresponding relation between the message information of the message to be forwarded and the determined message processing mode.
In a fourth aspect, an embodiment of the present invention provides a packet forwarding apparatus, which is applied to a network card installed on a computing node, where the apparatus includes:
the message receiving module is used for receiving a message to be forwarded;
an information determining module, configured to determine, according to the packet information of the packet to be forwarded, whether target processing information matched with the packet to be forwarded exists in the packet processing information stored in the network card, where each packet processing information includes: the corresponding relation between the message information and the message processing mode; if yes, triggering a message forwarding module;
and the message forwarding module is used for processing the message to be forwarded according to a message processing mode included in the target processing information to obtain a first message, and forwarding the first message according to a destination address of the first message.
In a fifth aspect, an embodiment of the present invention provides a data forwarding apparatus, which is applied to a virtualized gateway deployed on a compute node, where the apparatus includes:
the message receiving module is used for receiving a message to be forwarded, which is sent by a network card installed on the computing node;
and the first message forwarding module is used for forwarding the message to be forwarded to the virtual machine corresponding to the destination address of the message to be forwarded under the condition of receiving the instruction of directly forwarding the message to be forwarded, which is sent by the network card.
In a sixth aspect, an embodiment of the present invention provides a packet forwarding apparatus, which is applied to a virtualized gateway deployed on a computing node, where the apparatus includes:
the message receiving module is used for receiving a message to be forwarded, which is sent by a virtual machine deployed on the computing node;
the message sending module is used for sending the message to be forwarded to a network card installed on the computing node so that the network card can forward the processed message after successfully processing the message to be forwarded;
the mode determining module is used for determining the message processing mode of the message to be forwarded according to the message information of the message to be forwarded under the condition that the network card does not successfully process the message to be forwarded;
the message processing module is used for processing the message to be forwarded according to the message processing mode to obtain a first message;
an information sending module, configured to forward the first packet according to a destination address of the first packet, and send target processing information to the network card, so that the network card stores the target processing information, where the target processing information includes: and the corresponding relation between the message information of the message to be forwarded and the determined message processing mode.
In a seventh aspect, an embodiment of the present invention provides a computing node, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the first to third aspects described above when executing a program stored in the memory.
In an eighth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps in any of the first to third aspects.
As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to forwarding a message, since the network card processes the message to be forwarded to obtain the first message and forwards the first message, the virtualized gateway does not need to process the message to be forwarded by using the computing resources of the devices such as the CPU and the memory on the computing node, and thus, compared with the related art, a large amount of computing resources such as the CPU and the memory on the computing node can be saved, thereby alleviating the problem of computing resource shortage. In addition, because the network card processes the message to be forwarded, the hardware resource of the network card on the computing node is fully utilized. Therefore, when the message is forwarded, the message forwarding efficiency is improved.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or technical solutions in related arts, the drawings used in the description of the embodiments or related arts will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a cloud computing network in a message forwarding application scenario according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a first message forwarding method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a first method for forwarding a packet in a packet receiving direction according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a second method for forwarding a message in a message receiving direction according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of a first method for forwarding a packet in a packet sending direction according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of a second method for forwarding a message in a message sending direction according to an embodiment of the present invention;
fig. 7 is a schematic flowchart of a second packet forwarding method according to an embodiment of the present invention;
fig. 8 is a schematic flowchart of a third method for forwarding a packet in a packet receiving direction according to an embodiment of the present invention;
fig. 9 is a schematic flowchart of a fourth method for forwarding a message in a message receiving direction according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a process for determining a message processing manner according to an embodiment of the present invention;
FIG. 11 is a diagram illustrating a linked list of timing clocks according to an embodiment of the present invention;
FIG. 12 is a diagram illustrating a target clock migration process according to an embodiment of the present invention;
fig. 13 is a schematic flowchart of a third method for forwarding a packet in a packet sending direction according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of a first packet forwarding device according to an embodiment of the present invention;
fig. 15 is a schematic structural diagram of a second packet forwarding device according to an embodiment of the present invention;
fig. 16 is a schematic structural diagram of a third packet forwarding device according to an embodiment of the present invention;
fig. 17 is a schematic structural diagram of a compute node according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
First, an application scenario of the embodiment of the present invention is specifically described.
Referring to fig. 1, fig. 1 is a schematic diagram of a cloud computing network in a message forwarding application scenario according to an embodiment of the present invention.
In FIG. 1, a compute node C is included1Computing node C2… …, computing node Cn. Computing node C1Computing node C2… …, computing node CnIs each computing node of the cloud computing network.
Wherein, the node C is calculated1On which a virtual gateway VGW is deployed11M virtual machines are deployed: virtual machine VM11Virtual machine VM12… … virtual machine VM1mAnd a network card NA is installed11
Computing nodePoint C2On which a virtual gateway VGW is deployed21M virtual machines are deployed: virtual machine VM21Virtual machine VM22… … virtual machine VM2mAnd a network card NA is installed21
Computing node CnOn which a virtual gateway VGW is deployedn1M virtual machines are deployed: virtual machine VMn1Virtual machine VMn2… … virtual machine VMnmAnd a network card NA is installedn1
When performing message interaction, in one way, message interaction may be performed between different virtual machines deployed in the same computing node, for example: may be a computing node C1Middle virtual machine VM11With virtual machine VM12And performing message interaction between the two.
In this case, it is assumed that the virtual machine VM11As a message sender, a virtual machine VM12As a message receiving end, the message is firstly sent by a virtual machine VM11VGW to virtualized gateways11Sent and then sent by the virtualized gateway VGW11Network interface card NA11Sending, then network card NA11VGW to virtualized gateways11Sending, and finally virtualizing the gateway VGW11To virtual machine VM12Send, when the virtual machine VM12When the message is received, the virtual machine VM is realized11To virtual machine VM12And sending the message.
In another mode, message interaction may also be performed between virtual machines deployed in different computing nodes, for example: may be a computing node C1Middle virtual machine VM11And a computing node C2Middle virtual machine VM21And carrying out message interaction.
In this case, it is assumed that the virtual machine VM11As a message sender, a virtual machine VM21As a message receiving end, the message is firstly sent by a virtual machine VM11VGW to virtualized gateways11Sent and then sent by the virtualized gateway VGW11To network card NA11Sending, then network card NA11To a computing node C2Sending; message arrival at computing node C2At first timeWill arrive at the network card NA first21Then the network card NA21VGW to virtualized gateways21Sending by virtualized gateway VGW21To virtual machine VM21Send, when the virtual machine VM21When the message is received, the virtual machine VM is realized11To virtual machine VM21And sending the message.
In another mode, the virtual machine in the computing node may perform packet interaction with other network devices in the internet. For example: may be a computing node C1Middle virtual machine VM11And performing message interaction with other network equipment in the Internet.
In this case, it is assumed that the virtual machine VM11As a message sending end and a network device as a message receiving end, the message is firstly sent by a virtual machine VM11VGW to virtualized gateways11Sending and then virtualizing gateway VGW11Network interface card NA11Sending, and finally sending by network card NA11Sending the message to the network equipment, and realizing the virtual machine VM when the network equipment receives the message11And sending the message to the network equipment.
In order to alleviate the problem of computing resource shortage in the related art, the embodiment of the invention provides a message forwarding method. Referring to fig. 2, fig. 2 is a schematic flow chart of a message forwarding method provided in an embodiment of the present invention, and is applied to a network card installed on a computing node, where the method includes the following steps S201 to S203.
Step S201: and receiving a message to be forwarded.
Step S202: and judging whether target processing information matched with the message to be forwarded exists in the message processing information stored by the network card or not according to the message information of the message to be forwarded. If so, go to step S203.
Each of the above message processing information includes: the corresponding relation between the message information and the message processing mode.
Step S203: and processing the message to be forwarded according to a message processing mode included in the target processing information to obtain a first message, and forwarding the first message according to the destination address of the first message.
As can be seen from the above, when the scheme provided in this embodiment is applied to forward a packet, because the network card processes the packet to be forwarded to obtain the first packet and forwards the first packet, the virtualized gateway does not need to process the packet to be forwarded by using the computing resources of the devices such as the CPU and the memory on the computing node, and thus, compared with the related art, a large amount of computing resources such as the CPU and the memory on the computing node can be saved, thereby alleviating the problem of computing resource shortage. In addition, because the network card processes the message to be forwarded, the hardware resource of the network card on the computing node is fully utilized. Therefore, when the message is forwarded, the message forwarding efficiency is improved.
Specifically, the packet to be forwarded may be a packet that needs to be forwarded to a virtual machine deployed on the computing node, or may be a packet that a virtual machine deployed on the computing node wants to send to another virtual machine or a network device.
When the destination address of the message to be forwarded, which is received by the network card, corresponds to the virtual machine deployed on the computing node where the network card is located, it is described that the message to be forwarded is a message that needs to be forwarded to the virtual machine deployed on the computing node, so that the implementation of forwarding the message by applying the scheme provided by the embodiment of the present invention is that: and forwarding the message in the message receiving direction.
When the source address of the message to be forwarded, which is received by the network card, corresponds to the virtual machine deployed on the computing node where the network card is located, it is indicated that the message to be forwarded is a message that the virtual machine deployed on the computing node wants to send to other virtual machines or network devices, so that the implementation of forwarding the message by applying the scheme provided by the embodiment of the present invention is that: and forwarding the message in the message sending direction.
Based on this, the following describes a message forwarding method with respect to a message receiving direction and a message transmitting direction, respectively.
The following describes a packet forwarding method in the packet receiving direction.
Referring to fig. 3, fig. 3 is a schematic flowchart of a first method for forwarding a message in a message receiving direction according to an embodiment of the present invention, which is applied to a network card installed on a computing node, where the method includes the following steps S301 to S303.
Step S301: and receiving a message to be forwarded.
The message to be forwarded may include information such as a payload of the message, a source IP (Internet Protocol) address, and a destination IP address. And the destination address of the message to be forwarded corresponds to the virtual machine deployed at the computing node where the network card is located.
When a message is forwarded in a message receiving direction, the message to be forwarded can be divided into the following three cases:
in the first case, the virtual machine on the same computing node sends the message to be forwarded to the network card through the virtualization gateway. That is, the network card can receive the message to be forwarded sent from the virtual machine on the same computing node
In the second case, the virtual machines on other computing nodes send the message to be forwarded to the network card. That is, the network card can receive the message to be forwarded sent by the virtual machine on other computing nodes
In the third situation, the message to be forwarded is sent to the network card by other network devices in the internet. That is, the network card can receive messages to be forwarded, which are sent from other network devices in the internet.
Step S302: judging whether target processing information matched with the message to be forwarded exists in message processing information stored by the network card or not according to the message information of the message to be forwarded; if so, go to step S303.
Each message handling information may include: the corresponding relation between the message information and the message processing mode.
The message information may include five-tuple information of the message, i.e. a source address, a destination address, a source port, a destination port, and a network protocol of the message.
The message processing method may include: discarding the message, modifying the header field of the message, encapsulating the header field, decapsulating the header field, limiting the forwarding speed of the message, and determining the physical port or virtual port identifier for forwarding the message.
Taking table 1 as an example, table 1 shows each message processing information stored in the network card.
TABLE 1
Figure BDA0002992295270000061
Table 1 shows three types of message processing information, the message processing information of each row includes: the corresponding relation between the line message information and the message processing mode.
Specifically, when judging whether target processing information matched with the message to be forwarded exists in the message processing information stored in the network card, the message information of the message to be forwarded may be compared with the message information included in each message processing information, and when the message information of the message to be forwarded is the same as the message information included in the message processing information, it indicates that the target processing information matched with the message to be forwarded exists; and when the message information of the message to be forwarded is different from the message information included in the message processing information, indicating that target processing information matched with the message to be forwarded does not exist.
For example: assume that the message information of the message to be forwarded includes: the source address is IP1, the destination address is IP2, the source port P1, the destination port is P2, and the network Protocol is TCP (Transmission Control Protocol). When the matching is performed with the message processing information shown in table 1, since the message information included in the message processing information flow1 is the same as the message information of the message to be forwarded, it indicates that the target processing information matching with the message to be forwarded exists, that is, the message processing information flow 1.
Assume that the message information of the message to be forwarded includes: the source address is IP5, the destination address is IP6, the source port is P5, the destination port is P6, and the network protocol is TCP. When the matching is performed with the message processing information shown in table 1, since the message information included in the message processing information flow1, the message processing information flow2, and the message processing information flow3 is different from the message information of the message to be forwarded, it indicates that there is no target processing information matching with the message to be forwarded.
Step S303: and processing the message to be forwarded according to a message processing mode included in the target processing information to obtain a first message, and forwarding the first message according to the destination address of the first message.
After the target processing information is determined, the target processing information includes a corresponding relationship between the message information and the message processing mode, that is, the target processing information includes the message processing mode, so that the message to be forwarded can be processed according to the message processing mode included in the target processing information.
For example: the message processing mode included in the target processing information is assumed as follows: modifying the header field of the message and encapsulating the header field, modifying the header field of the message to be forwarded according to the message processing mode, and encapsulating the header field.
Since the first message is obtained by processing the message to be forwarded according to the message processing manner, and as described in step S301, the destination address of the message to be forwarded corresponds to the virtual machine deployed in the computing node where the network card is located in the embodiment, the destination address of the first message corresponds to the virtual machine deployed on the computing node where the network card is located. In this case, the first packet may be forwarded to the virtual machine corresponding to the destination address of the first packet through the virtualization gateway deployed on the computing node, or the first packet may be directly forwarded to the virtual machine corresponding to the destination address of the first packet through the network card.
As can be seen from the above, when the scheme provided in this embodiment is applied to forward a packet, because the network card processes the packet to be forwarded to obtain the first packet and forwards the first packet, the virtualized gateway does not need to process the packet to be forwarded by using the computing resources of the devices such as the CPU and the memory on the computing node, and thus, compared with the related art, a large amount of computing resources such as the CPU and the memory on the computing node can be saved, thereby alleviating the problem of computing resource shortage. Besides, because the network card processes the message to be forwarded, the hardware resource of the network card on the computing node is fully utilized. Therefore, when the message is forwarded, the message forwarding efficiency is improved.
In an embodiment of the present invention, the forwarding of the first packet according to the destination address of the first packet in step S303 may be implemented as follows.
And sending the first message to a virtualization gateway deployed on the computing node, and indicating the virtualization gateway to directly forward the first message to a virtual machine corresponding to the destination address of the first message.
Because the network card processes the message to be forwarded, the virtualized gateway does not need to process the message to be forwarded, and in this case, in order to enable the virtualized gateway to know the situation, the gateway can send the indication information to the virtualized gateway.
In an embodiment, the indication information may be appointed flag bit information set in the first packet, and in this case, after receiving the first packet, the virtualized gateway may parse the first packet to obtain that the first packet needs to be directly forwarded, and then directly forward the first packet to the virtual machine corresponding to the destination address of the first packet without processing the first packet.
In another embodiment, the indication information may also be information that is additionally sent outside the first packet, and in this case, the virtualized gateway may know, through the additional information, to directly forward the first packet, and then directly forward the first packet to the virtual machine corresponding to the destination address of the first packet without processing the first packet.
Therefore, the virtualized gateway directly forwards the first message, and the first message is not processed by using the computing resources of the devices such as the CPU, the memory and the like on the computing node, so that compared with the related technology, a large amount of computing resources can be saved, and the problem of computing resource shortage is solved. The network card processes the message to be forwarded, namely, the hardware resource of the network card on the computing node is fully utilized when the message is processed.
When it is determined in step S302 that the target processing information does not exist in the message processing information stored in the network card, the network card is difficult to process the message to be forwarded. In order to smoothly process and forward a message to be forwarded, in an embodiment of the present invention, referring to fig. 4, a flow diagram of a second message forwarding method in a message receiving direction is provided, on the basis of the foregoing embodiment, if a destination address of the message to be forwarded corresponds to a virtual machine deployed in a computing node, it may be considered that such a situation belongs to a situation that the virtual machine deployed in the computing node receives the message, and the foregoing method may further include the following steps S304-S305.
Step S304: and sending the message to be forwarded to the virtualized gateway, and instructing the virtualized gateway to process the message to be forwarded and forward the processed message.
And when the destination address of the message to be forwarded corresponds to the virtual machine deployed in the computing node, indicating that the message to be forwarded is the message to be sent to the virtual machine deployed in the computing node. The packet to be forwarded may come from virtual machines on different computing nodes or network devices on the internet.
If the message processing information stored in the network card does not contain the target processing information, the network card is difficult to process the message to be forwarded, so that the virtualized gateway is required to process the message to be forwarded.
In an embodiment, the indication information may be appointed flag bit information set in the message to be forwarded, and after receiving the message to be forwarded, the virtualized gateway may parse the message to be forwarded, learn that the message to be forwarded needs to be processed, and further process the message to be forwarded and forward the message.
In another embodiment, the indication information may also be information that is additionally sent in addition to the message to be forwarded, and in this case, the virtualized gateway may learn, through the additional information, that the message to be forwarded needs to be processed, further process the message to be forwarded, and forward the message.
Specifically, when the virtualized gateway processes the message to be forwarded, the virtualized gateway may determine a message processing mode of the message to be forwarded according to the message information of the message to be forwarded; and processing the message to be forwarded according to the determined message processing mode, and forwarding the processed message.
Step S305: and receiving target processing information sent by the virtualization gateway and storing the target processing information.
After determining the message processing mode of the message to be forwarded, the virtualization gateway can determine the corresponding relationship between the message information of the message to be forwarded and the message processing mode of the message to be forwarded, and generate the target processing information including the corresponding relationship, so that the virtualization gateway can send the target processing information to the network card.
After the network card stores the target processing information, when a to-be-forwarded message matched with the target processing information is received, the received to-be-forwarded message can be processed according to a message processing mode included in the target processing information, and the virtualized gateway does not need to process the to-be-forwarded message by using computing resources of devices such as a CPU (central processing unit), a memory and the like on a computing node.
When the scheme provided by the embodiment is applied to forwarding a message, if target processing information does not exist in message processing information stored in the network card, it indicates that the network card is difficult to process the message to be forwarded.
In an embodiment of the present invention, when there is no target processing information in the message processing information stored in the network card, if the destination address of the message to be forwarded corresponds to the virtual machine deployed in the computing node and the source address corresponds to the virtual machine deployed in the computing node, in this case, one virtual machine deployed in the computing node sends the message to be forwarded to another virtual machine. Before the network card sends the message to be forwarded to the virtualized gateway, the virtualized gateway has already received the message to be forwarded sent by the virtual machine, so, in this case, after the network card determines that the target processing information does not exist, the network card may not send the message to be forwarded to the virtualized gateway, but only instructs the virtualized gateway to process the message to be forwarded and forward the processed message. The specific indication manner can be referred to as the indication manner in step 304, and is not described in detail here.
The following describes a message forwarding method in the message sending direction.
Referring to fig. 5, fig. 5 is a schematic flowchart of a first method for forwarding a message in a message sending direction according to an embodiment of the present invention, and is applied to a network card installed on a computing node, where the method includes the following steps S501 to S503.
Step S501: and receiving a message to be forwarded.
For the message sending direction, the source address of the message to be forwarded corresponds to the virtual machine deployed by the computing node where the network card is located.
The source address of the message to be forwarded corresponds to the virtual machine deployed at the computing node where the network card is located, and when the virtual machine sends the message, the message first passes through the virtualization gateway deployed at the computing node, so that the message to be forwarded is sent by the virtualization gateway deployed at the computing node where the network card is located.
Step S502: and judging whether target processing information matched with the message to be forwarded exists in the message processing information stored by the network card or not according to the message information of the message to be forwarded. If so, go to step S503.
Each of the above message processing information includes: the corresponding relation between the message information and the message processing mode.
When judging whether target processing information matched with the message to be forwarded exists in the message processing information stored in the network card, comparing the message information of the message to be forwarded with the message information included in each message processing information, and when the message information of the message to be forwarded is the same as the message information included in the message processing information, indicating that the target processing information matched with the message to be forwarded exists; and when the message information of the message to be forwarded is different from the message information included in the message processing information, indicating that target processing information matched with the message to be forwarded does not exist.
Step S503: and processing the message to be forwarded according to a message processing mode included in the target processing information to obtain a first message, and forwarding the first message according to the destination address of the first message.
After the target processing information is determined, the target processing information includes a corresponding relationship between the message information and the message processing mode, that is, the target processing information includes the message processing mode, so that the message to be forwarded can be processed according to the message processing mode included in the target processing information.
Specifically, the destination address of the first packet may correspond to another virtual machine deployed in the computing node, in this case, the network card needs to send the first packet to a virtualization gateway deployed on the computing node, and the virtualization gateway forwards the first packet to the virtual machine corresponding to the destination address of the first packet.
The destination address of the first packet may also correspond to a virtual machine deployed in another computing node, and in this case, the network card needs to send the first packet to a network card installed in another computing node, and the network card and the virtualization gateway of another computing node are used to forward the first packet.
The destination address of the first message may also correspond to a network device on the internet, in which case the network card forwards the first message to the network device.
As can be seen from the above, when the scheme provided in this embodiment is applied to forward a packet, because the network card processes the packet to be forwarded to obtain the first packet, and forwards the first packet, it is not necessary for the virtualized gateway to process the packet to be forwarded without using the computing resources of the devices such as the CPU and the memory on the computing node, and therefore, compared with the related art, a large amount of computing resources such as the CPU and the memory on the computing node can be saved, thereby alleviating the problem of computing resource shortage. In addition, because the network card processes the message to be forwarded, the hardware resource of the network card on the computing node is fully utilized. Therefore, when the message is forwarded, the message forwarding efficiency is improved.
When it is determined in step S502 that the target processing information does not exist in the message processing information stored in the network card, the network card is difficult to process the message to be forwarded. In order to smoothly process a message to be forwarded and forward the message, in an embodiment of the present invention, referring to fig. 6, a flow diagram of a second message forwarding method in a message sending direction is provided, and on the basis of the above embodiment, the message forwarding method may further include the following steps S504 to S505.
Step S504: and instructing the virtualization gateway to process the message to be forwarded and forward the processed message.
The specific indication process may refer to an embodiment of the corresponding indication process in step S304.
Step S505: and receiving target processing information sent by the virtualization gateway and storing the target processing information.
After determining the message processing mode of the message to be forwarded, the virtualization gateway may determine a correspondence between the message information of the message to be forwarded and the message processing mode of the message to be forwarded, and generate target processing information including the correspondence, so that the virtualization gateway may send the target processing information to the network card.
Therefore, when the network card does not successfully process the message to be forwarded, the virtualized gateway processes the message to be forwarded, and the message to be forwarded can be processed and forwarded. And the virtualization gateway sends target processing information comprising the corresponding relation between the message information of the message to be forwarded and the determined message processing mode to the network card, so that when the network card receives the message matched with the target processing information later, the received message can be processed according to the message processing mode included in the target processing information, and the virtualization gateway does not need to process the message by utilizing the computing resources of devices such as a CPU (Central processing Unit) and a memory on a computing node. Thereby saving computational resources.
The above has specifically explained the message forwarding method from the message receiving direction and the message sending direction, respectively. The subsequent embodiments are applicable to both the case of forwarding a message in the message receiving direction and the case of forwarding a message in the message sending direction.
In an embodiment of the present invention, before the step S202, the following steps a 1-a 2 may be further included.
Step A1: and judging whether the number of the received messages in the target effective time is less than the preset message number. If so, and the destination address of the message to be forwarded corresponds to the virtual machine deployed in the computing node, executing step a 2; if not, go to step S202.
The target effective time is as follows: the effective time of the session period of the session to which the message to be forwarded belongs.
When the number of the received messages in the target effective time of the network card is less than the preset message number, the network card indicates that the network flow on the network connection corresponding to the session to which the message to be forwarded belongs is small, and the network flow transmitted on the network connection can be vividly called as the mouse flow.
When the number of the received messages in the target effective time by the network card is larger than or equal to the preset message number, the network card indicates that the network flow on the network connection corresponding to the session to which the message to be forwarded belongs is larger, and the network flow transmitted on the network connection can be vividly called as a 'elephant flow'.
The predetermined message number may be determined empirically by a skilled person, and may be 20, 30, etc. as described above.
Specifically, when determining whether the number of received messages in the target effective time is smaller than the preset message number, the number of received messages of the network card in the target effective time recorded by the network card may be obtained, and the number is compared with the preset message number to determine whether the number of received messages in the target effective time is smaller than the preset message number.
For example: the number of the messages received by the network card in the target effective time recorded by the network card is 30, the number of the preset messages is 20, and the number of the received messages in the target effective time can be determined to be larger than the number of the preset messages because the number of the received messages is more than 20; if the number of the received messages in the target effective time recorded by the network card is 10, since 20 is greater than 10, it can be determined that the number of the received messages in the target effective time is less than the preset number of messages.
Step A2: and sending the message to be forwarded to the virtualized gateway, and instructing the virtualized gateway to process the message to be forwarded and forward the processed message.
And the destination address of the message to be forwarded corresponds to the virtual machine deployed in the computing node and represents that the message is forwarded in the message receiving direction.
In an embodiment of the present invention, before the step S202, the following steps A3-a 4 may be further included.
Step A3: and judging whether the number of the received messages in the target effective time is less than the preset message number. If so, and the source address of the message to be forwarded corresponds to the virtual machine deployed in the computing node, executing step a 4; if not, go to step S202.
Step A3 is the same step as step a1, and specific embodiments can be found in step a 1.
Step A4: and instructing the virtualization gateway to process the message to be forwarded and forward the processed message.
And the source address of the message to be forwarded corresponds to the representation of the virtual machine deployed in the computing node, and the message is forwarded in the message sending direction.
In step a2 and step a4 of the two embodiments, the virtualized gateway processes and forwards the packet to be forwarded when the number of received packets is less than the preset number of packets within the target effective time. In this case, the virtualization gateway does not transmit the target process information to the network card.
When the network flow transmitted by the network connection corresponding to the session to which the message to be forwarded belongs is the mouse flow, the timeout time of the network connection is short, and the frequency of reestablishing the network connection is high. If the number of received messages is smaller than the preset message number within the target effective time, the virtualized gateway sends message processing information matched with the messages to the gateway, so that the virtualized gateway frequently sends the message processing information to the gateway, and the performance of the virtualized gateway is reduced.
Therefore, in order to reduce the frequency of sending message processing information to the network card by the virtualization gateway and improve the performance of the virtualization gateway, when the network traffic transmitted by the network connection is a mouse flow, the virtualization gateway only needs to process and forward the message to be forwarded, and does not need to send message processing information to the network card.
The specific indication process can be referred to the description of step S304.
Therefore, under the condition that the number of the received messages is smaller than the preset message number in the target effective time, the virtualization gateway only processes and forwards the messages to be forwarded, the virtualization gateway can be prevented from frequently sending message processing information to the gateway, and the performance of the virtualization gateway is improved.
In one embodiment of the present invention, before the step S202, the following steps B1-B2 may be further included.
Step B1: judging whether the message to be forwarded is a message transmitted after the session to which the message belongs is successfully established in network connection; if not, and the destination address of the message to be forwarded corresponds to the virtual machine deployed in the computing node, executing step B2; if so, go to step S202.
Specifically, when determining whether the to-be-forwarded message is a message transmitted after the session to which the to-be-forwarded message belongs is successfully established, the to-be-forwarded message may be determined according to connection state information of the network connection corresponding to the session to which the to-be-forwarded message belongs, which is recorded in the computing node.
For example: when the connection state information represents that the network connection is a state in which the network connection is successfully established, the message to be forwarded can be considered as a message transmitted after the session to which the message belongs is successfully established; when the connection state information indicates that the network connection is not a state in which the network connection is successfully established, it may be considered that the packet to be forwarded is not a packet transmitted after the session to which the packet belongs is successfully established.
Step B2: and sending the message to be forwarded to the virtualized gateway, and instructing the virtualized gateway to process the message to be forwarded and forward the processed message.
And under the condition that the destination address of the message to be forwarded corresponds to the virtual machine deployed in the computing node, the message is forwarded in the message receiving direction.
In one embodiment of the present invention, before the step S202, the following steps B3-B4 may be further included.
Step B3: judging whether the message to be forwarded is a message transmitted after the session to which the message belongs is successfully established in network connection; if not, and the source address of the message to be forwarded corresponds to the virtual machine deployed in the computing node, executing step B4; if so, go to step S202.
Step B3 is the same as step B1, and the specific embodiment can be seen in step B1.
Step B4: and instructing the virtualization gateway to process the message to be forwarded and forward the processed message.
The source address of the message to be forwarded corresponds to the virtual machine deployed in the computing node and indicates that the message is forwarded in the direction of sending the message.
In step B2 and step B4 of the two embodiments, when the message to be forwarded is not a message transmitted after the session successfully establishes the network connection, the network card sends the message to be forwarded to the virtualized gateway, that is, the network card does not process the message to be forwarded, but the virtualized gateway processes and forwards the message to be forwarded.
For example: when the message to be forwarded is a message transmitted in a handshake phase of a TCP connection, the message to be forwarded may not be a message transmitted after the session successfully establishes a network connection.
And when the message to be forwarded is not the message transmitted after the network connection is successfully established for the session, the message to be forwarded is processed and forwarded by the virtualization gateway. In this case, the virtualization gateway does not transmit the target process information to the network card.
Because the timeout time of the message transmitted after the network connection is successfully established is longer than the timeout time of the message transmitted without the network connection being successfully established, the frequency of transmitting the message after the network connection is successfully established is lower, and the frequency of transmitting the message without the network connection is higher. If the message to be forwarded is not a message transmitted after the network connection is successfully established for the session to which the message belongs, and the virtualized gateway sends message processing information to the gateway, the virtualized gateway needs to frequently send the message processing information to the gateway, so that the performance of the virtualized gateway is reduced.
Therefore, in order to reduce the frequency of sending message processing information to the network card by the virtualization gateway and improve the performance of the virtualization gateway, when the message to be forwarded is not a message transmitted after the network connection is successfully established for the session, the virtualization gateway only needs to process and forward the message to be forwarded, and does not need to send message processing information to the network card.
The specific indication method may refer to the above step S304 embodiment.
Therefore, under the condition that the message to be forwarded is not the message transmitted after the network connection is successfully established for the session, the virtualized gateway only processes and forwards the message to be forwarded, and the condition that the virtualized gateway needs to frequently send message processing information to the gateway is avoided, so that the performance of the virtualized gateway is improved.
Referring to fig. 7, fig. 7 is a flowchart illustrating a second packet forwarding method according to an embodiment of the present invention, where on the basis of the foregoing embodiment, the packet forwarding method may further include the following steps S204 to S206.
Step S204: and monitoring the first times of successful matching of the target processing information in the preset time length.
The preset time period may be set by the staff according to experience, for example: the preset time period may be 10ms, 20ms, etc.
The first number of times that the target processing information is successfully matched within the preset time length can be understood as follows: and the times that the target processing information is matched with each obtained message to be forwarded in the preset time length.
For example: assuming that 5 messages to be forwarded are received within a preset time, when it is determined whether target processing information matched with the messages to be forwarded exists in the message processing information stored in the network card, the target processing information matched with the 4 messages to be forwarded is obtained as the same message processing information, and it can be determined that the first number of times that the same message processing information is successfully matched within the preset time is 4.
Specifically, when the first time count is monitored, information that the target processing information is successfully matched within the preset time length every time may be recorded, and based on the recorded information, a first time that the target processing information is successfully matched within the preset time length may be obtained.
Step S205: and if the first times are not changed within the preset time length, informing the virtualization gateway of setting the timeout of a first timing clock of the network connection corresponding to the session to which the message to be forwarded belongs.
The first timing clock represents the time length of the network connection which does not receive the message in the message direction corresponding to the target processing information. The message direction may include a message receiving direction and a message sending direction.
The first timing clock represents the time length of the network connection which does not receive the message in the message direction corresponding to the target processing information is overtime; and updating the first timing clock to represent the time length of the network connection which does not receive the message in the message direction corresponding to the target processing information.
When the first times in the preset time length are not changed, the times that the target processing information is successfully matched in the preset time length are not changed, that is, the message is not received on the network connection corresponding to the session to which the message to be forwarded belongs in the preset time length. Under the condition, the virtualization gateway is informed to set the timeout of the first timing clock of the network connection corresponding to the session to which the message to be forwarded belongs, so that the computing resources of devices such as a CPU (central processing unit), a memory and the like on the computing node are saved.
Specifically, when the virtualized gateway is notified to set the timeout of the first timing clock of the network connection corresponding to the session to which the packet to be forwarded belongs, an timeout instruction of the first timing clock may be sent to the virtualized gateway, and the virtualized gateway sets the timeout of the first timing clock according to the timeout instruction.
Step S206: and if the first time number changes within the preset time length, informing the virtualization gateway to update the first timing clock.
When the first time number in the preset time length changes, the matching of the target processing information in the preset time length is successful, and when the matching of the target processing information in the preset time length is successful, the message is transmitted on the network connection corresponding to the session to which the message to be forwarded belongs. In this case, the virtualization gateway is notified to set up an update to the first timing clock to ensure that the transmitted message can be received.
Specifically, when the virtualized gateway is notified to update the first time clock, an update instruction of the first time clock may be sent to the virtualized gateway, and the virtualized gateway updates the first time clock according to the update instruction.
Therefore, when the first time within the preset time length is not changed, the virtualized gateway is informed to set the first timing clock of the network connection corresponding to the session to which the message to be forwarded belongs to be overtime, and the computing resources of devices such as a CPU (central processing unit), a memory and the like on the computing node can be saved. And when the first time number changes within the preset time length, the virtualization gateway is informed to set and update the first timing clock, so that the transmitted message can be ensured to be received.
In order to avoid an excessive amount of message processing information stored in the network card and save hardware resources of the network card, in an embodiment of the present invention, a deletion instruction for the target processing information sent by the virtualized gateway after satisfying a deletion condition may be further received, and the target processing information is deleted.
The deletion conditions are as follows: and the timing clocks of the network connection corresponding to the session to which the message to be forwarded belongs in the message receiving direction and the message sending direction are both overtime.
When the timing clocks of the network connection corresponding to the session to which the message to be forwarded belongs in the message receiving direction and the message sending direction both time out, it indicates that it is difficult to obtain the message based on the network connection. In order to save hardware resources of the network card, the target processing information stored in the network card can be deleted.
Specifically, the deletion instruction sent by the virtualized gateway may carry an identifier of the target processing information, and the network card analyzes the deletion instruction to obtain the identifier of the target processing information and delete the target processing information corresponding to the obtained identifier.
Therefore, when the timing clocks of the network connection corresponding to the session to which the message to be forwarded belongs in the message receiving direction and the message sending direction are both timed out, the fact that no message is transmitted on the network connection is indicated, and therefore the target processing information stored in the network card can be deleted, and hardware resources of the network card can be saved.
Corresponding to the message forwarding method applied to the network card installed on the computing node, the embodiment of the invention also provides a message forwarding method applied to a virtualized gateway deployed on the computing node.
Referring to fig. 8, fig. 8 is a schematic flowchart of a third method for forwarding a packet in a packet receiving direction according to an embodiment of the present invention, where the method is applied to a virtualized gateway deployed on a computing node, and the method includes the following steps S801 to S802.
Step S801: and receiving a message to be forwarded sent by a network card installed on the computing node.
Specifically, the message to be forwarded may be a message processed by the network card, or may be a message directly forwarded by the network card without processing the message after receiving the message to be forwarded.
Step S802: and under the condition of receiving an instruction of directly forwarding the message to be forwarded, which is sent by the network card, forwarding the message to be forwarded to the virtual machine corresponding to the destination address of the message to be forwarded.
When a message to be forwarded which is sent by the network card and is directly forwarded is received, the message to be forwarded is represented as a message processed by the network card, and under the condition, the virtualized gateway does not need to process the message to be forwarded, so that the computing resources of devices such as a CPU (central processing unit), a memory and the like on a computing node are saved.
When forwarding the message to be forwarded to the virtual machine corresponding to the destination address of the message to be forwarded, the virtualized gateway may parse the message to be forwarded to obtain the destination address of the message to be forwarded, and forward the message to be forwarded to the virtual machine corresponding to the destination address.
As can be seen from the above, when the scheme provided in this embodiment is applied to forward a message, and when a message to be forwarded is directly forwarded and sent by a network card, the message to be forwarded is indicated as a message after being processed by the network card, in this case, the virtualized gateway does not process the message to be forwarded, but directly forwards the message to be forwarded, so that the computing resources of devices such as a CPU and a memory on the computing node are saved.
In the step S801, when the indication that the message to be forwarded is directly forwarded and sent by the network card is not received after the message to be forwarded is received, it indicates that the network card does not process the message to be forwarded. In order to smoothly process and forward a to-be-forwarded message, referring to fig. 9, fig. 9 is a schematic flow diagram of a fourth message forwarding method in a message receiving direction according to an embodiment of the present invention, where on the basis of the above embodiment, the method further includes the following steps S803 to S805.
Step S803: and under the condition that the indication of directly forwarding the message to be forwarded sent by the network card is not received, determining the message processing mode of the message to be forwarded according to the message information of the message to be forwarded.
When the message processing mode of the message to be forwarded is determined, the target table entry matched with the message to be forwarded in the flow table stored in the virtualized gateway can be queried according to the message information of the message to be forwarded, and the message processing mode contained in the found target table entry is determined as the message processing mode of the message to be forwarded.
When the message processing mode is determined, the message processing mode of the message to be forwarded is determined relatively quickly according to the stored table entry in the flow table, and the message to be forwarded is processed and forwarded according to the processing mode, and the forwarding path for forwarding the message to be forwarded is called as a 'fast forwarding path'.
Each table entry of the flow table is used for storing the corresponding relationship between the message information of the message and the message processing mode.
When a target table entry matched with the message to be forwarded in the flow table is queried, the message information of the message to be forwarded and the message information included in each table entry in the flow table can be compared, and the table entry with the same message information as the message to be forwarded is used as the target table entry.
Taking table 2 as an example, table 2 shows a flow table stored by the virtualized gateway.
TABLE 2
Figure BDA0002992295270000141
The flow table of table 2 includes three entries, the entries of each row including: the corresponding relation between the line message information and the message processing mode.
For example: assume that the message information of the message to be forwarded includes: the source address is sip1, the destination address is dip2, the source port is SP1, the destination port is SP2, and the network protocol is TCP. When the table entry is matched with each table entry shown in table 2, the table entry Session1 may be used as a target table entry because the message information included in the table entry Session1 is the same as the message information of the message to be forwarded.
If the table entry matched with the message to be forwarded is not found, the message processing mode of the message to be forwarded can be determined from the message processing mode table of each preset processing type according to the message information of the message to be forwarded.
Because the message processing mode of the message to be forwarded needs to be determined from the message processing mode table of each preset processing type, and the message to be forwarded is processed and forwarded according to the determined message processing, the forwarding path for forwarding the message to be forwarded can be called as a "slow forwarding path".
The message processing mode table of each preset processing type may include: and the corresponding relation between the message information and the message processing mode of the preset processing type. The message processing mode table of the preset processing type may include a routing table, a security group table, a switching table, and the like.
When the message processing mode of the message to be forwarded is determined, the message information of the message to be forwarded and the message information included in the message processing mode table of the preset processing type can be compared for each preset processing mode, and when the message processing modes are the same, the message processing mode corresponding to the same message information compared in the message processing mode table of the preset processing type can be used as the message processing mode of the preset processing type of the message to be forwarded, and the message processing modes of the preset processing types are integrated, so that the message processing mode of the message to be forwarded can be obtained.
Step S804: and processing the message to be forwarded according to the determined message processing mode to obtain a first message, and forwarding the first message to the virtual machine corresponding to the destination address of the first message.
Step S805: and sending the target processing information to the network card so that the network card stores the target processing information.
The target processing information includes: the corresponding relation between the message information of the message to be forwarded and the determined message processing mode.
In this way, after the message processing mode is determined, the target processing information including the corresponding relation between the message information of the message to be forwarded and the determined message processing mode is sent to the network card, so that when the network card receives the message matched with the target processing information later, the received message can be processed according to the message processing mode included in the target processing information, and the message does not need to be processed by the virtualized gateway by utilizing the computing resources of the devices such as the CPU, the memory and the like on the computing node. Thereby saving computational resources.
Because the process of forwarding the message to be forwarded is relatively simple when the message to be forwarded is forwarded based on the "fast forwarding path", the timing of sending the target processing information to the network card can be flexibly controlled, and the message to be forwarded can be forwarded according to the "fast forwarding path" in step S803.
In an embodiment of the present invention, the message processing method for determining the message to be forwarded according to the message information of the message to be forwarded in the step S804 may also be implemented according to the following steps C1-C3.
Step C1: and inquiring a target table item matched with the message to be forwarded in the flow table according to the message information of the message to be forwarded.
Each table entry of the flow table is used for storing the corresponding relationship between the message information of the message and the message processing mode.
When a target table entry matched with the message to be forwarded in the flow table is queried, the message information of the message to be forwarded and the message information included in each table entry in the flow table can be compared, and the table entry with the same message information as the message to be forwarded is used as the target table entry.
Step C2: and judging whether the information associated with the virtual machine corresponding to the destination address of the message to be forwarded changes. If no change occurs, go to step C3; if so, go to step C4.
The information associated with the virtual machine may include resources, an IP address, a port number, an identifier of the virtual machine, information of each virtual machine deployed on the computing node where the virtual machine is located, and the like.
When judging whether the information associated with the virtual machine corresponding to the destination address of the message to be forwarded changes, the determination may be made according to the virtual machine information identifier representing whether the information associated with the virtual machine corresponding to the destination address of the message to be forwarded changes, where the identifier may be a cache identifier.
Specifically, when the virtual machine information identifier indicates that the information associated with the virtual machine is not changed, it may be considered that the information associated with the virtual machine corresponding to the destination address of the packet to be forwarded is not changed; when the virtual machine information identifier indicates that the information associated with the virtual machine changes, it may be considered that the information associated with the virtual machine corresponding to the destination address of the packet to be forwarded changes.
When the information changes, the determined message processing mode may be different from the message processing mode actually used for processing the message to be forwarded. Therefore, in this case, the message processing method of the message to be forwarded needs to be determined again.
Step C3: and determining the message processing mode contained in the target table entry as the message processing mode of the message to be forwarded.
Step C4: and determining the message processing mode of the message to be forwarded from the message processing mode table of each preset processing type according to the message information of the message to be forwarded.
In this way, when the information associated with the virtual machine changes, the determined message processing mode may be different from the message processing mode actually used for processing the message to be forwarded. Therefore, in this case, the message processing method of the message to be forwarded is determined again, and a more accurate message processing method can be obtained.
Taking fig. 10 as an example, fig. 10 is a schematic diagram of a message processing method determining process according to an embodiment of the present invention.
First, a virtualized gateway receives a packet to be forwarded.
The virtualization gateway then queries the flow table. And inquiring a target table item matched with the message to be forwarded in the flow table.
And finally, judging whether the cache is effective, if so, determining the message processing mode contained in the target table entry as the message processing mode of the message to be forwarded, and if not, determining the message processing mode of the message to be forwarded from each message processing mode table with preset processing types according to the message information of the message to be forwarded.
In an embodiment of the present invention, before the step S805, it may be further determined whether the number of received messages in the target valid time is smaller than a preset number of messages; if not, go to step S805; if so, the step S805 is not executed, that is, the target processing information is not transmitted to the network card. In the case that the number of received messages in the target valid time is greater than or equal to the preset number of messages, the step S805 is executed.
Therefore, under the condition that the number of the received messages is smaller than the preset message number in the target effective time, the virtualization gateway only processes and forwards the messages to be forwarded, the virtualization gateway can be prevented from frequently sending message processing information to the gateway, and the performance of the virtualization gateway is improved.
In an embodiment of the present invention, before the step S805, it may further be determined whether the packet to be forwarded is a packet transmitted after the session to which the packet belongs is successfully established over a network; if not, go to step S805; if so, step S805 is not executed, that is, the target processing information is not transmitted to the network card.
Therefore, under the condition that the message to be forwarded is not the message transmitted after the network connection is successfully established for the session, the virtualized gateway only processes and forwards the message to be forwarded, and the condition that the virtualized gateway needs to frequently send message processing information to the gateway is avoided, so that the performance of the virtualized gateway is improved.
In an embodiment of the present invention, when a first notification sent by a network card is received, a first timing clock of a network connection corresponding to a session to which a message to be forwarded belongs is set to be overtime.
The first notification is sent when the network card monitors that the first time does not change within the preset time. The first time number indicates: and the times of successful matching of the message processing information matched with the message to be forwarded in a preset time length.
The first timing clock represents the duration of the network connection which does not receive the message in the message receiving direction. The network connection has two message forwarding directions including a message receiving direction and a message sending direction, which are two independent message forwarding directions.
The first timing clock represents the timeout of the time length of the network connection which does not receive the message in the message receiving direction; and updating the first timing clock to indicate the time length of the new network connection which does not receive the message in the message receiving direction.
The preset time period may be set by the staff according to experience, for example: the preset time period may be 10ms, 20ms, etc. The preset number of hits may be set by a worker according to experience, for example, the preset number of hits may be 1, 2, and so on.
In an embodiment of the present invention, the first timing clock is updated when the second notification sent by the network card is received.
The second notification is sent when the network card monitors that the first time is changed within the preset time.
Therefore, when the first time within the preset time length is not changed, the virtualized gateway is informed to set the first timing clock of the network connection corresponding to the session to which the message to be forwarded belongs to be overtime, and the computing resources of devices such as a CPU (central processing unit), a memory and the like on the computing node can be saved. And when the first time number changes within the preset time length, the virtualization gateway is informed to set and update the first timing clock, so that the transmitted message can be ensured to be received.
In an embodiment of the present invention, the first packet number and the second packet number may also be obtained periodically, and when a difference between the first packet number and the second packet number is smaller than a preset difference threshold, a first timing clock of a network connection corresponding to a session to which a packet to be forwarded belongs is set to be overtime; and updating the first timing clock under the condition that the difference between the first message quantity and the second message quantity is greater than or equal to a preset difference threshold value.
The number of the first messages is as follows: the number of messages which are received before the first moment and are transmitted through the network connection corresponding to the session to which the message to be forwarded belongs. The second message quantity is: the number of messages transmitted over the network connection received before the second time. And a preset interval duration is arranged between the first time and the second time.
The difference between the first message quantity and the second message quantity can be understood as the quantity of the messages received in a period by the network connection corresponding to the session to which the message to be forwarded belongs.
For example, it is assumed that the first packet number is 5 packets received through the network connection corresponding to the session to which the packet to be forwarded belongs before time T1, the second packet number is 6 packets received through the network connection before time T2, and a difference between the first packet number and the second packet number is 1, which indicates that the packet number received through the network connection within time T1 to time T2 is 1.
When the difference between the first message quantity and the second message quantity is smaller than a preset difference threshold value, the number of times that the message processing information matched with the message to be forwarded is successfully matched within a preset interval duration is low, and when the number of times that the message processing information is successfully matched within the preset interval duration is low, the number of messages transmitted on the network connection corresponding to the first affiliated session is low. Under the condition, the virtualization gateway sets the first timing clock of the network connection corresponding to the session to which the message to be forwarded belongs to be overtime so as to save the computing resources of devices such as a CPU (central processing unit), a memory and the like on the computing node.
When the first timing clock of the network connection corresponding to the session to which the packet to be forwarded belongs is set to timeout, the first timing clock of the network connection may be set to a preset timeout duration.
When the difference between the first message quantity and the second message quantity is larger than or equal to a preset difference threshold value, the number of times that the matching of the message processing information matched with the message to be forwarded is successful within a preset time length is more, and when the number of times that the matching of the message processing information is successful within the preset time length is more, the number of messages transmitted on the network connection corresponding to the session to which the message to be forwarded belongs is more. In this case, the virtualized gateway updates the first timing clock to ensure that more packets can be received.
When the first timing clock of the network connection corresponding to the session to which the packet to be forwarded belongs is updated, the first timing clock may be set to a preset initial value.
Therefore, when the difference between the first message quantity and the second message quantity is smaller than the preset difference threshold value, the virtualized gateway sets the timeout of the first timing clock of the network connection corresponding to the session to which the message to be forwarded belongs, and computing resources of devices such as a CPU (central processing unit), a memory and the like on the computing node can be saved. And when the difference between the first message quantity and the second message quantity is greater than or equal to a preset difference threshold value, the virtualization gateway updates the first timing clock so as to ensure that more messages can be received.
In one embodiment of the invention, the first timing clock may be updated in the following manner: determining a target time clock linked list corresponding to the type of the network connection from the time clock linked list corresponding to the target thread; and searching a target clock corresponding to the message receiving direction connected with the network in the target timing clock linked list, updating the target clock, and transferring the target clock to the tail of the target timing clock linked list.
The target thread is a thread for maintaining network connection.
The link nodes in the timing clock linked list are: the timing clock which represents the time length of the network connection maintained by the target thread and is not used for transmitting the message in the message receiving or sending direction;
the time clock linked list includes clocks of each network connection, and the time clock linked list may be divided into a long connection time clock linked list and a short connection time clock linked list based on the type of the network connection, because the network connection may be divided into a long connection and a short connection. Specifically, a target thread may maintain a long link clock chain and a short link clock chain.
Taking fig. 11 as an example, fig. 11 is a schematic diagram of a clock timing chain table according to an embodiment of the present invention. In fig. 11, short-time-list represents a short-connection time clock linked list, long-time-list represents a long-connection time clock linked list, tn in the short-time-list represents a time clock which is maintained by the target thread and has no message transmission duration in the message receiving or sending direction in each short connection, and tn in the long-time-list represents a time clock which is maintained by the target thread and has no message transmission duration in the message receiving or sending direction in each long connection.
Specifically, when the type of the network connection is short connection, a short connection timing clock linked list can be determined; when the type of network connection is a long connection, a long connection timeclock linked list may be determined.
When searching for the target clock, the connection identifier of the network connection message receiving direction may be determined, and the target clock corresponding to the determined connection identifier is searched for in the determined time clock linked list, so that the target clock may be updated, and the target clock may be migrated to the tail of the determined time clock linked list.
Referring to fig. 12, fig. 12 is a schematic diagram of a target clock migration process according to an embodiment of the present invention, where the second tn in the linked list located on the upper side in fig. 12 represents a target clock, and it can be seen in the linked list located on the lower side in fig. 12 that the target clock migrates to the chain end of the determined time clock linked list.
Therefore, the target clock corresponding to the message receiving direction connected with the network can be searched more accurately based on the timing clock linked list, and the target clock is updated.
In an embodiment of the present invention, a delete instruction for the target processing information may also be sent to the network card when the timing clocks of the network connection corresponding to the session to which the packet to be forwarded belongs are both overtime in the packet receiving direction and the packet sending direction, so that the network card deletes the target processing information.
Therefore, when the timing clocks of the network connection corresponding to the session to which the message to be forwarded belongs in the message receiving direction and the message sending direction are both timed out, the fact that the message is difficult to obtain based on the network connection is shown, the target processing information stored in the network card is deleted, and the hardware resources of the network card can be saved.
Referring to fig. 13, fig. 13 is a schematic flowchart of a third method for forwarding a packet in a packet sending direction according to an embodiment of the present invention, which is applied to a virtualized gateway deployed on a computing node, and the method includes the following steps S1301 to S1305.
Step S1301: and receiving a message to be forwarded sent by a virtual machine deployed on the computing node.
Step 1302; sending a message to be forwarded to a network card installed on the computing node, so that the network card forwards the processed message after successfully processing the message to be forwarded;
in this step, the virtualized gateway directly sends the message to be forwarded to the network card.
Step S1303: and under the condition that the network card does not successfully process the message to be forwarded, determining the message processing mode of the message to be forwarded according to the message information of the message to be forwarded.
Step S1304: and processing the message to be forwarded according to the message processing mode to obtain a first message.
Step S1305: and forwarding the first message according to the destination address of the first message, and sending target processing information to the network card so that the network card stores the target processing information.
As can be seen from the above, when the scheme provided in this embodiment is applied to forwarding a packet, since the network card is used to process the packet to be forwarded, and the virtualized gateway directly forwards the packet to be forwarded, that is, the virtualized gateway does not utilize the computing resources of the devices such as the CPU and the memory on the computing node to process the packet to be forwarded, compared with the related art, a large amount of computing resources such as the CPU and the memory on the computing node can be saved, thereby solving the problem of lack of computing resources. And because the network card processes the message to be forwarded, the hardware resource of the network card on the computing node is fully utilized. Therefore, when the message is forwarded, the message forwarding efficiency is improved.
In addition, when the network card does not successfully process the message to be forwarded, the virtualized gateway processes the message to be forwarded, so that the message to be forwarded can be processed and forwarded. And the virtualization gateway sends target processing information comprising the corresponding relation between the message information of the first message and the determined message processing mode to the network card, so that when the network card receives the message matched with the target processing information later, the received message can be processed according to the message processing mode included in the target processing information, and the virtualization gateway does not need to process the message by using the computing resources of devices such as a CPU (Central processing Unit) and a memory on a computing node. Thereby saving computational resources.
In an embodiment of the present invention, the message processing method for determining the message to be forwarded according to the message information of the message to be forwarded in step S1303 may be implemented according to the following steps D1-D3.
Step D1: and inquiring a target table item matched with the message to be forwarded in the flow table according to the message information of the message to be forwarded.
Each table entry of the flow table is used for storing the corresponding relationship between the message information of the message and the message processing mode.
Step D2: and judging whether the information associated with the virtual machine corresponding to the destination address of the message to be forwarded changes. If no change occurs, go to step D3; if so, go to step D4.
Step D3: and determining the message processing mode contained in the target table entry as the message processing mode of the message to be forwarded.
Step D4: and determining the message processing mode of the message to be forwarded from the message processing mode table of each preset processing type according to the message information of the message to be forwarded.
In this way, when the information associated with the virtual machine changes, the determined message processing mode may be different from the message processing mode actually used for processing the message to be forwarded. Therefore, in this case, the message processing method of the message to be forwarded is determined again, and a more accurate message processing method can be obtained.
In an embodiment of the present invention, before the step S1305, it may further be determined whether the number of received messages in the target valid time is smaller than a preset number of messages, and if not, the step S1305 is executed, that is, the target processing information is not sent to the network card.
The target effective time is as follows: the effective time of the session period of the session to which the message to be forwarded belongs.
Therefore, under the condition that the number of the received messages is smaller than the preset message number in the target effective time, the virtualization gateway only processes and forwards the messages to be forwarded, the virtualization gateway can be prevented from frequently sending message processing information to the gateway, and the performance of the virtualization gateway is improved.
In an embodiment of the present invention, before step S1305, it may further determine whether the packet to be forwarded is a packet transmitted after the session to which the packet belongs is successfully established in the network connection; if so, step S1305 is executed, that is, the target processing information is not transmitted to the network card.
Therefore, under the condition that the message to be forwarded is not the message transmitted after the network connection is successfully established for the session, the virtualized gateway only processes and forwards the message to be forwarded, and the condition that the virtualized gateway needs to frequently send message processing information to the gateway is avoided, so that the performance of the virtualized gateway is improved.
In an embodiment of the present invention, when a third notification sent by the network card is received, a second timing clock of a network connection corresponding to a session to which a message to be forwarded belongs is set to be overtime.
The third notification is that the second times that the network card monitors that the message processing information matched with the message to be forwarded is successfully matched within the preset time length is sent unchanged. The second timing clock represents the duration of the network connection in the message sending direction during which the message is not received.
Therefore, the virtualized gateway is informed to set the timeout of the second timing clock of the network connection corresponding to the session to which the message to be forwarded belongs, so that the computing resources of devices such as a CPU (central processing unit), a memory and the like on the computing node are saved.
In an embodiment of the present invention, the second clock is updated when the fourth notification sent by the network card is received.
The fourth notification is sent when the network card detects that the second number changes.
In this way, the virtualized gateway is notified to set up an updated second timing clock to ensure that the message can be received.
In an embodiment of the present invention, on the basis of the above embodiment, a third packet quantity and a fourth packet quantity may also be obtained periodically; and setting a second timing clock of the network connection corresponding to the session to which the message to be forwarded belongs to be overtime under the condition that the difference between the third message quantity and the fourth message quantity is smaller than a preset difference threshold, and updating the second timing clock under the condition that the difference between the third message quantity and the fourth message quantity is larger than or equal to the preset difference threshold.
The second timing clock represents the duration of the network connection in the message sending direction during which the message is not received;
the third message quantity is: the number of messages which are received before the first moment and are transmitted through the network connection corresponding to the session to which the message to be forwarded belongs. The fourth message number is: the number of messages transmitted over the network connection received before the second time. And a preset interval duration is arranged between the first time and the second time.
In this way, when the difference between the third packet quantity and the fourth packet quantity is smaller than the preset difference threshold, it indicates that the quantity of the packets transmitted on the network connection corresponding to the session to which the packet to be forwarded belongs is small. In this case, the virtualized gateway sets the timeout of the second timing clock of the network connection corresponding to the session to which the packet to be forwarded belongs, so as to save the computing resources of devices such as a CPU and a memory on the computing node. And when the difference between the third message quantity and the fourth message quantity is greater than or equal to a preset difference threshold value, the number of the messages transmitted on the network connection corresponding to the session to which the message to be forwarded belongs is larger. In this case, the virtualized gateway updates the second timing clock to ensure that more packets can be received.
In one embodiment of the invention, when the second time clock is updated, a target time clock linked list corresponding to the type of the network connection can be determined from the time clock linked list corresponding to the target thread; and searching a target clock corresponding to the message receiving direction connected with the network in the target timing clock linked list, updating the target clock, and transferring the target clock to the tail of the target timing clock linked list.
The target thread is a thread for maintaining network connection. The link nodes in the timing clock linked list are: and the network maintained by the representation target thread is connected with a timing clock for the time length of the message which is not transmitted in the message receiving or sending direction.
Therefore, the target clock corresponding to the message receiving direction connected with the network can be searched more accurately based on the timing clock linked list, and the target clock is updated.
In an embodiment of the present invention, a delete instruction for the target processing information may also be sent to the network card when the timing clocks of the network connection corresponding to the session to which the packet to be forwarded belongs are both overtime in the packet receiving direction and the packet sending direction, so that the network card deletes the target processing information.
Therefore, when the timing clocks of the network connection corresponding to the session to which the message to be forwarded belongs in the message receiving direction and the message sending direction are both timed out, the fact that no time is available for transmitting the message on the network connection is indicated, the target processing information stored in the network card is deleted, and the hardware resources of the network card can be saved.
Referring to fig. 14, fig. 14 is a schematic structural diagram of a first packet forwarding device provided in an embodiment of the present invention, which is applied to a network card installed on a computing node, and the device includes the following modules 1401 and 1403.
A message receiving module 1401, configured to receive a message to be forwarded;
an information determining module 1402, configured to determine, according to the message information of the message to be forwarded, whether target processing information matched with the message to be forwarded exists in the message processing information stored in the network card, where each message processing information includes: the corresponding relation between the message information and the message processing mode; if yes, triggering a message forwarding module;
the message forwarding module 1403 is configured to process the message to be forwarded according to a message processing manner included in the target processing information, obtain a first message, and forward the first message according to a destination address of the first message.
In an embodiment of the present invention, the message forwarding module is specifically configured to send the first message to a virtualization gateway deployed on the computing node if a destination address of the first message corresponds to a virtual machine deployed in the computing node, and instruct the virtualization gateway to directly forward the first message to the virtual machine corresponding to the destination address of the first message.
In an embodiment of the present invention, the apparatus further includes: a first message sending module, configured to send the to-be-forwarded message to the virtualized gateway if a destination address of the to-be-forwarded message corresponds to a virtual machine deployed in the computing node under the condition that the target processing information does not exist in the message processing information stored in the network card, and instruct the virtualized gateway to process the to-be-forwarded message and forward the processed message; or the processing indication module is used for indicating the virtualization gateway to process the message to be forwarded and forward the processed message if the source address of the message to be forwarded corresponds to the virtual machine deployed in the computing node; and the information receiving module is used for receiving the target processing information sent by the virtualization gateway and storing the target processing information.
In an embodiment of the present invention, the apparatus further includes: a first quantity judgment module, configured to, before the information judgment module, judge whether the quantity of received packets in a target effective time is less than a preset packet quantity, where the target effective time is: the effective time of the session period of the session to which the message to be forwarded belongs; if so, triggering a second message sending module, wherein the destination address of the message to be forwarded corresponds to a virtual machine deployed in the computing node; if not, triggering the information judgment module;
the second message sending module is configured to send the message to be forwarded to the virtualized gateway, and instruct the virtualized gateway to process the message to be forwarded and forward the processed message,
in an embodiment of the present invention, the apparatus further includes: a second quantity judgment module, configured to, before the information judgment module, judge whether the quantity of received messages in a target effective time is smaller than a preset message quantity, where the target effective time is: the effective time of the session period of the session to which the message to be forwarded belongs; if so, triggering a third message sending module, wherein the source address of the message to be forwarded corresponds to the virtual machine deployed in the computing node; if not, triggering the information judgment module;
and the third message sending module is used for indicating the virtualized gateway to process the message to be forwarded and forward the processed message.
In an embodiment of the present invention, the apparatus further includes:
the first message judging module is used for judging whether the message to be forwarded is a message transmitted after the session to which the message belongs is successfully established in front of the information judging module; if not, and the destination address of the message to be forwarded corresponds to the virtual machine deployed in the computing node, triggering a fourth message sending module, and if so, triggering the information judging module;
the fourth message sending module is configured to send the message to be forwarded to the virtualized gateway if the destination address of the message to be forwarded corresponds to the virtual machine deployed in the computing node, and instruct the virtualized gateway to process the message to be forwarded and forward the processed message.
In an embodiment of the present invention, the apparatus further includes:
the second message judging module is used for judging whether the message to be forwarded is a message transmitted after the session to which the message belongs is successfully established in front of the information judging module; if not, triggering a fifth message sending module by the source address of the message to be forwarded corresponding to the virtual machine deployed in the computing node, and if so, triggering the information judging module;
and the fifth message sending module is used for indicating the virtualized gateway to process the message to be forwarded and forward the processed message.
In an embodiment of the present invention, the apparatus further includes:
the frequency detection module is used for monitoring the first frequency of successful matching of the target processing information within a preset time length;
an overtime notifying module, configured to notify the virtualized gateway to set a first timing clock of a network connection corresponding to a session to which the packet to be forwarded belongs to be overtime if the first number of times does not change within the preset duration, where the first timing clock represents a duration in which the network connection does not receive the packet in a packet direction corresponding to the target processing information;
and the clock updating module is used for informing the virtualization gateway to update the first timing clock if the first time number changes within the preset time length.
In an embodiment of the present invention, the apparatus further includes: an instruction receiving module, configured to receive a deletion instruction for the target processing information, where the deletion instruction is sent by the virtualized gateway after a deletion condition is met, where the deletion condition is: the timing clocks of the network connection corresponding to the session to which the message to be forwarded belongs in the message receiving direction and the message sending direction are both overtime; and the information deleting module is used for deleting the target processing information.
Referring to fig. 15, fig. 15 is a schematic structural diagram of a second data forwarding apparatus applied to a virtualized gateway deployed on a computing node according to an embodiment of the present invention, where the apparatus includes the following modules 1501 to 1502.
A message receiving module 1501, configured to receive a message to be forwarded, where the message is sent by a network card installed on the computing node;
a first message forwarding module 1502, configured to forward the message to be forwarded to a virtual machine corresponding to a destination address of the message to be forwarded, when receiving an instruction sent by the network card to directly forward the message to be forwarded.
In an embodiment of the present invention, the apparatus further includes: the mode determining module is used for determining the message processing mode of the message to be forwarded according to the message information of the message to be forwarded under the condition that the indication of directly forwarding the message to be forwarded sent by the network card is not received; the second message forwarding module is used for processing the message to be forwarded according to the determined message processing mode to obtain a second message and forwarding the second message to a virtual machine corresponding to a destination address of the second message; an information sending module, configured to send target processing information to the network card, so that the network card stores the target processing information, where the target processing information includes: and the corresponding relation between the message information of the message to be forwarded and the determined message processing mode.
In an embodiment of the present invention, the above-mentioned manner determining module is specifically configured to query, according to the message information of the message to be forwarded, a target table entry in a flow table, where the target table entry is matched with the message to be forwarded, and each table entry of the flow table is used to store a corresponding relationship between the message information of the message and a message processing manner; judging whether information associated with the virtual machine corresponding to the destination address of the message to be forwarded changes; if the message processing mode contained in the target table entry is not changed, determining the message processing mode contained in the target table entry as the message processing mode of the message to be forwarded; and if the message to be forwarded changes, determining the message processing mode of the message to be forwarded from the message processing mode table of each preset processing type according to the message information of the message to be forwarded.
In an embodiment of the present invention, the apparatus further includes: a quantity judgment module, configured to judge, before the information sending module, whether a message quantity of a received message is smaller than a preset message quantity within a target effective time, where the target effective time is: the effective time of the session period of the session to which the message to be forwarded belongs; if not, triggering the information sending module.
In an embodiment of the present invention, the apparatus further includes: the message judging module is used for judging whether the message to be forwarded is a message transmitted after the session to which the message belongs is successfully established in front of the information sending module; if yes, triggering the message judgment module.
In an embodiment of the present invention, the apparatus further includes: a first timeout setting module, configured to set a first timing clock of a network connection corresponding to a session to which the packet to be forwarded belongs to timeout when a first notification sent by the network card is received, where the first notification is sent when the network card monitors that a first time within a preset time period has not changed, and the first time indicates that: the number of times that the message processing information matched with the message to be forwarded is successfully matched within the preset time length is determined, and the first timing clock represents the time length of the network connection in the message receiving direction, wherein the message processing information is not received; and the first clock updating module is used for updating the first timing clock under the condition of receiving a second notice sent by the network card, wherein the second notice is sent by the network card when monitoring that the first time number changes within the preset time length.
In an embodiment of the present invention, the apparatus further includes: the quantity obtaining module is used for periodically obtaining a first message quantity and a second message quantity, wherein the first message quantity is as follows: the number of messages transmitted through the network connection corresponding to the session to which the message to be forwarded belongs, which is received before the first time, is as follows: the number of the messages transmitted through the network connection is received before the second moment, and a preset interval duration is arranged between the first moment and the second moment; a second timeout setting module, configured to set a first timing clock of a network connection corresponding to a session to which a packet to be forwarded belongs to be timeout when a difference between the first packet quantity and the second packet quantity is smaller than a preset difference threshold, where the first timing clock represents a duration during which the network connection does not receive the packet in a packet receiving direction; and the second clock updating module is used for updating the first timing clock under the condition that the difference between the first message quantity and the second message quantity is greater than or equal to a preset difference threshold value.
In an embodiment of the present invention, the second clock updating module is specifically configured to determine, from a clock chain table corresponding to a target thread, a target clock chain table corresponding to the type of the network connection, where the target thread is a thread for maintaining the network connection, and a chain table node in the clock chain table is: representing a timing clock for the network connection maintained by the target thread to the message receiving or sending direction for not transmitting the message; and searching a target clock corresponding to the message receiving direction connected with the network in the target timing clock linked list, updating the target clock, and transferring the target clock to the chain tail of the target timing clock linked list.
In an embodiment of the present invention, the apparatus further includes: and the instruction sending module is used for sending a deleting instruction aiming at the target processing information to the network card under the condition that the timing clocks of the network connection corresponding to the session to which the message to be forwarded belongs in the message receiving direction and the message sending direction are both overtime, so that the network card deletes the target processing information.
Referring to fig. 16, fig. 16 is a schematic structural diagram of a third packet forwarding device provided in the embodiment of the present invention, which is applied to a virtualized gateway deployed on a computing node, and the device includes the following modules 1601 and 1605.
A message receiving module 1601, configured to receive a message to be forwarded, where the message is sent by a virtual machine deployed on the computing node;
a message sending module 1602, configured to send the to-be-forwarded message to a network card installed on the computing node, so that the network card forwards the processed message after successfully processing the to-be-forwarded message;
a mode determining module 1603, configured to determine a message processing mode of the message to be forwarded according to message information of the message to be forwarded, when the network card does not successfully process the message to be forwarded;
the message processing module 1604, configured to process the message to be forwarded according to the message processing manner to obtain a first message;
an information sending module 1605, configured to forward the first packet according to the destination address of the first packet, and send target processing information to the network card, so that the network card stores the target processing information, where the target processing information includes: and the corresponding relation between the message information of the message to be forwarded and the determined message processing mode.
In an embodiment of the present invention, the mode determination module includes: and the table item query submodule is used for querying a target table item matched with the message to be forwarded in the flow table according to the message information of the message to be forwarded. And the information judgment submodule is used for judging whether the information related to the virtual machine corresponding to the destination address of the message to be forwarded changes. And if the change does not occur, triggering the first mode determination submodule, and if the change occurs, triggering the second mode determination submodule. And the first mode determining submodule is used for determining a message processing mode contained in a target table item as the message processing mode of the message to be forwarded. And the second mode determining submodule is used for determining the message processing mode of the message to be forwarded from the message processing mode table of each preset processing type according to the message information of the message to be forwarded.
In an embodiment of the present invention, the apparatus further includes: the quantity judging module is used for judging whether the message quantity of the received messages in the target effective time is less than the preset message quantity before the information sending module, and if not, the information sending module is triggered. The target effective time is as follows: the effective time of the session period of the session to which the message to be forwarded belongs.
In an embodiment of the present invention, the apparatus further includes: the message judging module is used for judging whether the message to be forwarded is a message transmitted after the session to which the message belongs is successfully established before the information sending module; if yes, triggering the message judgment module.
In an embodiment of the present invention, the apparatus further includes: and the first timeout setting module is used for setting the second timing clock of the network connection corresponding to the session to which the message to be forwarded belongs to be timeout under the condition of receiving the third notification sent by the network card. The third notification is that the second times that the network card monitors that the message processing information matched with the message to be forwarded is successfully matched within the preset time length is sent unchanged. The second timing clock represents the duration of the network connection in the message sending direction during which the message is not received.
In an embodiment of the present invention, the apparatus further includes: and the first clock updating module is used for updating the second timing clock under the condition of receiving a fourth notice sent by the network card. The fourth notification is sent when the network card detects that the second number changes.
In an embodiment of the present invention, the apparatus further includes: the quantity obtaining module is used for periodically obtaining the quantity of the third message and the quantity of the fourth message; the second timeout setting module is used for setting the second timing clock of the network connection corresponding to the session to which the message to be forwarded belongs to be timeout when the difference between the third message quantity and the fourth message quantity is smaller than the preset difference threshold; and the second clock updating module is used for updating the second timing clock under the condition that the difference between the third message quantity and the fourth message quantity is greater than or equal to a preset difference threshold value. The second timing clock represents the duration of the network connection in the message sending direction during which the message is not received; the third message quantity is: the number of messages which are received before the first moment and are transmitted through the network connection corresponding to the session to which the message to be forwarded belongs. The fourth message number is: the number of messages transmitted over the network connection received before the second time. And a preset interval duration is arranged between the first time and the second time.
In an embodiment of the present invention, the first clock updating module or the second clock updating module is specifically configured to determine a target time clock linked list corresponding to the type of the network connection from a time clock linked list corresponding to a target thread; and searching a target clock corresponding to the message receiving direction connected with the network in the target timing clock linked list, updating the target clock, and transferring the target clock to the tail of the target timing clock linked list. The target thread is a thread for maintaining network connection. The link nodes in the timing clock linked list are: and the network maintained by the representation target thread is connected with a timing clock for the time length of the message which is not transmitted in the message receiving or sending direction.
In one embodiment of the present invention, the apparatus further comprises: and the instruction sending module is used for sending a deleting instruction aiming at the target processing information to the network card under the condition that the timing clocks of the network connection corresponding to the session to which the message to be forwarded belongs in the message receiving direction and the message sending direction are both overtime so that the network card deletes the target processing information.
Referring to fig. 17, fig. 17 is a schematic structural diagram of a computing node according to an embodiment of the present invention, including a processor 1701, a communication interface 1702, a memory 1703 and a communication bus 1704, where the processor 1701, the communication interface 1702 and the memory 1703 communicate with each other through the communication bus 1704,
a memory 1703 for storing a computer program;
the processor 1701 is configured to implement the message forwarding method provided in the embodiment of the present invention when executing the program stored in the memory 1703.
The communication bus mentioned in the above computing node may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the computing node and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment provided by the present invention, a computer-readable storage medium is further provided, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the message forwarding method provided in the embodiment of the present invention.
In another embodiment provided by the present invention, a computer program product containing instructions is also provided, which when executed on a computer, causes the computer to implement the message forwarding method provided by the embodiment of the present invention when executed.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus, the computing node, and the computer-readable storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some parts of the description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (24)

1. A message forwarding method is applied to a network card installed on a computing node, and the method comprises the following steps:
receiving a message to be forwarded;
judging whether target processing information matched with the message to be forwarded exists in the message processing information stored by the network card according to the message information of the message to be forwarded, wherein each message processing information comprises: the corresponding relation between the message information and the message processing mode;
if so, processing the message to be forwarded according to a message processing mode included in the target processing information to obtain a first message, and forwarding the first message according to a destination address of the first message.
2. The method of claim 1, wherein forwarding the first packet according to the destination address of the first packet comprises:
and if the destination address of the first message corresponds to the virtual machine deployed in the computing node, sending the first message to a virtualization gateway deployed on the computing node, and indicating the virtualization gateway to directly forward the first message to the virtual machine corresponding to the destination address of the first message.
3. The method according to claim 1, wherein when the target processing information does not exist in the message processing information stored in the network card, the method further comprises:
if the destination address of the message to be forwarded corresponds to a virtual machine deployed in the computing node, sending the message to be forwarded to the virtualized gateway, and instructing the virtualized gateway to process the message to be forwarded and forward the processed message;
or
If the source address of the message to be forwarded corresponds to the virtual machine deployed in the computing node, indicating the virtualization gateway to process the message to be forwarded and forward the processed message;
and receiving the target processing information sent by the virtualization gateway and storing the target processing information.
4. The method according to claim 1, wherein before said determining whether there is target processing information matching the message to be forwarded in the message processing information stored in the network card according to the message information of the message to be forwarded, further comprising:
judging whether the number of received messages in the target effective time is less than the preset message number, wherein the target effective time is as follows: the effective time of the session period of the session to which the message to be forwarded belongs;
if so, and the destination address of the message to be forwarded corresponds to a virtual machine deployed in the computing node, sending the message to be forwarded to the virtualized gateway, and instructing the virtualized gateway to process the message to be forwarded and forward the processed message;
if not, the step of judging whether target processing information matched with the message to be forwarded exists in the message processing information stored by the network card according to the message information of the message to be forwarded is executed.
5. The method according to claim 1 or 4, wherein before the determining whether the message processing information stored in the network card has the target processing information matched with the message to be forwarded according to the message information of the message to be forwarded, the method further comprises:
judging whether the number of received messages in the target effective time is less than the preset message number, wherein the target effective time is as follows: the effective time of the session period of the session to which the message to be forwarded belongs;
if so, and the source address of the message to be forwarded corresponds to the virtual machine deployed in the computing node, instructing the virtualized gateway to process the message to be forwarded and forward the processed message;
if not, the step of judging whether target processing information matched with the message to be forwarded exists in the message processing information stored by the network card according to the message information of the message to be forwarded is executed.
6. The method according to claim 1, wherein before said determining whether there is target processing information matching the message to be forwarded in the message processing information stored in the network card according to the message information of the message to be forwarded, further comprising:
judging whether the message to be forwarded is a message transmitted after the session to which the message belongs is successfully established in network connection;
if not, and the destination address of the message to be forwarded corresponds to a virtual machine deployed in the computing node, sending the message to be forwarded to the virtualized gateway, and instructing the virtualized gateway to process the message to be forwarded and forward the processed message;
if so, executing the step of judging whether target processing information matched with the message to be forwarded exists in the message processing information stored by the network card according to the message information of the message to be forwarded.
7. The method according to claim 1 or 5, wherein before the determining whether the message processing information stored in the network card has the target processing information matched with the message to be forwarded according to the message information of the message to be forwarded, the method further comprises:
judging whether the message to be forwarded is a message transmitted after the session to which the message belongs is successfully established in network connection;
if not, and the source address of the message to be forwarded corresponds to the virtual machine deployed in the computing node, indicating the virtualization gateway to process the message to be forwarded and forward the processed message;
if so, executing the step of judging whether target processing information matched with the message to be forwarded exists in the message processing information stored by the network card according to the message information of the message to be forwarded.
8. The method according to any one of claims 1-4, further comprising:
monitoring a first time of successful matching of the target processing information within a preset time length;
if the first times are not changed within the preset time length, informing the virtualization gateway that a first timing clock of a network connection corresponding to a session to which the message to be forwarded belongs is set to be overtime, wherein the first timing clock represents the time length of the network connection in which the message is not received in the message direction corresponding to the target processing information;
and if the first time number changes within the preset time length, informing the virtualization gateway to update the first timing clock.
9. The method according to any one of claims 1-4, further comprising:
receiving a deletion instruction aiming at the target processing information sent by the virtualization gateway after the deletion condition is met, wherein the deletion condition is as follows: the timing clocks of the network connection corresponding to the session to which the message to be forwarded belongs in the message receiving direction and the message sending direction are both overtime;
and deleting the target processing information.
10. A data forwarding method is applied to a virtualized gateway deployed on a computing node, and the method comprises the following steps:
receiving a message to be forwarded sent by a network card installed on the computing node;
and under the condition of receiving an instruction of directly forwarding the message to be forwarded, which is sent by the network card, forwarding the message to be forwarded to a virtual machine corresponding to the destination address of the message to be forwarded.
11. The method according to claim 10, wherein in case of not receiving an indication sent by the network card to directly forward the message to be forwarded, the method further comprises:
determining a message processing mode of the message to be forwarded according to the message information of the message to be forwarded;
processing the message to be forwarded according to the determined message processing mode to obtain a first message, and forwarding the first message to a virtual machine corresponding to a destination address of the first message;
sending target processing information to the network card to enable the network card to store the target processing information, wherein the target processing information comprises: and the corresponding relation between the message information of the message to be forwarded and the determined message processing mode.
12. The method according to claim 11, wherein the determining a packet processing manner of the packet to be forwarded according to the packet information of the packet to be forwarded includes:
inquiring a target table item matched with the message to be forwarded in a flow table according to the message information of the message to be forwarded, wherein each table item of the flow table is used for storing the corresponding relation between the message information of the message and a message processing mode;
judging whether information associated with the virtual machine corresponding to the destination address of the message to be forwarded changes;
if the message processing mode contained in the target table entry is not changed, determining the message processing mode contained in the target table entry as the message processing mode of the message to be forwarded;
and if the message to be forwarded changes, determining the message processing mode of the message to be forwarded from the message processing mode table of each preset processing type according to the message information of the message to be forwarded.
13. The method of claim 11, further comprising, prior to said sending target processing information to said network card:
judging whether the message quantity of the received messages is smaller than a preset message quantity within a target effective time, wherein the target effective time is as follows: the effective time of the session period of the session to which the message to be forwarded belongs;
and if not, executing the step of sending the target processing information to the network card.
14. The method of claim 11, further comprising, prior to said sending target processing information to said network card:
judging whether the message to be forwarded is a message transmitted after the session to which the message belongs is successfully established in network connection;
if so, executing the step of sending the target processing information to the network card.
15. The method according to any one of claims 10-14, further comprising:
setting a first timing clock of a network connection corresponding to a session to which the message to be forwarded belongs to be overtime under the condition that a first notification sent by the network card is received, wherein the first notification is sent by the network card when monitoring that a first time within a preset time length is unchanged, and the first time indicates that: the number of times that the message processing information matched with the message to be forwarded is successfully matched within the preset time length is determined, and the first timing clock represents the time length of the network connection in the message receiving direction, wherein the message processing information is not received;
and under the condition of receiving a second notice sent by the network card, updating the first timing clock, wherein the second notice is sent by the network card when the network card monitors that the first time number changes within the preset time length.
16. The method according to any one of claims 10-14, further comprising:
periodically obtaining a first message quantity and a second message quantity, wherein the first message quantity is as follows: the number of messages transmitted through the network connection corresponding to the session to which the message to be forwarded belongs, which is received before the first time, is as follows: the number of the messages transmitted through the network connection is received before the second moment, and a preset interval duration is arranged between the first moment and the second moment;
setting a first timing clock of a network connection corresponding to a session to which a message to be forwarded belongs to be overtime under the condition that the difference between the first message quantity and the second message quantity is smaller than a preset difference threshold value, wherein the first timing clock represents the duration of the network connection in the message receiving direction during which the message is not received;
and updating the first timing clock under the condition that the difference between the first message quantity and the second message quantity is greater than or equal to a preset difference threshold value.
17. The method of claim 15 or 16, wherein said updating the first timing clock comprises:
determining a target time clock linked list corresponding to the type of the network connection from a time clock linked list corresponding to a target thread, wherein the target thread is a thread for maintaining the network connection, and linked list nodes in the time clock linked list are as follows: representing a timing clock for the network connection maintained by the target thread to the message receiving or sending direction for not transmitting the message;
and searching a target clock corresponding to the message receiving direction connected with the network in the target timing clock linked list, updating the target clock, and transferring the target clock to the chain tail of the target timing clock linked list.
18. The method according to any one of claims 10-14, further comprising:
and sending a deleting instruction aiming at the target processing information to the network card under the condition that the timing clocks of the network connection corresponding to the session to which the message to be forwarded belongs in the message receiving direction and the message sending direction are both overtime, so that the network card deletes the target processing information.
19. A message forwarding method is applied to a virtualized gateway deployed on a computing node, and the method comprises the following steps:
receiving a message to be forwarded sent by a virtual machine deployed on the computing node;
sending the message to be forwarded to a network card installed on the computing node, so that the network card forwards the processed message after successfully processing the message to be forwarded;
under the condition that the network card does not successfully process the message to be forwarded, determining a message processing mode of the message to be forwarded according to message information of the message to be forwarded;
processing the message to be forwarded according to the message processing mode to obtain a first message;
forwarding the first message according to the destination address of the first message, and sending target processing information to the network card, so that the network card stores the target processing information, wherein the target processing information includes: and the corresponding relation between the message information of the message to be forwarded and the determined message processing mode.
20. A message forwarding device is applied to a network card installed on a computing node, and the device comprises:
the message receiving module is used for receiving a message to be forwarded;
an information determining module, configured to determine, according to the packet information of the packet to be forwarded, whether target processing information matched with the packet to be forwarded exists in the packet processing information stored in the network card, where each packet processing information includes: the corresponding relation between the message information and the message processing mode; if yes, triggering a message forwarding module;
and the message forwarding module is used for processing the message to be forwarded according to a message processing mode included in the target processing information to obtain a first message, and forwarding the first message according to a destination address of the first message.
21. A data forwarding apparatus applied to a virtualized gateway deployed on a computing node, the apparatus comprising:
the message receiving module is used for receiving a message to be forwarded, which is sent by a network card installed on the computing node;
and the first message forwarding module is used for forwarding the message to be forwarded to the virtual machine corresponding to the destination address of the message to be forwarded under the condition of receiving the instruction of directly forwarding the message to be forwarded, which is sent by the network card.
22. A packet forwarding apparatus, applied to a virtualized gateway deployed on a computing node, the apparatus comprising:
the message receiving module is used for receiving a message to be forwarded, which is sent by a virtual machine deployed on the computing node;
the message sending module is used for sending the message to be forwarded to a network card installed on the computing node so that the network card can forward the processed message after successfully processing the message to be forwarded;
the mode determining module is used for determining the message processing mode of the message to be forwarded according to the message information of the message to be forwarded under the condition that the network card does not successfully process the message to be forwarded;
the message processing module is used for processing the message to be forwarded according to the message processing mode to obtain a first message;
an information sending module, configured to forward the first packet according to a destination address of the first packet, and send target processing information to the network card, so that the network card stores the target processing information, where the target processing information includes: and the corresponding relation between the message information of the message to be forwarded and the determined message processing mode.
23. A computing node is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are communicated with each other through the communication bus by the memory;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-9, 10-18, 19 when executing a program stored in a memory.
24. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 9, 10 to 18, 19.
CN202110319656.XA 2021-03-25 2021-03-25 Message forwarding method and device Active CN113098774B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110319656.XA CN113098774B (en) 2021-03-25 2021-03-25 Message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110319656.XA CN113098774B (en) 2021-03-25 2021-03-25 Message forwarding method and device

Publications (2)

Publication Number Publication Date
CN113098774A true CN113098774A (en) 2021-07-09
CN113098774B CN113098774B (en) 2023-01-03

Family

ID=76669500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110319656.XA Active CN113098774B (en) 2021-03-25 2021-03-25 Message forwarding method and device

Country Status (1)

Country Link
CN (1) CN113098774B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039707A (en) * 2021-11-09 2022-02-11 中国人民解放军国防科技大学 Message transmission timeout processing method based on SRv6 programmable network
CN116192741A (en) * 2023-04-27 2023-05-30 顺霆科技(无锡)有限公司 Data transmission method based on ad hoc network
WO2023193432A1 (en) * 2022-04-06 2023-10-12 华为云计算技术有限公司 Data forwarding method and related device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102480420A (en) * 2010-11-29 2012-05-30 北京系统工程研究所 Message sending method as well as message receiving method, device and system
CN102801729A (en) * 2012-08-13 2012-11-28 福建星网锐捷网络有限公司 Virtual machine message forwarding method, network switching equipment and communication system
CN107026784A (en) * 2017-06-13 2017-08-08 电子科技大学 A kind of remote dummy private network gateway apparatus and implementation method
CN107360096A (en) * 2017-08-14 2017-11-17 北京优帆科技有限公司 A kind of retransmission method and system of VXLAN messages
US20180181425A1 (en) * 2016-12-27 2018-06-28 Tmax Cloud Co., Ltd. Method and apparatus for handling network i/o device virtualization
CN109039746A (en) * 2018-08-07 2018-12-18 新华三技术有限公司 Detect the method and processor of two-way converting path detection session status

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102480420A (en) * 2010-11-29 2012-05-30 北京系统工程研究所 Message sending method as well as message receiving method, device and system
CN102801729A (en) * 2012-08-13 2012-11-28 福建星网锐捷网络有限公司 Virtual machine message forwarding method, network switching equipment and communication system
US20180181425A1 (en) * 2016-12-27 2018-06-28 Tmax Cloud Co., Ltd. Method and apparatus for handling network i/o device virtualization
CN107026784A (en) * 2017-06-13 2017-08-08 电子科技大学 A kind of remote dummy private network gateway apparatus and implementation method
CN107360096A (en) * 2017-08-14 2017-11-17 北京优帆科技有限公司 A kind of retransmission method and system of VXLAN messages
CN109039746A (en) * 2018-08-07 2018-12-18 新华三技术有限公司 Detect the method and processor of two-way converting path detection session status

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039707A (en) * 2021-11-09 2022-02-11 中国人民解放军国防科技大学 Message transmission timeout processing method based on SRv6 programmable network
CN114039707B (en) * 2021-11-09 2023-11-07 中国人民解放军国防科技大学 Message transmission timeout processing method based on SRv6 programmable network
WO2023193432A1 (en) * 2022-04-06 2023-10-12 华为云计算技术有限公司 Data forwarding method and related device
CN116192741A (en) * 2023-04-27 2023-05-30 顺霆科技(无锡)有限公司 Data transmission method based on ad hoc network

Also Published As

Publication number Publication date
CN113098774B (en) 2023-01-03

Similar Documents

Publication Publication Date Title
CN113098774B (en) Message forwarding method and device
US9614930B2 (en) Virtual machine mobility using OpenFlow
WO2018210117A1 (en) Congestion control method, network device, and network interface controller thereof
WO2020001393A1 (en) Method and network node for sending network performance parameter and calculating network performance
Turkovic et al. Fast network congestion detection and avoidance using P4
JP6564937B2 (en) Method and apparatus for pushing data in a content-oriented networking (CCN) network
US10044641B2 (en) Data packet processing in SDN
WO2019134383A1 (en) Method for controlling network congestion, access device, and computer readable storage medium
US8493859B2 (en) Method and apparatus for adaptive bandwidth control with a bandwidth guarantee
WO2023005773A1 (en) Message forwarding method and apparatus based on remote direct data storage, and network card and device
US10250496B2 (en) Router based maximum transmission unit and data frame optimization for virtualized environments
US20090070481A1 (en) Method and Apparatus for an Improved Bulk Read Socket Call
JP6595698B2 (en) Realization of cloud platform security
US20160088578A1 (en) Link layer discovery protocol (lldp) on multiple nodes of a distributed fabric
EP3070910B1 (en) Pending interest table behavior
US9426246B2 (en) Method and apparatus for providing caching service in network infrastructure
CN113992588A (en) Data transmission method and device, electronic equipment and readable storage medium
JP2016515361A (en) Network transmission coordination based on transmission metadata provided by the application
US10608889B2 (en) High-level interface to analytics engine
US10659351B2 (en) Dataflow consistency verification
WO2017071430A1 (en) Message processing method, network card, system, information update method, and server
EP3136251B1 (en) Flit transmission method and device of network on chip
WO2016183732A1 (en) Data packet forwarding method and network device
Anju et al. Enhancement of flow in sdn by embedded cache
US11811643B2 (en) System and method for managing computing resources

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