WO2019144777A1 - Packet forwarding method and apparatus, server, and storage medium - Google Patents

Packet forwarding method and apparatus, server, and storage medium Download PDF

Info

Publication number
WO2019144777A1
WO2019144777A1 PCT/CN2018/125951 CN2018125951W WO2019144777A1 WO 2019144777 A1 WO2019144777 A1 WO 2019144777A1 CN 2018125951 W CN2018125951 W CN 2018125951W WO 2019144777 A1 WO2019144777 A1 WO 2019144777A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual switch
initialization
result data
memory
data
Prior art date
Application number
PCT/CN2018/125951
Other languages
French (fr)
Chinese (zh)
Inventor
李光伟
董玢
Original Assignee
北京金山云网络技术有限公司
北京金山云科技有限公司
北京金迅瑞博网络技术有限公司
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 北京金山云网络技术有限公司, 北京金山云科技有限公司, 北京金迅瑞博网络技术有限公司 filed Critical 北京金山云网络技术有限公司
Publication of WO2019144777A1 publication Critical patent/WO2019144777A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/354Switches specially adapted for specific applications for supporting virtual local area networks [VLAN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • H04L49/557Error correction, e.g. fault recovery or fault tolerance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9063Intermediate storage in different physical parts of a node or terminal
    • H04L49/9078Intermediate storage in different physical parts of a node or terminal using an external memory or storage device

Abstract

The embodiments of the present application provide a packet forwarding method and apparatus based on a virtual switch, a server, and a storage medium. The method comprises: initializing a virtual switch in a first process to obtain initialization result data, and caching the initialization result data in a memory; forwarding a received packet by means of the initialized virtual switch by using the initialization result data in a second process; recreating the second process and obtaining the initialization result data from the memory when an exception occurs in the second process; and forwarding the received packet by means of the initialized virtual switch by using the obtained initialization result data in the recreated second process. Therefore, time consumption due to the reinitialization of the virtual switch is avoided, so that the virtual switch can resume a packet forwarding service as soon as possible, and the packet forwarding efficiency is improved.

Description

报文转发方法、转发装置、服务器及存储介质Message forwarding method, forwarding device, server and storage medium
本申请要求于2018年01月24日提交中国专利局、申请号为201810069233.5发明名称为“报文转发方法、转发装置、服务器及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese Patent Application No. 201810069233.5, entitled "Message Forwarding Method, Forwarding Device, Server and Storage Media", filed on January 24, 2018, the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本申请涉及虚拟交换机技术领域,特别是涉及一种基于虚拟交换机的报文转发方法、转发装置、服务器及存储介质。The present application relates to the field of virtual switch technologies, and in particular, to a packet forwarding method, a forwarding device, a server, and a storage medium based on a virtual switch.
背景技术Background technique
虚拟交换机是一种通过软件模拟物理交换机功能的交换机。虚拟交换机用于连接不同虚拟机之间的虚拟网络接口,实现虚拟机间的数据交换。现有的虚拟交换机,通常基于DPDK(Data Plane Development Kit,数据平面开发套件)开发。DPDK能够在虚拟交换机的开发过程中,提供用于数据包快速处理的函数库和驱动。A virtual switch is a switch that emulates the functionality of a physical switch through software. A virtual switch is used to connect virtual network interfaces between different virtual machines to implement data exchange between virtual machines. Existing virtual switches are usually developed based on the DPDK (Data Plane Development Kit). The DPDK provides libraries and drivers for fast packet processing during the development of virtual switches.
现有的计算机在运行基于DPDK开发的虚拟交换机时,通常是在一个进程中先进行虚拟机初始化,再在该进程中进行报文的转发。其具体过程为:计算机启动操作系统后,在操作系统中建立运行虚拟交换机的进程,首先在该进程中进行大页内存初始化及虚拟交换机网卡驱动初始化,得到大页内存数据和网卡驱动数据,然后在该进程中通过已初始化的虚拟交换机,使用上述大页内存数据和网卡驱动数据,转发接收的报文。When an existing computer runs a virtual switch based on the DPDK development, the virtual machine is usually initialized in a process, and then the packet is forwarded in the process. The specific process is as follows: after the computer starts the operating system, the process of running the virtual switch is established in the operating system, firstly, the large page memory initialization and the virtual switch network card driver initialization are performed in the process, and the large page memory data and the network card driver data are obtained, and then In the process, the initialized virtual switch uses the large page memory data and the network card drive data to forward the received message.
有时由于转发报文出现异常,致使上述进程状态异常(例如进程停止响应),则需要重新启动上述进程。在重新启动上述进程时,操作系统需重新进行大页内存初始化及网卡驱动初始化,待初始化完成后,才能继续转发报文,而重新进行大页内存初始化及网卡驱动初始化花费较长等待时间,导致报文转发效率低。Sometimes, due to an abnormality in the forwarding of the packet, the process is abnormal (for example, the process stops responding), and the process needs to be restarted. When restarting the above process, the operating system needs to re-execute the large page memory initialization and the network card driver initialization. After the initialization is completed, the message can be forwarded again, and the large page memory initialization and the network card driver initialization take longer to wait, resulting in a long waiting time. Packet forwarding efficiency is low.
发明内容Summary of the invention
本申请实施例的目的在于提供一种基于虚拟交换机的报文转发方法、转发装置、服务器及存储介质,以实现提高虚拟交换机的报文转发效率。具体技术方案如下:The purpose of the embodiment of the present application is to provide a packet forwarding method, a forwarding device, a server, and a storage medium based on a virtual switch, so as to improve packet forwarding efficiency of the virtual switch. The specific technical solutions are as follows:
第一方面,本申请实施例提供了一种基于虚拟交换机的报文转发方法,包括:In a first aspect, the embodiment of the present application provides a packet forwarding method based on a virtual switch, including:
在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将所述初始化结果数据缓存至内存中;Initializing the virtual switch in the first process, obtaining initialization result data, and buffering the initialization result data into the memory;
在第二进程中,通过已初始化的虚拟交换机使用所述初始化结果数据转发接收的报文;In the second process, the received message is forwarded by the initialized virtual switch by using the initialization result data;
当所述第二进程发生异常时,重新创建第二进程,并从内存中获取所述初始化结果数据;When an abnormality occurs in the second process, re-creating the second process, and acquiring the initialization result data from the memory;
在重新创建的第二进程中,通过已初始化的虚拟交换机使用获取的所述初始化结果数据转发接收的报文。In the second process of re-creation, the received message is forwarded by the initialized virtual switch using the obtained initialization result data.
第二方面,本申请实施例提供了一种基于虚拟交换机的报文转发装置,包括:In a second aspect, the embodiment of the present application provides a packet forwarding device based on a virtual switch, including:
初始化模块,用于在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将所述初始化结果数据缓存至内存中;An initialization module, configured to perform initialization of the virtual switch in the first process, obtain initialization result data, and cache the initialization result data into the memory;
转发模块,用于在第二进程中,通过已初始化的虚拟交换机使用所述初始化结果数据转发接收的报文;a forwarding module, configured to forward, by using the initialization result data, the received packet by the initialized virtual switch in the second process;
所述创建模块,还用于当所述第二进程发生异常时,重新创建第二进程,并从内存中获取所述初始化结果数据;The creating module is further configured to: when the second process is abnormal, re-create the second process, and obtain the initialization result data from the memory;
所述转发模块,还用于在重新创建的第二进程中,通过已初始化的虚拟交换机使用获取的所述初始化结果数据转发接收的报文。The forwarding module is further configured to forward the received packet by using the obtained initialization result data by the initialized virtual switch in the second process of re-creation.
第三方面,本申请实施例提供了一种服务器,包括处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令,所述处理器执行所述机器可执行指令时,实现上述提供的基于虚拟交换机的报文转发方法步骤。In a third aspect, an embodiment of the present application provides a server, including a processor and a machine readable storage medium, where the machine readable storage medium stores machine executable instructions executable by the processor, the processor When the machine executable instructions are executed, the virtual switch-based message forwarding method steps provided above are implemented.
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述提供的基于虚拟交换机的报文转发方法步骤。In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores a computer program, where the computer program is executed by a processor to implement the virtual switch-based message provided above. Forward method steps.
第五方面,本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述提供的基于虚拟交换机的报文转发方法。In a fifth aspect, the embodiment of the present application further provides a computer program product comprising instructions, when executed on a computer, causing a computer to execute the virtual switch-based message forwarding method provided above.
第六方面,本申请实施例还提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述提供的基于虚拟交换机的报文转发方法。In a sixth aspect, the embodiment of the present application further provides a computer program, when running on a computer, causing the computer to execute the virtual switch-based message forwarding method provided above.
由上述的技术方案可见,本申请实施例提供的一种基于虚拟交换机的报文转发方法、转发装置、服务器及存储介质,通过在第一进程中进行虚拟交换机的初始化并将初始化结果数据缓存至内存中,虚拟交换机能够在第二进程中使用初始化结果数据转发接收的报文,即使第二进程发生异常,重新创建第二进程后,虚拟交换机也能够直接使用所获取的初始化结果数据继续进行报文的转发。由于不需要在第二进程再进行初始化操作,相比于现有技术而言,本申请能够消除因重新进行虚拟交换机的初始化而耗费的时间,使虚拟交换机尽快恢复报文转发业务,从而提高报文转发效率。当然,实施本申请的任一产品或方法并不一定需要同时达到以上所述的所有优点。It can be seen from the foregoing technical solution that the virtual switch-based packet forwarding method, the forwarding device, the server, and the storage medium provided by the embodiment of the present application are configured to initialize the virtual switch and cache the initialization result data in the first process. In the memory, the virtual switch can forward the received packet in the second process by using the initialization result data. Even if the second process is abnormal, after the second process is re-created, the virtual switch can directly use the obtained initialization result data to continue reporting. Forwarding of the text. The present invention can eliminate the time taken for re-initializing the virtual switch, so that the virtual switch can resume the packet forwarding service as soon as possible, thereby improving the report. Text forwarding efficiency. Of course, implementing any of the products or methods of the present application does not necessarily require that all of the advantages described above be achieved at the same time.
附图说明DRAWINGS
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application and the technical solutions of the prior art, the following description of the embodiments and the drawings used in the prior art will be briefly introduced. Obviously, the drawings in the following description are only Some embodiments of the application may also be used to obtain other figures from those of ordinary skill in the art without departing from the scope of the invention.
图1为本申请实施例提供的基于虚拟交换机的报文转发方法的一种流程示意图;FIG. 1 is a schematic flowchart of a method for forwarding a packet based on a virtual switch according to an embodiment of the present disclosure;
图2为本申请实施例提供的基于虚拟交换机的报文转发方法中,第一进程和第二进程间信息传输的流程示意图;2 is a schematic flowchart of information transmission between a first process and a second process in a packet forwarding method based on a virtual switch according to an embodiment of the present disclosure;
图3为本申请实施例提供的基于虚拟交换机的报文转发方法的另一种流程示意图;FIG. 3 is another schematic flowchart of a method for forwarding a packet based on a virtual switch according to an embodiment of the present disclosure;
图4为本申请实施例提供的基于虚拟交换机的报文转发方法中,检测第二进程是否处于正常状态的流程示意图;4 is a schematic flowchart of detecting whether a second process is in a normal state in a packet forwarding method based on a virtual switch according to an embodiment of the present disclosure;
图5为本申请实施例提供的基于虚拟交换机的报文转发装置的结构示意 图;FIG. 5 is a schematic structural diagram of a packet forwarding device based on a virtual switch according to an embodiment of the present disclosure;
图6为本申请实施例提供的基于虚拟交换机的报文转发装置的另一种结构示意图;FIG. 6 is another schematic structural diagram of a virtual switch-based packet forwarding apparatus according to an embodiment of the present disclosure;
图7为本申请实施例提供的基于虚拟交换机的报文转发装置中,检测模块的结构示意图;FIG. 7 is a schematic structural diagram of a detection module in a packet forwarding device based on a virtual switch according to an embodiment of the present disclosure;
图8为本申请实施例提供的一种服务器的结构示意图。FIG. 8 is a schematic structural diagram of a server according to an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings. It is apparent that the described embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
现有的虚拟交换机通常基于DPDK(Data Plane Development Kit,数据平面开发套件)开发。DPDK由6WIND、Intel等多家公司开发,主要基于Linux系统运行,用于快速数据包处理的函数库与驱动集合,可以极大提高数据处理性能和吞吐量,提高数据平面应用程序的工作效率。Existing virtual switches are usually developed based on the DPDK (Data Plane Development Kit). Developed by 6WIND, Intel and other companies, DPDK is mainly based on Linux system. It is used for fast packet processing function library and driver set, which can greatly improve data processing performance and throughput, and improve the efficiency of data plane application.
其优势主要包括:通过大页减少缓存失效,利用内核旁路技术,将网卡直接映射到用户态,使数据包路径不需要经过复杂的协议栈处理等。The advantages include: reducing cache failure through large pages, using kernel bypass technology to map the network card directly to the user state, so that the packet path does not need to be processed by a complex protocol stack.
同时,DPDK也有相应的不足制约虚拟交换机的性能发挥,例如,基于DPDK框架的虚拟交换机在启动时,由于需要进行大页内存的映射、大量配置加载、网卡驱动的初始化等过程,启动加载时间长。At the same time, the DPDK also has corresponding limitations to control the performance of the virtual switch. For example, when the virtual switch based on the DPDK framework starts up, it needs to perform large-page memory mapping, a large number of configuration loads, and initialization of the network card driver. .
并且,现有的服务器在运行基于DPDK开发的虚拟交换机时,通常是在一个进程中先进行虚拟机初始化,再在该进程中进行报文的转发。如果出现转发报文异常,致使上述进程状态异常(例如进程停止响应),则需要重新启动上述进程。在重新启动上述进程时,操作系统需重新进行大页内存初始化、大量配置加载、网卡驱动初始化等过程,待初始化完成后,才能继续转发报文。而重新进行大页内存初始化及网卡驱动初始化花费较长等待时间,导致报文转发效率低。Moreover, when an existing server runs a virtual switch developed based on the DPDK, the virtual machine is usually initialized in one process, and then the packet is forwarded in the process. If the forwarding packet is abnormal, causing the above process to be abnormal (for example, the process stops responding), you need to restart the above process. When the above process is restarted, the operating system needs to re-execute the process of initializing large page memory, loading a large number of configurations, and initializing the network card driver. After the initialization is complete, the device can continue to forward packets. The re-performation of large page memory initialization and NIC driver initialization takes a long wait time, resulting in low packet forwarding efficiency.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
方法实施例1Method embodiment 1
如图1所示,本申请实施例提供了一种基于虚拟交换机的报文转发方法,可以应用于服务器,当然也可以应用于其他类型的具有数据处理运算功能的设备,该过程可以包括以下步骤:As shown in FIG. 1 , the embodiment of the present application provides a packet forwarding method based on a virtual switch, which can be applied to a server, and can be applied to other types of devices with data processing operations. The process may include the following steps. :
S101,在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将初始化结果数据缓存至内存中。S101: Initialize the virtual switch in the first process, obtain initialization result data, and cache the initialization result data into the memory.
本申请实施例中,通过所创建的第一进程,可以在第一进程中进行虚拟交换机的初始化。容易理解的是,虚拟交换机在初始化过程中,需进行大页内存初始化、网卡驱动初始化等过程,耗费的时间多。基于上述考虑,不妨可以将虚拟交换机的在初始化过程单独放在一个进程中进行。In the embodiment of the present application, the initialization of the virtual switch may be performed in the first process by using the created first process. It is easy to understand that during the initialization process, the virtual switch needs to perform large page memory initialization, network card driver initialization, etc., which takes a lot of time. Based on the above considerations, it may be possible to separate the initialization process of the virtual switch in one process.
由于内存具有极高的数据读取/写入速度,因此,利用这一特点,可以将初始化后所得的初始化结果数据缓存至内存中。当服务器需要调用这些初始化结果数据时,可以快速地从内存中读取所缓存的数据。Since the memory has a very high data read/write speed, this initialization feature can be used to cache the initialization result data obtained after initialization into the memory. When the server needs to call these initialization result data, it can quickly read the cached data from memory.
进一步地,虚拟交换机的初始化可以包括大页内存初始化、网卡驱动初始化、网卡队列初始化等与虚拟交换机初始化相关的操作,从而可以得到大页内存数据、网卡驱动数据、网卡队列信息等数据。Further, the initialization of the virtual switch may include operations related to initialization of the virtual switch, such as large page memory initialization, network card driver initialization, and network card queue initialization, so that data such as large page memory data, network card driver data, and network card queue information may be obtained.
作为本申请实施例一种可选的实施方式,为了能够尽快完成虚拟交换机的初始化,可以在服务器操作系统启动的过程中创建第一进程,并在第一进程中进行虚拟交换机的初始化。待虚拟交换机初始化完毕并将初始化结果数据缓存至内存中后,服务器可以进入等待状态,随时等待调用命令调用所缓存的初始化结果数据。As an optional implementation manner of the embodiment of the present application, in order to complete the initialization of the virtual switch as soon as possible, the first process may be created in the process of starting the server operating system, and the virtual switch is initialized in the first process. After the virtual switch is initialized and the initialization result data is cached in the memory, the server can enter the waiting state and wait for the calling command to call the cached initialization result data.
通过上述在服务器操作系统启动的过程中创建第一进程,并在第一进程中进行虚拟交换机的初始化,可以使虚拟交换机的初始化在服务器启动时进行,而不是等待服务器进入操作系统的操作界面后才进行虚拟交换机的初始化,从而使虚拟交换机的初始化提前进行,有利于提升虚拟交换机的启动速度。By creating the first process in the process of starting the server operating system and initializing the virtual switch in the first process, the initialization of the virtual switch can be performed at the startup of the server, instead of waiting for the server to enter the operating interface of the operating system. The initialization of the virtual switch is performed, so that the initialization of the virtual switch is advanced, which is beneficial to improving the startup speed of the virtual switch.
S102,在第二进程中,通过已初始化的虚拟交换机使用初始化结果数据转发接收的报文。S102. In the second process, the received message is forwarded by using the initialization result data by the initialized virtual switch.
本申请实施例中,可以在操作系统中创建第二进程,其中,第二进程是不同于第一进程的一个进程,它们分别运行于服务器的操作系统中。在第二进程中,已初始化的虚拟交换机可以通过使用所缓存的初始化结果数据,实现转发接收的报文。In the embodiment of the present application, the second process may be created in the operating system, where the second process is a process different from the first process, and they are respectively run in the operating system of the server. In the second process, the initialized virtual switch can forward the received message by using the cached initialization result data.
具体地,所创建的第二进程可以与第一进程共享内存,从而获取内存中所缓存的初始化结果数据,例如大页内存数据、网卡驱动数据、网卡队列信息等数据。已初始化的虚拟交换机获取上述数据后,便可以在第二进程中进行报文的接收、报文的转发。Specifically, the created second process may share the memory with the first process, thereby acquiring initialization result data buffered in the memory, such as large page memory data, network card driver data, and network card queue information. After the initialized virtual switch obtains the above data, it can receive the packet and forward the packet in the second process.
本申请实施例中,在第一进程中可以只进行虚拟交换机的初始化,从而使第一进程功能简单,达到稳定运行的目的。在第二进程中可以只进行报文的接收与转发,即使第二进程发生异常,也不会影响第一进程。In the embodiment of the present application, only the initialization of the virtual switch may be performed in the first process, so that the function of the first process is simple and the purpose of stable operation is achieved. In the second process, only the receiving and forwarding of the packet can be performed, and even if the second process is abnormal, the first process is not affected.
S103,当第二进程发生异常时,重新创建第二进程,并从内存中获取初始化结果数据。S103. When an exception occurs in the second process, re-creating the second process and obtaining initialization result data from the memory.
在第二进程中,由于虚拟交换机转发报文出现异常,可能会致使上述第二进程状态异常,例如第二进程停止响应。此时需要通过创建模块重新创建第二进程,从而使虚拟交换机重新进行报文转发。In the second process, the second process is abnormal because the virtual switch forwards the packet. For example, the second process stops responding. In this case, you need to re-create the second process by creating a module, so that the virtual switch can re-transmit the packet.
本申请实施例在重新创建第二进程的过程中,由于第一进程已经进行了虚拟交换机的初始化,并将初始化结果数据缓存至内存中,因此第二进程不需要再进行上述初始化操作,而是可以直接从内存中获取所缓存的初始化结果数据,例如大页内存数据、网卡驱动数据、网卡队列信息等数据。不难看出,由于不需要在第二进程再进行上述初始化操作,相比于现有技术而言,本申请能够消除重新进行虚拟交换机的初始化而耗费的时间,使虚拟交换机尽快恢复报文转发业务。In the process of re-creating the second process, the first process has already initialized the virtual switch and caches the initialization result data into the memory, so the second process does not need to perform the above initialization operation, but The cached initialization result data, such as large page memory data, network card driver data, and network card queue information, can be obtained directly from the memory. It is not difficult to see that, as the above-mentioned initialization operation is not required to be performed in the second process, the present application can eliminate the time taken for re-initializing the virtual switch, and the virtual switch can resume the packet forwarding service as soon as possible. .
S104,在重新创建的第二进程中,通过已初始化的虚拟交换机使用获取的初始化结果数据转发接收的报文。S104. In the second process of re-creation, the received packet is forwarded by using the obtained initialization result data by the initialized virtual switch.
本申请实施例中,如前文所述,可以重新创建第二进程,并可以从内存 中获取初始化结果数据,服务器可以利用所获取的初始化结果数据。因此在重新创建的第二进程中,已初始化的虚拟交换机可以通过使用所获取的初始化结果数据,实现转发接收的报文。In the embodiment of the present application, as described above, the second process may be re-created, and the initialization result data may be obtained from the memory, and the server may utilize the obtained initialization result data. Therefore, in the second process of re-creation, the initialized virtual switch can forward the received packet by using the obtained initialization result data.
具体地例如,服务器重新创建的第二进程后,可以获取内存中所缓存大页内存数据、网卡驱动数据、网卡队列信息等数据。已初始化的虚拟交换机可以直接使用上述数据,在第二进程中进行报文的接收、报文的转发。Specifically, for example, after the second process re-created by the server, data such as large page memory data, network card driver data, and network card queue information cached in the memory may be acquired. The initialized virtual switch can directly use the above data to receive packets and forward packets in the second process.
作为本申请实施例一种可选的实施方式,在第一进程中进行虚拟交换机的初始化之前,可以创建第一进程。As an optional implementation manner of the embodiment of the present application, before the initialization of the virtual switch is performed in the first process, the first process may be created.
服务器中通常可以部署多台虚拟机,这些虚拟机之间可以通过虚拟交换机进行数据交换。具体来说,可以在服务器的进程中运行虚拟交换机服务,通过虚拟交换机连接各个虚拟机的虚拟网络接口(虚拟网卡的端口),利用虚拟交换机进行报文转发。Multiple virtual machines can usually be deployed in a server, and data exchange can be performed between these virtual machines through a virtual switch. Specifically, the virtual switch service can be run in the process of the server, and the virtual network interface (the port of the virtual network card) of each virtual machine is connected through the virtual switch, and the virtual switch is used for packet forwarding.
如前文所述,现有的虚拟交换机在运行时,通常是在一个进程中先进行虚拟机初始化,再在该进程中进行报文的转发。本申请实施例中,可以先创建一个进程,称之为第一进程,具体地,可以在Linux操作系统中创建第一进程。在Linux操作系统中创建进程的过程可以由现有的进程创建方法得到,在此不再赘述。As described above, when an existing virtual switch is running, the virtual machine is first initialized in a process, and then the packet is forwarded in the process. In the embodiment of the present application, a process may be created first, which is referred to as a first process. Specifically, a first process may be created in a Linux operating system. The process of creating a process in the Linux operating system can be obtained by an existing process creation method, and details are not described herein again.
作为本申请实施例一种可选的实施方式,可以在一台服务器中启动多台虚拟交换机进行报文转发。具体地,服务器可以创建一个第一进程,并在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将初始化结果数据缓存至内存中;可以创建多个第二进程,多个第二进程各自对应一台虚拟交换机,且在各第二进程中,对应的虚拟交换机均可以通过第一进程得到的初始化结果数据转发接收的报文。As an optional implementation manner of the embodiment of the present application, multiple virtual switches can be started in one server for packet forwarding. Specifically, the server may create a first process, perform initialization of the virtual switch in the first process, obtain initialization result data, and cache the initialization result data into the memory; may create multiple second processes, multiple second Each of the processes corresponds to a virtual switch, and in each of the second processes, the corresponding virtual switch can forward the received packet through the initialization result data obtained by the first process.
当某一个第二进程发生异常时,可以重新创建该第二进程,并从内存中获取初始化结果数据,从而在重新创建的该第二进程中,对应的虚拟交换机使用所获取的初始化结果数据,转发接收的报文。本申请实施例中,通过在一台服务器中启动多台虚拟交换机进行报文转发,相比于一台虚拟交换机进行报文转发,提高了报文转发效率;通过创建多个第二进程,各第二进程各自对应一台虚拟交换机,当其中一个第二进程异常时,只需重新创建该第二 进程并从内存中获取初始化结果数据,即可通过对应的虚拟交换机继续进行报文转发,而不必对该虚拟交换机重新进行初始化,使虚拟交换机尽快恢复报文转发业务,节约了因虚拟交换机初始化而损失的时间。When an abnormality occurs in a second process, the second process may be re-created, and the initialization result data is obtained from the memory, so that the corresponding virtual switch uses the obtained initialization result data in the second process that is re-created. Forward the received message. In the embodiment of the present application, a plurality of virtual switches are started in a server to perform packet forwarding, and packet forwarding is performed compared to a virtual switch, thereby improving packet forwarding efficiency. The second process corresponds to a virtual switch. When one of the second processes is abnormal, the second process is re-created and the initialization result data is obtained from the memory, so that the packet forwarding can be continued through the corresponding virtual switch. The virtual switch does not need to be re-initialized, so that the virtual switch can resume the packet forwarding service as soon as possible, saving the time lost due to virtual switch initialization.
图2为第一进程和第二进程间信息传输的示意图,如图2所示,该过程包括:2 is a schematic diagram of information transmission between a first process and a second process, as shown in FIG. 2, the process includes:
S201,服务器创建第一进程;S201. The server creates a first process.
S202,在第一进程中进行虚拟交换机的初始化,可以包括大页内存初始化及网卡驱动初始化等;S202, performing initialization of the virtual switch in the first process, which may include large page memory initialization and network card driver initialization;
S203,将初始化结果数据缓存至内存中;S203. Cache the initialization result data into the memory.
S204,第一进程常驻内存,进入睡眠等待状态;S204, the first process is resident in the memory, and enters a sleep waiting state;
S205,服务器创建第二进程;S205. The server creates a second process.
S206,从内存中获取初始化结果数据,包括大页内存初始化及网卡驱动初始化等;S206, obtaining initialization result data from the memory, including large page memory initialization and network card driver initialization;
S207,虚拟交换机使用获取的初始化结果数据转发接收的报文。S207. The virtual switch forwards the received packet by using the obtained initialization result data.
需要说明的是,本申请实施例中,由于第二进程中的报文转发业务需要使用第一进程所生成的初始化结果数据,因此可以将第一进程看作是主进程,将第二进程看作是从进程。但是,第一进程和第二进程间是相对独立的,即使第二进程停止响应,也不会影响第一进程。It should be noted that, in the embodiment of the present application, since the packet forwarding service in the second process needs to use the initialization result data generated by the first process, the first process may be regarded as the main process, and the second process may be viewed. The work is from the process. However, the first process and the second process are relatively independent, and even if the second process stops responding, it will not affect the first process.
本申请实施例提供的一种基于虚拟交换机的报文转发方法,通过在第一进程中进行虚拟交换机的初始化并将初始化结果数据缓存至内存中,虚拟交换机能够在第二进程中使用初始化结果数据转发接收的报文,即使第二进程发生异常,重新创建第二进程后,虚拟交换机也能够直接使用所获取的初始化结果数据继续进行报文的转发。由于不需要在第二进程再进行初始化操作,相比于现有技术而言,本申请能够消除因重新进行虚拟交换机的初始化而耗费的时间,使虚拟交换机尽快恢复报文转发业务,从而提高报文转发效率。A virtual switch-based packet forwarding method is provided by the embodiment of the present application. The virtual switch can use the initialization result data in the second process by performing initialization of the virtual switch in the first process and buffering the initialization result data into the memory. After forwarding the received packet, even if the second process is abnormal, the virtual switch can directly forward the packet using the obtained initialization result data. The present invention can eliminate the time taken for re-initializing the virtual switch, so that the virtual switch can resume the packet forwarding service as soon as possible, thereby improving the report. Text forwarding efficiency.
方法实施例2Method embodiment 2
如图3所示,本申请实施例还提供了一种基于虚拟交换机的报文转发方法,可以应用于服务器,当然也可以应用于其他类型的具有数据处理运算功能的设备,包括以下步骤:As shown in FIG. 3, the embodiment of the present application further provides a packet forwarding method based on a virtual switch, which can be applied to a server, and can be applied to other types of devices with data processing operations, including the following steps:
S301,创建第一进程。S301. Create a first process.
一台服务器中通常可以部署多台虚拟机,这些虚拟机之间可以通过虚拟交换机进行数据交换。具体来说,可以在服务器的进程中运行虚拟交换机服务,通过虚拟交换机连接各个虚拟机的虚拟网络接口,利用虚拟交换机进行报文转发。Multiple virtual machines can usually be deployed in one server, and data exchange can be performed between these virtual machines through virtual switches. Specifically, the virtual switch service can be run in the process of the server, and the virtual network interface of each virtual machine is connected through the virtual switch, and the virtual switch is used for packet forwarding.
现有的虚拟交换机在运行时,通常是在一个进程中先进行虚拟机初始化,再在该进程中进行报文的转发。本申请实施例中,可以先创建一个进程,称之为第一进程,具体地,可以在Linux操作系统中创建第一进程。在Linux操作系统中创建进程的过程可以由现有的进程创建方法得到,在此不再赘述。When an existing virtual switch is running, it is usually initialized in a process in a virtual machine, and then the packet is forwarded in the process. In the embodiment of the present application, a process may be created first, which is referred to as a first process. Specifically, a first process may be created in a Linux operating system. The process of creating a process in the Linux operating system can be obtained by an existing process creation method, and details are not described herein again.
S302,在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将初始化结果数据缓存至内存中。S302: Initialize the virtual switch in the first process, obtain initialization result data, and cache the initialization result data into the memory.
本申请实施例中,通过所创建的第一进程,可以在第一进程中进行虚拟交换机的初始化。容易理解的是,虚拟交换机在初始化过程中,需进行大页内存初始化、网卡驱动初始化等过程,耗费的时间多,可以将虚拟交换机的在初始化过程单独放在一个进程中进行。In the embodiment of the present application, the initialization of the virtual switch may be performed in the first process by using the created first process. It is easy to understand that during the initialization process, the virtual switch needs to perform large page memory initialization, network card driver initialization, etc., which takes a lot of time, and the virtual switch's initialization process can be separately placed in one process.
由于内存具有极高的数据读取/写入速度,因此,利用这一特点,可以将初始化后所得的初始化结果数据缓存至内存中。当服务器需要调用这些初始化结果数据时,可以快速地从内存中读取所缓存的数据。Since the memory has a very high data read/write speed, this initialization feature can be used to cache the initialization result data obtained after initialization into the memory. When the server needs to call these initialization result data, it can quickly read the cached data from memory.
进一步地,虚拟交换机的初始化可以包括大页内存初始化、网卡驱动初始化、网卡队列初始化等与虚拟交换机初始化相关的操作,从而可以得到大页内存数据、网卡驱动数据、网卡队列信息等数据。Further, the initialization of the virtual switch may include operations related to initialization of the virtual switch, such as large page memory initialization, network card driver initialization, and network card queue initialization, so that data such as large page memory data, network card driver data, and network card queue information may be obtained.
作为本申请实施例一种可选的实施方式,为了能够尽快完成虚拟交换机的初始化,可以在服务器操作系统启动的过程中创建第一进程,并在第一进程中进行虚拟交换机的初始化。待虚拟交换机初始化完毕并将初始化结果数据缓存至内存中后,服务器可以进入等待状态,随时等待调用命令调用所缓 存的初始化结果数据。通过上述在服务器操作系统启动的过程中创建第一进程,并在第一进程中进行虚拟交换机的初始化,可以使虚拟交换机的初始化在服务器启动时进行,而不是等待服务器进入操作系统的操作界面后才进行虚拟交换机的初始化,从而使虚拟交换机的初始化提前进行,有利于提升虚拟交换机的启动速度。As an optional implementation manner of the embodiment of the present application, in order to complete the initialization of the virtual switch as soon as possible, the first process may be created in the process of starting the server operating system, and the virtual switch is initialized in the first process. After the virtual switch is initialized and the initialization result data is cached in the memory, the server can enter the wait state and wait for the call command to call the cached initialization result data at any time. By creating the first process in the process of starting the server operating system and initializing the virtual switch in the first process, the initialization of the virtual switch can be performed at the startup of the server, instead of waiting for the server to enter the operating interface of the operating system. The initialization of the virtual switch is performed, so that the initialization of the virtual switch is advanced, which is beneficial to improving the startup speed of the virtual switch.
S303,在已创建的第二进程中,通过已初始化的虚拟交换机使用初始化结果数据转发接收的报文。S303. In the second process that has been created, the received packet is forwarded by using the initialization result data by the initialized virtual switch.
本申请实施例中,可以在操作系统中创建第二进程,其中,第二进程是不同于第一进程的一个进程,它们分别运行于服务器的操作系统中。在第二进程中,已初始化的虚拟交换机可以通过使用所缓存的初始化结果数据,实现转发接收的报文。In the embodiment of the present application, the second process may be created in the operating system, where the second process is a process different from the first process, and they are respectively run in the operating system of the server. In the second process, the initialized virtual switch can forward the received message by using the cached initialization result data.
具体地,所创建的第二进程可以与第一进程共享内存,从而可以获取内存中所缓存的初始化结果数据,例如大页内存数据、网卡驱动数据、网卡队列信息等数据。已初始化的虚拟交换机获取上述数据后,便可以在第二进程中进行报文的接收、报文的转发。Specifically, the created second process may share the memory with the first process, so that the initialization result data buffered in the memory, such as large page memory data, network card driver data, and network card queue information, may be acquired. After the initialized virtual switch obtains the above data, it can receive the packet and forward the packet in the second process.
本申请实施例中,在第一进程中可以只进行虚拟交换机的初始化,从而使第一进程功能简单,达到稳定运行的目的。在第二进程中可以只进行报文的接收与转发,即使第二进程发生异常,也不会影响第一进程。并且,虚拟交换机初始化后,在第二进程中启动并转发报文的过程可以达到毫秒级别时间,具有启动速度快的特点。In the embodiment of the present application, only the initialization of the virtual switch may be performed in the first process, so that the function of the first process is simple and the purpose of stable operation is achieved. In the second process, only the receiving and forwarding of the packet can be performed, and even if the second process is abnormal, the first process is not affected. Moreover, after the virtual switch is initialized, the process of starting and forwarding the message in the second process can reach the millisecond level time, and has the characteristics of fast startup speed.
S304,检测第二进程是否处于正常状态。S304. Detect whether the second process is in a normal state.
本申请实施例中,已初始化的虚拟交换机使用初始化结果数据,在第二进程中转发所接收的报文过程中,可能出现由于报文转发错误,导致第二进程状态异常的情况,严重时甚至可能导致服务器宕机。为了及时发现第二进程是否处于异常状态,避免因第二进程异常而导致服务器宕机,可以对第二进程的状态进行检测。In the embodiment of the present application, the initialized virtual switch uses the initialization result data, and in the process of forwarding the received packet in the second process, the second process may be abnormal due to packet forwarding error. May cause the server to crash. In order to find out in time whether the second process is in an abnormal state and avoid the server down due to the abnormality of the second process, the state of the second process can be detected.
进一步可选地,服务器可以通过第一进程,检测第二进程是否处于正常状态。Further optionally, the server may detect, by the first process, whether the second process is in a normal state.
具体地,如图4所示,上述S304可以包括以下步骤:Specifically, as shown in FIG. 4, the foregoing S304 may include the following steps:
S3041,通过第一进程向第二进程发送应答请求。S3041: Send a response request to the second process by using the first process.
操作系统的各个进程间可以存在通信机制,实现进程间的通信,例如共享内存、套接字等。本申请实施例中,可以通过第一进程向第二进程发送应答请求,以使第二进程对应答请求作出回应。There may be communication mechanisms between the various processes of the operating system to implement inter-process communication, such as shared memory, sockets, and the like. In this embodiment, the response process may be sent to the second process by the first process, so that the second process responds to the response request.
S3042,如果接收到第二进程的响应,确定第二进程状态正常。S3042. If the response of the second process is received, determine that the second process is in a normal state.
容易理解的是,如果服务器接收到第二进程的响应,例如对应答请求作出回应,或者返回包含自己健康状态的数据包,则说明第二进程运行状态正常,无需对第二进程进行进一步操作。It is easy to understand that if the server receives a response from the second process, such as responding to the response request, or returns a packet containing its own health status, the second process is in a normal state and no further operations are required on the second process.
S3043,如果未接收到第二进程的响应,确定第二进程状态异常。S3043. If the response of the second process is not received, determine that the second process status is abnormal.
如果未接收到第二进程的响应,例如第二进程没有对应答请求作出回应,或者没有返回包含自己健康状态的数据包,则第二进程可能已经停止响应,说明第二进程运行状态异常,可以对第二进程进行进一步操作,从而恢复第二进程。If the response of the second process is not received, for example, the second process does not respond to the response request, or does not return a packet containing its own health status, the second process may have stopped responding, indicating that the second process is operating abnormally. Further operations are performed on the second process to resume the second process.
S305,当第二进程发生异常时,重新创建第二进程,并从内存中获取初始化结果数据。S305. When an exception occurs in the second process, re-creating the second process and obtaining initialization result data from the memory.
本申请实施例中,如果服务器检测到第二进程发生异常,则服务器可以注销停止响应的第二进程,释放运行第二进程所占用的内存空间,并可以重新创建第二进程。In the embodiment of the present application, if the server detects that an abnormality occurs in the second process, the server may log off the second process that stops responding, release the memory space occupied by running the second process, and re-create the second process.
在第二进程中,由于虚拟交换机转发报文出现异常,可能会致使上述第二进程状态异常,例如第二进程停止响应。此时需要重新启动第二进程,从而使虚拟交换机重新进行报文转发。In the second process, the second process is abnormal because the virtual switch forwards the packet. For example, the second process stops responding. The second process needs to be restarted, so that the virtual switch can re-transmit the packet.
本申请实施例在重新创建第二进程的过程中,由于第一进程已经进行了虚拟交换机的初始化,并将初始化结果数据缓存至内存中,因此第二进程不需要再进行上述初始化操作,而是可以直接从内存中获取所缓存的初始化结果数据,例如大页内存数据、网卡驱动数据、网卡队列信息等数据。不难看出,由于不需要在第二进程再进行上述初始化操作,相比于现有技术而言, 本申请能够消除重新进行虚拟交换机的初始化而耗费的时间,使虚拟交换机尽快恢复报文转发业务。In the process of re-creating the second process, the first process has already initialized the virtual switch and caches the initialization result data into the memory, so the second process does not need to perform the above initialization operation, but The cached initialization result data, such as large page memory data, network card driver data, and network card queue information, can be obtained directly from the memory. It is not difficult to see that the above-mentioned initialization operation is not required in the second process. Compared with the prior art, the present application can eliminate the time taken for re-initializing the virtual switch, so that the virtual switch can resume the packet forwarding service as soon as possible. .
S306,在重新创建的第二进程中,通过已初始化的虚拟交换机使用获取的初始化结果数据转发接收的报文。S306. In the second process of re-creation, the received packet is forwarded by using the obtained initialization result data by the initialized virtual switch.
本申请实施例中,如前文所述,服务器可以重新创建第二进程,并可以从内存中获取初始化结果数据,服务器可以利用所获取的初始化结果数据,因此在重新创建的第二进程中,已初始化的虚拟交换机可以通过使用所获取的初始化结果数据,实现转发接收的报文。In the embodiment of the present application, as described above, the server may re-create the second process, and may obtain initialization result data from the memory, and the server may use the obtained initialization result data, so in the second process of re-creation, The initialized virtual switch can forward and receive the received message by using the obtained initialization result data.
具体地例如,服务器重新创建的第二进程后,可以获取内存中所缓存大页内存数据、网卡驱动数据、网卡队列信息等数据。已初始化的虚拟交换机可以直接使用上述数据,在第二进程中进行报文的接收、报文的转发。Specifically, for example, after the second process re-created by the server, data such as large page memory data, network card driver data, and network card queue information cached in the memory may be acquired. The initialized virtual switch can directly use the above data to receive packets and forward packets in the second process.
作为本申请实施例一种可选的实施方式,为了进一步及时检测第二进程的状态,通过第一进程向第二进程发送应答请求时,可以每隔预设时间间隔,向第二进程发送应答请求。As an optional implementation manner of the embodiment of the present application, in order to further detect the state of the second process in time, when the first process sends a response request to the second process, the response may be sent to the second process at a preset time interval. request.
示例性地,可以每隔5分钟,服务器通过第一进程向第二进程发送一次应答请求,如果第二进程对应答请求作出回应,说明第二进程运行正常。Exemplarily, the server may send a response request to the second process through the first process every 5 minutes, and if the second process responds to the response request, the second process runs normally.
作为本申请实施例另一种可选的实施方式,如果服务器检测到第二进程状态异常,为了能够使运维管理人员尽快地获知第二进程状态异常,服务器可以生成包含第二进程状态异常信息的通知消息,并可以将该通知消息发送至运维人员所使用的客户端,例如电脑、平板电脑或者手机等移动设备,方便运维人员随时随刻接收并查看该通知消息。或者,服务器还可以将通知消息显示于运维系统的显示设备中,使运维人员及时看到该通知消息,及时对问题定位并修复问题。As another optional implementation manner of the embodiment of the present application, if the server detects that the second process status is abnormal, in order to enable the operation and maintenance manager to know the second process status abnormality as soon as possible, the server may generate the second process status abnormality information. The notification message can be sent to the client used by the operation and maintenance personnel, such as a mobile device such as a computer, a tablet computer or a mobile phone, so that the operation and maintenance personnel can receive and view the notification message at any time. Alternatively, the server may display the notification message in the display device of the operation and maintenance system, so that the operation and maintenance personnel can see the notification message in time, locate the problem in time, and fix the problem.
当与虚拟交换机报文转发相关的程序需要升级时,现有的基于一个进程的报文转发方法中,需要注销进程,待虚拟交换机报文转发相关的程序文件升级后,再在进程中重新进行大页内存初始化及虚拟交换机网卡驱动初始化,得到大页内存数据和网卡驱动数据,然后才能转发报文。显然这种方法会耗费大量时间。When the program related to the packet forwarding of the virtual switch needs to be upgraded, the existing process of forwarding the packet based on the process needs to be deactivated. After the program file related to the forwarding of the virtual switch is upgraded, the process is re-executed in the process. Large page memory initialization and virtual switch network card driver initialization, get large page memory data and network card driver data, and then can forward messages. Obviously this method will take a lot of time.
当虚拟交换机对应的进程停止响应或者虚拟交换机升级时,虚拟交换机是不可用的,需要再次启动虚拟交换机进而恢复报文转发业务。作为本申请实施例另一种可选的实施方式,本申请实施例中具有第一进程和第二进程,可以将第二进程注销后,释放内存空间,升级虚拟交换机报文转发相关的程序文件后,重新创建第二进程,可以直接从内存中获取所缓存的初始化结果数据,启动虚拟交换机,由于初始化结果数据已缓存至内存,恢复第二进程中的业务,不需要再进行虚拟交换机的初始化。When the process corresponding to the virtual switch stops responding or the virtual switch is upgraded, the virtual switch is unavailable. You need to start the virtual switch again to restore the packet forwarding service. As another optional implementation manner of the embodiment of the present application, the embodiment has a first process and a second process, and after the second process is logged off, the memory space is released, and the virtual switch message forwarding related program file is upgraded. After the second process is re-created, the cached initialization result data can be directly obtained from the memory, and the virtual switch is started. Since the initialization result data is cached to the memory, the service in the second process is restored, and the virtual switch is not required to be initialized. .
作为本申请实施例另一种可选的实施方式,如前文所述,服务器中通常可以部署多台虚拟机,每台虚拟机都可以具有一个虚拟网卡,可以将一台虚拟机的虚拟网卡转发报文业务放在一个进程中进行,从而可以在多个进程中进行多个报文转发业务,提高业务的并行处理能力。As another optional implementation manner of the embodiment of the present application, as described above, multiple virtual machines can be deployed in the server, and each virtual machine can have one virtual network card, which can forward the virtual network card of one virtual machine. The packet service is carried out in a process, so that multiple packet forwarding services can be performed in multiple processes to improve the parallel processing capability of the service.
本申请实施例提供的一种基于虚拟交换机的报文转发方法,通过检测第二进程的状态,能够及时发现第二进程是处于正常状态还是异常状态,如果状态正常,则继续在第二进程中转发报文,如果状态异常,则重新启动第二进程,从而根据不同的检测结果进行不同的处理,避免因第二进程异常而导致服务器宕机,提高了服务器的可靠性。The method for forwarding a packet based on the virtual switch provided by the embodiment of the present application can detect whether the second process is in a normal state or an abnormal state in time by detecting the state of the second process, and if the state is normal, continue in the second process. If the status is abnormal, the second process is restarted, so that different processing is performed according to different detection results to avoid server downtime due to the abnormality of the second process, thereby improving the reliability of the server.
相应于上面的方法实施例,本申请实施例还提供了相应的装置实施例。Corresponding to the above method embodiment, the embodiment of the present application also provides a corresponding device embodiment.
装置实施例1Device embodiment 1
如图5所示,本申请实施例提供了一种基于虚拟交换机的报文转发装置,包括:As shown in FIG. 5, the embodiment of the present application provides a packet forwarding device based on a virtual switch, including:
初始化模块402,用于在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将初始化结果数据缓存至内存中。The initialization module 402 is configured to perform initialization of the virtual switch in the first process, obtain initialization result data, and cache the initialization result data into the memory.
本申请实施例中,通过创建模块所创建的第一进程,可以在第一进程中进行虚拟交换机的初始化。容易理解的是,虚拟交换机在初始化过程中,需进行大页内存初始化、网卡驱动初始化等过程,耗费的时间多,可以通过初始化模块将虚拟交换机的初始化过程单独放在一个进程中进行。In the embodiment of the present application, the initialization of the virtual switch may be performed in the first process by creating the first process created by the module. It is easy to understand that during the initialization process, the virtual switch needs to perform large page memory initialization, network card driver initialization, etc., which takes a lot of time. The initialization process of the virtual switch can be separately placed in one process through the initialization module.
由于内存具有极高的数据读取/写入速度,因此,利用这一特点,可以将初始化后所得的初始化结果数据缓存至内存中。当服务器需要调用这些初始 化结果数据时,可以快速地从内存中读取所缓存的数据。Since the memory has a very high data read/write speed, this initialization feature can be used to cache the initialization result data obtained after initialization into the memory. When the server needs to call these initialization result data, it can quickly read the cached data from memory.
进一步地,虚拟交换机的初始化可以包括大页内存初始化、网卡驱动初始化、网卡队列初始化等与虚拟交换机初始化相关的操作,从而可以得到大页内存数据、网卡驱动数据、网卡队列信息等数据。Further, the initialization of the virtual switch may include operations related to initialization of the virtual switch, such as large page memory initialization, network card driver initialization, and network card queue initialization, so that data such as large page memory data, network card driver data, and network card queue information may be obtained.
作为本申请实施例一种可选的实施方式,为了能够尽快完成虚拟交换机的初始化,可以在服务器操作系统启动的过程中创建第一进程,并在第一进程中进行虚拟交换机的初始化。待虚拟交换机初始化完毕并将初始化结果数据缓存至内存中后,服务器可以进入等待状态,随时等待调用命令调用所缓存的初始化结果数据。通过上述在服务器操作系统启动的过程中创建第一进程,并在第一进程中进行虚拟交换机的初始化,可以使虚拟交换机的初始化在服务器启动时进行,而不是等待服务器进入操作系统的操作界面后才进行虚拟交换机的初始化,从而使虚拟交换机的初始化提前进行,有利于提升虚拟交换机的启动速度。As an optional implementation manner of the embodiment of the present application, in order to complete the initialization of the virtual switch as soon as possible, the first process may be created in the process of starting the server operating system, and the virtual switch is initialized in the first process. After the virtual switch is initialized and the initialization result data is cached in the memory, the server can enter the waiting state and wait for the calling command to call the cached initialization result data. By creating the first process in the process of starting the server operating system and initializing the virtual switch in the first process, the initialization of the virtual switch can be performed at the startup of the server, instead of waiting for the server to enter the operating interface of the operating system. The initialization of the virtual switch is performed, so that the initialization of the virtual switch is advanced, which is beneficial to improving the startup speed of the virtual switch.
转发模块403,用于在第二进程中,通过已初始化的虚拟交换机使用初始化结果数据转发接收的报文。The forwarding module 403 is configured to forward, by using the initialized virtual switch, the received packet by using the initialized virtual switch in the second process.
本申请实施例中,创建模块可以在操作系统中创建第二进程,其中,第二进程是不同于第一进程的一个进程,它们分别运行于服务器的操作系统中。在第二进程中,转发模块可以通过已初始化的虚拟交换机使用所缓存的初始化结果数据,实现转发接收的报文。In this embodiment, the creating module may create a second process in the operating system, where the second process is a process different from the first process, and they respectively run in an operating system of the server. In the second process, the forwarding module can forward the received packet by using the cached initialization result data by the initialized virtual switch.
具体地,所创建的第二进程可以与第一进程共享内存,从而可以获取内存中所缓存的初始化结果数据,例如大页内存数据、网卡驱动数据、网卡队列信息等数据。已初始化的虚拟交换机获取上述数据后,便可以在第二进程中进行报文的接收、报文的转发。Specifically, the created second process may share the memory with the first process, so that the initialization result data buffered in the memory, such as large page memory data, network card driver data, and network card queue information, may be acquired. After the initialized virtual switch obtains the above data, it can receive the packet and forward the packet in the second process.
本申请实施例中,在第一进程中可以只进行虚拟交换机的初始化,从而使第一进程功能简单,达到稳定运行的目的。在第二进程中可以只进行报文的接收与转发,即使第二进程发生异常,也不会影响第一进程。In the embodiment of the present application, only the initialization of the virtual switch may be performed in the first process, so that the function of the first process is simple and the purpose of stable operation is achieved. In the second process, only the receiving and forwarding of the packet can be performed, and even if the second process is abnormal, the first process is not affected.
创建模块401,用于当第二进程发生异常时,重新创建第二进程,并从内存中获取初始化结果数据。The creating module 401 is configured to re-create the second process when an abnormality occurs in the second process, and obtain initialization result data from the memory.
本申请实施例中,如果检测到第二进程发生异常,则服务器可以注销停止响应的第二进程,释放运行第二进程所占用的内存空间,并可以通过创建模块重新创建第二进程。In the embodiment of the present application, if an abnormality occurs in the second process, the server may log out the second process that stops responding, release the memory space occupied by running the second process, and re-create the second process by creating a module.
在第二进程中,由于虚拟交换机转发报文出现异常,可能会致使上述第二进程状态异常,例如第二进程停止响应。此时需要通过创建模块重新创建第二进程,从而使虚拟交换机重新进行报文转发。In the second process, the second process is abnormal because the virtual switch forwards the packet. For example, the second process stops responding. In this case, you need to re-create the second process by creating a module, so that the virtual switch can re-transmit the packet.
本申请实施例在重新创建第二进程的过程中,由于第一进程已经进行了虚拟交换机的初始化,并将初始化结果数据缓存至内存中,因此第二进程不需要再进行上述初始化操作,而是可以直接从内存中获取所缓存的初始化结果数据,例如大页内存数据、网卡驱动数据、网卡队列信息等数据。不难看出,由于不需要在第二进程再进行上述初始化操作,相比于现有技术而言,本申请能够消除重新进行虚拟交换机的初始化而耗费的时间,使虚拟交换机尽快恢复报文转发业务。In the process of re-creating the second process, the first process has already initialized the virtual switch and caches the initialization result data into the memory, so the second process does not need to perform the above initialization operation, but The cached initialization result data, such as large page memory data, network card driver data, and network card queue information, can be obtained directly from the memory. It is not difficult to see that, as the above-mentioned initialization operation is not required to be performed in the second process, the present application can eliminate the time taken for re-initializing the virtual switch, and the virtual switch can resume the packet forwarding service as soon as possible. .
作为本发明实施例一种可选的实施方式,创建模块401可以用于创建第一进程。As an optional implementation manner of the embodiment of the present invention, the creating module 401 can be used to create a first process.
服务器中通常可以部署多台虚拟机,这些虚拟机之间可以通过虚拟交换机进行数据交换。具体来说,可以在服务器的进程中运行虚拟交换机服务,通过虚拟交换机连接各个虚拟机的虚拟网络接口(虚拟网卡的端口),利用虚拟交换机进行报文转发。Multiple virtual machines can usually be deployed in a server, and data exchange can be performed between these virtual machines through a virtual switch. Specifically, the virtual switch service can be run in the process of the server, and the virtual network interface (the port of the virtual network card) of each virtual machine is connected through the virtual switch, and the virtual switch is used for packet forwarding.
如前文所述,现有的虚拟交换机在运行时,通常是在一个进程中先进行虚拟机初始化,再在该进程中进行报文的转发。本申请实施例中,可以通过创建模块先创建一个进程,称之为第一进程,具体地,可以在Linux操作系统中创建第一进程。在Linux操作系统中创建进程的过程可以由现有的进程创建方法得到,在此不再赘述。As described above, when an existing virtual switch is running, the virtual machine is first initialized in a process, and then the packet is forwarded in the process. In the embodiment of the present application, a process may be first created by creating a module, which is referred to as a first process. Specifically, a first process may be created in a Linux operating system. The process of creating a process in the Linux operating system can be obtained by an existing process creation method, and details are not described herein again.
其中,转发模块402,还用于在重新创建的第二进程中,通过已初始化的虚拟交换机使用获取的初始化结果数据转发接收的报文。The forwarding module 402 is further configured to: in the second process that is re-created, forward the received packet by using the obtained initialization result data by the initialized virtual switch.
本申请实施例中,如前文所述,可以重新创建第二进程,并可以从内存中获取初始化结果数据,服务器可以利用所获取的初始化结果数据,因此在 重新创建的第二进程中,已初始化的虚拟交换机可以通过使用所获取的初始化结果数据,实现转发接收的报文。In the embodiment of the present application, as described above, the second process may be re-created, and the initialization result data may be obtained from the memory, and the server may use the obtained initialization result data, so that the second process in the re-creation is initialized. The virtual switch can forward and receive the received message by using the obtained initialization result data.
具体地例如,服务器重新创建的第二进程后,可以获取内存中所缓存大页内存数据、网卡驱动数据、网卡队列信息等数据。已初始化的虚拟交换机可以直接使用上述数据,在第二进程中进行报文的接收、报文的转发。Specifically, for example, after the second process re-created by the server, data such as large page memory data, network card driver data, and network card queue information cached in the memory may be acquired. The initialized virtual switch can directly use the above data to receive packets and forward packets in the second process.
本申请实施例提供的一种基于虚拟交换机的报文转发装置,通过在第一进程中进行虚拟交换机的初始化并将初始化结果数据缓存至内存中,虚拟交换机能够在第二进程中使用初始化结果数据转发接收的报文,即使第二进程发生异常,重新创建第二进程后,虚拟交换机也能够直接使用所获取的初始化结果数据继续进行报文的转发。由于不需要在第二进程再进行初始化操作,相比于现有技术而言,本申请能够消除因重新进行虚拟交换机的初始化而耗费的时间,使虚拟交换机尽快恢复报文转发业务,从而提高报文转发效率。The virtual switch-based packet forwarding device provided by the embodiment of the present application can use the initialization result data in the second process by performing initialization of the virtual switch in the first process and buffering the initialization result data into the memory. After forwarding the received packet, even if the second process is abnormal, the virtual switch can directly forward the packet using the obtained initialization result data. The present invention can eliminate the time taken for re-initializing the virtual switch, so that the virtual switch can resume the packet forwarding service as soon as possible, thereby improving the report. Text forwarding efficiency.
装置实施例2Device embodiment 2
如图6所示,本申请实施例还提供了一种基于虚拟交换机的报文转发装置,包括:As shown in FIG. 6, the embodiment of the present application further provides a packet forwarding device based on a virtual switch, including:
创建模块401,用于创建第一进程。A module 401 is created for creating a first process.
服务器中通常可以部署多台虚拟机,这些虚拟机之间可以通过虚拟交换机进行数据交换。具体来说,可以在服务器的进程中运行虚拟交换机服务,通过虚拟交换机连接各个虚拟机的虚拟网络接口(虚拟网卡的端口),利用虚拟交换机进行报文转发。Multiple virtual machines can usually be deployed in a server, and data exchange can be performed between these virtual machines through a virtual switch. Specifically, the virtual switch service can be run in the process of the server, and the virtual network interface (the port of the virtual network card) of each virtual machine is connected through the virtual switch, and the virtual switch is used for packet forwarding.
如前文所述,现有的虚拟交换机在运行时,通常是在一个进程中先进行虚拟机初始化,再在该进程中进行报文的转发。本申请实施例中,可以通过创建模块先创建一个进程,称之为第一进程,具体地,可以在Linux操作系统中创建第一进程。在Linux操作系统中创建进程的过程可以由现有的进程创建方法得到,在此不再赘述。As described above, when an existing virtual switch is running, the virtual machine is first initialized in a process, and then the packet is forwarded in the process. In the embodiment of the present application, a process may be first created by creating a module, which is referred to as a first process. Specifically, a first process may be created in a Linux operating system. The process of creating a process in the Linux operating system can be obtained by an existing process creation method, and details are not described herein again.
初始化模块402,用于在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将初始化结果数据缓存至内存中。The initialization module 402 is configured to perform initialization of the virtual switch in the first process, obtain initialization result data, and cache the initialization result data into the memory.
本申请实施例中,通过创建模块所创建的第一进程,可以在第一进程中进行虚拟交换机的初始化。容易理解的是,虚拟交换机在初始化过程中,需进行大页内存初始化、网卡驱动初始化等过程,耗费的时间多,可以通过初始化模块将虚拟交换机的初始化过程单独放在一个进程中进行。In the embodiment of the present application, the initialization of the virtual switch may be performed in the first process by creating the first process created by the module. It is easy to understand that during the initialization process, the virtual switch needs to perform large page memory initialization, network card driver initialization, etc., which takes a lot of time. The initialization process of the virtual switch can be separately placed in one process through the initialization module.
由于内存具有极高的数据读取/写入速度,因此,利用这一特点,可以将初始化后所得的初始化结果数据缓存至内存中。当服务器需要调用这些初始化结果数据时,可以快速地从内存中读取所缓存的数据。Since the memory has a very high data read/write speed, this initialization feature can be used to cache the initialization result data obtained after initialization into the memory. When the server needs to call these initialization result data, it can quickly read the cached data from memory.
进一步地,虚拟交换机的初始化可以包括大页内存初始化、网卡驱动初始化、网卡队列初始化等与虚拟交换机初始化相关的操作,从而可以得到大页内存数据、网卡驱动数据、网卡队列信息等数据。Further, the initialization of the virtual switch may include operations related to initialization of the virtual switch, such as large page memory initialization, network card driver initialization, and network card queue initialization, so that data such as large page memory data, network card driver data, and network card queue information may be obtained.
作为本申请实施例一种可选的实施方式,为了能够尽快完成虚拟交换机的初始化,可以在服务器操作系统启动的过程中创建第一进程,并在第一进程中进行虚拟交换机的初始化。待虚拟交换机初始化完毕并将初始化结果数据缓存至内存中后,服务器可以进入等待状态,随时等待调用命令调用所缓存的初始化结果数据。通过上述在服务器操作系统启动的过程中创建第一进程,并在第一进程中进行虚拟交换机的初始化,可以使虚拟交换机的初始化在服务器启动时进行,而不是等待服务器进入操作系统的操作界面后才进行虚拟交换机的初始化,从而使虚拟交换机的初始化提前进行,有利于提升虚拟交换机的启动速度。As an optional implementation manner of the embodiment of the present application, in order to complete the initialization of the virtual switch as soon as possible, the first process may be created in the process of starting the server operating system, and the virtual switch is initialized in the first process. After the virtual switch is initialized and the initialization result data is cached in the memory, the server can enter the waiting state and wait for the calling command to call the cached initialization result data. By creating the first process in the process of starting the server operating system and initializing the virtual switch in the first process, the initialization of the virtual switch can be performed at the startup of the server, instead of waiting for the server to enter the operating interface of the operating system. The initialization of the virtual switch is performed, so that the initialization of the virtual switch is advanced, which is beneficial to improving the startup speed of the virtual switch.
转发模块403,用于在已创建的第二进程中,通过已初始化的虚拟交换机使用初始化结果数据转发接收的报文。The forwarding module 403 is configured to forward, by using the initialized virtual switch, the received packet by using the initialized virtual data in the second process that has been created.
本申请实施例中,创建模块可以在操作系统中创建第二进程,其中,第二进程是不同于第一进程的一个进程,它们分别运行于服务器的操作系统中。在第二进程中,转发模块可以通过已初始化的虚拟交换机使用所缓存的初始化结果数据,实现转发接收的报文。In this embodiment, the creating module may create a second process in the operating system, where the second process is a process different from the first process, and they respectively run in an operating system of the server. In the second process, the forwarding module can forward the received packet by using the cached initialization result data by the initialized virtual switch.
具体地,所创建的第二进程可以与第一进程共享内存,从而可以获取内存中所缓存的初始化结果数据,例如大页内存数据、网卡驱动数据、网卡队列信息等数据。已初始化的虚拟交换机获取上述数据后,便可以在第二进程中进行报文的接收、报文的转发。Specifically, the created second process may share the memory with the first process, so that the initialization result data buffered in the memory, such as large page memory data, network card driver data, and network card queue information, may be acquired. After the initialized virtual switch obtains the above data, it can receive the packet and forward the packet in the second process.
本申请实施例中,在第一进程中可以只进行虚拟交换机的初始化,从而使第一进程功能简单,达到稳定运行的目的。在第二进程中可以只进行报文的接收与转发,即使第二进程发生异常,也不会影响第一进程。In the embodiment of the present application, only the initialization of the virtual switch may be performed in the first process, so that the function of the first process is simple and the purpose of stable operation is achieved. In the second process, only the receiving and forwarding of the packet can be performed, and even if the second process is abnormal, the first process is not affected.
检测模块404,用于检测第二进程是否处于正常状态。The detecting module 404 is configured to detect whether the second process is in a normal state.
本申请实施例中,已初始化的虚拟交换机使用初始化结果数据,在第二进程中转发所接收的报文过程中,可能出现由于报文转发错误,导致第二进程状态异常的情况,严重时甚至可能导致服务器宕机。为了及时发现第二进程是否处于异常状态,避免因第二进程异常而导致服务器宕机,可以通过检测模块对第二进程的状态进行检测。In the embodiment of the present application, the initialized virtual switch uses the initialization result data, and in the process of forwarding the received packet in the second process, the second process may be abnormal due to packet forwarding error. May cause the server to crash. In order to detect whether the second process is in an abnormal state in time, and avoid the server downtime due to the abnormality of the second process, the state of the second process may be detected by the detecting module.
进一步可选地,如图7所示,检测模块404可以包括:Further optionally, as shown in FIG. 7, the detecting module 404 may include:
发送子模块4041,用于通过第一进程向第二进程发送应答请求。The sending submodule 4041 is configured to send a response request to the second process by using the first process.
操作系统的各个进程间可以存在通信机制,实现进程间的通信,例如共享内存、套接字等。本申请实施例中,可以通过第一进程向第二进程发送应答请求,以使第二进程对应答请求作出回应。There may be communication mechanisms between the various processes of the operating system to implement inter-process communication, such as shared memory, sockets, and the like. In this embodiment, the response process may be sent to the second process by the first process, so that the second process responds to the response request.
确定子模块4042,用于如果接收到第二进程的响应,确定第二进程状态正常;如果未接收到第二进程的响应,确定第二进程状态异常。The determining submodule 4042 is configured to determine that the second process state is normal if the response of the second process is received, and determine that the second process state is abnormal if the response of the second process is not received.
容易理解的是,如果服务器接收到第二进程的响应,例如对应答请求作出回应,或者返回包含自己健康状态的数据包,则说明第二进程运行状态正常,无需对第二进程进行进一步操作。It is easy to understand that if the server receives a response from the second process, such as responding to the response request, or returns a packet containing its own health status, the second process is in a normal state and no further operations are required on the second process.
如果未接收到第二进程的响应,例如第二进程没有对应答请求作出回应,或者没有返回包含自己健康状态的数据包,则第二进程可能已经停止响应,说明第二进程运行状态异常,可以对第二进程进行进一步操作,从而恢复第二进程。If the response of the second process is not received, for example, the second process does not respond to the response request, or does not return a packet containing its own health status, the second process may have stopped responding, indicating that the second process is operating abnormally. Further operations are performed on the second process to resume the second process.
其中,创建模块401,还用于当第二进程发生异常时,重新创建第二进程,并从内存中获取初始化结果数据。The creating module 401 is further configured to re-create the second process when an abnormality occurs in the second process, and obtain initialization result data from the memory.
本申请实施例中,如果检测到第二进程发生异常,则服务器可以注销停止响应的第二进程,释放运行第二进程所占用的内存空间,并可以通过创建 模块重新创建第二进程。In the embodiment of the present application, if an abnormality is detected in the second process, the server may log off the second process that stops responding, release the memory space occupied by running the second process, and re-create the second process by creating a module.
在第二进程中,由于虚拟交换机转发报文出现异常,可能会致使上述第二进程状态异常,例如第二进程停止响应。此时需要通过创建模块重新创建第二进程,从而使虚拟交换机重新进行报文转发。In the second process, the second process is abnormal because the virtual switch forwards the packet. For example, the second process stops responding. In this case, you need to re-create the second process by creating a module, so that the virtual switch can re-transmit the packet.
本申请实施例在重新创建第二进程的过程中,由于第一进程已经进行了虚拟交换机的初始化,并将初始化结果数据缓存至内存中,因此第二进程不需要再进行上述初始化操作,而是可以直接从内存中获取所缓存的初始化结果数据,例如大页内存数据、网卡驱动数据、网卡队列信息等数据。不难看出,由于不需要在第二进程再进行上述初始化操作,相比于现有技术而言,本申请能够消除重新进行虚拟交换机的初始化而耗费的时间,使虚拟交换机尽快恢复报文转发业务。In the process of re-creating the second process, the first process has already initialized the virtual switch and caches the initialization result data into the memory, so the second process does not need to perform the above initialization operation, but The cached initialization result data, such as large page memory data, network card driver data, and network card queue information, can be obtained directly from the memory. It is not difficult to see that, as the above-mentioned initialization operation is not required to be performed in the second process, the present application can eliminate the time taken for re-initializing the virtual switch, and the virtual switch can resume the packet forwarding service as soon as possible. .
其中,转发模块402,还用于在重新创建的第二进程中,通过已初始化的虚拟交换机使用获取的初始化结果数据转发接收的报文。The forwarding module 402 is further configured to: in the second process that is re-created, forward the received packet by using the obtained initialization result data by the initialized virtual switch.
本申请实施例中,如前文所述,可以重新创建第二进程,并可以从内存中获取初始化结果数据,服务器可以利用所获取的初始化结果数据,因此在重新创建的第二进程中,已初始化的虚拟交换机可以通过使用所获取的初始化结果数据,实现转发接收的报文。In the embodiment of the present application, as described above, the second process may be re-created, and the initialization result data may be obtained from the memory, and the server may use the obtained initialization result data, so that the second process in the re-creation is initialized. The virtual switch can forward and receive the received message by using the obtained initialization result data.
具体地例如,服务器重新创建的第二进程后,可以获取内存中所缓存大页内存数据、网卡驱动数据、网卡队列信息等数据。已初始化的虚拟交换机可以直接使用上述数据,在第二进程中进行报文的接收、报文的转发。Specifically, for example, after the second process re-created by the server, data such as large page memory data, network card driver data, and network card queue information cached in the memory may be acquired. The initialized virtual switch can directly use the above data to receive packets and forward packets in the second process.
本申请实施例提供的一种基于虚拟交换机的报文转发装置,通过检测第二进程的状态,能够及时发现第二进程是处于正常状态还是异常状态,如果状态正常,则继续在第二进程中转发报文,如果状态异常,则重新启动第二进程,从而根据不同的检测结果进行不同的处理,避免因第二进程异常而导致服务器宕机,提高了服务器的可靠性。The packet forwarding device based on the virtual switch provided by the embodiment of the present application can detect whether the second process is in a normal state or an abnormal state in time by detecting the state of the second process, and if the state is normal, continue in the second process. If the status is abnormal, the second process is restarted, so that different processing is performed according to different detection results to avoid server downtime due to the abnormality of the second process, thereby improving the reliability of the server.
本申请实施例还提供了一种服务器,如图8所示,该服务器500包括处理器501和机器可读存储介质502,机器可读存储介质存储有能够被处理器执行的机器可执行指令,处理器被机器可执行指令促使实现以下步骤:The embodiment of the present application further provides a server. As shown in FIG. 8, the server 500 includes a processor 501 and a machine readable storage medium 502. The machine readable storage medium stores machine executable instructions executable by the processor. The processor is exemplified by machine executable instructions to implement the following steps:
在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将所述初始化结果数据缓存至内存中;Initializing the virtual switch in the first process, obtaining initialization result data, and buffering the initialization result data into the memory;
在第二进程中,通过已初始化的虚拟交换机使用所述初始化结果数据转发接收的报文;In the second process, the received message is forwarded by the initialized virtual switch by using the initialization result data;
当所述第二进程发生异常时,重新创建第二进程,并从内存中获取所述初始化结果数据;When an abnormality occurs in the second process, re-creating the second process, and acquiring the initialization result data from the memory;
在重新创建的第二进程中,通过已初始化的虚拟交换机使用获取的所述初始化结果数据转发接收的报文。In the second process of re-creation, the received message is forwarded by the initialized virtual switch using the obtained initialization result data.
机器可读存储介质502可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The machine readable storage medium 502 may include a random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
本申请实施例提供的服务器,通过在第一进程中进行虚拟交换机的初始化并将初始化结果数据缓存至内存中,虚拟交换机能够在第二进程中使用初始化结果数据转发接收的报文,即使第二进程发生异常,重新创建第二进程后,虚拟交换机也能够直接使用所获取的初始化结果数据继续进行报文的转发。由于不需要在第二进程再进行初始化操作,相比于现有技术而言,本申请能够消除因重新进行虚拟交换机的初始化而耗费的时间,使虚拟交换机尽快恢复报文转发业务,从而提高报文转发效率。The server provided by the embodiment of the present application can perform the initialization of the virtual switch in the first process and cache the initialization result data into the memory, and the virtual switch can forward the received packet by using the initialization result data in the second process, even if the second The process is abnormal. After the second process is re-created, the virtual switch can directly forward the packets using the obtained initialization result data. The present invention can eliminate the time taken for re-initializing the virtual switch, so that the virtual switch can resume the packet forwarding service as soon as possible, thereby improving the report. Text forwarding efficiency.
本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质内存储有计算机程序,计算机程序被处理器执行时,用以执行如下步骤:The embodiment of the present application further provides a computer readable storage medium. The computer readable storage medium stores a computer program. When the computer program is executed by the processor, the following steps are performed:
在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将所述初始化结果数据缓存至内存中;Initializing the virtual switch in the first process, obtaining initialization result data, and buffering the initialization result data into the memory;
在第二进程中,通过已初始化的虚拟交换机使用所述初始化结果数据转发接收的报文;In the second process, the received message is forwarded by the initialized virtual switch by using the initialization result data;
当所述第二进程发生异常时,重新创建第二进程,并从内存中获取所述初始化结果数据;When an abnormality occurs in the second process, re-creating the second process, and acquiring the initialization result data from the memory;
在重新创建的第二进程中,通过已初始化的虚拟交换机使用获取的所述初始化结果数据转发接收的报文。In the second process of re-creation, the received message is forwarded by the initialized virtual switch using the obtained initialization result data.
本申请实施例提供的计算机可读存储介质,通过在第一进程中进行虚拟交换机的初始化并将初始化结果数据缓存至内存中,虚拟交换机能够在第二进程中使用初始化结果数据转发接收的报文,即使第二进程发生异常,重新创建第二进程后,虚拟交换机也能够直接使用所获取的初始化结果数据继续进行报文的转发。由于不需要在第二进程再进行初始化操作,相比于现有技术而言,本申请能够消除因重新进行虚拟交换机的初始化而耗费的时间,使虚拟交换机尽快恢复报文转发业务,从而提高报文转发效率。The computer readable storage medium provided by the embodiment of the present application can perform the initialization of the virtual switch in the first process and cache the initialization result data into the memory, and the virtual switch can forward the received message by using the initialization result data in the second process. After the second process is re-created, the virtual switch can directly forward the packet using the obtained initialization result data. The present invention can eliminate the time taken for re-initializing the virtual switch, so that the virtual switch can resume the packet forwarding service as soon as possible, thereby improving the report. Text forwarding efficiency.
本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行以下步骤:The embodiment of the present application further provides a computer program product comprising instructions, when executed on a computer, causing the computer to perform the following steps:
在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将所述初始化结果数据缓存至内存中;Initializing the virtual switch in the first process, obtaining initialization result data, and buffering the initialization result data into the memory;
在第二进程中,通过已初始化的虚拟交换机使用所述初始化结果数据转发接收的报文;In the second process, the received message is forwarded by the initialized virtual switch by using the initialization result data;
当所述第二进程发生异常时,重新创建第二进程,并从内存中获取所述初始化结果数据;When an abnormality occurs in the second process, re-creating the second process, and acquiring the initialization result data from the memory;
在重新创建的第二进程中,通过已初始化的虚拟交换机使用获取的所述初始化结果数据转发接收的报文。In the second process of re-creation, the received message is forwarded by the initialized virtual switch using the obtained initialization result data.
本申请实施例提供的包含指令的计算机程序产品,通过在第一进程中进行虚拟交换机的初始化并将初始化结果数据缓存至内存中,虚拟交换机能够在第二进程中使用初始化结果数据转发接收的报文,即使第二进程发生异常,重新创建第二进程后,虚拟交换机也能够直接使用所获取的初始化结果数据继续进行报文的转发。由于不需要在第二进程再进行初始化操作,相比于现有技术而言,本申请能够消除因重新进行虚拟交换机的初始化而耗费的时间,使虚拟交换机尽快恢复报文转发业务,从而提高报文转发效率。The computer program product including the instruction provided by the embodiment of the present application can perform the initialization of the virtual switch in the first process and cache the initialization result data into the memory, and the virtual switch can forward the received report by using the initialization result data in the second process. After the second process is re-created, the virtual switch can directly forward the packet using the obtained initialization result data. The present invention can eliminate the time taken for re-initializing the virtual switch, so that the virtual switch can resume the packet forwarding service as soon as possible, thereby improving the report. Text forwarding efficiency.
本申请实施例还提供了一种计算机程序,当其在计算机上运行时,使得计算机执行以下步骤:The embodiment of the present application also provides a computer program, when it is run on a computer, causes the computer to perform the following steps:
在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将所述初始化结果数据缓存至内存中;Initializing the virtual switch in the first process, obtaining initialization result data, and buffering the initialization result data into the memory;
在第二进程中,通过已初始化的虚拟交换机使用所述初始化结果数据转发接收的报文;In the second process, the received message is forwarded by the initialized virtual switch by using the initialization result data;
当所述第二进程发生异常时,重新创建第二进程,并从内存中获取所述初始化结果数据;When an abnormality occurs in the second process, re-creating the second process, and acquiring the initialization result data from the memory;
在重新创建的第二进程中,通过已初始化的虚拟交换机使用获取的所述初始化结果数据转发接收的报文。In the second process of re-creation, the received message is forwarded by the initialized virtual switch using the obtained initialization result data.
本申请实施例提供的包含指令的计算机程序,通过在第一进程中进行虚拟交换机的初始化并将初始化结果数据缓存至内存中,虚拟交换机能够在第二进程中使用初始化结果数据转发接收的报文,即使第二进程发生异常,重新创建第二进程后,虚拟交换机也能够直接使用所获取的初始化结果数据继续进行报文的转发。由于不需要在第二进程再进行初始化操作,相比于现有技术而言,本申请能够消除因重新进行虚拟交换机的初始化而耗费的时间,使虚拟交换机尽快恢复报文转发业务,从而提高报文转发效率。The computer program including the instruction provided by the embodiment of the present application can perform the initialization of the virtual switch in the first process and cache the initialization result data into the memory, and the virtual switch can forward the received message by using the initialization result data in the second process. After the second process is re-created, the virtual switch can directly forward the packet using the obtained initialization result data. The present invention can eliminate the time taken for re-initializing the virtual switch, so that the virtual switch can resume the packet forwarding service as soon as possible, thereby improving the report. Text forwarding efficiency.
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or may be a digital signal processing (DSP), dedicated integration. Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。In this document, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such. The actual relationship or order. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the present specification are described in a related manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。The above description is only the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are included in the scope of the present application.
工业实用性Industrial applicability
基于本申请实施例提供的报文转发方法、转发装置、服务器及存储介质,通过在第一进程中进行虚拟交换机的初始化并将初始化结果数据缓存至内存中,虚拟交换机能够在第二进程中使用初始化结果数据转发接收的报文,即使第二进程发生异常,重新创建第二进程后,虚拟交换机也能够直接使用所获取的初始化结果数据继续进行报文的转发。由于不需要在第二进程再进行初始化操作,相比于现有技术而言,本申请能够消除因重新进行虚拟交换机的初始化而耗费的时间,使虚拟交换机尽快恢复报文转发业务,从而提高报文转发效率。Based on the packet forwarding method, the forwarding device, the server, and the storage medium provided by the embodiments of the present application, the virtual switch can be used in the second process by performing initialization of the virtual switch in the first process and buffering the initialization result data into the memory. After the second process is re-created, the virtual switch can directly forward the packet using the obtained initialization result data. The present invention can eliminate the time taken for re-initializing the virtual switch, so that the virtual switch can resume the packet forwarding service as soon as possible, thereby improving the report. Text forwarding efficiency.

Claims (18)

  1. 一种基于虚拟交换机的报文转发方法,其中,所述方法包括:A packet forwarding method based on a virtual switch, where the method includes:
    在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将所述初始化结果数据缓存至内存中;Initializing the virtual switch in the first process, obtaining initialization result data, and buffering the initialization result data into the memory;
    在第二进程中,通过已初始化的虚拟交换机使用所述初始化结果数据转发接收的报文;In the second process, the received message is forwarded by the initialized virtual switch by using the initialization result data;
    当所述第二进程发生异常时,重新创建第二进程,并从内存中获取所述初始化结果数据;When an abnormality occurs in the second process, re-creating the second process, and acquiring the initialization result data from the memory;
    在重新创建的第二进程中,通过已初始化的虚拟交换机使用获取的所述初始化结果数据转发接收的报文。In the second process of re-creation, the received message is forwarded by the initialized virtual switch using the obtained initialization result data.
  2. 根据权利要求1所述的报文转发方法,其中,在所述第一进程中进行虚拟交换机的初始化的步骤之前,还包括:The packet forwarding method according to claim 1, wherein before the step of performing initialization of the virtual switch in the first process, the method further includes:
    在操作系统启动的过程中创建所述第一进程。The first process is created during the startup of the operating system.
  3. 根据权利要求1所述的报文转发方法,其中,所述在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将所述初始化结果数据缓存至内存中,包括:The message forwarding method according to claim 1, wherein the initializing of the virtual switch in the first process, obtaining the initialization result data, and buffering the initialization result data into the memory includes:
    在所述第一进程中进行大页内存初始化及网卡驱动初始化,得到大页内存数据和网卡驱动数据,并将所述大页内存数据和所述网卡驱动数据缓存至内存中。Large page memory initialization and network card driver initialization are performed in the first process to obtain large page memory data and network card drive data, and the large page memory data and the network card drive data are buffered into the memory.
  4. 根据权利要求1所述的报文转发方法,其中,所述当所述第二进程发生异常时,重新创建第二进程,并从内存中获取所述初始化结果数据之前,所述方法还包括:The packet forwarding method according to claim 1, wherein the method further comprises: when the second process is re-created, and the initialization result data is obtained from the memory, the method further comprises:
    检测所述第二进程是否处于正常状态。Detecting whether the second process is in a normal state.
  5. 根据权利要求4所述的报文转发方法,其中,所述检测所述第二进程是否处于正常状态,包括:The packet forwarding method according to claim 4, wherein the detecting whether the second process is in a normal state comprises:
    通过第一进程向所述第二进程发送应答请求;Sending a response request to the second process by using a first process;
    如果接收到所述第二进程的响应,确定所述第二进程状态正常;If the response of the second process is received, determining that the second process status is normal;
    如果未接收到所述第二进程的响应,确定所述第二进程状态异常。If the response of the second process is not received, it is determined that the second process status is abnormal.
  6. 根据权利要求5所述的报文转发方法,其中,所述通过第一进程向所述第二进程发送应答请求,包括:The packet forwarding method according to claim 5, wherein the sending the response request to the second process by using the first process comprises:
    每隔预设时间间隔,通过第一进程向所述第二进程发送应答请求。The response request is sent to the second process by the first process every preset time interval.
  7. 根据权利要求5或6所述的报文转发方法,其中,所述如果未接收到所述第二进程的回应,确定所述第二进程状态异常之后,所述方法还包括:The packet forwarding method according to claim 5 or 6, wherein, after the response of the second process is not received, and the second process status is determined to be abnormal, the method further includes:
    生成所述第二进程状态异常的通知消息并显示所述通知消息。Generating a notification message of the second process status exception and displaying the notification message.
  8. 一种基于虚拟交换机的报文转发装置,其中,所述装置包括:A packet forwarding device based on a virtual switch, wherein the device includes:
    初始化模块,用于在第一进程中进行虚拟交换机的初始化,得到初始化结果数据,并将所述初始化结果数据缓存至内存中;An initialization module, configured to perform initialization of the virtual switch in the first process, obtain initialization result data, and cache the initialization result data into the memory;
    转发模块,用于在第二进程中,通过已初始化的虚拟交换机使用所述初始化结果数据转发接收的报文;a forwarding module, configured to forward, by using the initialization result data, the received packet by the initialized virtual switch in the second process;
    创建模块,还用于当所述第二进程发生异常时,重新创建第二进程,并从内存中获取所述初始化结果数据;a module is further configured to: when an abnormality occurs in the second process, re-create the second process, and obtain the initialization result data from the memory;
    所述转发模块,还用于在重新创建的第二进程中,通过已初始化的虚拟交换机使用获取的所述初始化结果数据转发接收的报文。The forwarding module is further configured to forward the received packet by using the obtained initialization result data by the initialized virtual switch in the second process of re-creation.
  9. 根据权利要求8所述的报文转发装置,其中,所述装置还包括:The message forwarding device of claim 8, wherein the device further comprises:
    创建模块,用于在操作系统启动的过程中创建所述第一进程。A module is created for creating the first process during an operating system startup process.
  10. 根据权利要求8所述的报文转发装置,其中,所述初始化模块,具体用于:The message forwarding device according to claim 8, wherein the initialization module is specifically configured to:
    在所述第一进程中进行大页内存初始化及网卡驱动初始化,得到大页内存数据和网卡驱动数据,并将所述大页内存数据和所述网卡驱动数据缓存至内存中。Large page memory initialization and network card driver initialization are performed in the first process to obtain large page memory data and network card drive data, and the large page memory data and the network card drive data are buffered into the memory.
  11. 根据权利要求8所述的报文转发装置,其中,所述装置还包括:The message forwarding device of claim 8, wherein the device further comprises:
    检测模块,用于检测所述第二进程是否处于正常状态。The detecting module is configured to detect whether the second process is in a normal state.
  12. 根据权利要求11所述的报文转发装置,其中,所述检测模块,包括:The packet forwarding device of claim 11, wherein the detecting module comprises:
    发送子模块,用于通过第一进程向所述第二进程发送应答请求;a sending submodule, configured to send a response request to the second process by using a first process;
    确定子模块,用于如果接收到所述第二进程的响应,确定所述第二进程状态正常;如果未接收到所述第二进程的响应,确定所述第二进程状态异常。Determining a submodule, configured to determine that the second process status is normal if the response of the second process is received; and determine that the second process status is abnormal if the response of the second process is not received.
  13. 根据权利要求12所述的报文转发装置,其中,所述发送子模块,具体用于:The packet forwarding device according to claim 12, wherein the sending submodule is specifically configured to:
    每隔预设时间间隔,通过第一进程向所述第二进程发送应答请求。The response request is sent to the second process by the first process every preset time interval.
  14. 根据权利要求12或13所述的报文转发装置,其中,所述装置还包括:The message forwarding device according to claim 12 or 13, wherein the device further comprises:
    生成模块,用于生成所述第二进程状态异常的通知消息并显示所述通知消息。And a generating module, configured to generate a notification message of the second process status abnormality and display the notification message.
  15. 一种服务器,其中,包括处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令,所述处理器被所述机器可执行指令时:实现权利要求1至7任一项所述的方法步骤。A server, comprising a processor and a machine readable storage medium, the machine readable storage medium storing machine executable instructions executable by the processor, the processor being executable by the machine The method steps of any one of claims 1 to 7 are carried out.
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至7任一项所述的方法步骤。A computer readable storage medium, wherein the computer readable storage medium stores a computer program, the computer program being executed by a processor to implement the method steps of any one of claims 1 to 7.
  17. 一种包含指令的计算机程序产品,其中,所述包含指令的计算机程序产品在计算机上运行时,使得计算机执行权利要求1-7任一项所述的方法步骤。A computer program product comprising instructions, wherein the computer program product comprising instructions, when run on a computer, causes the computer to perform the method steps of any of claims 1-7.
  18. 一种计算机程序,其中,所述计算机程序在计算机上运行时,使得计算机执行权利要求1-7任一项所述的方法步骤。A computer program, wherein the computer program, when run on a computer, causes the computer to perform the method steps of any of claims 1-7.
PCT/CN2018/125951 2018-01-24 2018-12-30 Packet forwarding method and apparatus, server, and storage medium WO2019144777A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810069233.5A CN110071880B (en) 2018-01-24 2018-01-24 Message forwarding method, forwarding device, server and storage medium
CN201810069233.5 2018-01-24

Publications (1)

Publication Number Publication Date
WO2019144777A1 true WO2019144777A1 (en) 2019-08-01

Family

ID=67365679

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/125951 WO2019144777A1 (en) 2018-01-24 2018-12-30 Packet forwarding method and apparatus, server, and storage medium

Country Status (2)

Country Link
CN (1) CN110071880B (en)
WO (1) WO2019144777A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110650100A (en) * 2019-10-16 2020-01-03 南京中孚信息技术有限公司 Method and device for capturing network card data packet and electronic equipment
CN111897681A (en) * 2020-07-14 2020-11-06 绿盟科技集团股份有限公司 Message forwarding method and device, computing equipment and storage medium
CN113064748A (en) * 2021-04-08 2021-07-02 中国第一汽车股份有限公司 Process succession method, device, electronic equipment and storage medium
CN113839889A (en) * 2021-09-18 2021-12-24 深圳震有科技股份有限公司 Message processing method, terminal and computer readable storage medium
CN115150464A (en) * 2022-06-22 2022-10-04 北京天融信网络安全技术有限公司 Application proxy method, device, equipment and medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569126A (en) * 2019-09-09 2019-12-13 南京中孚信息技术有限公司 Data packet processing method and device of target application and electronic equipment
CN113630341B (en) * 2021-08-03 2023-06-06 武汉绿色网络信息服务有限责任公司 Data information processing method and server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297277A (en) * 2013-06-19 2013-09-11 北京华胜天成科技股份有限公司 Virtual network repairing method and system
CN103425535A (en) * 2013-06-05 2013-12-04 浙江大学 Agile elastic telescoping method in cloud environment
CN106339254A (en) * 2015-07-15 2017-01-18 中兴通讯股份有限公司 Quick starting method and device, and management node for virtual machine
CN107483237A (en) * 2017-08-02 2017-12-15 赛尔网络有限公司 Performance optimization system and method based on DPDK forwardings

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3415494B2 (en) * 1999-07-01 2003-06-09 日本電気通信システム株式会社 Method and apparatus for duplicated LAN switch for virtual LAN
CN100490399C (en) * 2003-10-31 2009-05-20 华为技术有限公司 Quick method for recovering mass configuration of three-layer exchanger
CN101217462A (en) * 2005-07-15 2008-07-09 华为技术有限公司 A failure recovery method in virtual exchange
US9021299B2 (en) * 2011-02-18 2015-04-28 Ab Initio Technology Llc Restarting processes
CN102262558A (en) * 2011-08-04 2011-11-30 中兴通讯股份有限公司 Synchronizing method and system of virtual machine
CN102467403B (en) * 2011-10-14 2015-06-10 海尔集团技术研发中心 Software fast switching method based on progress emigration/immigration and device thereof
CN105068866B (en) * 2012-05-04 2019-06-04 北京奇虎科技有限公司 A kind of course control method and device of browser input control
CN105447033B (en) * 2014-08-28 2019-06-11 国际商业机器公司 The method and apparatus of initial copy are generated in duplication initialization
CN104239120B (en) * 2014-08-28 2018-06-05 华为技术有限公司 The method, apparatus and system of a kind of status information synchronization of virtual machine
CN107368358B (en) * 2016-05-11 2020-07-24 华为技术有限公司 Device and method for realizing migration of virtual machine of client among different hosts
CN108183871B (en) * 2017-11-23 2019-03-12 北京三快在线科技有限公司 A kind of virtual switch, virtual switch start method, electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425535A (en) * 2013-06-05 2013-12-04 浙江大学 Agile elastic telescoping method in cloud environment
CN103297277A (en) * 2013-06-19 2013-09-11 北京华胜天成科技股份有限公司 Virtual network repairing method and system
CN106339254A (en) * 2015-07-15 2017-01-18 中兴通讯股份有限公司 Quick starting method and device, and management node for virtual machine
CN107483237A (en) * 2017-08-02 2017-12-15 赛尔网络有限公司 Performance optimization system and method based on DPDK forwardings

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110650100A (en) * 2019-10-16 2020-01-03 南京中孚信息技术有限公司 Method and device for capturing network card data packet and electronic equipment
CN111897681A (en) * 2020-07-14 2020-11-06 绿盟科技集团股份有限公司 Message forwarding method and device, computing equipment and storage medium
CN113064748A (en) * 2021-04-08 2021-07-02 中国第一汽车股份有限公司 Process succession method, device, electronic equipment and storage medium
CN113839889A (en) * 2021-09-18 2021-12-24 深圳震有科技股份有限公司 Message processing method, terminal and computer readable storage medium
CN113839889B (en) * 2021-09-18 2024-04-05 深圳震有科技股份有限公司 Message processing method, terminal and computer readable storage medium
CN115150464A (en) * 2022-06-22 2022-10-04 北京天融信网络安全技术有限公司 Application proxy method, device, equipment and medium
CN115150464B (en) * 2022-06-22 2024-03-15 北京天融信网络安全技术有限公司 Application proxy method, device, equipment and medium

Also Published As

Publication number Publication date
CN110071880B (en) 2021-06-18
CN110071880A (en) 2019-07-30

Similar Documents

Publication Publication Date Title
WO2019144777A1 (en) Packet forwarding method and apparatus, server, and storage medium
JP6383839B2 (en) Method, storage device and system used for remote KVM session
JP4887150B2 (en) Method and apparatus for monitoring and resetting a coprocessor
TWI610167B (en) Computing device-implemented method and non-transitory medium holding computer-executable instructions for improved platform management, and computing device configured to provide enhanced management information
US8910160B1 (en) Handling of virtual machine migration while performing clustering operations
WO2018095414A1 (en) Method and apparatus for detecting and recovering fault of virtual machine
JP5286942B2 (en) Control method, control program, and information processing apparatus
US10742761B2 (en) Inter-process communication fault detection and recovery system
US9712382B2 (en) Retrieving console messages after device failure
JP2014522052A (en) Reduce hardware failure
WO2013188332A1 (en) Software handling of hardware error handling in hypervisor-based systems
US10848595B2 (en) Method and device for message sending and receiving based on a communication interface framework
US20200057714A1 (en) Testing data changes in production systems
US20070174723A1 (en) Sub-second, zero-packet loss adapter failover
US9448827B1 (en) Stub domain for request servicing
CN109586989B (en) State checking method, device and cluster system
US9148479B1 (en) Systems and methods for efficiently determining the health of nodes within computer clusters
US10157005B2 (en) Utilization of non-volatile random access memory for information storage in response to error conditions
US20110239038A1 (en) Management apparatus, management method, and program
US8880957B2 (en) Facilitating processing in a communications environment using stop signaling
JP2012198651A (en) Cluster system, virtual machine server, failover method for virtual machine, and failover program for the virtual machine
CN109257235B (en) Network anomaly recovery method, device, equipment and computer readable storage medium
JP2016513309A (en) Control of error propagation due to faults in computing nodes of distributed computing systems
WO2020096845A1 (en) Performing actions opportunistically in connection with reboot events in a cloud computing system
WO2022218346A1 (en) Fault processing method and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18902294

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10/11/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18902294

Country of ref document: EP

Kind code of ref document: A1