CN110048963A - Message transmitting method, medium, device and calculating equipment in virtual network - Google Patents
Message transmitting method, medium, device and calculating equipment in virtual network Download PDFInfo
- Publication number
- CN110048963A CN110048963A CN201910320283.0A CN201910320283A CN110048963A CN 110048963 A CN110048963 A CN 110048963A CN 201910320283 A CN201910320283 A CN 201910320283A CN 110048963 A CN110048963 A CN 110048963A
- Authority
- CN
- China
- Prior art keywords
- buffering area
- message
- memory
- memory pool
- capacity
- 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
- 238000000034 method Methods 0.000 title claims abstract description 64
- 230000003139 buffering effect Effects 0.000 claims abstract description 177
- 230000005540 biological transmission Effects 0.000 claims abstract description 71
- 238000003860 storage Methods 0.000 claims abstract description 51
- 239000000872 buffer Substances 0.000 claims description 10
- 238000000151 deposition Methods 0.000 claims description 3
- 230000005055 memory storage Effects 0.000 claims description 2
- 230000007812 deficiency Effects 0.000 abstract description 3
- 230000008569 process Effects 0.000 description 20
- 238000005516 engineering process Methods 0.000 description 19
- 230000006870 function Effects 0.000 description 12
- 238000005538 encapsulation Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000003780 insertion Methods 0.000 description 7
- 230000037431 insertion Effects 0.000 description 7
- 238000012546 transfer Methods 0.000 description 7
- 238000011161 development Methods 0.000 description 3
- 238000013467 fragmentation Methods 0.000 description 3
- 238000006062 fragmentation reaction Methods 0.000 description 3
- 239000011800 void material Substances 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000003111 delayed effect Effects 0.000 description 2
- 238000007599 discharging Methods 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 230000005291 magnetic effect Effects 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 239000000047 product Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 230000005641 tunneling Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4633—Interconnection of networks using encapsulation techniques, e.g. tunneling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
- H04L49/9005—Buffering arrangements using dynamic buffer space allocation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
- H04L49/9015—Buffering arrangements for supporting a linked list
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
- H04L49/9047—Buffering arrangements including multiple buffers, e.g. buffer pools
- H04L49/9052—Buffering arrangements including multiple buffers, e.g. buffer pools with buffers of different sizes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Embodiments of the present invention provide a kind of message transmitting method in virtual network, medium, device and calculate equipment.This method comprises: when, there are when message to be transmitted, applying for first buffering area and second buffering area from memory pool, and the second buffering area is linked in after the first buffering area in message transmissions queue;The pointer of the second buffering area is directed toward storage address of the message to be transmitted in the message transmissions queue;The tunnel protocol head of the virtual network is stored in the first buffering area;The tunnel protocol head and the message to be transmitted are encapsulated into tunnel packet, and the physical network interface by corresponding to the virtual network sends the tunnel packet.By way of pre- first to file memory, method of the invention can significantly improve message transmissions efficiency, avoid and lead to not the problem of being inserted into tunnel protocol head and then message is caused to send failure because of the missing of memory headroom or deficiency.
Description
Technical field
Embodiments of the present invention are related to communication and field of computer technology, more specifically, embodiments of the present invention relate to
And message transmitting method, medium, device and calculating equipment in virtual network.
Background technique
Background that this section is intended to provide an explanation of the embodiments of the present invention set forth in the claims or context.Herein
Description recognizes it is the prior art not because not being included in this section.
Virtual network is a kind of computer network comprising being at least partly virtual network link, generally be can be based on void
The network virtualization technology for intending machine and virtual network agreement to realize.Virtual machine (Virtual Machine) refers to through software mould
The computer system of the quasi- virtualization with complete hardware system function.In a computer being physically present (i.e. host)
On can run multiple virtual machines simultaneously, run between multiple virtual machines on same host that can mutually to carry out data logical
In addition letter can also carry out data communication by the physical network card of host and other computer equipments of Physical Network road.
When virtual machine User space operation application program generate message need to be sent out by virtual network when, first
It needs to undergo the primary copy by User space to kernel state.Virtual machine kernel state can safeguard the report for storing waiting message
Text transmission queue, is successively copied to host for the message stored in message transmissions queue as the physical memory space of its distribution
In, it can issued by the physical network card of host after encapsulation process.
Summary of the invention
By background above technology contents it is found that the transmission of in virtual network message at least need to message content into
Row copies twice, not only will affect message transmission speed, but also can occupy a large amount of memory headrooms.
Thus, it is also very desirable to which a kind of improved message transmitting method is mentioned with reducing the copy number of message in virtual network
High message transmission speed simultaneously reduces memory headroom occupancy.
In the present context, a kind of embodiments of the present invention are intended to provide in virtual network message transmitting method is situated between
Matter, message transmitting device and calculating equipment.
In the first aspect of embodiment of the present invention, the message transmitting method in a kind of virtual network is provided, comprising:
When there are when message to be transmitted, apply for that first buffering area and second is buffered from memory pool in message transmissions queue
Area, and the second buffering area is linked in after the first buffering area;
With being directed toward storage of the message to be transmitted in the message transmissions queue by the pointer of the second buffering area
Location;
The tunnel protocol head of the virtual network is stored in the first buffering area;
The tunnel protocol head and the message to be transmitted are encapsulated into tunnel packet, and described virtual by corresponding to
The physical network interface of network sends the tunnel packet.
In some illustrative embodiments of the invention, applying for first buffering area and second buffering area from memory pool
Before, the method also includes:
For corresponding to the first memory pool of virtual machine application of the virtual network and the second memory pool;
Wherein, first memory pool includes the first memory block that multiple storage sizes are the first capacity, and described the
Two memory pools include the second memory block that multiple storage sizes are the second capacity, and first capacity is less than described second and holds
Amount;
Application first buffering area and the second buffering area from memory pool include:
Apply the first memory block as first buffering area from first memory pool;
Apply the second memory block as second buffering area from second memory pool.
In some illustrative embodiments of the invention, first capacity is 64-256 byte, second capacity
For 1024-2048 byte.
In some illustrative embodiments of the invention, when the message to be transmitted includes being stored in the message transmissions
It is described to apply for first buffering area from memory pool and second buffering area includes: when multiple data packets in queue
Apply for a first buffering area and multiple second buffering areas from memory pool;Wherein, the number of the second buffering area
Amount is equal to the quantity of the data packet.
It is described that the second buffering area is linked in first buffering in some illustrative embodiments of the invention
Include: after area
It is linked in multiple after the first buffering area based on the concatenated second buffering area of list structure.
In some illustrative embodiments of the invention, the pointer by the second buffering area is directed toward described to be passed
Storage address of the defeated message in the message transmissions queue, comprising:
Judge whether current Packet Transfer Mode is zero-copy mode;
When the judgment result is yes, the pointer of the second buffering area message to be transmitted is directed toward to pass in the message
Storage address in defeated queue.
It is described to be stored in the tunnel protocol head of the virtual network in some illustrative embodiments of the invention
In the first buffering area, comprising:
Judge whether the memory capacity of the first buffering area is large enough to hold the tunnel protocol head of the virtual network;
When the judgment result is yes, the tunnel protocol head of the virtual network is stored in the first buffering area.
In some illustrative embodiments of the invention, the virtual network is virtual expansible local area network.
According to the second aspect of the invention, a kind of medium is provided, program is stored thereon with, when which is executed by processor
Realize the method as described in any in foregoing exemplary embodiment.
According to the third aspect of the invention we, the message transmitting device in a kind of virtual network is provided, comprising:
Memory application module is configured as when, there are when message to be transmitted, applying from memory pool in message transmissions queue
First buffering area and second buffering area, and the second buffering area is linked in after the first buffering area;
Packet storage module is configured as the pointer of the second buffering area being directed toward the message to be transmitted in the report
Storage address in text transmission queue;
Tunnel is inserted into module, is configured as the tunnel protocol head of the virtual network being stored in the first buffering area
In;
Message sending module is configured as encapsulating the tunnel protocol head and the message to be transmitted to tunnel packet
In, and the physical network interface by corresponding to the virtual network sends the tunnel packet.
In some illustrative embodiments of the invention, described device further include:
Memory pool application module is configured as the first memory pool of virtual machine application and corresponding to the virtual network
Two memory pools;
Wherein, first memory pool includes the first memory block that multiple storage sizes are the first capacity, and described the
Two memory pools include the second memory block that multiple storage sizes are the second capacity, and first capacity is less than described second and holds
Amount;
Application first buffering area and the second buffering area from memory pool include:
Apply the first memory block as first buffering area from first memory pool;
Apply the second memory block as second buffering area from second memory pool.
In some illustrative embodiments of the invention, first capacity is 64-256 byte, second capacity
For 1024-2048 byte.
In some illustrative embodiments of the invention, when the message to be transmitted includes being stored in the message transmissions
It is described to apply for first buffering area from memory pool and second buffering area includes: when multiple data packets in queue
Apply for a first buffering area and multiple second buffering areas from memory pool;Wherein, the number of the second buffering area
Amount is equal to the quantity of the data packet.
It is described that the second buffering area is linked in first buffering in some illustrative embodiments of the invention
Include: after area
It is linked in multiple after the first buffering area based on the concatenated second buffering area of list structure.
In some illustrative embodiments of the invention, the packet storage module includes:
First judgment module is configured as judging whether current Packet Transfer Mode is zero-copy mode;
First memory module is configured as when the judgment result is yes, described in the pointer direction by the second buffering area
Storage address of the message to be transmitted in the message transmissions queue.
In some illustrative embodiments of the invention, the tunnel insertion module includes:
It is described virtual to be configured as judging whether the memory capacity of the first buffering area is large enough to hold for second judgment module
The tunnel protocol head of network;
Second memory module is configured as that when the judgment result is yes, the tunnel protocol head of the virtual network being deposited
It is stored in the first buffering area.
In some illustrative embodiments of the invention, the virtual network is virtual expansible local area network.
According to the fourth aspect of the invention, a kind of calculating equipment is provided, comprising: processor and memory, the memory
It is stored with executable instruction, the processor is used to that the executable instruction of the memory storage to be called to execute such as foregoing exemplary
Any method of embodiment.
Message transmitting method, medium, device and the electricity in virtual network that illustrative embodiments provide according to the present invention
Sub- equipment, by the way of pre- first to file memory, respectively message data and tunnel protocol head storage allocation space, then by two
The encapsulation and transmission that message data can with stability and high efficiency be carried out after person's link are sent, and are significantly improved message transmissions efficiency, are avoided
Lead to not because of the missing of memory headroom or deficiency to be inserted into tunnel protocol head and then message is caused to send asking for failure
Topic.In addition to this, exemplary embodiment of the invention is improving network by combining preliminery application memory with zero duplication technology
While service performance, memory overhead can be significantly reduced, reduce the generation of memory fragmentation.
Detailed description of the invention
The following detailed description is read with reference to the accompanying drawings, above-mentioned and other mesh of exemplary embodiment of the invention
, feature and advantage will become prone to understand.In the accompanying drawings, if showing by way of example rather than limitation of the invention
Dry embodiment, in which:
Fig. 1 shows the structure composition schematic diagram of mbuf structural body involved in exemplary embodiment of the invention;
Fig. 2 shows message receive process when not using zero duplication technology involved in exemplary embodiment of the invention to show
It is intended to;
Message receive process when Fig. 3 is shown involved in exemplary embodiment of the invention using zero duplication technology are shown
It is intended to;
Fig. 4 shows stream of the message transmitting method of illustrative embodiments offer according to the present invention under an application scenarios
Journey schematic diagram.
Fig. 5 shows the message transmitting method of illustrative embodiments offer according to the present invention under an application scenarios
Mbuf memory headroom use state diagram.
Fig. 6 diagrammatically illustrates message transmitting method in the virtual network that a kind of illustrative embodiments of the present invention provide
Steps flow chart block diagram.
Fig. 7 diagrammatically illustrates message transmitting method in the virtual network that another exemplary embodiment of the present invention provides
Part steps flow diagram.
Fig. 8 diagrammatically illustrates message transmitting method in the virtual network that another exemplary embodiment of the present invention provides
Part steps flow diagram.
Fig. 9 diagrammatically illustrates message transmitting device in the virtual network that another illustrative embodiments of the invention provide
Composition block diagram.
In the accompanying drawings, identical or corresponding label indicates identical or corresponding part.
Specific embodiment
The principle and spirit of the invention are described below with reference to several illustrative embodiments.It should be appreciated that providing this
A little embodiments are used for the purpose of making those skilled in the art can better understand that realizing the present invention in turn, and be not with any
Mode limits the scope of the invention.On the contrary, thesing embodiments are provided so that the present invention is more thorough and complete, and energy
It enough will fully convey the scope of the invention to those skilled in the art.
One skilled in the art will appreciate that embodiments of the present invention can be implemented as a kind of system, device, equipment, method
Or computer program product.Therefore, the present invention can be with specific implementation is as follows, it may be assumed that complete hardware, complete software
The form that (including firmware, resident software, microcode etc.) or hardware and software combine.
Embodiment according to the present invention proposes message transmitting method, medium, message transmissions in a kind of virtual network
Device and calculating equipment.
It is to be appreciated that relational language involved in herein is explained as follows:
VXLAN (Virtual Extensible LAN, virtual expansible local area network): being a kind of network virtualization technology,
IP based network and two-layer VPN technology (Virtual Private Network, the void for using " MAC in UDP " packing forms
Quasi- dedicated network), for improving scaling problem of the large-scale cloud computing in deployment, it can be understood as be to VLAN (Virtual
Local AreaNetwork, virtual LAN) a kind of extension.
VTEP (VXLAN Tunnel Endpoints, VXLAN endpoint of a tunnel): the edge device of VXLAN network is
The beginning and end in the tunnel VXLAN.VTEP is either an independent network equipment, the service being also possible to where virtual machine
Device.
DPDK (Date Plane Development Kit, data plane development kit): being the data increased income by Intel
Message accelerates frame, is made of one group of shared library and User space driving, provides a succinct but complete frame.
A kind of virtio (I/O device virtualization program) network equipment Back end data that vhost-user:DPDK is provided is logical
Road, the message of virtual machine are directly sent out by DPDK from User space in host, can substantially be mentioned compared to vhost-net technology
The network transmission performance of high virtual machine.
Zero copy (zero-copy): one kind that DPDK is provided for vhost-user network transmission is refered in particular to herein and is subtracted
The technology for copying number less, accelerates vhost-user to connect message by eliminating the rear end vhost-user to the copy of message
It receives.
HEADROOM:DPDK exclusive technical terms refer to mbuf (describing the structural body of message in DPDK) and store net
When network message, the one section of memory headroom reserved before packet storage initial address, for being inserted into tunnel in the treatment process below
Road head.
OVS (OpenVSwitch): the multilayer virtual interchanger of Product-level quality is realized by supporting programmable extension
Large-scale network automatically.It can be convenient management and configuration virtual machine network, detect more physical hosts in dynamic virtual environment
In traffic conditions.
Mempool (memory pool): being the object dispenser of fixed size.In DPDK, it by title unique identification, and
Idle object is stored using mempool operation.
In addition, any number of elements in attached drawing is used to example rather than limitation and any name are only used for distinguishing,
Without any restrictions meaning.
Below with reference to several representative embodiments of the invention, the principle and spirit of the present invention are explained in detail.
Summary of the invention
The inventors discovered that message is issued from virtual machine when DPDK application zero copy technology, pass through in host
DPDK is received, and by OVS encapsulation process, is finally issued again by DPDK from physical network card, due to reducing message transmission procedure
In copy number, theoretically have very great help to the promotion of vhost-user network transmission performance.
In DPDK, mbuf is the structural body that message is described in DPDK, is data knot most crucial in entire repeating process
One of structure, it is similar to the skb in Linux kernel, is mainly used to store network message data, and message data is all deposited
It stores up in one piece of continuous memory pointed by mbuf- > buf_addr.Under normal circumstances, the mbuf applied usually can
Start-up portion in the memory headroom that mbuf- > buf_addr is directed toward reserves one section of space HEADROOM, is used in the message later period
The head in the tunnels such as VXLAN is inserted into treatment process.As shown in Figure 1, adjacent two mbuf structural bodies (mbuf struct) it
Between linked using pointer mbuf- > pkt.next.The component part of one mbuf struct may include being located at data
Head room before the room and tail room after dataroom.The length of HEADROOM is by mbuf- > data_
Off is specified, and the message directly received from network interface (can be virtual machine network interface or physical internet ports) is practical all from mbuf- > buf_
Start to store at addr+mbuf- > data_off, that is, is stored in the corresponding memory headroom of data room.The length of data room
For mbuf- > data_len, and the entire length of mbuf struct is mbuf- > buf_len.
As shown in Fig. 2, message receive process can be generally mounted in the case where not using zero copy technology
VME operating system Guest OS on virtual equipment qemu-kvm transmits queue to the virtio safeguarded
(Virtqueue) data packet packet is sent, the data packet for transmitting the message to be sent that queue describes in table then will be stored in
It is copied to memory headroom pointed by mbuf- > buf_addr+mbuf- > data_off, i.e. data in mbuf structural body
Room, mbuf- > buf_addr initial address are to being reserved between mbuf- > buf_addr+mbuf- > data_off
HEADROOM。
As shown in figure 3, if using zero copy technology, not from transmission queue Virtqueue to mbuf structure
The copy function of body, but address pointer mbuf- > buf_addr in mbuf structural body is pointing directly at virtio transmission queue
The address of the descriptor of middle stored messages.In other words, the memory space that mbuf itself is reserved is not used, mbuf- > buf_
What addr was directed toward is also no longer the memory space that mbuf itself is reserved, but virtio transmits the descriptor of stored messages in queue
The initial address of middle message data.The memory mapping of descriptor is usually direct stored messages data, or is unloaded opening hardware
In the case where carrying function, the head virtio of one more than ten byte of increase before message data, but unpromising outer layer tunnel
Special HEADROOM is reserved on road head, i.e. HEADROOM length is 0.
When HEADROOM length is 0, and when the tunnels packet header such as to be inserted into VXLAN, a kind of scheme that can be used is
Again apply for one piece of biggish new memory headroom of capacity for being enough bearing tunnel protocol headers and message initial data itself, and
All copy tunnel protocol head and entire message to new memory headroom.This scheme, which is compared, does not use zero copy skill
Art performance is greatly reduced instead, because increasing the expense of memory application, and more copies compared to without using zero copy
Data, while will cause memory fragmentation.
At present in the realization mechanism of OVS-DPDK, if detect using mbuf stored messages and HEADROOM be 0 or
Person can be called directly when being not enough to be inserted into the tunnel VXLAN packet header abort terminate process, illustrate this be one cannot bear it is tight
Weight problem.As described above, applying for that the mode of one piece big memory will lead to performance seriously and reduce again when being inserted into tunnel header, it is
Overcome the problems, such as this, present invention employs the modes of memory headroom of the application as HEADROOM in advance, in vhost-user
This memory headroom can be used when packet receiving, and before the memory headroom applied being inserted into collected message, it is complete
The memory headroom for discharging insertion after sending at message again, reduces the expense of memory to the greatest extent.As the supplement to zero copy technology
With it is perfect, the present invention be able to solve by the received message of zero copy reserved HEADROOM the problem of, allow into
Function is applied to VXLAN network environment and other tunneling protocol network environment, to improve the tunnel packets such as VXLAN in OVS
Network processes performance, so that the zero copy technology of virtio can obtain better service performance in overlay network.
After introduced the basic principles of the present invention, lower mask body introduces various non-limiting embodiment party of the invention
Formula.
Application scenarios overview
It should be noted which is shown only for the purpose of facilitating an understanding of the spirit and principles of the present invention for following application scenarios, this
The embodiment of invention is unrestricted in this regard.On the contrary, embodiments of the present invention can be applied to it is applicable any
Scene.
By taking application of the present invention in OVS-DPDK as an example, in conjunction with Fig. 4 to the message transmissions stream in embodiment of the present invention
Journey is made as described below.
(1) preliminery application memory
OVS-DPDK can be each equipment (the i.e. corresponding network interface of an equipment) application one mempool, mempool
In storage object be mbuf.The present invention adopts preliminery application memory in a like fashion, in addition as each equipment applies for one again
A mempool is used as each receiving the HEADROOM of message in subsequent process from virtio.
It, can be first from the mempool for being used as HEADROOM when there is data packet etc. to be received in transmission queue Virtqueue
Middle application mbuf, and mbuf_h can be named as to distinguish over the mbuf for being used for stored messages data.Mbuf_h can be with
It is configured to entire memory space and is used as HEADROOM, even mbuf- > data_off=mbuf- > buf_len.It simultaneously can be from
Application is used for the mbuf of bearing message data in mempool, and after the mbuf is linked at mbuf_h, even mbuf_h- >
Pkt.next=mbuf.
(2) mempool is passed to the packet receiving function of vhost-user in DPDK
After having applied for that special mempool is used as the HEADROOM for receiving message, need the mempool
The function that vhostuser receives message is passed to, in addition the mempool for bearing message data, needs to transmit 2 altogether
Mempool gives vhostuser message receiver function.The vhost-user message that DPDK is externally provided receives API and only receives one
Mempool pointer.Therefore, the biography ginseng that can modify packet receiving function, is used for while transmitting two mempool.
(3) HEADROOM is previously inserted into the message of zero copy application
OVS and DPDK needs support multiple segments function, i.e. a message can store in multiple mbuf
In, these mbuf are together in series in the form of chained list.DPDK is primary just have been supported, OVS then needs development support.
If opening zero copy, for each from the message that receives of virtio transmission queue, can first from
One mbuf_h of mempool application is as the first mbuf for carrying this message, and by the entire space buf all conducts
Then HEADROOM receives message according still further to primitive logic, and the mbuf of bearing message data is linked at behind first mbuf.
When being inserted into the tunnel headers such as VXLAN in the follow-up process in this way, insertion operation is directly carried out, message is normally from object later
Reason mouth forwards, without causing OVS process exception to terminate because of HEADROOM insufficient space.In addition, if report to be transmitted
Text is not from DPDK (such as host itself generates message), then can apply for sufficiently large memory again, in insertion tunnel
It is issued after protocol headers by port.
Packet receiving process based on shown in Fig. 4 receives the number of the mbuf of message using zero copy from virtio transmission queue
According to structure as shown in figure 5, the memory space that buf_addr is directed toward in first mbuf is all used as the HEADROOM of the message (can be with
Set mbuf- > data_off to the value of mbuf- > data_len, rather than default value), and by first bearing message data
Mbuf be linked at after the first mbuf as HEADROOM.Refering to what is shown in Fig. 5, being located at current in virtio transmission queue
Message to be transmitted be divided into multiple descriptors such as packet1_segs1, packet1_segs2, packet1_segs3 and deposited
Storage, each mbuf are together in series in the form of chained list.For carrying the last one mbuf of current message to be transmitted in its knot
The descriptor packet2 of next message to be transmitted can be directed toward at tail by pointer mbuf_h- > pkt.next, it is next to be passed
Defeated message and current message to be transmitted have similar data structure, that is, include one for as the first of HEADROOM
Mbuf and at least one being linked in after the first mbuf are used for the mbuf of bearing message data.
(4) release of memory
Due to there is the pointer for being directed toward place mempool in each mbuf struct, so when discharging mbuf, even if
Mbuf in one chained list can also normally be discharged from different mempool by safety.
Illustrative methods
Below with reference to above-mentioned application scenarios, the void of exemplary embodiment of the invention offer is described with reference to Fig. 6 to Fig. 8
Message transmitting method in quasi- network.
As shown in fig. 6, the message transmitting method in the virtual network that exemplary embodiment of the invention provides mainly can be with
The following steps are included:
Step S610. when there are when message to be transmitted, apply from memory pool in message transmissions queue first buffering area and
Second buffering area, and second buffering area is linked in after first buffering area.
When virtual machine needs to be sent out message, message data can be stored in message in the form of data packet first
It transmits in queue, descriptor can be embodied under UNIX LINUX operating system.This step can first determine whether certain
It when the judgment result is yes can be from memory with the presence or absence of message to be transmitted in the message transmissions queue that one virtual machine is safeguarded
Application first buffering area and second buffering area in pond (mempool), while second buffering area can be linked in first buffering area
Later.First buffering area corresponds to mbuf_H involved in above-mentioned application scenarios, and second buffering area corresponds to above-mentioned answer
The mbuf being linked in involved in scene after mbuf_H.It, can after completing the application of first buffering area and second buffering area
By in the process space of corresponding memory address mappings to DPDK in a manner of by passing a parameter, for follow-up storage use.
In general, multiple virtual machines can be usually carried on a host, in such a case, it is possible to by the way of poll
Judge with the presence or absence of message to be sent in multiple message transmissions queues that each virtual machine is safeguarded, and is distinguished according to polling result
The message sent is needed to handle each virtual machine.Applied first buffering area and second buffering area can be in this step
From same memory pool, it in addition can be from two different memory pools, this illustrative embodiment does not do special limit to this
It is fixed.
The pointer of second buffering area is directed toward storage address of the message to be transmitted in message transmissions queue by step S620..
The second buffering area applied in step S610 is the message data for storing waiting message originally, but is
A copy function from message transmissions queue to host institute's storage allocation space is reduced, this step can be by the second buffering
The pointer in area is revised as being pointing directly at storage address of the message to be transmitted in message transmissions queue by direction allocation address.
In this way, can be directed toward according to the pointer of second buffering area, in the encapsulation of subsequent message and transmission process by message transmissions
Storage address in queue directly acquires the message data of message to be transmitted, and handles it.
The tunnel protocol head of virtual network is stored in first buffering area by step S630..
Before the first buffering area applied in step S610 is linked at second buffering area, for being stored as HEADROOM
The tunnel protocol head of virtual network is stored in the first buffering area that application obtains by space, this step.In addition to tunnel protocol
Also can store other than head, in first buffering area facilitate deblocking message other information, this illustrative embodiment to this not
Do particular determination.Virtual network in this illustrative embodiment for example can be virtual expansible local area network, i.e., above-mentioned application
VXLAN network involved in scene.In VXLAN network environment, establishing the tunnel VXLAN based on tunnel protocol be may be implemented in physics
Virtual expansible local area network is constructed in the network architecture, different virtual expansible local area networks can be used positioned at tunnel protocol head
In VNI (VXLANNetwork Identifier, virtual expansible local net network identifier) be identified, general one
VNI is the virtual machine facility carried on corresponding host.Other than VNI, VXLAN tunnel protocol can also wrap in head
Include other fields such as flag bit (VXLAN flags), reserved bit (Reserved).
Step S640. encapsulates on tunnel protocol head and message to be transmitted into tunnel packet, and by corresponding to virtual net
The physical network interface of network sends tunnel packet.
After tunnel protocol head is inserted in front of message to be transmitted, this step can by tunnel protocol head and
Message to be transmitted is encapsulated into tunnel packet, so that message data can be in the form of tunnel packet in bearer network (such as IP network
Network) on transmitted.It, can also successively outward in tunnel packet other than being inserted into tunnel protocol head before message to be transmitted
Encapsulation corresponds to the head UDP of User Datagram Protocol (User Datagram Protocol, UDP), corresponds to internet protocol
Discuss (Internet Protocol, IP) the head IP and correspond to medium access control (Media Access Control,
MAC MAC header).The destination slogan of source port number and message recipient in the head UDP including message transmitting party, IP head
The purpose IP address of source IP address and the affiliated VTEP of message recipient in portion including the affiliated VTEP of message transmitting party, MAC header
In including the affiliated VTEP of message transmitting party source MAC and the affiliated VTEP of message recipient target MAC (Media Access Control) address.Pass through insertion
Tunnel protocol head and after being packaged, can be led to by virtual machine the message that virtual network is sent in the form of tunnel packet
It crosses and is sent out corresponding to the physical network interface of virtual network.
This illustrative embodiment provide virtual network in message transmitting method by the way of pre- first to file memory,
Respectively message data and tunnel protocol head storage allocation space, then message can with stability and high efficiency be carried out after the two is linked
The encapsulation and transmission of data are sent, and are significantly improved message transmissions efficiency, are avoided and lead because of the missing of memory headroom or deficiency
The problem of cause can not be inserted into tunnel protocol head and then message is caused to send failure.In addition to this, this illustrative embodiment is logical
It crosses and combines preliminery application memory with zero duplication technology, while improving Web vector graphic performance, memory can be significantly reduced and open
Pin, reduces the generation of memory fragmentation.
Based on foregoing exemplary embodiment, apply in the slave memory pool as performed by step S610 first buffering area and
It, can be comprising steps of for corresponding in the first memory pool of virtual machine application of virtual network and second before second buffering area
Deposit pond.Wherein, the first memory pool includes the first memory block that multiple storage sizes are the first capacity, and the second memory pool includes
Multiple storage sizes are the second memory block of the second capacity.In general, under the application scenarios of OVS-DPDK, preparatory Shen
Memory pool please is made of the memory block with default capability size (such as 2048 bytes).And in this illustrative embodiment
In, it, can be to the two for the considerations of saving memory since the first memory block and the second memory block are used to store different data
Storage space volume adaptively configured.Such as by the first capacity configuration of the first memory block for less than the second memory block
The second capacity, can be specifically 64-256 byte by the first capacity configuration of the first memory block, and by the of the second memory block
Two capacity configurations are 1024-2048 byte.In this way, can be correspondingly by the first memory pool according to the difference of storage content
Apply for the first memory block compared with low capacity or the second memory block by applying for larger capacity in the second memory pool, so as to reach
To the effect for reducing memory overhead.
On the basis of the illustrative embodiments, in slave memory pool performed by step S610 apply first buffering area and
Second buffering area may further include: apply the first memory block as first buffering area from the first memory pool;Out of second
It deposits and applies the second memory block as second buffering area in pond.First buffering area is as being inserted into tunnel packet header
HEADROOM, required capacity is smaller, such as can configure its amount of capacity to 128 bytes;Second buffering area itself is to be used for
Storing waiting message data, but in zero duplication technology, the memory address as second buffering area of allocation is not
It is used, but the pointer of second buffering area is directed toward storage address of the message to be transmitted in the message transmissions queue, because
The amount of capacity of this second buffering area can carry out adaptability configuration according to the size of the data packet stored in message transmissions queue,
Such as its amount of capacity can be configured to 2048 bytes.
It should be noted that can also have default size to buffer by one in some other illustrative embodiments
Apply for first buffering area and second buffering area simultaneously in the memory pool in area, in this way, which first buffering area and second buffering area will
Amount of capacity having the same, such as be all 2048 bytes.
It, can be to be sent by one if a data packet is not enough to carry the message data of a message to be sent
Message is divided into multiple data packets and is stored in message transmissions queue.In this case, message to be transmitted may include being stored in
Multiple data packets in message transmissions queue apply for first buffering area and the second buffering in slave memory pool performed by step S610
Area may further include: apply for a first buffering area and multiple second buffering areas from memory pool;Wherein, the second buffering
The quantity in area is equal to the quantity of data packet.With this corresponding, second buffering area is linked in by execution described in step S610
It after one buffer area, may further include: first buffering being linked in based on the concatenated second buffering area of list structure by multiple
After area.For example, a message to be sent, which is fragmented, to form four data packets and is stored in message transmissions queue, then can
To apply for a first buffering area and four second buffering areas simultaneously, chain again after four second buffering areas are connected with list structure
It connects after first buffering area.First buffering area is used to be inserted into tunnel protocol head according to step S630, and each second buffers
The address pointer in area is then respectively directed to the storage address of four data packets in message transmissions queue according to step S620.
As shown in fig. 7, in the another exemplary embodiment of the disclosure, step S620. is by the pointer of second buffering area
It is directed toward storage address of the message to be transmitted in message transmissions queue, may further include following steps:
Step S710. judges whether current Packet Transfer Mode is zero-copy mode.
It, can be in message transmission procedure with reference to the message transmissions process shown in Fig. 4 under OVS-DPDK application environment
Being turned on or off for zero-copy mode is configured.It can judge that current Packet Transfer Mode is when receiving message
No is zero-copy mode, will receive mode using different messages under different Packet Transfer Modes.
Step S720. is directed toward message to be transmitted in message transmissions when the judgment result is yes, by the pointer of second buffering area
Storage address in queue.
It, can be by if current message transmission mode is zero-copy mode according to the judging result of step S710
Address pointer mbuf- > buf_addr of two buffer areas is pointing directly at depositing for the data packet of message to be transmitted in message transmissions queue
Address is stored up, subsequent data encapsulation is also directly to be packaged to the data packet in message transmissions queue.And if it is determined that current
It is not turned on zero-copy mode, then needing first to refer to the address that the data packet in message transmissions queue is copied to second buffering area
Memory headroom pointed by needle mbuf- > buf_addr, i.e., the original memory headroom distributed when applying for second buffering area.
Though using which kind of message reception pattern, in the reception of completion message and after OVS carries out a series of forward process,
It also needs to continue to be sent out after being inserted into tunnel protocol head and encapsulation process before message.As shown in figure 8, in the disclosure
Another exemplary embodiment in, the tunnel protocol head of virtual network is stored in first buffering area by step S630., can
With the following steps are included:
Step S810. judges whether the memory capacity of first buffering area is large enough to hold the tunnel protocol head of virtual network.
With continued reference to the message transmissions process shown in Fig. 4 under OVS-DPDK application environment, complete to be inserted into VXLAN tunnel
After the preparation on road head, it can be determined that whether the first buffering area as HEADROOM of present application has enough deposit
Capacity is stored up to accommodate the tunnel protocol head of virtual network.
When the judgment result is yes, the tunnel protocol head of virtual network is stored in first buffering area by step S820..
In general, being assisted by the first buffering area that step S610 application obtains dedicated for storing the tunnel of virtual network
Head is discussed, if first buffering area has enough memory capacity, the tunnel protocol head of virtual network can be stored
In first buffering area.And if the data volume of protocol headers is excessive or the capacity of first buffering area is too small, lead to not insert
Enter tunnel protocol head, then abort can then be called to terminate process, terminates current message transmission process.In addition, if to be passed
Defeated message comes from other than DPDK (such as message of host itself generation), then can also apply for that sufficiently large memory is empty again
Between for be inserted into tunnel protocol head.
The message transmitting method in virtual network provided using foregoing exemplary embodiment of the present invention, can overcome
The problem of vhost-user can not be inserted into VXLAN tunnel header when using zero copy technology, so that zero copy technology
It can be realized the large-scale use deployment in current main-stream cloud network environment, thus big in the case where not increasing hardware cost
The performance of width raising vhost-user network transmission.It can be use in the case where not increasing hardware cost in terms of angles of product
Family provides the higher cloud host of performance.
Exemplary media
After describing the method for exemplary embodiment of the invention, next, to exemplary embodiment of the invention
Medium be illustrated.
In some possible embodiments, various aspects of the invention are also implemented as a kind of medium, store thereon
There is program code, it is above-mentioned " illustrative methods " for realizing this specification when said program code is executed by the processor of equipment
Step in the message transmitting method of various illustrative embodiments according to the present invention described in part.
Specifically, for realizing following steps when the processor of the equipment executes said program code:
Step S610. when there are when message to be transmitted, apply from memory pool in message transmissions queue first buffering area and
Second buffering area, and second buffering area is linked in after first buffering area.
The pointer of second buffering area is directed toward storage address of the message to be transmitted in message transmissions queue by step S620..
The tunnel protocol head of virtual network is stored in first buffering area by step S630..
Step S640. encapsulates on tunnel protocol head and message to be transmitted into tunnel packet, and by corresponding to virtual net
The physical network interface of network sends tunnel packet.
In certain embodiments of the present invention, for realizing such as when the processor of the equipment executes said program code
Lower step:
Step S710. judges whether current Packet Transfer Mode is zero-copy mode.
Step S720. is directed toward message to be transmitted in message transmissions when the judgment result is yes, by the pointer of second buffering area
Storage address in queue.
In certain embodiments of the present invention, for realizing such as when the processor of the equipment executes said program code
Lower step:
Step S810. judges whether the memory capacity of first buffering area is large enough to hold the tunnel protocol head of virtual network.
When the judgment result is yes, the tunnel protocol head of virtual network is stored in first buffering area by step S820..
It should be understood that above-mentioned medium can be readable signal medium or readable storage medium storing program for executing.Readable storage medium
Matter can be for example but not limited to: electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or it is any
Above combination.The more specific example (non exhaustive list) of readable storage medium storing program for executing includes: to have one or more conducting wires
Electrical connection, portable disc, hard disk, random access memory (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-ROM), light storage device, magnetic memory device or
The above-mentioned any appropriate combination of person.
Readable signal medium may include in a base band or as the data-signal that carrier wave a part is propagated, wherein carrying
Readable program code.The data-signal of this propagation can take various forms, including but not limited to: electromagnetic signal, light letter
Number or above-mentioned any appropriate combination.Readable signal medium can also be any readable medium other than readable storage medium storing program for executing,
The readable medium can be sent, propagated or be transmitted for being used by instruction execution system, device or device or being tied with it
Close the program used.
The program code for including on readable medium can transmit with any suitable medium, including but not limited to: wirelessly, have
Line, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languages
Code, described program design language include object oriented program language-Java, C++ etc., further include conventional
Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user
It calculates and is executed in equipment, partially partially executes or remotely counted completely on a remote computing on the user computing device
It calculates and is executed on equipment or server.In the situation for being related to remote computing device, remote computing device can pass through any kind
Network --- be connected to user calculating equipment including local area network (LAN) or wide area network (WAN)-, or, it may be connected to it is outer
Portion calculates equipment (such as connecting using ISP by internet).
Exemplary means
After describing the medium of exemplary embodiment of the invention, with reference to Fig. 9 to exemplary embodiment of the invention
Virtual network in message transmitting device be illustrated.
As shown in figure 9, the message transmitting device 900 in a kind of illustrative embodiments of the invention, in virtual network
It mainly may include: memory application module 910, packet storage module 920, tunnel insertion module 930 and message sending module
940。
Wherein, memory application module 910 be configured as when in message transmissions queue there are when message to be transmitted, from memory pool
Middle application first buffering area and second buffering area, and the second buffering area is linked in after the first buffering area;Message
Memory module 920 is configured as the pointer of the second buffering area being directed toward the message to be transmitted in the message transmissions queue
In storage address;Insertion module 930 in tunnel is configured as being stored on the tunnel protocol head of the virtual network described the
In one buffer area;Message sending module 940 is configured as encapsulating the tunnel protocol head and the message to be transmitted to tunnel
In road packet, and the physical network interface by corresponding to the virtual network sends the tunnel packet.
In another exemplary embodiment of the invention, message transmitting device 900 can also include memory pool application mould
Block.Memory pool application module is configured as corresponding to the first memory pool of virtual machine application of the virtual network and the second memory
Pond.Wherein, first memory pool includes the first memory block that multiple storage sizes are the first capacity, second memory
Pond includes the second memory block that multiple storage sizes are the second capacity, and first capacity is less than second capacity.
On this basis, apply for that first buffering area and second is delayed in the slave memory pool as performed by memory application module 910
Area is rushed, may further include: applying the first memory block as first buffering area from first memory pool;From described second
Apply the second memory block as second buffering area in memory pool.
In another exemplary embodiment of the invention, first capacity is 64-256 byte, second capacity
For 1024-2048 byte.
In another exemplary embodiment of the invention, when the message to be transmitted includes being stored in the message transmissions
When multiple data packets in queue, as performed by memory application module 910 described in apply from memory pool first buffering area and
Second buffering area may further include: apply for a first buffering area and multiple second buffering areas from memory pool;Wherein,
The quantity of the second buffering area is equal to the quantity of the data packet.
In another exemplary embodiment of the invention, described second is delayed as performed by memory application module 910
It rushes area to be linked in after the first buffering area, may further include: by multiple based on list structure concatenated described second
Buffer chain is after the first buffering area.
With continued reference to Fig. 9, in another exemplary embodiment of the invention, packet storage module 920 can be further
It include: first judgment module 921 and the first memory module 922.Wherein, first judgment module 921 is configured as judging currently
Whether Packet Transfer Mode is zero-copy mode;First memory module 922 is configured as when the judgment result is yes, by described
The pointer of two buffer areas is directed toward storage address of the message to be transmitted in the message transmissions queue.
With continued reference to Fig. 9, in another exemplary embodiment of the invention, tunnel is inserted into module 930 can be further
It include: the second judgment module 931 and the second memory module 932.Wherein, the second judgment module 931 is configured as judging described
Whether the memory capacity of one buffer area is large enough to hold the tunnel protocol head of the virtual network;Second memory module 932 is matched
It is set to when the judgment result is yes, the tunnel protocol head of the virtual network is stored in the first buffering area.
In the device that foregoing exemplary embodiment provides, involved virtual network can be virtual expansible local
Net.
It is illustrated in corresponding embodiment of the method with concrete operations performed by upper module or its submodule, herein
It repeats no more.
Exemplary computer device
After method, medium and the device for describing exemplary embodiment of the invention, next, introducing according to this hair
The calculating equipment of bright another exemplary embodiment.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or
Program product.Therefore, various aspects of the invention can be embodied in the following forms, it may be assumed that complete hardware embodiment, complete
The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite here
Referred to as circuit, " module " or " system ".
In some possible embodiments, the calculating equipment of embodiment can include at least at least one according to the present invention
A processor and at least one processor.Wherein, the memory is stored with program code, when said program code is by institute
When stating processor execution, so that the processor executes described in above-mentioned " illustrative methods " part of this specification according to this hair
In the virtual network of bright various illustrative embodiments the step of message transmitting method.For example, the processor can execute such as
Shown in Fig. 6: step S610. is when there are when message to be transmitted, apply for that first buffers from memory pool in message transmissions queue
Area and second buffering area, and second buffering area is linked in after first buffering area.Step S620. is by the pointer of second buffering area
It is directed toward storage address of the message to be transmitted in message transmissions queue.Step S630. deposits the tunnel protocol head of virtual network
It is stored in first buffering area.Step S640. encapsulates on tunnel protocol head and message to be transmitted into tunnel packet, and passes through correspondence
Tunnel packet is sent in the physical network interface of virtual network.
For another example, the processor can also be executed such as Fig. 7 or each step shown in fig. 8.
It should be noted that although be referred in virtual network in the above detailed description several units of message transmitting device or
Subelement, but this division is only exemplary, and is not enforceable.In fact, embodiment according to the present invention,
Two or more above-described modules or the feature and function of unit can embody in a module or unit.Conversely,
An above-described module or the feature and function of unit can be to be embodied by multiple modules or unit with further division.
In addition, although describing the operation of the method for the present invention in the accompanying drawings with particular order, this do not require that or
Hint must execute these operations in this particular order, or have to carry out shown in whole operation be just able to achieve it is desired
As a result.Additionally or alternatively, it is convenient to omit multiple steps are merged into a step and executed by certain steps, and/or by one
Step is decomposed into execution of multiple steps.
Although detailed description of the preferred embodimentsthe spirit and principles of the present invention are described by reference to several, it should be appreciated that, this
Invention is not limited to invented specific embodiment, does not also mean that the feature in these aspects cannot to the division of various aspects
Combination is benefited to carry out, this to divide the convenience merely to statement.The present invention is directed to cover appended claims spirit and
Included various modifications and equivalent arrangements in range.
Claims (10)
1. the message transmitting method in a kind of virtual network, comprising:
When there are when message to be transmitted, applying for first buffering area and second buffering area in message transmissions queue from memory pool, and
The second buffering area is linked in after the first buffering area;
The pointer of the second buffering area is directed toward storage address of the message to be transmitted in the message transmissions queue;
The tunnel protocol head of the virtual network is stored in the first buffering area;
The tunnel protocol head and the message to be transmitted are encapsulated into tunnel packet, and by corresponding to the virtual network
Physical network interface send the tunnel packet.
2. described according to the method described in claim 1, before applying for first buffering area and second buffering area in memory pool
Method further include:
For corresponding to the first memory pool of virtual machine application of the virtual network and the second memory pool;
Wherein, first memory pool includes the first memory block that multiple storage sizes are the first capacity, in described second
Depositing pond includes the second memory block that multiple storage sizes are the second capacity, and first capacity is less than second capacity;
Application first buffering area and the second buffering area from memory pool include:
Apply the first memory block as first buffering area from first memory pool;
Apply the second memory block as second buffering area from second memory pool.
3. second capacity is 1024- according to the method described in claim 2, first capacity is 64-256 byte
2048 bytes.
4. according to the method described in claim 1, when the message to be transmitted includes being stored in the message transmissions queue
On multiple data packets when, it is described to apply for that first buffering area and second buffering area include: from memory pool
Apply for a first buffering area and multiple second buffering areas from memory pool;Wherein, the quantity etc. of the second buffering area
In the quantity of the data packet.
5. a kind of medium, is stored thereon with program, realized when which is executed by processor as any one in Claims 1-4
Method described in.
6. the message transmitting device in a kind of virtual network, comprising:
Memory application module is configured as when, there are when message to be transmitted, applying for first from memory pool in message transmissions queue
Buffer area and second buffering area, and the second buffering area is linked in after the first buffering area;
Packet storage module is configured as passing the pointer direction message to be transmitted of the second buffering area in the message
Storage address in defeated queue;
Tunnel is inserted into module, is configured as being stored in the first buffering area on the tunnel protocol head of the virtual network;
Message sending module is configured as encapsulating the tunnel protocol head and the message to be transmitted into tunnel packet, and
Physical network interface by corresponding to the virtual network sends the tunnel packet.
7. device according to claim 6, described device further include:
Memory pool application module is configured as corresponding in the first memory pool of virtual machine application of the virtual network and second
Deposit pond;
Wherein, first memory pool includes the first memory block that multiple storage sizes are the first capacity, in described second
Depositing pond includes the second memory block that multiple storage sizes are the second capacity, and first capacity is less than second capacity;
Application first buffering area and the second buffering area from memory pool include:
Apply the first memory block as first buffering area from first memory pool;
Apply the second memory block as second buffering area from second memory pool.
8. device according to claim 7, first capacity is 64-256 byte, and second capacity is 1024-
2048 bytes.
9. device according to claim 6, when the message to be transmitted includes being stored in the message transmissions queue
On multiple data packets when, it is described to apply for that first buffering area and second buffering area include: from memory pool
Apply for a first buffering area and multiple second buffering areas from memory pool;Wherein, the quantity etc. of the second buffering area
In the quantity of the data packet.
10. a kind of calculating equipment, comprising: processor and memory, the memory are stored with executable instruction, the processor
Executable instruction for calling the memory storage executes the method as described in any one of Claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910320283.0A CN110048963B (en) | 2019-04-19 | 2019-04-19 | Message transmission method, medium, device and computing equipment in virtual network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910320283.0A CN110048963B (en) | 2019-04-19 | 2019-04-19 | Message transmission method, medium, device and computing equipment in virtual network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110048963A true CN110048963A (en) | 2019-07-23 |
CN110048963B CN110048963B (en) | 2023-06-06 |
Family
ID=67278173
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910320283.0A Active CN110048963B (en) | 2019-04-19 | 2019-04-19 | Message transmission method, medium, device and computing equipment in virtual network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110048963B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110851289A (en) * | 2019-10-23 | 2020-02-28 | 新华三信息安全技术有限公司 | Protocol message processing method and switch |
CN110995680A (en) * | 2019-11-22 | 2020-04-10 | 北京浪潮数据技术有限公司 | Virtual machine message receiving method, system, device and computer readable storage medium |
CN111526606A (en) * | 2020-04-23 | 2020-08-11 | 海尔优家智能科技(北京)有限公司 | Method and device for data transmission, smart home equipment and storage medium |
CN111565142A (en) * | 2020-07-15 | 2020-08-21 | 鹏城实验室 | Message processing method and device and computer readable storage medium |
CN111813547A (en) * | 2020-06-30 | 2020-10-23 | 武汉虹旭信息技术有限责任公司 | DPDK-based data packet processing method and device |
CN112231101A (en) * | 2020-10-16 | 2021-01-15 | 北京中科网威信息技术有限公司 | Memory allocation method and device and readable storage medium |
CN113098780A (en) * | 2021-02-22 | 2021-07-09 | 网宿科技股份有限公司 | Message processing method of virtual network, electronic device and storage medium |
CN114157620A (en) * | 2021-11-30 | 2022-03-08 | 新华三半导体技术有限公司 | Message forwarding method and device |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6411617B1 (en) * | 1998-12-10 | 2002-06-25 | Nokia Telecommunications, Oy | System and method for managing data traffic associated with various quality of service principles using a conventional network node switch |
CN101707590A (en) * | 2009-09-25 | 2010-05-12 | 曙光信息产业(北京)有限公司 | Zero-copy mode based TCP/IP messaging method and device |
US20110258337A1 (en) * | 2008-08-04 | 2011-10-20 | Zte Corporation | Method and system for enabling zero-copy transmission of streaming media data |
CN102567226A (en) * | 2011-12-31 | 2012-07-11 | 曙光信息产业股份有限公司 | Data access implementation method and data access implementation device |
CN104133784A (en) * | 2014-07-24 | 2014-11-05 | 大唐移动通信设备有限公司 | Message buffer management method and message buffer management device |
US20150026681A1 (en) * | 2013-06-28 | 2015-01-22 | Huawei Technologies Co., Ltd. | Virtual Switching Method, Related Apparatus, and Computer System |
CN106534249A (en) * | 2016-09-21 | 2017-03-22 | 苏州市广播电视总台 | File transmission system based on file straight-through technology |
CN107302499A (en) * | 2017-06-26 | 2017-10-27 | 北京赛特斯信息科技股份有限公司 | The NFV protocol massages receiving/transmission methods of packet buffer need not be copied |
CN108243118A (en) * | 2016-12-27 | 2018-07-03 | 华为技术有限公司 | The method and physical host to E-Packet |
US20180239715A1 (en) * | 2017-02-17 | 2018-08-23 | Red Hat Israel, Ltd. | Secure zero-copy packet forwarding |
EP3402172A1 (en) * | 2017-05-12 | 2018-11-14 | Solarflare Communications Inc | A data processing system |
CN108900327A (en) * | 2018-06-20 | 2018-11-27 | 昆明理工大学 | A kind of chronometer data acquisition and real-time processing method based on DPDK |
CN109302349A (en) * | 2018-09-29 | 2019-02-01 | 迈普通信技术股份有限公司 | A kind of message forwarding method and routing device |
-
2019
- 2019-04-19 CN CN201910320283.0A patent/CN110048963B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6411617B1 (en) * | 1998-12-10 | 2002-06-25 | Nokia Telecommunications, Oy | System and method for managing data traffic associated with various quality of service principles using a conventional network node switch |
US20110258337A1 (en) * | 2008-08-04 | 2011-10-20 | Zte Corporation | Method and system for enabling zero-copy transmission of streaming media data |
CN101707590A (en) * | 2009-09-25 | 2010-05-12 | 曙光信息产业(北京)有限公司 | Zero-copy mode based TCP/IP messaging method and device |
CN102567226A (en) * | 2011-12-31 | 2012-07-11 | 曙光信息产业股份有限公司 | Data access implementation method and data access implementation device |
US20150026681A1 (en) * | 2013-06-28 | 2015-01-22 | Huawei Technologies Co., Ltd. | Virtual Switching Method, Related Apparatus, and Computer System |
CN104133784A (en) * | 2014-07-24 | 2014-11-05 | 大唐移动通信设备有限公司 | Message buffer management method and message buffer management device |
CN106534249A (en) * | 2016-09-21 | 2017-03-22 | 苏州市广播电视总台 | File transmission system based on file straight-through technology |
CN108243118A (en) * | 2016-12-27 | 2018-07-03 | 华为技术有限公司 | The method and physical host to E-Packet |
US20180239715A1 (en) * | 2017-02-17 | 2018-08-23 | Red Hat Israel, Ltd. | Secure zero-copy packet forwarding |
EP3402172A1 (en) * | 2017-05-12 | 2018-11-14 | Solarflare Communications Inc | A data processing system |
CN107302499A (en) * | 2017-06-26 | 2017-10-27 | 北京赛特斯信息科技股份有限公司 | The NFV protocol massages receiving/transmission methods of packet buffer need not be copied |
CN108900327A (en) * | 2018-06-20 | 2018-11-27 | 昆明理工大学 | A kind of chronometer data acquisition and real-time processing method based on DPDK |
CN109302349A (en) * | 2018-09-29 | 2019-02-01 | 迈普通信技术股份有限公司 | A kind of message forwarding method and routing device |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110851289A (en) * | 2019-10-23 | 2020-02-28 | 新华三信息安全技术有限公司 | Protocol message processing method and switch |
CN110851289B (en) * | 2019-10-23 | 2022-11-08 | 新华三信息安全技术有限公司 | Protocol message processing method and switch |
CN110995680A (en) * | 2019-11-22 | 2020-04-10 | 北京浪潮数据技术有限公司 | Virtual machine message receiving method, system, device and computer readable storage medium |
CN111526606B (en) * | 2020-04-23 | 2022-06-14 | 海尔优家智能科技(北京)有限公司 | Method and device for data transmission, smart home equipment and storage medium |
CN111526606A (en) * | 2020-04-23 | 2020-08-11 | 海尔优家智能科技(北京)有限公司 | Method and device for data transmission, smart home equipment and storage medium |
CN111813547A (en) * | 2020-06-30 | 2020-10-23 | 武汉虹旭信息技术有限责任公司 | DPDK-based data packet processing method and device |
CN111813547B (en) * | 2020-06-30 | 2023-10-31 | 武汉虹旭信息技术有限责任公司 | DPDK-based data packet processing method and device |
CN111565142A (en) * | 2020-07-15 | 2020-08-21 | 鹏城实验室 | Message processing method and device and computer readable storage medium |
CN111565142B (en) * | 2020-07-15 | 2020-11-03 | 鹏城实验室 | Message processing method and device and computer readable storage medium |
CN112231101A (en) * | 2020-10-16 | 2021-01-15 | 北京中科网威信息技术有限公司 | Memory allocation method and device and readable storage medium |
CN112231101B (en) * | 2020-10-16 | 2024-03-01 | 北京中科网威信息技术有限公司 | Memory allocation method and device and readable storage medium |
CN113098780A (en) * | 2021-02-22 | 2021-07-09 | 网宿科技股份有限公司 | Message processing method of virtual network, electronic device and storage medium |
CN114157620A (en) * | 2021-11-30 | 2022-03-08 | 新华三半导体技术有限公司 | Message forwarding method and device |
CN114157620B (en) * | 2021-11-30 | 2024-01-19 | 新华三半导体技术有限公司 | Message forwarding method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110048963B (en) | 2023-06-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110048963A (en) | Message transmitting method, medium, device and calculating equipment in virtual network | |
US11765000B2 (en) | Method and system for virtual and physical network integration | |
CN103888386B (en) | The transmission method and device, system of expansible virtual local area network packet | |
US7349391B2 (en) | Tunneling between a bus and a network | |
TWI504193B (en) | Method and system for offloading tunnel packet processing in cloud computing | |
EP1856886B1 (en) | Method and apparatus for providing remote audio | |
US9306761B2 (en) | Video streaming system and method | |
US7397797B2 (en) | Method and apparatus for performing network processing functions | |
US7924868B1 (en) | Internet protocol (IP) router residing in a processor chipset | |
US7505455B1 (en) | Optimizations for tunneling between a bus and a network | |
JP4807861B2 (en) | Host Ethernet adapter for networking offload in server environments | |
US8094670B1 (en) | Method and apparatus for performing network processing functions | |
CN103181119B (en) | Communication between management different communication protocol network | |
EP1796334A1 (en) | Dynamic service blade and method | |
US20090248918A1 (en) | Method and system for a usb ethertype to tunnel usb over ethernet | |
WO2010057386A1 (en) | Data package forwarding method, system and device | |
CN105407140A (en) | Calculation resource virtualization system of networked test system and method thereof | |
US8356112B1 (en) | Intelligent network adaptor with end-to-end flow control | |
CN104796353B (en) | Message forwarding method, interchanger | |
WO2019033964A1 (en) | Method for transmitting packet, forwarding device, controller, and system | |
US9288287B2 (en) | Accelerated sockets | |
CN110505244A (en) | Long-range tunnel access technique gateway and server | |
WO2020108531A1 (en) | Packet forwarding | |
US20090190610A1 (en) | Circuit emulation over an IP interworking VLL | |
CN114268518A (en) | Method and system for realizing forwarding acceleration of sdwan data tunnel |
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 | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 310052 Room 301, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province Patentee after: Hangzhou NetEase Shuzhifan Technology Co.,Ltd. Address before: 310052 Room 301, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province Patentee before: HANGZHOU LANGHE TECHNOLOGY Ltd. |