WO2019174074A1 - 一种处理业务数据的方法和网络设备 - Google Patents

一种处理业务数据的方法和网络设备 Download PDF

Info

Publication number
WO2019174074A1
WO2019174074A1 PCT/CN2018/081555 CN2018081555W WO2019174074A1 WO 2019174074 A1 WO2019174074 A1 WO 2019174074A1 CN 2018081555 W CN2018081555 W CN 2018081555W WO 2019174074 A1 WO2019174074 A1 WO 2019174074A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage space
sub
service data
processing
processing process
Prior art date
Application number
PCT/CN2018/081555
Other languages
English (en)
French (fr)
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 网宿科技股份有限公司
Priority to US16/330,205 priority Critical patent/US20210334210A1/en
Priority to EP18880058.5A priority patent/EP3567483B1/en
Publication of WO2019174074A1 publication Critical patent/WO2019174074A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0646Configuration or reconfiguration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/15Use in a specific computing environment
    • G06F2212/152Virtualized environment, e.g. logically partitioned system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Definitions

  • the present invention relates to the field of virtualization technologies, and in particular, to a method and network device for processing service data.
  • Vhost/Virtio technology is a paravirtualized device abstract interface specification. Most of the DPDK framework uses the Vhost/Virtio interface to send and receive business data. In the DPDK technical transformation project, there may be multiple virtual processing processes that simultaneously process the transmitted and received business data, and each processing process can implement data interaction with the physical network card through the Vhost/Virtio interface.
  • the processing stack is a protocol stack that encapsulates and decapsulates service data based on a multi-layer communication protocol in the network.
  • the technician can The DPDK (Data Plane Development Kit) technology is used to modify the processing process so that after the physical network card receives the service data, the network card driver reloaded by the DPDK framework does not notify the CPU through the interrupt request, but directly directs the service.
  • the data is copied to the application layer, and the service data is decapsulated through a separate protocol stack.
  • the Vhost interface allows only one processing process to call the Virtio interface to establish a communication connection with it. Therefore, multiple processing processes need to frequently call the Virtio interface to establish a communication connection with the Vhost interface to implement service data transmission and reception, thus greatly consuming network equipment. Processing resources and reducing the efficiency of processing business data.
  • an embodiment of the present invention provides a method and a network device for processing service data.
  • the technical solution is as follows:
  • a method of processing business data comprising:
  • the Virtio interface is invoked to establish a communication connection with the Vhost interface deployed on the virtual switch;
  • the first processing process applies for a target storage space, and divides the target storage space into multiple sub-storage spaces;
  • the second processing process determines a target sub-storage space in the plurality of sub-storage spaces at startup, and performs processing of the service data based on the target sub-storage space.
  • the processing of the service data based on the target sub-storage space includes:
  • the second processing process periodically detects the target sub-storage space
  • the second processing process acquires the service data to be processed, and processes the service data to be processed.
  • the method further includes:
  • the virtual switch determines the current load of all the processing processes, and stores the to-be-processed service data into the sub-storage space corresponding to the processing process with the lowest current load.
  • the processing of the service data based on the target sub-storage space includes:
  • the second processing process acquires service data to be processed, and processes the to-be-processed service data
  • the second processing process stores the processed service data into the target sub-storage space.
  • the method further includes:
  • the virtual switch extracts the processed service data, and provides the processed service data to the physical network card.
  • the first processing process applies for a target storage space, and the target storage space is divided into multiple sub-storage spaces, including:
  • the first processing process reads a preset configuration file to determine a total number of processing processes
  • the first processing process requests a target storage space, and divides the target storage space into a plurality of sub-storage spaces according to the total number of the processing processes.
  • the method further includes:
  • the first processing process performs data negotiation with the Vhost interface to generate a negotiation result.
  • the first processing process sets a shared sub-storage space in the plurality of sub-storage spaces, and stores the negotiation result in the shared sub-storage space;
  • the second processing process accesses the shared sub-storage space to obtain the negotiation result, and initializes the target sub-storage space based on the negotiation result.
  • a network device for processing service data is provided, the network device being provided with a virtual switch and executing a plurality of processing processes, wherein:
  • the first processing process of the multiple processing processes is configured to invoke a Virtio interface to establish a communication connection with a Vhost interface deployed on the virtual switch.
  • the first processing process is used to apply for a target storage space, and divide the target storage space into multiple sub-storage spaces;
  • the second processing process of the multiple processing processes is configured to determine a target sub-storage space in the plurality of sub-storage spaces at startup, and perform processing of the service data based on the target sub-storage space.
  • the second processing process is specifically configured to:
  • the service data to be processed exists in the target sub-storage space, the service data to be processed is acquired, and the service data to be processed is processed.
  • the network device is configured with a physical network card, where:
  • the virtual switch is configured to acquire the to-be-processed service data received by the physical network card, determine a current load of all the processing processes, and store the to-be-processed service data in the sub-process corresponding to the current load. storage.
  • the second processing process is specifically configured to:
  • the processed business data is stored in the target sub-storage space.
  • the network device is configured with a physical network card, where:
  • the virtual switch is configured to: after detecting the processed service data in the target sub-storage space in the plurality of sub-storage spaces, extract the processed service data, and provide the processed service data to the physical NIC .
  • the first processing process is specifically configured to:
  • the target storage space is applied, and the target storage space is divided into a plurality of sub-storage spaces according to the total number of the processing processes.
  • the first processing process is further configured to perform data negotiation with the Vhost interface, generate a negotiation result, set a shared sub-storage space in the multiple sub-storage spaces, and store the negotiation result in the Share sub-storage space;
  • the second processing process is further configured to: after determining the target sub-storage space, access the shared sub-storage space to obtain the negotiation result, and initialize the target sub-storage space based on the negotiation result.
  • the first processing process invokes the Virtio interface to establish a communication connection with the Vhost interface deployed on the virtual switch; the first processing process requests the target storage space, and divides the target storage space into multiple sub-storage spaces.
  • the second processing process determines the target sub-storage space in the plurality of sub-storage spaces at the time of startup, and performs processing of the service data based on the target sub-storage space.
  • a processing process calls the Virtio interface to establish a communication connection with the Vhost interface, and multiple processing processes use the same communication connection to realize the transmission and reception of service data in a shared storage space, without requiring multiple processing processes to alternately call the Virtio interface and the Vhost interface.
  • the communication connection saves the processing resources of the network device and ensures the efficiency of processing the business data.
  • FIG. 1 is a schematic diagram of a scenario for processing service data according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for processing service data according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a shared storage space according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a network device according to an embodiment of the present invention.
  • the embodiment of the present invention provides a method for processing service data.
  • the execution entity of the method may be a network device, and the network device may be any device that has a data transceiving function, such as a computer and a server.
  • a project process and a plurality of processing processes having at least one network service may be executed in the network device, and each processing process may be used to process the service data of the project process, and the process may be the service data as mentioned in the background art.
  • Analytic processing including encapsulation and decapsulation
  • the network device can use DPDK technology to implement the above virtualization processing.
  • the DPDK framework is configured to set up a virtual switch.
  • the virtual switch can be connected to the physical network card of the network device, and one end can interact with the processing process through the Vhost/Virtio interface.
  • the Vhost/Virtio interface in the DPDK framework has high data throughput performance.
  • the Vhost/Virtio interface can serve multiple processing processes described above. Each processing process can implement data interaction with the physical network card through the Vhost/Virtio interface to implement service data.
  • the specific scene frame can refer to Figure 1.
  • the foregoing network device may include a processor, a memory, and a transceiver.
  • the processor may be used to process the service data in the following process, and the memory may be used to store data and data generated in the following processing, and the transceiver may Used to receive and send relevant data in the following processing.
  • the analysis processing of the service data is taken as an example, and other processing procedures are similar, and details are not described herein again.
  • Step 201 When the first processing process starts, the Virtio interface is invoked to establish a communication connection with the Vhost interface deployed on the virtual switch.
  • the processing process may be an independent protocol stack executed on the CPU of the network device.
  • the independent protocol stack may be developed by a technician on the network device side, and the original kernel protocol on different CPUs. Stack.
  • the first processing process when the first processing process is started, it can be determined whether it is the first data processing process initiated, and if so, the initialization processing is performed, specifically, the Virtio interface of the virtual network card can be invoked, and deployed on the virtual switch.
  • the Vhost interface establishes a communication connection for the linux domain socket. If the first processing process is not the first processing process, the processing of the following step 203 may be referred to find the corresponding sub-storage space.
  • the technician can also pre-specify the processing process of invoking the Virtio interface to establish a communication connection with the Vhost interface, and then record the specified result to the configuration file, and load the configuration file into the network device, so that the first processing process can Look for the above configuration file after startup to determine whether to call the Virtio interface to establish a communication connection with the Vhost interface.
  • Step 202 The first processing process requests a target storage space, and divides the target storage space into multiple sub-storage spaces.
  • the shared structure may be created, that is, the target storage space is requested from the operating system of the network device, and the target storage space may be shared by multiple processing processes. storage. Thereafter, the first processing process may divide the target storage space into a plurality of sub-storage spaces, and each of the sub-storage spaces may be provided to a processing process to store the service data. Further, each processing process may correspond to unique identification information, and the first processing process may mark each sub-storage space according to the identification information when dividing the sub-storage space.
  • each sub-storage space can be further divided into two parts, one part is used to store the received service data to be decapsulated, and the other part is used to store the encapsulated service data to be sent.
  • the first processing process may create multiple sub-storage spaces according to the total number of processing processes.
  • the processing of step 202 may be as follows: the first processing process reads the preset configuration file, and determines the total number of processing processes; A processing process requests a target storage space, and divides the target storage space into a plurality of sub-storage spaces according to the total number of processing processes.
  • the technician can record the total number of processing processes running on the network device in the configuration file in advance, and then store the configuration file in the network device. In this way, when the first processing process creates the shared structure, the foregoing configuration file may be read to determine the total number of processing processes on the network device. After that, the first processing process may divide the target storage space into multiple sub-storage spaces after applying the target storage space from the operating system of the network device, so that the number of the sub-storage spaces is the same as the total number of processing processes. In addition, the technician can also pre-set the size of each sub-storage space and write it into the configuration file, so that the first processing process can be based on the size of each sub-storage space, and the total number of processing processes, from the network device. The operating system requests a target storage space of the corresponding size.
  • Step 203 The second processing process determines the target sub-storage space in the plurality of sub-storage spaces at the time of startup, and performs processing of the service data based on the target sub-storage space.
  • the second processing process is any processing process different from the first processing process.
  • the shared structure created by the first processing process may be searched. Specifically, when the shared processing entity is created, the first processing process may set default identification information for the shared structure, thereby The second processing process can find the shared structure according to the default identification information. Further, the second processing process may determine, in the plurality of sub-storage spaces in the shared structure, the target sub-storage space marked with the identification information of the second processing process according to the identity information of the second processing. In this way, the second processing process can perform processing of the service data based on the target sub-storage space. It can be understood that, based on the above processing, each processing process can process the service data according to a sub-storage space in the target storage space.
  • the process of processing the service data based on the sub-storage space may be mainly divided into a receiving phase of the service data and a sending phase of the service data, and the specific content may be as follows:
  • the second processing process periodically detects the target sub-storage space; if the target sub-storage space has the service data to be processed, the second processing process acquires the service data to be processed, and the service to be processed The data is processed.
  • the service data to be processed (to be decapsulated) can be obtained through the corresponding sub-storage space.
  • the target sub-storage space may be periodically detected. If the target sub-storage space has service data to be decapsulated, the second processing process may extract the The service data to be decapsulated is then decapsulated by the decapsulated service data. Furthermore, the second processing process can provide the decapsulated business data to the corresponding project process.
  • the foregoing service data to be processed may be that the virtual switch reads from the physical network card and writes to the sub-storage space
  • the specific processing may be as follows: the virtual switch acquires the to-be-processed service data received by the physical network card; the virtual switch determines The current load of all processing processes stores the service data to be processed into the sub-storage space corresponding to the processing process with the lowest load.
  • the physical network card of the network device can receive the corresponding service data.
  • the service data may be through the multi-layer network communication.
  • Service data to be decapsulated after the protocol is encapsulated.
  • the virtual switch can obtain the service data to be decapsulated received by the physical network card, and then determine the current load of all the processing processes according to the amount of data to be processed currently processed by each processing process.
  • the virtual switch can select the processing process with the lowest current load, and store the service data to be decapsulated into the sub-storage space corresponding to the processing process. If there are multiple processing processes with the current load tied to the lowest, the virtual switch can randomly select a processing process among them.
  • the sending phase of the service data the second processing process acquires the business data to be processed, and processes the processed business data; and the second processing process stores the processed business data into the target sub-storage space.
  • the service data when the project process on the network device needs to send the service data to the outside world, the service data may be first provided to a processing process for processing (encapsulation), where the second processing process is taken as an example, and the second processing process obtains After the service data to be encapsulated provided by the project process, the encapsulated service data can be encapsulated. It is not difficult to think that if there are multiple processing processes on the network device serving the above project process, the project process can select the processing process with the lowest load in the multiple processing processes to process the business data based on the load balancing processing. After the second processing process encapsulates the service data to be encapsulated, the encapsulated service data may be stored in its corresponding target sub-storage space.
  • encapsulation for processing
  • the virtual switch may send the processed service data in each sub-storage space to the physical network card of the network device for sending, and the corresponding processing may be as follows: if the target sub-storage space in the plurality of sub-storage spaces is detected to be processed After the service data, the virtual switch extracts the processed service data and provides the processed service data to the physical network card.
  • the access address of the target storage space can be sent to the virtual switch, so that the virtual switch can periodically query multiple sub-storage spaces according to the access address of the target storage space. Whether the processed (encapsulated) business data is stored in the medium. If the target sub-storage space in the plurality of sub-storage spaces is detected to store the encapsulated service data, the virtual switch may extract the encapsulated service data, and then provide the encapsulated service data to the physical NIC of the network device, thereby The NIC can send the encapsulated service data to the specified network address.
  • the virtual switch can receive the corresponding prompt information, so that the virtual switch can also detect that the target sub-storage space is stored and encapsulated. Business data so that it can be processed later.
  • the process of processing the received service data by the network device may be as follows: the physical network card receives the service data, the virtual switch obtains the service data, and the service data is written into the sub-storage space through the Vhost/Virtio interface, and the process is processed.
  • the business data is extracted from the sub-storage space, and the business data is processed to provide the processed business data to the project process.
  • the process of processing the service data to be sent by the network device may be as follows: The service data to be sent is processed and stored in the sub-storage space.
  • the virtual switch reads the service data in the sub-storage space through the Vhost/Virtio interface and sends the data through the physical network card.
  • the first processing process performs data negotiation with the Vhost interface to generate a negotiation result, and the first processing process sets a shared sub-storage space in the multiple sub-storage spaces, and stores the negotiation result in the shared sub-storage space, where the second processing process is After the target sub-storage space is determined, the shared sub-storage space is accessed to obtain the negotiation result, and the target sub-storage space is initialized based on the negotiation result.
  • the first processing process invokes the Virtio interface to establish a communication connection with the Vhost interface deployed on the virtual switch, and may also perform data negotiation with the Vhost interface to generate a negotiation result, and the negotiation result may include the underlying hardware characteristics of the network device and Parameter information of the target storage space (such as the size of the target storage space, the access address, the number of sub-storage spaces, etc.).
  • the shared sub-storage space may be set in the plurality of sub-storage spaces, and then the foregoing negotiation result may be stored in the shared sub-storage space, and the structure of the target storage space is configured. Can be as shown in Figure 3.
  • the processing may first access the shared sub-storage space, obtain the negotiation result stored therein, and perform initialization processing on the target sub-storage space based on the negotiation result.
  • the first processing process invokes the Virtio interface to establish a communication connection with the Vhost interface deployed on the virtual switch; the first processing process requests the target storage space, and divides the target storage space into multiple sub-storage spaces.
  • the second processing process determines the target sub-storage space in the plurality of sub-storage spaces at the time of startup, and performs processing of the service data based on the target sub-storage space.
  • a processing process calls the Virtio interface to establish a communication connection with the Vhost interface, and multiple processing processes use the same communication connection to realize the transmission and reception of service data in a shared storage space, without requiring multiple processing processes to alternately call the Virtio interface and the Vhost interface.
  • the communication connection saves the processing resources of the network device and ensures the efficiency of processing the business data.
  • the embodiment of the present invention further provides a network device for processing service data, where the network device is configured with a virtual switch and performs multiple processing processes, where:
  • the first processing process of the multiple processing processes is configured to invoke a Virtio interface to establish a communication connection with a Vhost interface deployed on the virtual switch.
  • the first processing process is used to apply for a target storage space, and divide the target storage space into multiple sub-storage spaces;
  • the second processing process of the multiple processing processes is configured to determine a target sub-storage space in the plurality of sub-storage spaces at startup, and perform processing of the service data based on the target sub-storage space.
  • the second processing process is specifically configured to:
  • the service data to be processed exists in the target sub-storage space, the service data to be processed is acquired, and the service data to be processed is processed.
  • the network device is configured with a physical network card, where:
  • the virtual switch is configured to acquire the to-be-processed service data received by the physical network card, determine a current load of all the processing processes, and store the to-be-processed service data in the sub-process corresponding to the current load. storage.
  • the second processing process is specifically configured to:
  • the processed business data is stored in the target sub-storage space.
  • the network device is configured with a physical network card, where:
  • the virtual switch is configured to: after detecting the processed service data in the target sub-storage space in the plurality of sub-storage spaces, extract the processed service data, and provide the processed service data to the physical NIC .
  • the first processing process is specifically configured to:
  • the target storage space is applied, and the target storage space is divided into a plurality of sub-storage spaces according to the total number of the processing processes.
  • the first processing process is further configured to perform data negotiation with the Vhost interface, generate a negotiation result, set a shared sub-storage space in the multiple sub-storage spaces, and store the negotiation result in the Share sub-storage space;
  • the second processing process is further configured to: after determining the target sub-storage space, access the shared sub-storage space to obtain the negotiation result, and initialize the target sub-storage space based on the negotiation result.
  • the first processing process invokes the Virtio interface to establish a communication connection with the Vhost interface deployed on the virtual switch; the first processing process requests the target storage space, and divides the target storage space into multiple sub-storage spaces.
  • the second processing process determines the target sub-storage space in the plurality of sub-storage spaces at the time of startup, and performs processing of the service data based on the target sub-storage space.
  • a processing process calls the Virtio interface to establish a communication connection with the Vhost interface, and multiple processing processes use the same communication connection to realize the transmission and reception of service data in a shared storage space, without requiring multiple processing processes to alternately call the Virtio interface and the Vhost interface.
  • the communication connection saves the processing resources of the network device and ensures the efficiency of processing the business data.
  • FIG. 4 is a schematic structural diagram of a network device according to an embodiment of the present invention.
  • the network device 400 can vary considerably depending on configuration or performance, and can include one or more central processing units 422 (eg, one or more processors) and memory 432, one or more storage applications 442 or Storage medium 430 of data 444 (eg, one or one storage device in Shanghai).
  • the memory 432 and the storage medium 430 may be short-term storage or persistent storage.
  • Programs stored on storage medium 430 may include one or more modules (not shown), each of which may include a series of instruction operations in a network device.
  • central processor 422 can be configured to communicate with storage medium 430, executing a series of instruction operations in storage medium 430 on network device 400.
  • Network device 400 may also include one or more power sources 429, one or more wired or wireless network interfaces 450, one or more input and output interfaces 458, one or more keyboards 456, and/or one or more operating systems. 441, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • Network device 400 can include a memory, and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors to include the one or more programs The above instructions for processing business data.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Multi Processors (AREA)
  • Computer And Data Communications (AREA)
  • Stored Programmes (AREA)

