CN108092923A - Message processing method and device based on SR-IOV - Google Patents
Message processing method and device based on SR-IOV Download PDFInfo
- Publication number
- CN108092923A CN108092923A CN201611036151.8A CN201611036151A CN108092923A CN 108092923 A CN108092923 A CN 108092923A CN 201611036151 A CN201611036151 A CN 201611036151A CN 108092923 A CN108092923 A CN 108092923A
- Authority
- CN
- China
- Prior art keywords
- virtual
- clear text
- message
- data message
- iov
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/25—Routing or path finding in a switch fabric
- H04L49/253—Routing or path finding in a switch fabric using establishment or release of connections between ports
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/10—Mapping addresses of different types
- H04L61/103—Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
A kind of message processing method based on SR IOV of disclosure, including:According to the intermediate MAC Address that the clear text received carries, the clear text is forwarded to the corresponding virtual switch of the intermediate MAC Address and performs business logic processing;Receive the virtual switch transmission performs the data message obtained after business logic processing to the clear text;The target MAC (Media Access Control) address carried according to the data message sends the data message.The message processing method based on SR IOV, the data traffic for being accomplished by hardware network interface card is drained to virtual switch, and complete business logic processing is carried out to the data traffic that drainage comes in the software view where virtual switch, so that the business function of data traffic is more diversified.
Description
Technical field
This application involves network virtualization technical fields, and in particular to a kind of message processing method based on SR-IOV.This
Application is related to a kind of message process device based on SR-IOV simultaneously, a kind of virtual switch processing message based on SR-IOV
Method and device.
Background technology
With the fast development and application of network virtualization technology, traditional physical switches can not gradually meet user's
Demand so as to promote the rapid advances of the update of interchanger and technology, is simplified when the physical equipment of entity and is merged into
Virtual platform, and when being multiplexed into true physical equipment using virtualization technology, you can form the components such as virtual switch.
SR-IOV (Single-Root I/O Virtualization, single virtualization) is solved as a kind of hardware based virtualization
Scheme can realize efficiently shared PCIe (Peripheral Component Interconnect between virtual machine
Express, quick peripheral component interconnection) equipment, virtual machine can be directly connected to by I/O based on the SR-IOV function modules created
Equipment.Such as physical function (Physical Function, PF) in SR-IOV and virtual functions (Virtual Function,
VF), as shown in Figure 1, PF includes SR-IOV functional structures, for managing SR-IOV functions, can be set as other any PCIe
It is standby equally to perform discovery, management and processing operation, and possess configuration resource completely, it can be used for configuring or PCIe controlled to set
It is standby.VF be with a kind of associated lightweight PCIe functions of PF, can with physical function and with same physical function it is associated its
His VF shares one or more physical resources, but VF only allows to possess the configuration resource for its own behavior.Each SR-IOV
Equipment can be there are one PF, and each PF can have multiple VF associated with it.
As shown in Figure 1, multiple VF that SR-IOV can fictionalize physical network card are directly delivered to virtually the prior art
Machine (virtual Machine, VM) uses, and is directly communicated between virtual machine and physical network card, avoids main in physical machine
The expense of machine software stack can reach very high process performance, and still, virtual machine does data flow using physical network card based on hardware
The simple forwarding of amount, has been sent directly to physical network, data message flow is to the void in virtual environment by data message flow
It is invisible to intend host, the dummy unit (such as virtual switch) disposed on fictitious host computer can not carry out service logic to data traffic
Processing, so can not increase service logic, business function is more single.
The content of the invention
The application provides a kind of message processing method based on SR-IOV, to solve business function list existing in the prior art
One the problem of.
The application is related to a kind of message process device based on SR-IOV, a kind of virtual switch based on SR-IOV simultaneously
Handle the method and device of message.
The application provides a kind of message processing method based on SR-IOV, including:
According to the intermediate MAC Address that the clear text that receives carries, by the clear text be forwarded to it is described in
Between the corresponding virtual switch of MAC Address perform business logic processing;
Receive the virtual switch transmission performs the data obtained after business logic processing to the clear text
Message;
The target MAC (Media Access Control) address carried according to the data message sends the data message.
Optionally, the clear text is sent by virtual machine;
Correspondingly, the clear text is received by the corresponding virtual functions module of the preconfigured virtual machine,
And pass through the corresponding virtual functions module forwards of the preconfigured virtual switch to the virtual switch;
And the data message is received by the corresponding physical function module of the preconfigured virtual switch.
Optionally, the intermediate MAC Address, obtains in the following way:
The ARP request of the virtual machine transmission is received by the corresponding virtual functions module of the virtual machine;
The ARP request is broadcasted to all virtual functions modules;
The virtual switch is received by the corresponding virtual functions module of the virtual switch and sends arp response, it will
The MAC Address that the arp response carries is as the intermediate MAC Address.
Optionally, it is described that the virtual switch transmission is received by the corresponding virtual functions module of the virtual switch
Arp response after the MAC Address that the arp response carries is performed as the intermediate MAC Address sub-step, performs following
Sub-step:
By the correspondence of intermediate MAC Address virtual functions module corresponding with the virtual switch, add in pre-
If MAC Address and port mapping relations in.
Optionally, the virtual machine is provided with corresponding label;
Wherein, the label includes:Virtual local area network tags.
Optionally, the intermediate MAC Address that the clear text that the basis receives carries turns the clear text
It is sent to before the corresponding virtual switch execution business logic processing step execution of the intermediate MAC Address, performs following step:
In the corresponding label of virtual machine described in the clear text outer envelope.
Optionally, the virtual switch maintenance has the mapping relations of virtual machine and label, and based on the virtual machine
The label of the clear text outer envelope is released with the mapping relations of label.
Optionally, the target MAC (Media Access Control) address carried according to the data message sends the data message, using as follows
Mode is realized:
According to the target MAC (Media Access Control) address that the data message carries, looked into the mapping relations of default MAC Address and port
Look for the corresponding port of the target MAC (Media Access Control) address;
The data message is sent by the corresponding port of the target MAC (Media Access Control) address.
Optionally, the clear text is sent by physical network;
Correspondingly, the clear text is received by the corresponding physical internet ports of the physical network, and pass through and match somebody with somebody in advance
The corresponding physical function module forwards of the virtual switch put are to the virtual switch;
And the data message is received by the corresponding virtual functions module of the preconfigured virtual switch.
Optionally, the intermediate MAC Address, obtains in the following way:
The ARP request of the physical network transmission is received by the physical internet ports;
The ARP request is broadcasted to all virtual functions modules;
The virtual switch is received by the corresponding virtual functions module of the virtual switch and sends arp response, it will
The MAC Address that the arp response carries is as the intermediate MAC Address.
Optionally, it is described that the virtual switch transmission is received by the corresponding virtual functions module of the virtual switch
Arp response after the MAC Address that the arp response carries is performed as the intermediate MAC Address sub-step, performs following
Sub-step:
By the correspondence of intermediate MAC Address virtual functions module corresponding with the virtual switch, add in pre-
If MAC Address and port mapping relations in.
Optionally, the target MAC (Media Access Control) address carried according to the data message sends the data message step, uses
Following manner is realized:
According to the target MAC (Media Access Control) address that the data message carries, looked into the mapping relations of default MAC Address and port
Look for the corresponding virtual machine of the target MAC (Media Access Control) address;
The data message is sent to the virtual machine by the corresponding virtual functions module of the virtual machine.
Optionally, the virtual machine is respectively arranged with unique corresponding label;
Wherein, the label includes:Virtual local area network tags.
Optionally, the virtual switch maintenance has the mapping relations of virtual machine and the label, and based on the void
The mapping relations of plan machine and the label are in the corresponding label of virtual machine described in the data message outer envelope.
Optionally, after what the reception virtual switch was sent performs business logic processing to the clear text
After the data message step of acquisition performs, and the target MAC (Media Access Control) address carried according to the data message sends the number
Before being performed according to message step, following step is performed:
Release the label of the data message outer envelope.
In addition the application provides a kind of message process device based on SR-IOV, including:
Clear text retransmission unit, for the intermediate MAC Address carried according to the clear text received, by described in
Clear text is forwarded to the corresponding virtual switch of the intermediate MAC Address and performs business logic processing;
Data message receiving unit performs business for receive that the virtual switch sends to the clear text
The data message obtained after logical process;
Data message transmitting element, the target MAC (Media Access Control) address for being carried according to the data message send the datagram
Text.
The application also provides a kind of method of the virtual switch processing message based on SR-IOV, including:
The clear text that desampler is sent;
Business logic processing is performed for the clear text, obtains data message, and by the clear text pair
The target MAC (Media Access Control) address answered is encapsulated into the data message;
The data message is sent to the interchanger;
Wherein, the clear text carries intermediate MAC Address.
Optionally, the clear text comes from virtual machine;
Correspondingly, the clear text is received by preconfigured virtual functions module, the data message passes through
Preconfigured physical function module is sent.
Optionally, before the clear text step that the desampler is sent performs, following step is performed:
The ARP request of the interchanger transmission is received by the virtual functions module;
The corresponding arp response of the ARP request is created, and itself corresponding MAC Address is encapsulated in the arp response
In;
The arp response is sent to the interchanger by the virtual functions module.
Optionally, the virtual machine is respectively arranged with unique corresponding label;
Wherein, the label includes:Virtual local area network tags.
Optionally, the arp response is packaged with the corresponding label of the virtual machine.
Optionally, after the clear text step that the desampler is sent performs, and described wait to locate for described
It manages message and performs business logic processing, obtain data message, and the corresponding target MAC (Media Access Control) address of the clear text is encapsulated into
Before step performs in the data message, following step is performed:
According to the mapping relations of default virtual machine and label, the described virtual of the clear text outer envelope is released
The corresponding label of machine.
Optionally, the clear text comes from physical network;
Correspondingly, the clear text is received by preconfigured physical function module, the data message passes through
Preconfigured virtual functions module is sent.
Optionally, before the clear text step that the desampler is sent performs, following step is performed:
The ARP request of the interchanger transmission is received by the virtual functions module;
The corresponding arp response of the ARP request is created, and itself corresponding MAC Address is encapsulated in the arp response
In;
The arp response is sent to the interchanger by the virtual functions module.
Optionally, the virtual machine is respectively arranged with unique corresponding label;
Wherein, the label includes:Virtual local area network tags.
Optionally, it is described to perform business logic processing for the clear text, data message is obtained, and is treated described
The corresponding target MAC (Media Access Control) address of processing message is encapsulated into the data message in step implementation procedure or described for described
Clear text performs business logic processing, obtains data message, and the corresponding target MAC (Media Access Control) address of the clear text is sealed
It is attached in the data message after step performs, and described send the data message step to the interchanger and perform it
Before, perform following step:
According to the mapping relations of default virtual machine and label, it is corresponding that the virtual machine is encapsulated in the data message
Label.
The application also provides a kind of device of the virtual switch processing message based on SR-IOV, including:
Clear text receiving unit, the clear text sent for desampler;
Service logic execution unit performs business logic processing for being directed to the clear text, obtains data message,
And the corresponding target MAC (Media Access Control) address of the clear text is encapsulated into the data message;
Data message transmitting element, for sending the data message to the interchanger;
Wherein, the clear text carries intermediate MAC Address.
Compared with prior art, the application has the following advantages:
The message processing method based on SR-IOV that the application provides, including:It is carried according to the clear text received
Intermediate MAC Address, the clear text be forwarded to the corresponding virtual switch of the intermediate MAC Address perform business and patrol
Collect processing;Receive the virtual switch transmission performs the datagram obtained after business logic processing to the clear text
Text;The target MAC (Media Access Control) address carried according to the data message sends the data message.
The message processing method based on SR-IOV that the application provides is carried according to the clear text received
Intermediate MAC Address drains into the data of the clear text on virtual switch according to the intermediate MAC Address, can be
Business logic processing is performed for the clear text on virtual switch, when the reception virtual switch transmission is to institute
After stating the data message obtained after clear text execution business logic processing, according to the purpose of data message carrying
MAC Address sends the data message, and the data traffic for being accomplished by hardware network interface card is drained to the virtual switch, in institute
The software view where virtual switch is stated, complete business logic processing can be carried out to the data traffic that drainage comes, so as to
The business function for making data traffic is more diversified.
Description of the drawings
A kind of schematic diagram for SR-IOV frameworks that 1 the application of attached drawing provides;
Attached drawing 2 is a kind of process chart for message processing method embodiment based on SR-IOV that the application provides;
A kind of schematic diagram of SR-IOV frameworks provided by the embodiments of the present application of attached drawing 3;
Attached drawing 4 is a kind of schematic diagram for message process device embodiment based on SR-IOV that the application provides;
Attached drawing 5 is a kind of place of the embodiment of the method for virtual switch processing message based on SR-IOV that the application provides
Manage flow chart;
Attached drawing 6 is a kind of showing for the device embodiment for virtual switch processing message based on SR-IOV that the application provides
It is intended to.
Specific embodiment
Many details are elaborated in the following description in order to fully understand the application.But the application can be with
Much implement different from other modes described here, those skilled in the art can be in the situation without prejudice to the application intension
Under do similar popularization, therefore the application is from the limitation of following public specific implementation.
The application provides a kind of message processing method based on SR-IOV, and the application also provides a kind of report based on SR-IOV
Literary processing unit, a kind of method and device of the virtual switch processing message based on SR-IOV.Below in conjunction with this Shen
The attached drawing for the embodiment that please be provided is described in detail one by one, and each step of method is illustrated.
A kind of message processing method embodiment based on SR-IOV that the application provides is as follows:
The message processing method based on SR-IOV that the application provides provides following based on SR-IOV with the application
Virtual switch processing message method cooperate, therefore, read the present embodiment please compare following void based on SR-IOV
Intend the embodiment of the method for switch processes message.
Referring to the drawings 2, it illustrates a kind of places for message processing method embodiment based on SR-IOV that the application provides
Flow chart is managed, referring to the drawings 3, it illustrates a kind of schematic diagrames of SR-IOV frameworks provided in this embodiment.In addition, described be based on
Relation between each step of the message processing method embodiment of SR-IOV please 2 determines with reference to the accompanying drawings.
According to the intermediate MAC Address that the clear text received carries, the clear text is forwarded by step S201
Business logic processing is performed to the corresponding virtual switch of the intermediate MAC Address.
The message processing method based on SR-IOV, is realized based on the interchanger disposed on physical network card, and with
The method for following virtual switch processing messages based on SR-IOV that the application provides is engaged, by being disposed on hardware network interface card
Interchanger data message forwarding ability, with reference to ARP (Address Resolution Protocol, address resolution protocol)
Agency, the data traffic that virtual machine is led directly to physical network card drain into fictitious host computer level in virtual environment, i.e.,:By virtual machine
The data traffic to send datagram to physical network drains into the virtual machine interchanger disposed in virtual environment on fictitious host computer
In and data traffic that physical network sends datagram to virtual machine, drain into fictitious host computer top in virtual environment
In the virtual machine interchanger of administration, the complete business of data message progress that can come in the virtual switch for drainage is patrolled
Processing is collected, so as to avoid the problem that physical switches function is single, the business function for making data traffic is more diversified.
Clear text described in the embodiment of the present application refers to that the virtual machine or the physical network send and not yet exist
The data message of business logic processing is carried out on the virtual switch.Data message is the data for exchanging and transmitting among network
Block, data message can constantly be packaged into the various forms such as grouping, bag, frame in transmission process and be transmitted, data message
Packaged type is exactly to add some message segments, for example, addition message segment in comprising type of message, message version, message length,
The data messages such as message entity.
For the clear text sent from the virtual machine to the physical network and from the physical network to institute
The clear text of virtual machine transmission is stated, is described in detail one by one below.
1st, the clear text sent from the virtual machine to the physical network.
If the clear text is sent from the virtual machine to the physical network, the clear text
It is received by the corresponding virtual functions module of the preconfigured virtual machine, and passes through the preconfigured virtual switch
Corresponding virtual functions module forwards are to the virtual switch, and in the present embodiment, the physical function module is used to implement object
Manage function (Physical Function, PF), PF as shown in Figure 3;The virtual functions module is used to implement virtual work(
It can VF0, VF1, the VF2VFn of (Virtual Function, VF) as shown in Figure 3.
For example, as shown in Figure 3, VM1 (virtual machine) sends clear text and gives LAN (physical network), then passes through VM1 pairs
The VF1 answered receives clear text, and passes through vSwitch (Virtual Switch, void in L2Switch (Layer 2 switch)
Intending interchanger) corresponding VF0 is sent to vSwitch.
If it is well known that the virtual machine sends clear text to the network, the virtual machine can be examined first
ARP (Address Resolution Protocol, the address resolution protocol) cache table of oneself is looked into, checks and wherein whether there is
The IP address of the network and the mapping relations of MAC Address;If it is present by the MAC Address of network MAC as a purpose
Address is encapsulated in the clear text;If it does not exist, then the virtual machine can send an ARP request, the ARP please
The target ip address asked is the IP address of the network, and destination-mac address is the broadcast frame of MAC Address, and source IP address is described
The IP address of virtual machine, source MAC are the MAC Address of the virtual machine.After interchanger receives the ARP request, hair
The existing ARP request is broadcast frame, then sends the ARP request to all ports of interchanger.
In the present embodiment, in order to realize the data traffic that the virtual machine is sent to clear text to the physical network
It drains into the virtual machine interchanger disposed in virtual environment on fictitious host computer, Host in virtual environment as shown in Figure 3
The vSwitch disposed on (fictitious host computer), otherwise varied with the transmission processing procedure of above-mentioned ARP request, the ARP request is specific
It is handled using the mode of being implemented as described below:
1) ARP request of the virtual machine transmission is received by the corresponding virtual functions module of the virtual machine;
2) ARP request is broadcasted to all virtual functions modules;
3) virtual switch is received by the corresponding virtual functions module of the virtual switch and sends arp response,
Using the MAC Address that the arp response carries as the intermediate MAC Address.
Therefore, intermediate MAC Address refers to the corresponding MAC Address of virtual switch described in the present embodiment.
For example, as shown in Figure 3, VM1 sends clear text to LAN, then first checks for the arp cache table of itself,
The correspondence there are the IP address of LAN and MAC Address is wherein searched whether, if it does not exist, then by VF1 to L2Switch
Send ARP request;After L2Switch receives ARP request, to VF0, VF2VFn broadcast ARP request (in order to count
The vSwitch disposed on Host in virtual environment (fictitious host computer) is drained into according to flow, forbids physics end corresponding to LAN herein
Mouth sends ARP request);VSwitch receives the ARP request of L2Switch broadcast by VF0, after receiving ARP request, creates
The corresponding arp response of ARP request, and by itself corresponding MAC Address (the corresponding MAC Address of vSwitch) EE:FF:FF:FF:
FF:FF is encapsulated in arp response, and arp response is sent to L2Switch by VF0;L2Switch receives vSwitch by VF0
After the arp response of return, by MAC Address wherein included (the corresponding MAC Address of vSwitch) EE:FF:FF:FF:FF:FF
As intermediate MAC Address (i.e. the target MAC (Media Access Control) address of virtual machine transmission clear text), based on this, the pending report of VM1 transmissions
Text is drained in the vSwitch that is disposed in virtual environment on Host;If it is present show that warp-wise LAN has been transmitted across before this
Data message, there are the IP address of LAN and the correspondence of MAC Address in the arp cache table of VM1, i.e.,:xxx.xxx.x.x-
EE:FF:FF:FF:FF:FF, directly by EE:FF:FF:FF:FF:FF is as intermediate MAC Address, and based on this, what VM1 was sent waits to locate
Reason message is drained in the vSwitch that is disposed in virtual environment on Host.
Similar, the data traffic that all virtual machines can be sent to clear text to the physical network all drains
In the virtual switch disposed into virtual environment on fictitious host computer.
In the specific implementation, interchanger maintenance has the mapping relations of MAC Address and port, therefore by the intermediate MAC
The correspondence of location virtual functions module corresponding with the virtual switch, the mapping for adding in the MAC Address and port are closed
In system.
In addition, in the specific implementation, in order to realize the Network Isolation between the virtual machine, promote the safety of virtual machine
Property, corresponding label can be respectively arranged with for each virtual machine, for example, for VF0, VF1, VF2VFn points
Corresponding virtual local area network tags (VLAN Tag) are not set, and the virtual local area network tags of each virtual machine do not repeat mutually,
One-to-one virtual machine can determine according to VLAN Tag.
Based on this, interchanger can also safeguard void in addition to needing to safeguard the mapping relations of the MAC Address and port
The mapping relations of plan machine and label.Specifically, can by the mapping relations and the virtual machine of the MAC Address and port with
The mapping relations of label are safeguarded in respective table respectively;In addition, due between the virtual machine and the port
Mapping relations be fixed, and hence it is also possible to establish the virtual machine or the port, the MAC Address and the mark
Sign three between mapping relations, safeguarded in a table MAC Address and port mapping relations and the virtual machine with
The mapping relations of label.
Correspondingly, the virtual switch is also required to safeguard the mapping relations of the virtual machine and label, the otherwise void
The label of the data message encapsulation can not be contacted by intending interchanger.For example interchanger is broadcasted to all virtual functions modules
Before the ARP request, the Tag Packaging of virtual machine of the ARP request will be sent among the ARP request;When the void
After plan interchanger receives the ARP request, according to the virtual machine of self maintained and the mapping relations of label, institute is released
State the corresponding label of virtual machine of the transmission ARP request of ARP request encapsulation.
In addition, the clear text is forwarded to the corresponding virtual switch of the intermediate MAC Address by this step
During performing business logic processing, the Tag Packaging that the clear text can also be corresponded to virtual machine is waited to locate described
It manages among message, the clear text is sent to after the virtual switch, can be safeguarded according to the virtual switch
The mapping relations of the virtual machine and label release the corresponding label of the virtual machine of the clear text outer envelope.
2nd, the clear text sent from the physical network to the virtual machine.
If the clear text is sent from the physical network to the virtual machine, the clear text
It is received by the corresponding physical internet ports of the physical network, and passes through the corresponding physics work(of the preconfigured virtual switch
Can module forwards to the virtual switch.For example, as shown in Figure 3, LAN sends clear text to VM2, then passes through LAN
Corresponding physical internet ports receive clear text, and are sent out in L2Switch (Layer 2 switch) by the corresponding PF of vSwitch
It send to vSwitch.
In the present embodiment, in order to realize the data traffic that the physical network is sent to clear text to the virtual machine
It drains into the virtual machine interchanger disposed in virtual environment on fictitious host computer, Host in virtual environment as shown in Figure 3
The vSwitch of upper deployment, the specific use of the ARP request are implemented as described below mode and are handled:
1) ARP request of the physical network transmission is received by the physical internet ports;
2) ARP request is broadcasted to all virtual functions modules;
3) virtual switch is received by the corresponding virtual functions module of the virtual switch and sends arp response,
Using the MAC Address that the arp response carries as the intermediate MAC Address.
For example, as shown in Figure 3, LAN sends clear text to VM2, then first checks for the arp cache table of itself,
The correspondence there are the IP address of VM2 and MAC Address is wherein searched whether, if it does not exist, then passing through the corresponding physics of LAN
Network interface sends ARP request to L2Switch;After L2Switch receives ARP request, to VF0, VF2VFn broadcast arp
Request;VSwitch receives the ARP request of L2Switch broadcast by VF0, after receiving ARP request, creates ARP request pair
The arp response answered, and by itself corresponding MAC Address EE:FF:FF:FF:FF:FF is encapsulated in arp response, by VF0 to
L2Switch sends arp response;It, will be wherein included after L2Switch receives the arp response that vSwitch is returned by VF0
MAC Address EE:FF:FF:FF:FF:FF is as intermediate MAC Address, and based on this, the clear text that LAN is sent is drained to void
In the vSwitch disposed in near-ring border on Host;If it is present show that warp-wise VM2 has been transmitted across data message, LAN before this
Arp cache table in there are the IP address of VM2 and the correspondence of MAC Address, i.e.,:xxx.xxx.x.x-EE:FF:FF:FF:
FF:FF, directly by EE:FF:FF:FF:FF:FF is as intermediate MAC Address, and based on this, the clear text that LAN is sent is drained
In the vSwitch disposed into virtual environment on Host.
Similar, the data traffic that the physical network can be sent to clear text to all virtual machines all drains
In the virtual switch disposed into virtual environment on fictitious host computer.
In the specific implementation, interchanger maintenance has the mapping relations of MAC Address and port, therefore by the intermediate MAC
The mapping relations of location virtual functions module corresponding with the virtual switch, the mapping for adding in the MAC Address and port are closed
In system.
In this step, according to the intermediate MAC Address that the clear text received carries, by the clear text
It is forwarded to the corresponding virtual switch of the intermediate MAC Address and performs business logic processing.
Step S202 is obtained after receive that the virtual switch sends perform business logic processing to the clear text
The data message obtained.
The clear text is forwarded to the corresponding virtual switch of the intermediate MAC Address and performed by above-mentioned steps S201
Business logic processing, i.e., the virtual switch disposed into virtual environment on fictitious host computer forwards the clear text, described
Clear text generates corresponding data message after business processing is performed on the virtual switch, and sends number to interchanger
According to message.In this step, obtained after receive that the virtual switch sends perform business logic processing to the clear text
Data message, specific to the clear text sent from the virtual machine to the physical network and from the object
The clear text that reason network is sent to the virtual machine, is described in detail one by one below.
1st, the clear text sent from the virtual machine to the physical network.
If the clear text is sent from the virtual machine to the physical network, pass through the virtual switch
The corresponding virtual functions module forwards of machine to the virtual switch, the virtual switch is performed for the clear text
Business logic processing, obtains corresponding data message, and the corresponding target MAC (Media Access Control) address of the clear text is encapsulated into described
It is sent in data message to interchanger, in this step, by described in the corresponding physical function module reception of the virtual switch
Data message.For example, as shown in Figure 3, VM1 sends clear text to LAN, performs business logic processing in vSwitch, obtains
After obtaining corresponding data message, pass through the corresponding PF of vSwitch and receive data message.
2nd, the clear text sent from the physical network to the virtual machine.
If the clear text is sent from the physical network to the virtual machine, pass through the virtual switch
The corresponding physical function module forwards of machine to the virtual switch, the virtual switch is performed for the clear text
Business logic processing, obtains corresponding data message, and the corresponding target MAC (Media Access Control) address of the clear text is encapsulated into described
It is sent in data message to interchanger, in this step, by described in the corresponding virtual functions module reception of the virtual switch
Data message.For example, as shown in Figure 3, LAN sends clear text to VM2, business logic processing is performed in vSwitch, is obtained
After obtaining corresponding data message, pass through the corresponding VF0 of vSwitch and receive data message.
In the specific implementation, the virtual switch can also be closed according to the mapping of the virtual machine and label of its maintenance
System, by the Tag Packaging of the corresponding virtual machine of the data message among the data message, this step interchanger receives
After the data message that the virtual switch is sent, according to the virtual machine of interchanger self maintained and reflecting for label
Relation is penetrated, releases the corresponding label of the virtual machine of the data message outer envelope.
Step S203, the target MAC (Media Access Control) address carried according to the data message send the data message.
In this step, the target MAC (Media Access Control) address carried according to the data message sends the data message, specific to from
It clear text that the virtual machine is sent to the physical network and is sent from the physical network to the virtual machine
Clear text is described in detail one by one below.
1st, the clear text sent from the virtual machine to the physical network.
1) target MAC (Media Access Control) address carried according to the data message, in the mapping relations of default MAC Address and port
Search the corresponding port of the target MAC (Media Access Control) address;
2) data message is sent by the corresponding port of the target MAC (Media Access Control) address.
For example, as shown in Figure 3, VM1 sends clear text to LAN, according to the purpose MAC carried in data message
The corresponding port of target MAC (Media Access Control) address is searched as the corresponding physical internet ports of LAN, then in location in mapping relations of the MAC Address with port
By physical internet ports corresponding data message is sent to LAN.
2nd, the clear text sent from the physical network to the virtual machine.
1) target MAC (Media Access Control) address carried according to the data message, in the mapping relations of default MAC Address and port
Search the corresponding virtual machine of the target MAC (Media Access Control) address;
2) data message is sent to the virtual machine by the corresponding virtual functions module of the virtual machine.
For example, as shown in Figure 3, LAN sends clear text to VM2, according to the purpose MAC carried in data message
Location is searched the corresponding port of target MAC (Media Access Control) address as the corresponding VF2 of VM2 in mapping relations of the MAC Address with port, is then passed through
VF2 sends corresponding data message to VM2.
In conclusion the message processing method based on SR-IOV that the application provides, passes through what is provided with the application
The method of following virtual switch processing messages based on SR-IOV is engaged, in being carried according to the clear text received
Between MAC Address, the data of the clear text are drained on virtual switch according to the intermediate MAC Address, can be in void
Intend performing business logic processing for the clear text on interchanger, when the reception virtual switch transmission is to described
After clear text performs the data message obtained after business logic processing, according to the purpose MAC of data message carrying
Address sends the data message, and the data traffic for being accomplished by hardware network interface card is drained to the virtual switch, described
Software view where virtual switch can carry out complete business logic processing to the data traffic that drainage comes, so that
The business function of data traffic is more diversified.
A kind of message process device embodiment based on SR-IOV that the application provides is as follows:
In the above-described embodiment, a kind of message processing method based on SR-IOV, corresponding, this Shen are provided
A kind of message process device based on SR-IOV please be additionally provide, is illustrated below in conjunction with the accompanying drawings.
Referring to the drawings 4, a kind of message process device embodiment based on SR-IOV provided it illustrates the application is shown
It is intended to.
Since device embodiment is substantially similar to embodiment of the method, so describing fairly simple, relevant part please join
The corresponding explanation of the embodiment of the method for above-mentioned offer is provided.Device embodiment described below is only schematical.
The application provides a kind of message process device based on SR-IOV, including:
Clear text retransmission unit 401, will for the intermediate MAC Address carried according to the clear text received
The clear text is forwarded to the corresponding virtual switch of the intermediate MAC Address and performs business logic processing;
Data message receiving unit 402, for receiving being performed to the clear text for the virtual switch transmission
The data message obtained after business logic processing;
Data message transmitting element 403, the target MAC (Media Access Control) address for being carried according to the data message send the data
Message.
Optionally, the clear text is sent by virtual machine;
Correspondingly, the clear text is received by the corresponding virtual functions module of the preconfigured virtual machine,
And pass through the corresponding virtual functions module forwards of the preconfigured virtual switch to the virtual switch;
And the data message is received by the corresponding physical function module of the preconfigured virtual switch.
Optionally, the intermediate MAC Address, is obtained by following subelements:
First ARP request receiving subelement, for receiving the void by the corresponding virtual functions module of the virtual machine
The ARP request that plan machine is sent;
First ARP request broadcasts subelement, for broadcasting the ARP request to all virtual functions modules;
First arp response receiving subelement, for receiving institute by the corresponding virtual functions module of the virtual switch
It states virtual switch and sends arp response, using the MAC Address that the arp response carries as the intermediate MAC Address.
Optionally, the first correspondence study subelement is further included, and son list is received running first arp response
After member, the first correspondence study subelement is run;
First correspondence learns subelement, for the intermediate MAC Address is corresponding with the virtual switch
Virtual functions module correspondence, add in the mapping relations of default MAC Address and port.
Optionally, the virtual machine is provided with corresponding label;
Wherein, the label includes:Virtual local area network tags.
Optionally, the message process device based on SR-IOV, including:
Tag Packaging unit, in the corresponding label of virtual machine described in the clear text outer envelope.
Optionally, the virtual switch maintenance has the mapping relations of virtual machine and label, and based on the virtual machine
The label of the clear text outer envelope is released with the mapping relations of label.
Optionally, the data message transmitting element 403, including:
Subelement is searched in port, for the target MAC (Media Access Control) address carried according to the data message, in default MAC Address
Port corresponding with searching the target MAC (Media Access Control) address in the mapping relations of port;
First data message transmission sub-unit, for sending the data by the corresponding port of the target MAC (Media Access Control) address
Message.
Optionally, the clear text is sent by physical network;
Correspondingly, the clear text is received by the corresponding physical internet ports of the physical network, and pass through and match somebody with somebody in advance
The corresponding physical function module forwards of the virtual switch put are to the virtual switch;
And the data message is received by the corresponding virtual functions module of the preconfigured virtual switch.
Optionally, the intermediate MAC Address, is obtained by following subelements:
Second ARP request receiving subelement, the ARP that the physical network transmission is received for passing through the physical internet ports please
It asks;
Second ARP request broadcasts subelement, for broadcasting the ARP request to all virtual functions modules;
Second arp response receiving subelement, for receiving institute by the corresponding virtual functions module of the virtual switch
It states virtual switch and sends arp response, using the MAC Address that the arp response carries as the intermediate MAC Address.
Optionally, the second correspondence study subelement is further included, and son list is received running second arp response
After member, the second correspondence study subelement is run;
Second correspondence learns subelement, for the intermediate MAC Address is corresponding with the virtual switch
Virtual functions module correspondence, add in the mapping relations of default MAC Address and port.
Optionally, the message process device based on SR-IOV, including:
Virtual machine searches subelement, for the target MAC (Media Access Control) address carried according to the data message, in default MAC
The corresponding virtual machine of the target MAC (Media Access Control) address is searched in the mapping relations of location and port;
Second data message transmission sub-unit, for by the corresponding virtual functions module of the virtual machine to described virtual
Machine sends the data message.
Optionally, the virtual machine is respectively arranged with unique corresponding label;
Wherein, the label includes:Virtual local area network tags.
Optionally, the virtual switch maintenance has the mapping relations of virtual machine and the label, and based on the void
The mapping relations of plan machine and the label are in the corresponding label of virtual machine described in the data message outer envelope.
Optionally, the message process device based on SR-IOV, including:
Label lifting unit, for releasing the label of the data message outer envelope.
A kind of embodiment of the method for virtual switch processing message based on SR-IOV that the application provides is as follows:
In the above-described embodiment, a kind of message processing method based on SR-IOV is provided, in addition, the application also provides
A kind of method of the virtual switch processing message based on SR-IOV, it is with the message processing method based on SR-IOV mutual
Cooperation, illustrates below in conjunction with the accompanying drawings.
Referring to the drawings 3, it illustrates a kind of schematic diagrames of SR-IOV frameworks provided in this embodiment, referring to the drawings 5, show
A kind of schematic diagram of the embodiment of the method for virtual switch processing message based on SR-IOV of the application offer has been provided.
It is and upper due to the embodiment of the method for the virtual switch processing message based on SR-IOV provided in this embodiment
The message processing method embodiment based on SR-IOV for stating offer cooperates, so describe fairly simple, it is relevant
Part refers to the corresponding explanation of the message processing method embodiment based on SR-IOV of above-mentioned offer.It is described below
Embodiment it is only schematical.
The application provides a kind of method of the virtual switch processing message based on SR-IOV, including:
Step S501, the clear text that desampler is sent.
The method of the virtual switch processing message based on SR-IOV, based on being disposed on fictitious host computer in virtual environment
Virtual machine interchanger realize, and with the application provide described in the message processing method based on SR-IOV be engaged, pass through
The data message forwarding ability for the interchanger disposed on hardware network interface card, with reference to ARP (Address Resolution Protocol,
Address resolution protocol) agency, the data traffic that virtual machine is led directly to physical network card drains into fictitious host computer layer in virtual environment
Face, i.e.,:The data traffic that virtual machine is sent datagram to physical network, drains into virtual environment and is disposed on fictitious host computer
Virtual machine interchanger in and data traffic that physical network sends datagram to virtual machine, drain into virtual environment
In the virtual machine interchanger disposed on middle fictitious host computer, can in the virtual switch for the data message that comes of drainage into
The complete business logic processing of row, so as to avoid the problem that physical switches function is single, makes the business function of data traffic more
Add variation.
Clear text described in the embodiment of the present application refers to that the virtual machine or the physical network send and not yet exist
The data message of business logic processing is carried out on virtual switch.Wherein, the clear text carries intermediate MAC Address.
If the clear text sent from the virtual machine to the physical network, then what virtual switch received described waits to locate
Reason message comes from the virtual machine;It is if the clear text sent from the physical network to the virtual machine, then empty
Intend the clear text that interchanger receives and come from the physical network, be described in detail one by one below.
1st, clear text (the pending report sent from the virtual machine to the physical network from the virtual machine
Text).
If the clear text sent from the virtual machine to the physical network, then virtual switch passes through advance
The virtual functions module of configuration receives the clear text.For example, VM1 sends clear text to LAN, then vSwitch leads to
It crosses VF0 and receives the clear text that VM1 is sent.
It cooperates with the above-mentioned message processing method embodiment based on SR-IOV, the ARP request is specifically using as follows
Realization method is handled:
1) ARP request of the interchanger transmission is received by the virtual functions module;
2) the corresponding arp response of the ARP request is created, and itself corresponding MAC Address is encapsulated in the arp response
In;
3) arp response is sent to the interchanger by the virtual functions module.
For example, as shown in Figure 3, VM1 sends clear text to LAN, and vSwitch is wide by VF0 receptions L2Switch
The ARP request broadcast after receiving ARP request, creates the corresponding arp response of ARP request, and by itself corresponding MAC Address
(the corresponding MAC Address of vSwitch) EE:FF:FF:FF:FF:FF is encapsulated in arp response, and is passed through VF0 and sent out to L2Switch
Send arp response.
In addition, in order to realize the Network Isolation between the virtual machine, the security of virtual machine is promoted, can be directed to each
A virtual machine is respectively arranged with corresponding label, for example, for VF0, VF1, VF2VFn set respectively each it is right
The virtual local area network tags (VLAN Tag) answered, and the virtual local area network tags of each virtual machine do not repeat mutually, according to VLAN Tag
It can determine one-to-one virtual machine.Based on this, virtual switch can safeguard the mapping relations of virtual machine and label.
As described above, interchanger will send the ARP before the ARP request is broadcasted to all virtual functions modules
The Tag Packaging of the virtual machine of request is among the ARP request;Correspondingly, in the present embodiment, this step receives the friendship
It changes planes after the clear text of transmission, and following step S502 performs business logic processing for the clear text, obtains
Data message is obtained, and the corresponding target MAC (Media Access Control) address of the clear text is encapsulated into step in the data message and performs it
Before, i.e., after virtual switch receives the ARP request, closed according to the mapping of the virtual machine of self maintained and label
System releases the corresponding label of virtual machine of the transmission ARP request of the ARP request encapsulation.
2nd, the clear text from the physical network (is sent pending from the physical network to the virtual machine
Message).
If the clear text sent from the physical network to the virtual machine, then virtual switch passes through advance
The physical function module of configuration receives the clear text.For example, LAN sends clear text to VM2, then vSwitch leads to
It crosses PF and receives the clear text that LAN is sent.
It cooperates with the above-mentioned message processing method embodiment based on SR-IOV, the ARP request is specifically using as follows
Realization method is handled:
1) ARP request of the interchanger transmission is received by the virtual functions module;
2) the corresponding arp response of the ARP request is created, and itself corresponding MAC Address is encapsulated in the arp response
In;
3) arp response is sent to the interchanger by the virtual functions module.
For example, as shown in Figure 3, LAN sends clear text to VM2, vSwitch is wide by VF0 receptions L2Switch
The ARP request broadcast after receiving ARP request, creates the corresponding arp response of ARP request, and by itself corresponding MAC Address
EE:FF:FF:FF:FF:FF is encapsulated in arp response, and is passed through VF0 and sent arp response to L2Switch.
Optionally, the virtual machine is respectively arranged with unique corresponding label;Wherein, the label includes:Virtual local area
Network mark label.
As described above, virtual switch maintenance has the mapping relations of the virtual machine and label, it in the specific implementation, can root
According to the mapping relations of the virtual machine and label, by the Tag Packaging of the virtual machine among the arp response;The exchange
After machine receives the arp response, according to the mapping relations of the virtual machine of self maintained and label, the arp response is released
The label of the virtual machine encapsulated in the middle.
Step S502 performs business logic processing for the clear text, obtains data message, and wait to locate by described
The corresponding target MAC (Media Access Control) address of reason message is encapsulated into the data message.
Above-mentioned steps S501 receives the clear text that the interchanger is sent, in this step, for what is received
The clear text performs business logic processing, obtains the corresponding data message of the clear text, and waits to locate by described
The corresponding target MAC (Media Access Control) address of reason message is encapsulated into the data message.
As described above, virtual switch maintenance has the mapping relations of the virtual machine and label, thus it is described in order to realize
Network Isolation between virtual machine promotes the security of virtual machine, in the specific implementation, in this step implementation procedure, i.e.,:
During performing business logic processing, the generation data message for the clear text, by the mark of the virtual machine
Among the data message, the data message is sent to after the interchanger for sealing, is tieed up according to the interchanger
The virtual machine of shield and the mapping relations of label release the label of the virtual machine encapsulated in the data message.For example,
The Tag Packaging of the virtual machine VM2 of data message will be received in data message.Further, it is also possible to after the execution of this step,
After generating the data message, and before the execution of following step S503 steps, in the outer envelope institute of the data message
State the label of virtual machine.
Step S503 sends the data message to the interchanger.
Above-mentioned steps S502 performs business logic processing for the clear text, obtains the data message, and will
The corresponding target MAC (Media Access Control) address of the clear text is encapsulated into the data message, in this step, is sent to the interchanger
The data message.If the clear text sent from the virtual machine to the physical network, then virtual switch connects
The clear text received comes from the virtual machine;If it is treated from the physical network to what the virtual machine was sent
Message is handled, then the clear text that virtual switch receives comes from the physical network, carries out one by one below detailed
It describes in detail bright.
1st, clear text (the pending report sent from the virtual machine to the physical network from the virtual machine
Text).
If the clear text sent from the virtual machine to the physical network, then virtual switch passes through advance
The physical function module of configuration sends the data message for performing and being generated after business logic processing to the interchanger.For example,
VM1 transmission clear texts are sent datagram to LAN, then vSwitch by PF to L2Switch.
2nd, the clear text from the physical network (is sent pending from the physical network to the virtual machine
Message).
If the clear text sent from the physical network to the virtual machine, then virtual switch passes through advance
The virtual functions module of configuration sends the data message for performing and being generated after business logic processing to the interchanger.For example,
For example, LAN sends clear text to VM2, then vSwitch is sent datagram by VF0 to L2Switch.
In conclusion the application provide it is described based on SR-IOV virtual switch processing message method, by with
The above-mentioned message processing method based on SR-IOV is engaged, be accomplished by hardware network interface card data traffic be drained to it is described virtual
Interchanger, the software view where the virtual switch, the data traffic that can come to drainage carry out complete business and patrol
Processing is collected, so that the business function of data traffic is more diversified.
A kind of device embodiment for virtual switch processing message based on SR-IOV that the application provides is as follows:
In the above-described embodiment, a kind of method of the virtual switch processing message based on SR-IOV is provided, therewith
It is corresponding, present invention also provides it is a kind of based on SR-IOV virtual switch processing message device, below in conjunction with the accompanying drawings
It illustrates.
Referring to the drawings 6, it illustrates a kind of dresses for virtual switch processing message based on SR-IOV that the application provides
Put the schematic diagram of embodiment.
Since device embodiment is substantially similar to embodiment of the method, so describing fairly simple, relevant part please join
The corresponding explanation of the embodiment of the method for above-mentioned offer is provided.Device embodiment described below is only schematical.
The application provides a kind of device of the virtual switch processing message based on SR-IOV, including:
Clear text receiving unit 601, the clear text sent for desampler;
Service logic execution unit 602 performs business logic processing for being directed to the clear text, obtains datagram
Text, and the corresponding target MAC (Media Access Control) address of the clear text is encapsulated into the data message;
Data message transmitting element 603, for sending the data message to the interchanger;
Wherein, the clear text carries intermediate MAC Address.
Optionally, the clear text comes from virtual machine;
Correspondingly, the clear text is received by preconfigured virtual functions module, the data message passes through
Preconfigured physical function module is sent.
Optionally, the device of the virtual switch processing message based on SR-IOV, including:
First ARP request receiving unit, the ARP for receiving the interchanger transmission by the virtual functions module please
It asks;
First arp response generation unit, for creating the corresponding arp response of the ARP request, and itself is corresponding
MAC Address is encapsulated in the arp response;
First arp response transmitting element rings for sending the ARP to the interchanger by the virtual functions module
It should.
Optionally, the virtual machine is respectively arranged with unique corresponding label;
Wherein, the label includes:Virtual local area network tags.
Optionally, the arp response is packaged with the corresponding label of the virtual machine.
Optionally, the device of the virtual switch processing message based on SR-IOV, including:
Label lifting unit for the mapping relations according to default virtual machine and label, releases the clear text
The corresponding label of the virtual machine of outer envelope.
Optionally, the clear text comes from physical network;
Correspondingly, the clear text is received by preconfigured physical function module, the data message passes through
Preconfigured virtual functions module is sent.
Optionally, the device of the virtual switch processing message based on SR-IOV, including:
Second ARP request receiving unit, the ARP for receiving the interchanger transmission by the virtual functions module please
It asks;
Second arp response generation unit, for creating the corresponding arp response of the ARP request, and itself is corresponding
MAC Address is encapsulated in the arp response;
Second arp response transmitting element rings for sending the ARP to the interchanger by the virtual functions module
It should.
Optionally, the virtual machine is respectively arranged with unique corresponding label;
Wherein, the label includes:Virtual local area network tags.
Optionally, the device of the virtual switch processing message based on SR-IOV, including:
Tag Packaging unit for the mapping relations according to default virtual machine and label, seals in the data message
Fill the corresponding label of the virtual machine.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, any this field skill
Art personnel are not being departed from spirit and scope, can make possible variation and modification, therefore the guarantor of the application
Shield scope should be subject to the scope that the application claim is defined.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only memory (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, the storage of tape magnetic rigid disk or other magnetic storage apparatus
Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.It defines, calculates according to herein
Machine readable medium does not include the data-signal and carrier wave of non-temporary computer readable media (transitory media), such as modulation.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or the embodiment in terms of combining software and hardware can be used in the application
Form.It is deposited moreover, the application can be used to can use in one or more computers for wherein including computer usable program code
The shape for the computer program product that storage media is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
Claims (27)
1. a kind of message processing method based on SR-IOV, which is characterized in that including:
According to the intermediate MAC Address that the clear text received carries, the clear text is forwarded to the intermediate MAC
The corresponding virtual switch in address performs business logic processing;
Receive the virtual switch transmission performs the data message obtained after business logic processing to the clear text;
The target MAC (Media Access Control) address carried according to the data message sends the data message.
2. the message processing method according to claim 1 based on SR-IOV, which is characterized in that the clear text by
Virtual machine is sent;
Correspondingly, the clear text is received by the corresponding virtual functions module of the preconfigured virtual machine, and lead to
The corresponding virtual functions module forwards of the preconfigured virtual switch are crossed to the virtual switch;
And the data message is received by the corresponding physical function module of the preconfigured virtual switch.
3. the message processing method according to claim 2 based on SR-IOV, which is characterized in that the intermediate MAC Address,
It obtains in the following way:
The ARP request of the virtual machine transmission is received by the corresponding virtual functions module of the virtual machine;
The ARP request is broadcasted to all virtual functions modules;
The virtual switch is received by the corresponding virtual functions module of the virtual switch and sends arp response, by described in
The MAC Address that arp response carries is as the intermediate MAC Address.
4. the message processing method according to claim 3 based on SR-IOV, which is characterized in that described by described virtual
The corresponding virtual functions module of interchanger receives the virtual switch and sends arp response, the MAC that the arp response is carried
After address is performed as the intermediate MAC Address sub-step, following sub-steps are performed:
By the correspondence of intermediate MAC Address virtual functions module corresponding with the virtual switch, add in default
In the mapping relations of MAC Address and port.
5. the message processing method according to claim 2 based on SR-IOV, which is characterized in that the virtual machine is provided with
Corresponding label;
Wherein, the label includes:Virtual local area network tags.
6. the message processing method according to claim 5 based on SR-IOV, which is characterized in that the basis received
The intermediate MAC Address that clear text carries, the corresponding virtual friendship of the intermediate MAC Address is forwarded to by the clear text
It changes planes before performing the execution of business logic processing step, performs following step:
In the corresponding label of virtual machine described in the clear text outer envelope.
7. the message processing method according to claim 6 based on SR-IOV, which is characterized in that the virtual switch dimension
Shield has the mapping relations of virtual machine and label, and releases the pending report based on the mapping relations of the virtual machine and label
The label of literary outer envelope.
8. the message processing method according to claim 2 based on SR-IOV, which is characterized in that described according to the data
The target MAC (Media Access Control) address that message carries sends the data message, realizes in the following way:
According to the target MAC (Media Access Control) address that the data message carries, institute is searched in the mapping relations of default MAC Address and port
State the corresponding port of target MAC (Media Access Control) address;
The data message is sent by the corresponding port of the target MAC (Media Access Control) address.
9. the message processing method according to claim 1 based on SR-IOV, which is characterized in that the clear text by
Physical network is sent;
Correspondingly, the clear text is received by the corresponding physical internet ports of the physical network, and pass through preconfigured
The corresponding physical function module forwards of the virtual switch are to the virtual switch;
And the data message is received by the corresponding virtual functions module of the preconfigured virtual switch.
10. the message processing method according to claim 9 based on SR-IOV, which is characterized in that the intermediate MAC
Location obtains in the following way:
The ARP request of the physical network transmission is received by the physical internet ports;
The ARP request is broadcasted to all virtual functions modules;
The virtual switch is received by the corresponding virtual functions module of the virtual switch and sends arp response, by described in
The MAC Address that arp response carries is as the intermediate MAC Address.
11. the message processing method according to claim 10 based on SR-IOV, which is characterized in that described to pass through the void
Intend the corresponding virtual functions module of interchanger and receive the virtual switch transmission arp response, the arp response is carried
After MAC Address is performed as the intermediate MAC Address sub-step, following sub-steps are performed:
By the correspondence of intermediate MAC Address virtual functions module corresponding with the virtual switch, add in default
In the mapping relations of MAC Address and port.
12. the message processing method according to claim 9 based on SR-IOV, which is characterized in that described according to the number
The target MAC (Media Access Control) address carried according to message sends the data message step, realizes in the following way:
According to the target MAC (Media Access Control) address that the data message carries, institute is searched in the mapping relations of default MAC Address and port
State the corresponding virtual machine of target MAC (Media Access Control) address;
The data message is sent to the virtual machine by the corresponding virtual functions module of the virtual machine.
13. the message processing method according to claim 12 based on SR-IOV, which is characterized in that the virtual machine difference
It is provided with unique corresponding label;
Wherein, the label includes:Virtual local area network tags.
14. the message processing method according to claim 13 based on SR-IOV, which is characterized in that the virtual switch
Safeguard there are the mapping relations of virtual machine and the label, and based on the mapping relations of the virtual machine and the label described
The corresponding label of virtual machine described in data message outer envelope.
15. the message processing method according to claim 14 based on SR-IOV, which is characterized in that described to receive the void
After what plan interchanger was sent performs the clear text data message step obtained after business logic processing execution, and
Before the target MAC (Media Access Control) address carried according to the data message sends the data message step execution, following steps are performed
Suddenly:
Release the label of the data message outer envelope.
16. a kind of message process device based on SR-IOV, which is characterized in that including:
Clear text retransmission unit for the intermediate MAC Address carried according to the clear text received, is waited to locate by described
Reason message is forwarded to the corresponding virtual switch of the intermediate MAC Address and performs business logic processing;
Data message receiving unit performs service logic for receive that the virtual switch sends to the clear text
The data message obtained after processing;
Data message transmitting element, the target MAC (Media Access Control) address for being carried according to the data message send the data message.
A kind of 17. method of the virtual switch processing message based on SR-IOV, which is characterized in that including:
The clear text that desampler is sent;
Business logic processing is performed for the clear text, obtains data message, and the clear text is corresponding
Target MAC (Media Access Control) address is encapsulated into the data message;
The data message is sent to the interchanger;
Wherein, the clear text carries intermediate MAC Address.
18. the method for the virtual switch processing message according to claim 17 based on SR-IOV, which is characterized in that institute
It states clear text and comes from virtual machine;
Correspondingly, the clear text is received by preconfigured virtual functions module, the data message passes through advance
The physical function module of configuration is sent.
19. the method for the virtual switch processing message according to claim 18 based on SR-IOV, which is characterized in that institute
Before the clear text step execution for stating desampler transmission, following step is performed:
The ARP request of the interchanger transmission is received by the virtual functions module;
The corresponding arp response of the ARP request is created, and itself corresponding MAC Address is encapsulated in the arp response;
The arp response is sent to the interchanger by the virtual functions module.
20. the method for the virtual switch processing message according to claim 18 based on SR-IOV, which is characterized in that institute
It states virtual machine and is respectively arranged with unique corresponding label;
Wherein, the label includes:Virtual local area network tags.
21. the method for the virtual switch processing message according to claim 20 based on SR-IOV, which is characterized in that institute
It states arp response and is packaged with the corresponding label of the virtual machine.
22. the method for the virtual switch processing message according to claim 20 based on SR-IOV, which is characterized in that institute
After the clear text step execution for stating desampler transmission, and it is described for clear text execution service logic
Processing obtains data message, and the corresponding target MAC (Media Access Control) address of the clear text is encapsulated into step in the data message
Before execution, following step is performed:
According to the mapping relations of default virtual machine and label, the virtual machine pair of the clear text outer envelope is released
The label answered.
23. the method for the virtual switch processing message according to claim 17 based on SR-IOV, which is characterized in that institute
It states clear text and comes from physical network;
Correspondingly, the clear text is received by preconfigured physical function module, the data message passes through advance
The virtual functions module of configuration is sent.
24. the method for the virtual switch processing message according to claim 23 based on SR-IOV, which is characterized in that institute
Before the clear text step execution for stating desampler transmission, following step is performed:
The ARP request of the interchanger transmission is received by the virtual functions module;
The corresponding arp response of the ARP request is created, and itself corresponding MAC Address is encapsulated in the arp response;
The arp response is sent to the interchanger by the virtual functions module.
25. the method for the virtual switch processing message according to claim 23 based on SR-IOV, which is characterized in that institute
It states virtual machine and is respectively arranged with unique corresponding label;
Wherein, the label includes:Virtual local area network tags.
26. the method for the virtual switch processing message according to claim 25 based on SR-IOV, which is characterized in that institute
It states and performs business logic processing for the clear text, obtain data message, and by the corresponding mesh of the clear text
MAC Address be encapsulated into the data message in step implementation procedure or it is described for the clear text perform industry
Business logical process, obtains data message, and the corresponding target MAC (Media Access Control) address of the clear text is encapsulated into the data message
After middle step performs, and before the data message step execution to interchanger transmission, perform following step:
According to the mapping relations of default virtual machine and label, the corresponding mark of the virtual machine is encapsulated in the data message
Label.
27. a kind of device of the virtual switch processing message based on SR-IOV, which is characterized in that including:
Clear text receiving unit, the clear text sent for desampler;
Service logic execution unit performs business logic processing for being directed to the clear text, obtains data message, and will
The corresponding target MAC (Media Access Control) address of the clear text is encapsulated into the data message;
Data message transmitting element, for sending the data message to the interchanger;
Wherein, the clear text carries intermediate MAC Address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611036151.8A CN108092923B (en) | 2016-11-23 | 2016-11-23 | Message processing method and device based on SR-IOV |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611036151.8A CN108092923B (en) | 2016-11-23 | 2016-11-23 | Message processing method and device based on SR-IOV |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108092923A true CN108092923A (en) | 2018-05-29 |
CN108092923B CN108092923B (en) | 2021-06-18 |
Family
ID=62168649
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611036151.8A Active CN108092923B (en) | 2016-11-23 | 2016-11-23 | Message processing method and device based on SR-IOV |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108092923B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110798409A (en) * | 2019-10-31 | 2020-02-14 | 深信服科技股份有限公司 | Traffic processing method, device and storage medium |
CN110912825A (en) * | 2018-09-18 | 2020-03-24 | 阿里巴巴集团控股有限公司 | Message forwarding method, device, equipment and system |
CN111698167A (en) * | 2020-04-01 | 2020-09-22 | 新华三大数据技术有限公司 | Message processing method and device |
CN111698141A (en) * | 2019-03-13 | 2020-09-22 | 中兴通讯股份有限公司 | Message forwarding method and device |
WO2021135792A1 (en) * | 2019-12-30 | 2021-07-08 | 中兴通讯股份有限公司 | Data forwarding method, forwarding device, system, server, and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102334112A (en) * | 2009-02-27 | 2012-01-25 | 美国博通公司 | Method and system for virtual machine networking |
CN102457586A (en) * | 2010-10-18 | 2012-05-16 | 中兴通讯股份有限公司 | Expanding method for realizing double-layer network and expanded double-layer network |
CN103023827A (en) * | 2012-11-23 | 2013-04-03 | 杭州华三通信技术有限公司 | Data forwarding method for virtualized data centre and realization equipment of data forwarding method |
CN104170331A (en) * | 2012-04-09 | 2014-11-26 | 华为技术有限公司 | L3 gateway for VXLAN |
US20150319088A1 (en) * | 2014-04-30 | 2015-11-05 | Brocade Communications Systems, Inc. | Method and system for facilitating switch virtualization in a network of interconnected switches |
-
2016
- 2016-11-23 CN CN201611036151.8A patent/CN108092923B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102334112A (en) * | 2009-02-27 | 2012-01-25 | 美国博通公司 | Method and system for virtual machine networking |
CN102457586A (en) * | 2010-10-18 | 2012-05-16 | 中兴通讯股份有限公司 | Expanding method for realizing double-layer network and expanded double-layer network |
CN104170331A (en) * | 2012-04-09 | 2014-11-26 | 华为技术有限公司 | L3 gateway for VXLAN |
CN103023827A (en) * | 2012-11-23 | 2013-04-03 | 杭州华三通信技术有限公司 | Data forwarding method for virtualized data centre and realization equipment of data forwarding method |
US20150319088A1 (en) * | 2014-04-30 | 2015-11-05 | Brocade Communications Systems, Inc. | Method and system for facilitating switch virtualization in a network of interconnected switches |
Non-Patent Citations (1)
Title |
---|
荀仲恺等: ""基于SR-IOV的虚拟机防火墙设计与实现"", 《计算机工程》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110912825A (en) * | 2018-09-18 | 2020-03-24 | 阿里巴巴集团控股有限公司 | Message forwarding method, device, equipment and system |
CN110912825B (en) * | 2018-09-18 | 2022-08-02 | 阿里巴巴集团控股有限公司 | Message forwarding method, device, equipment and system |
US11677686B2 (en) | 2018-09-18 | 2023-06-13 | Alibaba Group Holding Limited | Packet forwarding method, apparatus, device, and system |
CN111698141A (en) * | 2019-03-13 | 2020-09-22 | 中兴通讯股份有限公司 | Message forwarding method and device |
CN111698141B (en) * | 2019-03-13 | 2022-12-02 | 中兴通讯股份有限公司 | Message forwarding method and device |
CN110798409A (en) * | 2019-10-31 | 2020-02-14 | 深信服科技股份有限公司 | Traffic processing method, device and storage medium |
WO2021135792A1 (en) * | 2019-12-30 | 2021-07-08 | 中兴通讯股份有限公司 | Data forwarding method, forwarding device, system, server, and storage medium |
CN111698167A (en) * | 2020-04-01 | 2020-09-22 | 新华三大数据技术有限公司 | Message processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN108092923B (en) | 2021-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112217746B (en) | Message processing method, host and system in cloud computing system | |
CN108092923A (en) | Message processing method and device based on SR-IOV | |
CN105706043B (en) | The list handling capacity of push type link | |
CN109587281B (en) | Container configuration method and computing node | |
EP3430512B1 (en) | Network virtualization of containers in computing systems | |
JP5855630B2 (en) | Management server and management method for managing cloud appliance of virtual local area network | |
CN103621046B (en) | Network communication method and device | |
CN109791482A (en) | Scalable service is found in micro services environment | |
WO2017148249A1 (en) | Resource configuration method and network device thereof | |
US9332067B2 (en) | Load sharing method and apparatus | |
US10841274B2 (en) | Federated virtual datacenter apparatus | |
CN104486589B (en) | Access method and device in video monitoring system based on GVRP | |
CN105430110A (en) | Container configuration method and network transmission device of virtual network system | |
CN103118149B (en) | Communication control method between same tenant's server and the network equipment | |
CN105159753A (en) | Virtualization method and device for accelerator and centralized resource manager | |
CN108713309A (en) | SD-WAN system, use method of SD-WAN system and related device | |
CN106031116A (en) | Method, apparatus and system for associating NS with VNF | |
CN105991387A (en) | Message transformation method and device of virtual extensible local area network (VXLAN) | |
JP2019521619A (en) | Packet forwarding | |
CN111049876A (en) | Lightweight telecom cloud edge computing system architecture | |
CN103685608A (en) | Method and device for automatically configuring IP (Internet Protocol) address of security virtual machine | |
CN108270878A (en) | Method, the VTEP equipment of ARP messages are sent in VXLAN | |
CN106612335B (en) | The method of the information exchange and communication of IoT is realized using Docker container | |
CN104683428A (en) | Network service processing method and device | |
WO2021147358A1 (en) | Network interface establishing method, apparatus, and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230605 Address after: Room 1-2-A06, Yungu Park, No. 1008 Dengcai Street, Sandun Town, Xihu District, Hangzhou City, Zhejiang Province Patentee after: Aliyun Computing Co.,Ltd. Address before: Box 847, four, Grand Cayman capital, Cayman Islands, UK Patentee before: ALIBABA GROUP HOLDING Ltd. |