Abstract

本发明公开了一种处理业务数据的方法和网络设备,属于虚拟化技术领域。所述方法包括:第一处理进程在启动时,调用Virtio接口,与部署在虚拟交换机上的Vhost接口建立通信连接;所述第一处理进程申请目标存储空间,将所述目标存储空间划分为多个子存储空间;第二处理进程在启动时,在所述多个子存储空间中确定目标子存储空间,并基于所述目标子存储空间进行业务数据的处理。采用本发明,可以节省网络设备的处理资源,保证处理业务数据的效率。

Description

一种处理业务数据的方法和网络设备 技术领域
本发明涉及虚拟化技术领域,特别涉及一种处理业务数据的方法和网络设备。
背景技术
Vhost/Virtio技术是一种半虚拟化的设备抽象接口规范,DPDK框架中大多利用Vhost/Virtio接口来实现业务数据的收发。DPDK技术改造的项目中可以存在虚拟出的多个处理进程同时对收发的业务数据进行处理,每个处理进程都可以通过Vhost/Virtio接口实现与物理网卡之间的数据交互。
以处理进程为基于网络中多层通信协议对业务数据进行封装、解封装的协议栈为例,为了节省CPU内核协议栈解析业务数据的过程中的CPU中断时间和数据读取时间,技术人员可以使用DPDK(Data Plane Development Kit,数据平面开发套件)技术来改造其处理过程,使得物理网卡接收到业务数据后,经DPDK框架重载的网卡驱动不会通过中断请求通知CPU,而是直接将业务数据拷贝至应用层,再经由独立的协议栈来对业务数据进行解封装处理。
在实现本发明的过程中,发明人发现现有技术至少存在以下问题:
同一时间内Vhost接口只允许一个处理进程调用Virtio接口与之建立通信连接,故而,多个处理进程需要频繁交替调用Virtio接口与Vhost接口建立通信连接才能实现业务数据的收发,因此大大耗费了网络设备的处理资源、降低了处理业务数据的效率。
发明内容
为了解决现有技术的问题,本发明实施例提供了一种处理业务数据的方法和网络设备。所述技术方案如下:
第一方面,提供了一种处理业务数据的方法,所述方法包括:
第一处理进程在启动时,调用Virtio接口,与部署在虚拟交换机上的Vhost 接口建立通信连接;
所述第一处理进程申请目标存储空间,将所述目标存储空间划分为多个子存储空间;
第二处理进程在启动时,在所述多个子存储空间中确定目标子存储空间,并基于所述目标子存储空间进行业务数据的处理。
可选的,所述基于所述目标子存储空间进行业务数据的处理,包括:
所述第二处理进程周期性检测所述目标子存储空间;
如果所述目标子存储空间中存在待处理的业务数据,所述第二处理进程则获取所述待处理的业务数据,对所述待处理的业务数据进行处理。
可选的,所述方法还包括:
所述虚拟交换机获取物理网卡接收到的待处理的业务数据;
所述虚拟交换机确定所有处理进程的当前负载,将所述待处理的业务数据存入所述当前负载最低的处理进程对应的子存储空间。
可选的,所述基于所述目标子存储空间进行业务数据的处理,包括:
所述第二处理进程获取待处理的业务数据,对所述待处理的业务数据进行处理;
所述第二处理进程将处理后的业务数据存入所述目标子存储空间。
可选的,所述方法还包括:
如果检测到多个子存储空间中的目标子存储空间存储有处理后的业务数据,所述虚拟交换机则提取所述处理后的业务数据,将所述处理后的业务数据提供给物理网卡。
可选的,所述第一处理进程申请目标存储空间,将所述目标存储空间划分为多个子存储空间,包括:
所述第一处理进程读取预设的配置文件,确定处理进程的总数;
所述第一处理进程申请目标存储空间,根据所述处理进程的总数,将所述目标存储空间划分为多个子存储空间。
可选的,所述方法还包括:
所述第一处理进程与所述Vhost接口进行数据协商,生成协商结果;
所述第一处理进程在所述多个子存储空间中设置共享子存储空间,将所述协商结果存入所述共享子存储空间;
所述第二处理进程在确定所述目标子存储空间后,访问所述共享子存储空间获取所述协商结果,并基于所述协商结果初始化所述目标子存储空间。
第二方面,提供了一种处理业务数据的网络设备,所述网络设备设置有虚拟交换机,并执行有多个处理进程,其中:
所述多个处理进程中的第一处理进程,用于在启动时,调用Virtio接口,与部署在所述虚拟交换机上的Vhost接口建立通信连接;
所述第一处理进程,用于申请目标存储空间,将所述目标存储空间划分为多个子存储空间;
所述多个处理进程中的第二处理进程,用于在启动时,在所述多个子存储空间中确定目标子存储空间,并基于所述目标子存储空间进行业务数据的处理。
可选的,所述第二处理进程,具体用于:
周期性检测所述目标子存储空间;
如果所述目标子存储空间中存在待处理的业务数据,则获取所述待处理的业务数据,对所述待处理的业务数据进行处理。
可选的,所述网络设备设置有物理网卡,其中:
所述虚拟交换机,用于获取所述物理网卡接收到的待处理的业务数据,确定所有处理进程的当前负载,将所述待处理的业务数据存入所述当前负载最低的处理进程对应的子存储空间。
可选的,所述第二处理进程,具体用于:
获取待处理的业务数据,对所述待处理的业务数据进行处理;
将处理后的业务数据存入所述目标子存储空间。
可选的,所述网络设备设置有物理网卡,其中:
所述虚拟交换机,用于如果检测到多个子存储空间中的目标子存储空间存储有处理后的业务数据,则提取所述处理后的业务数据,将所述处理后的业务数据提供给物理网卡。
可选的,所述第一处理进程,具体用于:
读取预设的配置文件,确定处理进程的总数;
申请目标存储空间,根据所述处理进程的总数,将所述目标存储空间划分为多个子存储空间。
可选的,所述第一处理进程,还用于与所述Vhost接口进行数据协商,生成协商结果,在所述多个子存储空间中设置共享子存储空间,将所述协商结果存入所述共享子存储空间;
所述第二处理进程,还用于在确定所述目标子存储空间后,访问所述共享子存储空间获取所述协商结果,并基于所述协商结果初始化所述目标子存储空间。
本发明实施例提供的技术方案带来的有益效果是:
本发明实施例中,第一处理进程在启动时,调用Virtio接口,与部署在虚拟交换机上的Vhost接口建立通信连接;第一处理进程申请目标存储空间,将目标存储空间划分为多个子存储空间;第二处理进程在启动时,在多个子存储空间中确定目标子存储空间,并基于目标子存储空间进行业务数据的处理。这样,一个处理进程调用Virtio接口与Vhost接口建立通信连接,多个处理进程以共享存储空间的方式,通过上述同一通信连接实现业务数据的收发,无需多个处理进程交替调用Virtio接口与Vhost接口建立通信连接,从而节省了网络设备的处理资源,保证了处理业务数据的效率。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种处理业务数据的场景框架图;
图2是本发明实施例提供的一种处理业务数据的方法流程图;
图3是本发明实施例提供的一种共享存储空间的结构示意图;
图4是本发明实施例提供的一种网络设备的结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
本发明实施例提供了一种处理业务数据的方法,该方法的执行主体可以是 网络设备,网络设备可以是具备数据收发功能的任意设备,如计算机、服务器。网络设备中可以执行有至少一个网络业务的项目进程和多个处理进程,每个处理进程均可以用于对项目进程的业务数据进行处理,该处理可以是如背景技术中提及的对业务数据的解析处理(包含封装和解封装),也可以是其它的数据处理。网络设备可以采用DPDK技术来实现上述虚拟化处理,支持DPDK框架设置虚拟交换机,虚拟交换机一端可以与网络设备的物理网卡连接,一端可以通过Vhost/Virtio接口与处理进程进行数据交互。DPDK框架下Vhost/Virtio接口具有很高数据吞吐性能,Vhost/Virtio接口可以服务于上述多个处理进程,每个处理进程均可以通过Vhost/Virtio接口实现和物理网卡的数据交互,从而实现业务数据的收发,具体场景框架可以参考图1。上述网络设备中可以包括处理器、存储器、收发器,处理器可以用于进行下述流程中业务数据的处理,存储器可以用于存储下述处理过程中需要的数据以及产生的数据,收发器可以用于接收和发送下述处理过程中的相关数据。本实施例中以业务数据的解析处理为例进行说明,其它处理过程与之类似,不再赘述。
下面将以解析业务为例,结合具体实施方式,对图2所示的处理流程进行详细的说明,内容可以如下:
步骤201,第一处理进程在启动时,调用Virtio接口,与部署在虚拟交换机上的Vhost接口建立通信连接。
其中,在解析业务数据的场景下,处理进程可以为执行在网络设备的CPU上的独立的协议栈,该独立的协议栈可以是网络设备侧的技术人员开发的,不同CPU上原有的内核协议栈。
在实施中,第一处理进程启动时,可以判断自身是否为第一个启动的数据处理进程,如果是,即执行初始化处理,具体则可以调用虚拟网卡的Virtio接口,与部署在虚拟交换机上的Vhost接口建立linux domain socket的通信连接。第一处理进程如果不是第一个启动的处理进程,则可以参考下述步骤203的处理,查找对应的子存储空间。需要说明的是,技术人员也可以预先指定调用Virtio接口与Vhost接口建立通信连接的处理进程,然后将指定结果记录至配置文件,并将配置文件载入网络设备,这样,第一处理进程则可以在启动后查找上述配置文件,以确定是否调用Virtio接口与Vhost接口建立通信连接。
步骤202,第一处理进程申请目标存储空间,将目标存储空间划分为多个子 存储空间。
在实施中,第一处理进程在调用Virtio接口与Vhost建立通信连接后,可以创建共享结构体,即从网络设备的操作系统处申请目标存储空间,该目标存储空间可以作为多个处理进程的共享存储空间。之后,第一处理进程可以将目标存储空间划分为多个子存储空间,每个子存储空间可以提供给一个处理进程来存储业务数据。进一步的,每个处理进程可以对应有唯一的标识信息,第一处理进程可以在划分子存储空间时,根据标识信息对每个子存储空间进行标记。可以理解,第一处理进程同样用于处理业务数据,故而目标存储空间中也存在第一处理进程对应的子存储空间。值得一提的是,每个子存储空间还可以进一步分为两个部分,一部分用于存储接收到的待解封装的业务数据,另一部分用于存储待发送的封装后的业务数据。
可选的,第一处理进程可以根据处理进程的总数,创建多个子存储空间,相应的,步骤202的处理可以如下:第一处理进程读取预设的配置文件,确定处理进程的总数;第一处理进程申请目标存储空间,根据处理进程的总数,将目标存储空间划分为多个子存储空间。
在实施中,技术人员可以预先在配置文件中记录网络设备上运行的处理进程的总数,然后将配置文件存储至网络设备中。这样,第一处理进程在创建共享结构体时,可以先读取上述预设的配置文件,确定网络设备上处理进程的总数。之后,第一处理进程可以在从网络设备的操作系统处申请目标存储空间后,将目标存储空间划分为多个子存储空间,以使子存储空间的个数与处理进程的总数相同。另外,技术人员还可以预先设定每个子存储空间的大小,并将其写入配置文件中,这样,第一处理进程可以根据每个子存储空间的大小,和处理进程的总数,从网络设备的操作系统处申请相应大小的目标存储空间。
步骤203,第二处理进程在启动时,在多个子存储空间中确定目标子存储空间,并基于目标子存储空间进行业务数据的处理。
其中,第二处理进程是不同于第一处理进程的任意处理进程。
在实施中,第二处理进程启动后,可以查找第一处理进程创建的共享结构体,具体的,第一处理进程在创建共享结构体时,可以为共享结构体设置默认的标识信息,从而第二处理进程可以根据该默认的标识信息查找到上述共享结构体。进一步的,第二处理进程可以根据自己的标识信息,在共享结构体中的 多个子存储空间中确定标记有第二处理进程的标识信息的目标子存储空间。这样,第二处理进程则可以基于目标子存储空间进行业务数据的处理。可以理解,基于上述处理,每个处理进程均可以依托于目标存储空间中的一个子存储空间对业务数据的进行处理。
可选的,处理进程基于子存储空间对业务数据进行的处理过程,主要可以分为业务数据的接收阶段和业务数据的发送阶段,具体内容可以分别如下:
其一,业务数据的接收阶段:第二处理进程周期性检测目标子存储空间;如果目标子存储空间中存在待处理的业务数据,第二处理进程则获取待处理的业务数据,对待处理的业务数据进行处理。
在实施中,每个处理进程在启动后,可以通过对应的子存储空间获取待处理(待解封装)的业务数据。具体的,以第二处理进程为例,第二处理进程在启动后,可以周期性检测目标子存储空间,如果目标子存储空间中存在待解封装的业务数据,第二处理进程则可以提取该待解封装的业务数据,然后对待解封装的业务数据进行解封装处理。进而,第二处理进程可以将解封装后的业务数据提供给相应的项目进程。
可选的,上述待处理的业务数据可以是虚拟交换机从物理网卡读取并写入子存储空间的,具体的处理可以如下:虚拟交换机获取物理网卡接收到的待处理的业务数据;虚拟交换机确定所有处理进程的当前负载,将待处理的业务数据存入当前负载最低的处理进程对应的子存储空间。
在实施中,在外界向网络设备发送某一项目进程的业务数据后,网络设备的物理网卡可以接收到相应的业务数据,在解析业务数据的场景下,该业务数据可以是经过多层网络通信协议封装后的待解封装的业务数据。之后,虚拟交换机可以获取物理网卡接收到的待解封装的业务数据,然后可以根据每个处理进程当前待处理的数据量确定所有处理进程的当前负载。进而,虚拟交换机可以挑选当前负载最低的处理进程,将待解封装的业务数据存入该处理进程对应的子存储空间中。如果存在多个当前负载并列最低的处理进程,虚拟交换机则可以在其中随机选择一个处理进程。
其二,业务数据的发送阶段:第二处理进程获取待处理的业务数据,对待处理的业务数据进行处理;第二处理进程将处理后的业务数据存入目标子存储空间。
在实施中,当网络设备上的项目进程需要向外界发送业务数据时,可以先将业务数据提供给一个处理进程进行处理(封装),此处以第二处理进程为例,第二处理进程获取到项目进程提供的待封装的业务数据后,可以对待封装的业务数据进行封装处理。不难想到,如果网络设备上有多个处理进程服务于上述项目进程,项目进程则可以基于负载均衡的处理,在多个处理进程中选择当前负载最低的处理进程对业务数据进行处理。第二处理进程在对待封装的业务数据进行封装处理之后,可以将封装后的业务数据存入其对应的目标子存储空间中。
可选的,虚拟交换机可以将各子存储空间中处理后的业务数据提供给网络设备的物理网卡进行发送,相应的处理可以如下:如果检测到多个子存储空间中的目标子存储空间存储有处理后的业务数据,虚拟交换机则提取处理后的业务数据,将处理后的业务数据提供给物理网卡。
在实施中,第一处理进程创建了目标存储空间后,可以将目标存储空间的访问地址发送给虚拟交换机,这样,虚拟交换机可以按照目标存储空间的访问地址,周期性地依次查询多个子存储空间中是否存储有处理(封装)后的业务数据。如果检测到多个子存储空间中的目标子存储空间存储有封装后的业务数据,虚拟交换机则可以提取该封装后的业务数据,然后将封装后的业务数据提供给网络设备的物理网卡,从而物理网卡可以将封装后的业务数据发送至指定的网络地址。当然,在另一种情况下,当目标子存储空间中存储有待封装后的业务数据时,虚拟交换机可以接收到相应的提示信息,这样,虚拟交换机也可以检测到目标子存储空间存储有封装后的业务数据,从而可以进行后续处理。
综上所述,一方面,网络设备对接收的业务数据进行处理的过程可以如下,物理网卡接收业务数据,虚拟交换机获取业务数据,通过Vhost/Virtio接口将业务数据写入子存储空间,处理进程从子存储空间中提取业务数据,并对业务数据进行处理,将处理后的业务数据提供给项目进程;另一方面,网络设备对待发送的业务数据进行处理的过程可以如下,处理进程获取项目进程的待发送的业务数据,对业务数据进行处理,并存入子存储空间,虚拟交换机通过Vhost/Virtio接口读取子存储空间中的业务数据,通过物理网卡发送。
可选的,第一处理进程与Vhost接口进行数据协商,生成协商结果,第一处理进程在多个子存储空间中设置共享子存储空间,将协商结果存入共享子存储 空间,第二处理进程在确定目标子存储空间后,访问共享子存储空间获取协商结果,并基于协商结果初始化目标子存储空间。
在实施中,第一处理进程调用Virtio接口,与部署在虚拟交换机上的Vhost接口建立通信连接时,还可以与Vhost接口进行数据协商,生成协商结果,协商结果可以包括网络设备的底层硬件特性和目标存储空间的参数信息(如目标存储空间的大小、访问地址,子存储空间的数量等)。第一处理进程在将目标存储空间划分为多个子存储空间后,可以在多个子存储空间中设置共享子存储空间,然后可以将上述协商结果存入该共享子存储空间中,目标存储空间的结构可以如图3所示。进而,当处理进程在确定了各自的子存储空间后,可以先访问上述共享子存储空间,获取其中存储的协商结果,再基于协商结果对目标子存储空间进行初始化处理。
本发明实施例中,第一处理进程在启动时,调用Virtio接口,与部署在虚拟交换机上的Vhost接口建立通信连接;第一处理进程申请目标存储空间,将目标存储空间划分为多个子存储空间;第二处理进程在启动时,在多个子存储空间中确定目标子存储空间,并基于目标子存储空间进行业务数据的处理。这样,一个处理进程调用Virtio接口与Vhost接口建立通信连接,多个处理进程以共享存储空间的方式,通过上述同一通信连接实现业务数据的收发,无需多个处理进程交替调用Virtio接口与Vhost接口建立通信连接,从而节省了网络设备的处理资源,保证了处理业务数据的效率。
基于相同的技术构思,本发明实施例还一种处理业务数据的网络设备,所述网络设备设置有虚拟交换机,并执行有多个处理进程,其中:
所述多个处理进程中的第一处理进程,用于在启动时,调用Virtio接口,与部署在所述虚拟交换机上的Vhost接口建立通信连接;
所述第一处理进程,用于申请目标存储空间,将所述目标存储空间划分为多个子存储空间;
所述多个处理进程中的第二处理进程,用于在启动时,在所述多个子存储空间中确定目标子存储空间,并基于所述目标子存储空间进行业务数据的处理。
可选的,所述第二处理进程,具体用于:
周期性检测所述目标子存储空间;
如果所述目标子存储空间中存在待处理的业务数据,则获取所述待处理的业务数据,对所述待处理的业务数据进行处理。
可选的,所述网络设备设置有物理网卡,其中:
所述虚拟交换机,用于获取所述物理网卡接收到的待处理的业务数据,确定所有处理进程的当前负载,将所述待处理的业务数据存入所述当前负载最低的处理进程对应的子存储空间。
可选的,所述第二处理进程,具体用于:
获取待处理的业务数据,对所述待处理的业务数据进行处理;
将处理后的业务数据存入所述目标子存储空间。
可选的,所述网络设备设置有物理网卡,其中:
所述虚拟交换机,用于如果检测到多个子存储空间中的目标子存储空间存储有处理后的业务数据,则提取所述处理后的业务数据,将所述处理后的业务数据提供给物理网卡。
可选的,所述第一处理进程,具体用于:
读取预设的配置文件,确定处理进程的总数;
申请目标存储空间,根据所述处理进程的总数,将所述目标存储空间划分为多个子存储空间。
可选的,所述第一处理进程,还用于与所述Vhost接口进行数据协商,生成协商结果,在所述多个子存储空间中设置共享子存储空间,将所述协商结果存入所述共享子存储空间;
所述第二处理进程,还用于在确定所述目标子存储空间后,访问所述共享子存储空间获取所述协商结果,并基于所述协商结果初始化所述目标子存储空间。
本发明实施例中,第一处理进程在启动时,调用Virtio接口,与部署在虚拟交换机上的Vhost接口建立通信连接;第一处理进程申请目标存储空间,将目标存储空间划分为多个子存储空间;第二处理进程在启动时,在多个子存储空间中确定目标子存储空间,并基于目标子存储空间进行业务数据的处理。这样,一个处理进程调用Virtio接口与Vhost接口建立通信连接,多个处理进程以共享存储空间的方式,通过上述同一通信连接实现业务数据的收发,无需多个处理进程交替调用Virtio接口与Vhost接口建立通信连接,从而节省了网络设备的处 理资源,保证了处理业务数据的效率。
图4是本发明实施例提供的网络设备的结构示意图。该网络设备400可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器422(例如,一个或一个以上处理器)和存储器432,一个或一个以上存储应用程序442或数据444的存储介质430(例如一个或一个以上海量存储设备)。其中,存储器432和存储介质430可以是短暂存储或持久存储。存储在存储介质430的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对网络设备中的一系列指令操作。更进一步地,中央处理器422可以设置为与存储介质430通信,在网络设备400上执行存储介质430中的一系列指令操作。
网络设备400还可以包括一个或一个以上电源429,一个或一个以上有线或无线网络接口450,一个或一个以上输入输出接口458,一个或一个以上键盘456,和/或,一个或一个以上操作系统441,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
网络设备400可以包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行上述处理业务数据的指令。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (14)

  1. 一种处理业务数据的方法,其特征在于,所述方法包括:
    第一处理进程在启动时,调用Virtio接口,与部署在虚拟交换机上的Vhost接口建立通信连接;
    所述第一处理进程申请目标存储空间,将所述目标存储空间划分为多个子存储空间;
    第二处理进程在启动时,在所述多个子存储空间中确定目标子存储空间,并基于所述目标子存储空间进行业务数据的处理。
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述目标子存储空间进行业务数据的处理,包括:
    所述第二处理进程周期性检测所述目标子存储空间;
    如果所述目标子存储空间中存在待处理的业务数据,所述第二处理进程则获取所述待处理的业务数据,对所述待处理的业务数据进行处理。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    所述虚拟交换机获取物理网卡接收到的待处理的业务数据;
    所述虚拟交换机确定所有处理进程的当前负载,将所述待处理的业务数据存入所述当前负载最低的处理进程对应的子存储空间。
  4. 根据权利要求1所述的方法,其特征在于,所述基于所述目标子存储空间进行业务数据的处理,包括:
    所述第二处理进程获取待处理的业务数据,对所述待处理的业务数据进行处理;
    所述第二处理进程将处理后的业务数据存入所述目标子存储空间。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    如果检测到多个子存储空间中的目标子存储空间存储有处理后的业务数据,所述虚拟交换机则提取所述处理后的业务数据,将所述处理后的业务数据提供 给物理网卡。
  6. 根据权利要求1所述的方法,其特征在于,所述第一处理进程申请目标存储空间,将所述目标存储空间划分为多个子存储空间,包括:
    所述第一处理进程读取预设的配置文件,确定处理进程的总数;
    所述第一处理进程申请目标存储空间,根据所述处理进程的总数,将所述目标存储空间划分为多个子存储空间。
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一处理进程与所述Vhost接口进行数据协商,生成协商结果;
    所述第一处理进程在所述多个子存储空间中设置共享子存储空间,将所述协商结果存入所述共享子存储空间;
    所述第二处理进程在确定所述目标子存储空间后,访问所述共享子存储空间获取所述协商结果,并基于所述协商结果初始化所述目标子存储空间。
  8. 一种处理业务数据的网络设备,其特征在于,所述网络设备设置有虚拟交换机,并执行有多个处理进程,其中:
    所述多个处理进程中的第一处理进程,用于在启动时,调用Virtio接口,与部署在所述虚拟交换机上的Vhost接口建立通信连接;
    所述第一处理进程,用于申请目标存储空间,将所述目标存储空间划分为多个子存储空间;
    所述多个处理进程中的第二处理进程,用于在启动时,在所述多个子存储空间中确定目标子存储空间,并基于所述目标子存储空间进行业务数据的处理。
  9. 根据权利要求8所述的网络设备,其特征在于,所述第二处理进程,具体用于:
    周期性检测所述目标子存储空间;
    如果所述目标子存储空间中存在待处理的业务数据,则获取所述待处理的业务数据,对所述待处理的业务数据进行处理。
  10. 根据权利要求9所述的网络设备,其特征在于,所述网络设备设置有物理网卡,其中:
    所述虚拟交换机,用于获取所述物理网卡接收到的待处理的业务数据,确定所有处理进程的当前负载,将所述待处理的业务数据存入所述当前负载最低的处理进程对应的子存储空间。
  11. 根据权利要求8所述的网络设备,其特征在于,所述第二处理进程,具体用于:
    获取待处理的业务数据,对所述待处理的业务数据进行处理;
    将处理后的业务数据存入所述目标子存储空间。
  12. 根据权利要求11所述的网络设备,其特征在于,所述网络设备设置有物理网卡,其中:
    所述虚拟交换机,用于如果检测到多个子存储空间中的目标子存储空间存储有处理后的业务数据,则提取所述处理后的业务数据,将所述处理后的业务数据提供给物理网卡。
  13. 根据权利要求8所述的网络设备,其特征在于,所述第一处理进程,具体用于:
    读取预设的配置文件,确定处理进程的总数;
    申请目标存储空间,根据所述处理进程的总数,将所述目标存储空间划分为多个子存储空间。
  14. 根据权利要求8所述的系统,其特征在于,所述第一处理进程,还用于与所述Vhost接口进行数据协商,生成协商结果,在所述多个子存储空间中设置共享子存储空间,将所述协商结果存入所述共享子存储空间;
    所述第二处理进程,还用于在确定所述目标子存储空间后,访问所述共享子存储空间获取所述协商结果,并基于所述协商结果初始化所述目标子存储空间。
PCT/CN2018/081555 2018-03-13 2018-04-02 一种处理业务数据的方法和网络设备 WO2019174074A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US16/330,205 US20210334210A1 (en) 2018-03-13 2018-04-02 Method and network device for processing service data
EP18880058.5A EP3567483B1 (en) 2018-03-13 2018-04-02 Method for processing service data, and network device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810205185.8A CN108491278B (zh) 2018-03-13 2018-03-13 一种处理业务数据的方法和网络设备
CN201810205185.8 2018-03-13

Publications (1)

Publication Number Publication Date
WO2019174074A1 true WO2019174074A1 (zh) 2019-09-19

Family

ID=63338805

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/081555 WO2019174074A1 (zh) 2018-03-13 2018-04-02 一种处理业务数据的方法和网络设备

Country Status (4)

Country Link
US (1) US20210334210A1 (zh)
EP (1) EP3567483B1 (zh)
CN (1) CN108491278B (zh)
WO (1) WO2019174074A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112543137A (zh) * 2020-11-30 2021-03-23 中国电子科技集团公司第五十四研究所 基于半虚拟化和ovs-dpdk的虚拟机网络加速系统

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110879748B (zh) * 2018-09-06 2023-06-13 阿里巴巴集团控股有限公司 一种共享资源分配方法、装置和设备
CN109976820B (zh) * 2019-04-09 2020-03-03 苏州浪潮智能科技有限公司 一种应用程序运行方法和应用程序架构
CN110489358B (zh) * 2019-07-12 2021-05-28 优刻得科技股份有限公司 一种交互控制方法及设备系统
CN111241201B (zh) * 2020-01-14 2023-02-07 厦门网宿有限公司 一种分布式数据处理方法及系统
CN112181512B (zh) * 2020-09-14 2022-11-11 锐捷网络股份有限公司 一种业务进程管理方法、装置、电子设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591715A (zh) * 2012-01-05 2012-07-18 北京航空航天大学 一种使用多队列技术的虚拟机网络性能优化的实现方法
CN106095580A (zh) * 2016-06-14 2016-11-09 上海交通大学 一种针对半虚拟化网卡的数据包高效发送方法
US20170322828A1 (en) * 2016-05-09 2017-11-09 Cavium, Inc. Systems and methods for virtio based optimization of data packet paths between a virtual machine and a network device for live virtual machine migration

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100481778C (zh) * 2006-12-28 2009-04-22 杭州华三通信技术有限公司 一种实现终端和伪终端设备绑定的方法、装置及系统
CN104468594B (zh) * 2014-12-15 2018-04-27 北京奇安信科技有限公司 一种数据请求的方法、装置及系统
CN105183922A (zh) * 2015-10-26 2015-12-23 北京美数信息科技有限公司 一种高并发的存储装置
CN105700826A (zh) * 2015-12-31 2016-06-22 华为技术有限公司 虚拟化方法和装置
CN105718305B (zh) * 2016-03-15 2018-11-13 南京南瑞继保电气有限公司 一种基于进程的仿真任务并行调度方法
CN106681842A (zh) * 2017-01-18 2017-05-17 迈普通信技术股份有限公司 一种多进程系统中共享内存的管理方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591715A (zh) * 2012-01-05 2012-07-18 北京航空航天大学 一种使用多队列技术的虚拟机网络性能优化的实现方法
US20170322828A1 (en) * 2016-05-09 2017-11-09 Cavium, Inc. Systems and methods for virtio based optimization of data packet paths between a virtual machine and a network device for live virtual machine migration
CN106095580A (zh) * 2016-06-14 2016-11-09 上海交通大学 一种针对半虚拟化网卡的数据包高效发送方法

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
NING FENGFENG: "Network IO Optimization in the context of virtualization", MASTER THESIS, 15 June 2015 (2015-06-15), pages 1 - 50, XP009516642, ISSN: 1674-0246 *
See also references of EP3567483A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112543137A (zh) * 2020-11-30 2021-03-23 中国电子科技集团公司第五十四研究所 基于半虚拟化和ovs-dpdk的虚拟机网络加速系统

Also Published As

Publication number Publication date
CN108491278A (zh) 2018-09-04
US20210334210A1 (en) 2021-10-28
EP3567483B1 (en) 2020-10-28
CN108491278B (zh) 2020-09-18
EP3567483A4 (en) 2019-12-18
EP3567483A1 (en) 2019-11-13

Similar Documents

Publication Publication Date Title
WO2019174074A1 (zh) 一种处理业务数据的方法和网络设备
US10402341B2 (en) Kernel-assisted inter-process data transfer
EP3471366B1 (en) Container deployment method, communication method between services and related devices
US20220318184A1 (en) Virtual rdma switching for containerized applications
US8595526B2 (en) System and method for power reduction by sequestering at least one device or partition in a platform from operating system access
US10417174B2 (en) Remote direct memory access in a virtualized computing environment
TWI303025B (en) Physical device , i/o device and computer system with virtual machine capable interfaces
WO2017215547A1 (zh) 一种数据传输方法及装置
US9081601B2 (en) Virtual mobile infrastructure and its base platform
JP5214473B2 (ja) ハードウェアデバイスなどのリソースを有する仮想マシンの移動システム
JP2514303B2 (ja) 仮想装置ドライバを利用したネットワ―クへのメッセ―ジ転送方法及びシステム
US9720712B2 (en) Physical/virtual device failover with a shared backend
WO2016115831A1 (zh) 一种虚拟机容错的方法、装置及系统
WO2015062339A1 (zh) 远程应用程序运行的方法和装置
US11860796B2 (en) Execution space agnostic device drivers
US20150370582A1 (en) At least one user space resident interface between at least one user space resident virtual appliance and at least one virtual data plane
WO2022170946A1 (zh) 一种访问控制方法及相关装置
US10313450B2 (en) Method for transparently connecting augmented network socket operations
CN112764877B (zh) 一种用于硬件加速设备与docker内进程通信的方法与系统
US10585689B1 (en) Shared memory interface for application processes
TWI814877B (zh) 將重定向的生物辨識裝置隔離到遠程會話
US11924336B1 (en) Cryptographic artifact generation using virtualized security modules
US20230032967A1 (en) Establishing process connections utilizing an intermediary broker
US20230171189A1 (en) Virtual network interfaces for managed layer-2 connectivity at computing service extension locations
CN115914136A (zh) 通信建立方法及系统

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2018880058

Country of ref document: EP

Effective date: 20190528

ENP Entry into the national phase

Ref document number: 2018880058

Country of ref document: EP

Effective date: 20190528

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

Ref document number: 18880058

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE