CN101135980A - Device and method for realizing zero copy based on Linux operating system - Google Patents

Device and method for realizing zero copy based on Linux operating system Download PDF

Info

Publication number
CN101135980A
CN101135980A CNA2006101126835A CN200610112683A CN101135980A CN 101135980 A CN101135980 A CN 101135980A CN A2006101126835 A CNA2006101126835 A CN A2006101126835A CN 200610112683 A CN200610112683 A CN 200610112683A CN 101135980 A CN101135980 A CN 101135980A
Authority
CN
China
Prior art keywords
zero
copy
sign
packet
skb
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA2006101126835A
Other languages
Chinese (zh)
Other versions
CN100464304C (en
Inventor
徐鄗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fortinet Inc
Original Assignee
Fortinet Information Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fortinet Information Technology Beijing Co Ltd filed Critical Fortinet Information Technology Beijing Co Ltd
Priority to CNB2006101126835A priority Critical patent/CN100464304C/en
Publication of CN101135980A publication Critical patent/CN101135980A/en
Application granted granted Critical
Publication of CN100464304C publication Critical patent/CN100464304C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a device for realizing zero copy based on a Linux operating system, which comprises: a zero copy initialization module, which is used for allocating a section of kernel space in the kernel, allocating the kernel space into a plurality of data blocks and identifying the data blocks; the network card driving module is used for sending the received data packet to a data block of the kernel space for storage, recording the identification of the data block in the skb of the data packet and sending the skb to the protocol stack; the protocol stack is used for receiving and analyzing the skb of the data packet from the network card driving module and acquiring the identification of the data block; the identification buffer area is connected with the protocol stack and directly mapped to the user process module and used for storing the identification of the data block acquired by the protocol stack; and the user process module is used for acquiring the identifier from the directly mapped identifier cache region, acquiring the data packet from the corresponding data block in the kernel space according to the identifier, and analyzing and processing the data packet. In addition, a method for realizing zero copy by using the device is also provided.

Description

A kind of apparatus and method that realize zero-copy based on (SuSE) Linux OS
Technical field
The present invention relates to the System and method for of the zero-copy of computer network, particularly relevant for a kind of system and method for realizing zero-copy based on (SuSE) Linux OS.
Background technology
In (SuSE) Linux OS, the flow process of catching and send network data by web socket as shown in Figure 1.
Receive process data packet: network interface card receives kernel spacing by DMA (Direct Memory Access) mechanism with network packet.User's attitude process is called and is obtained network data by calling the socket related system, and this system call copies to user's space with data from kernel spacing, and consumer process obtains network packet by the data that read user's space.
Send process data packet: consumer process calls and sends network data by calling the socket related system.This system call copies to kernel spacing with data from user's space, encapsulates accordingly, is mapped to the transmission buffer zone of network interface card by DMA, and network interface card sends these data.
Under this pattern, consumer process receives data needs once the data from the kernel spacing to the user's space to duplicate, and also needs once the data from the user's space to the kernel spacing to duplicate when sending data equally.Under the bigger situation of network traffics, the lot of data copy has greatly consumed cpu resource, has reduced system performance.Simultaneously, consumer process comes transceive data by system call, every reception and send twice system call of a packets need, and bigger network traffics can trigger a large amount of system calls.Because relating to context, system call switches, receive a data packet system and need switch to kernel state from user's attitude, after system call is returned, switch reuse family attitude (giving out a contract for a project in like manner) from kernel state again, so a large amount of system calls also can bring great performance loss.
Catch the low problem of network data performance in order to solve consumer process, zero duplication technology is occurred.
The basic thought of zero-copy is: packet is avoided copying data and system call the process of transmitting from network interface card to the consumer process space, realizes that zero of CPU participates in, and thoroughly eliminates CPU consumption in this respect.
The structure flow process of zero-copy as shown in Figure 2.
Zero-copy has mainly utilized memory-mapped technology and DMA transmission technology.Zero-copy at first distributes one section kernel spacing in kernel, and this kernel spacing is mapped in the middle of the user's space of consumer process, and it promptly is visit to this kernel spacing that consumer process is visited this user's space.Zero-copy is revised NIC driver, and control network card data bag receives, and network interface card is received network packet in the middle of the kernel spacing that zero-copy distributes in advance.
Present zero duplication technology is only supported data transmission from the bottom to top, is mainly used among the application of band monitoring character such as IDS (IntrusionDetection System, intruding detection system).Because IDS belongs to LPT device, only needs uniaxially to obtain network data, do not need data are transmitted, so current zero duplication technology is suitable for.But for needing simultaneously to catch and the application of transmission network data the IPS (Intrusion Protection System, intrusion protection system) of user's attitude (as be implemented in), just there is defective in current zero duplication technology: do not support data forwarding from top to bottom.
The packet of zero-copy directly from network interface card DMA to kernel spacing, consumer process obtains network data by memory-mapped.This data message does not pass through any processing of ICP/IP protocol stack and directly arrives consumer process, though partly improving, this mode catches the bag performance, but can not combine with the function of protocol stack, such as, consumer process also needs packet is carried out extra fragment reorganization and flows reorganization (for example IDS) in addition, can not combine with the application based on the Netfilter framework.
Because network card equipment and consumer process are shared one section kernel spacing, they are asynchronous (producer's consumer relations) to the visit of this kernel spacing, thus zero-copy need a kind of solve this asynchronous synchronization scenario (such as: the regional network interface card of just visiting for consumer process can not use.Equally, the network interface card regional consumer process that just using or do not reading in data should not visited yet).
The basic function of zero-copy realizes in network interface card drives, and often needs open, close, abnormality processing and interrupt service routine that network interface card drives are made amendment, and the workload of its modification is big.A large amount of modifications that network interface card is driven have increased the dependence that zero-copy drives network interface card.If network interface card drives edition upgrading, then need carefully to contrast new and old two versions, check whether the difference between new and old edition can exert an influence to zero-copy.If the replacing network interface card then need be realized zero-copy mechanism one time in new network interface card drives again again.
Summary of the invention
For addressing the above problem, the objective of the invention is to propose a kind of apparatus and method that realize zero-copy based on (SuSE) Linux OS.To realize two-way zero-copy based on (SuSE) Linux OS
For achieving the above object, the present invention proposes a kind of device, wherein, comprising based on (SuSE) Linux OS realization zero-copy:
One zero-copy initialization module is used for when the zero-copy initialization, distributes one section kernel spacing in kernel, described kernel spacing is distributed into a plurality of data blocks, and each data block is identified;
One network interface card driver module is used for sending to the data block of described kernel spacing and depositing receiving packet, the sign of the described data block of record in the skb of described packet, and described skb is sent to protocol stack;
One protocol stack is connected with described network interface card driver module, is used for receiving and analyzing from the network interface card driver module skb of described packet, obtains the sign of described data block;
One sign buffer area is connected with described protocol stack and maps directly to the consumer process module, is used to store the sign of the data block that described protocol stack obtains;
One consumer process module is used for obtaining sign from the sign buffer area of direct mapping, obtains packet in the data block according to described sign correspondence from described kernel spacing, and described packet is carried out analyzing and processing.
The above-mentioned device based on (SuSE) Linux OS realization zero-copy, wherein, described protocol stack also connects a skb buffer area, is used for depositing described skb after described protocol stack is handled described skb.
The above-mentioned device based on (SuSE) Linux OS realization zero-copy wherein, also comprises:
One zero-copy interface is connected with application module with described consumer process module, and the control signaling that also is used to transmit described consumer process module is finished described consumer process module calling described application module.
Above-mentioned device based on (SuSE) Linux OS realization zero-copy, wherein, described application module further comprises:
One zero-copy is subcontracted module, is connected with described zero-copy interface, is used for obtaining corresponding skb according to the sign of described packet from described skb buffer area when consumer process is analyzed described packets need and is forwarded, and transmits described packet according to described skb;
One zero-copy starts module, is connected with described zero-copy interface, is used for opening after described consumer process is controlled described initialization module to finish initialization the zero-copy pattern of kernel; With
One zero-copy closing module is connected with described zero-copy interface, is used for closing after described consumer process module withdraws from the zero-copy pattern of kernel.
Above-mentioned device based on (SuSE) Linux OS realization zero-copy, wherein, described zero-copy interface also comprises:
One character device file is connected with described consumer process module, is used to realize communicating by letter between described consumer process module and the zero-copy interface, realizes described consumer process module calling described zero-copy interface.
For achieving the above object, the invention allows for a kind of method of utilizing the described device of claim 1 to realize zero-copy, in kernel, distribute one section kernel spacing, the packet that storage network interface card driver module receives, described kernel spacing is mapped in the user's space of consumer process module, wherein, this method is further comprising the steps of:
Step 1 is divided into a plurality of data blocks with described kernel spacing, and each data block is identified;
Step 2, when packet arrived, the network interface card driver module received to described packet in the data block of described kernel spacing, and write down the sign of described data block in the skb of described packet;
Step 3 passes to protocol stack with the skb of described packet and handles, and the sign that described protocol stack extracts described data block is saved in the described sign buffer area;
Step 4, the consumer process module reads identification information from the sign buffer area, find data block corresponding in the kernel spacing according to described sign, obtains stored packet and analyze and handle from described data block.
The method of above-mentioned realization zero-copy wherein, specifically comprises in the described step 1:
Described kernel spacing and the step of user's space to the identical sign of each data block employing.
The method of above-mentioned realization zero-copy, wherein, described step 2 also comprises:
The step of record zero-copy sign in the skb of described packet.
The method of above-mentioned realization zero-copy, wherein, described step 3 also comprises:
Step 91, described protocol stack judge among the skb of described packet whether the zero-copy sign is arranged;
Step 92 if having, is then extracted the sign of described data block from described skb, be saved to described sign buffer area, and described skb be saved in the skb buffer area termination; If do not have, then described packet is carried out other processing.
The method of above-mentioned realization zero-copy, wherein, described step 4 specifically may further comprise the steps:
Step 101 is analyzed stored data packet in the described data block, judges whether described packet needs to be forwarded or to be dropped;
Step 102 if described packets need is forwarded, is then obtained corresponding skb according to described data block sign, and is transmitted described packet according to described skb from described skb buffer area;
Step 103, if described packets need is dropped, then the skb with described packet discharges.
Step 104 if described packet does not need to be forwarded or to be dropped, is then carried out other processing with described packet.
The method of above-mentioned realization zero-copy, wherein, described step 102 specifically comprises:
When a plurality of packets needs are forwarded, the step that described a plurality of packets are once all forwarded.
The method of above-mentioned realization zero-copy wherein, also comprises:
Step 121 is provided with available sign memory module, and the data block sign of store data bag is not left in the described available sign memory module;
Step 122 when network interface card driver module storage packet, is obtained available sign from described available sign memory module, and described packet is stored in the corresponding data block of described available sign, and described sign is deleted from described available sign memory module;
Step 123 when packets need is dropped, discharges the skb of described packet, and the sign that will deposit the data block of described packet is stored in the described available sign memory module.
The method of above-mentioned realization zero-copy wherein, also comprises:
Step 131, available sign memory module is set and has used the sign memory module, the sign of the data block of store data bag is left in the described available sign memory module, leave in the sign of the data block of store data bag not described with in the sign memory module;
Step 132, when network interface card driver module storage packet, from described available sign memory module, obtain available sign, and described packet is stored in the data block of described available sign correspondence, dump to described sign described from described available sign memory module with the sign memory module;
Step 133 when packets need is dropped, discharges the skb of described packet, and the sign that will deposit the data block of described packet is dumped in the described available sign memory module with the sign memory module by described.
The method of above-mentioned realization zero-copy wherein, further comprises the zero-copy initialization step, comprising:
Step 141 is distributed one section kernel spacing, described kernel spacing is divided into a plurality of data blocks, and each data block is numbered;
Step 1142, the consumer process module is by the first address of the described kernel spacing of described zero-copy interface interchange and the size of each data block, be divided into the data block of equal number according to the big young pathbreaker's kernel spacing of identical data block, and with the numbering of each data block allocations unanimity.
The method of above-mentioned realization zero-copy wherein, is only deposited a packet in each data block.
As mentioned above, the present invention has the following advantages:
1. a packet does not have the copy of data from network interface card-consumer process-network interface card in whole process.Realized two-way supporting data zero-copy technique.
2. because to the modification of network interface card driver module and kernel less (only is to replace a function name for the network interface card driver module), and the part of revising is more stable in the transition of version, so should mechanism insensitive to the concrete version of network interface card driver module and kernel.
3. should mechanism based on the Netfilter framework, Netfilter is the ingredient of present linux kernel network-critical, is the basis that Linux network firewall and Iptable realize.In Netfilter, every kind of agreement of protocol stack has all defined several hooks (HOOK), and the packet of corresponding agreement will be according to certain flow process by several hooks, and each hook all is to handle the function mount point.Kernel module is by location registration process function on each hook, and with the packet of operation through this hook, operation is finished to kernel and returned processing policy.Neatly the Hook function is registered on the required hook according to the needs of using.Be registered in application on the hook because the registration of hook is transparent in protocol stack and other, so can be with the applicating cooperation work in protocol stack and the protocol stack.
For the stationary problem of involved consumer process of traditional zero-copy and network interface card driver module then be converted into protocol stack and network interface card driver module synchronously.The zero-copy module only need be safeguarded two chain: free_list and used_list simply.Free_list deposits the node that is not used, and used_lidt deposits the node that has been used.The network interface card driver module is plucked next node use by calling zero_allco_skb () from the free_list chain, and this node hung into used_list, when calling zero-copy skb of kfree_skb () release, then corresponding node is hung back free_list from used_list.Network interface card driver module and the consumer process contention to memory block has been avoided in this realization.
Description of drawings
Fig. 1 is a synoptic diagram of catching and send network data in the (SuSE) Linux OS by web socket;
Fig. 2 is the synoptic diagram of (SuSE) Linux OS zero-copy in the known technology;
Fig. 3 is the synoptic diagram of the two-way zero-copy of (SuSE) Linux OS of the present invention;
Fig. 4 is the synoptic diagram of relevant interface of the present invention;
Fig. 5 is the schematic flow sheet that the present invention carries out the zero-copy program.
Embodiment
Below in conjunction with accompanying drawing the embodiment of the invention is elaborated.
Fig. 3 is the synoptic diagram of the two-way zero-copy of (SuSE) Linux OS of the present invention.As shown in the figure, when the device of realizing zero-copy is loaded, zero-copy initialization module 100 at first can carry out the initialization of kernel spacing: distribute Zero-copy data district, sign buffer zone 150 and skb buffer zone 160 in kernel, and the Zero-copy data district is carried out piecemeal, sign.Character device file in the registration zero-copy interface 180 " zerocopy ", this document is the communication interface of kernel and consumer process.Zero-copy interface 180 has been realized mmap (), the ioctl () interface of this document, and in addition, zero-copy initialization module 100 is according to application demand registration Netfilter hook.Zero-copy Hook function is articulated on the corresponding hook.
Network card equipment 110 is connected with network interface card driver module 120, and network interface card driver module 120 receives packet by network card equipment 110, and the present invention has also increased zero copy driver module 130, and this zero copy driver module 130 is connected with network interface card driver module 120.Network interface card driver module 130 can leave the packet that receives in the data block of kernel spacing, the relevant information of record store data bag in the skb of packet (structure of struct_sk_buff type) comprises the sign of data block, the sign of zero-copy, start address, routing iinformation, burst information and/or other memory headroom information of data block simultaneously.
In addition, the present invention also handles by 140 pairs of packets of protocol stack, network interface card driver module 120 has passed to protocol stack 140 with the skb of stored data packet, 140 couples of these skb of protocol stack handle, and at first by checking among the skb whether have the zero-copy sign, judge whether this packet belongs to the Zero-copy data bag, if exist, then from this skb, extract the sign of data block, if there is no, then packet is proceeded other flow processing.
Also be provided with sign buffer area 150 and skb buffer area 160 in the kernel of the present invention, the data block sign that protocol stack will obtain from skb leaves in the sign buffer area 150, skb is left in the skb buffer area 160 simultaneously, sign buffer area 150 will map directly to consumer process module 170, consumer process module 170 can directly be obtained the data block sign from sign buffer area 150, from user's space, directly find corresponding data block according to sign, from data block, obtain stored data packet and analyze, the packet that obtains may need to be forwarded or to be dropped, consumer process module 170 will be according to the result after analyzing, send dependent instruction, this instruction sends correlation module by the zero-copy interface 180 that is provided with in the kernel and handles, zero-copy interface 180 is connected respectively with skb buffer area 160 with protocol stack 140, when packets need is forwarded, zero-copy interface 180 will call the skb that skb buffer area 160 obtains packet, according to the relevant information among this skb, transmit packet by protocol stack 140.
Skb is the structure of struct sk buff type, and protocol stack 140 comes the supervising the network packet by this structure, transmits control and data message by this structure at network interface card driver module 120, protocol stack 140 each layers.It is the kernel data structure of protocol stack 140.Owing to consider the high dependence of the realization of kernel protocol stack to this structure, thus the present invention this structure is expanded so that compatible with original core protocol stack mechanism.Concrete is extended for: increase by two member unsignd short zero_flag and unsigned intZero_index in this structure.
All corresponding skb structure variable of each packet in the protocol stack 140, obtain by alloc_akb () that (the network interface card driver module then is to obtain by dev_alloc_skb () function, dev_alloc_skb () is the further encapsulation to alloc_skb ()), discharge by kfree_skb () function.
Deposited the kernel spacing information (this space is used for the store data bag) of relevant routing iinformation, burst information, each layer of packet header addresses and this skb correspondence of this packet among the skb.
Generally, network interface card driver module 120 calls the allocation of packets skb of dev_alloc_skb () for being about to receive.Equally, when user's attitude routine call socket socket sent data, protocol stack also can be by calling the next data allocations skb for sending of alloc_skb ().When packet enters from network interface card driver module 120, through protocol stack 140 handle arrive destinations (consumer process or be forwarded) after, this packet life stops, protocol stack 140 calls skb structure and the kernel spacing that kfree_skb () discharges this bag correspondence.
In an embodiment of the present invention, zero copy driver module 130 promptly is to be that source has been realized a functionally similar function zero_alloc_skb () with dev_alloc_skb (), and revise network interface card driver module 120, with all replace to the function calls to zero_alloc_skb () to dev_alloc_skb () function calls in the network interface card driver module 120.The skb that is obtained by zero_alloc_skb () function is the skb that adopts zero-copy mechanism, and its uses the space of zero-copy.
Zero_alloc_skb () function, be the distribution of kernel spacing with dev_alloc_skb () function main difference: zero_alloc_skb () function comes the head pointer (getting from free_list) of initialization skb with the data block of zero-copy, rather than calls kmalloc () data and dynamically obtain kernel spacing.Simultaneously, the sign of the data block of this zero-copy is inserted the unsigned int zero_index of skb, and the unsigned intzero_flag of skb is stamped the zero-copy sign.Sign with the Zero-copy data piece moves on on the used_list from free_list at last, prevents by contention.
Because there is two types skb (obtaining by alloc_skb () function and zero_alloc_skb () function respectively) in system, so must be distinguished to it, thereby carry out different operations: the skb that belongs to zero-copy mechanism should manage and discharges by the mechanism of zero-copy, and the skb of system self is then by the original flow processing of system.Unsignd short zero_flag member is used to distinguish this skb exactly whether based on zero-copy mechanism.
The corresponding Zero-copy data piece of skb that belongs to zero-copy mechanism.As former document was described, the data block of zero-copy kernel spacing all had the sign of oneself, such as, if the zero-copy kernel spacing is the 1M byte, a data block size is 2048 bytes, and this kernel spacing is divided into 512 so, the sign of data block successively from 0 to 511.Sign by concrete data block can calculate the address of this data block in conjunction with the first address of this kernel spacing.Unsigned int zero_index member is used to deposit this sign exactly.
The data block that zero-copy mechanism is managed the zero-copy space by sign, all unique corresponding sign of each data block.Be provided with available sign memory module free_list in the system and used two modules of sign memory module used_list.Available sign memory module free_list deposits the available block corresponding identification, then deposits the data block corresponding identification of having used with sign memory module used_list.The all signs of original state are all deposited on the free_list chain, and after a data block was used, its corresponding identification moved on to the used_list chain from the free_list chain.After a packet was released, this packet corresponding identification was just from moving on on the available sign memory module free_list chain with sign memory module used_list.
In addition, available sign memory module free_list can also only be set in the system, be used to deposit the available block corresponding identification, during original state, all signs are all deposited on the free_list chain, when a data block is used, then corresponding identification is deleted from available sign memory module free_list chain, when a packet is dropped, after this packet skb was released, this packet corresponding identification was stored among the available sign memory module free_list.
At initial phase, at first in kernel, distribute one section kernel spacing, it is mapped in the middle of the user's space of consumer process.It promptly is visit to kernel spacing that consumer process is visited this user's space.(this value is by MTU (the Maximum Transmission Unit of network interface card then this spatial division to be become one by one 2k, MTU) data block decision), and each data block identified, kernel spacing adopts consistent sign with user's space, notes the start address of each data block simultaneously.These data blocks are used for the Data Receiving of network interface card, and a data block is deposited a network packet.
In the Linux architecture, the kernel spacing (the head member by skb points to) that network interface card driver module 120 obtains skb and is used for packet receiving by calling dev_alloc_skb () function.Owing to need network interface card that network packet is received in the middle of the space specified,, realized functionally similar function a: zero_alloc_skb () function by revising dev_alloc_skb () function.The difference of this function and dev_alloc_skb () is:
Zero_alloc_skb () function comes initialization skb with the kernel data piece of allocating in advance, the sign of this data block is inserted in the middle of the zero_index member of skb simultaneously, and the zero_flag of this skb stamped the zero-copy mark, dev_alloc_skb () function then is dynamically to obtain space (kmalloc () function is used to distribute one section kernel spacing that physical address is continuous) by calling kmalloc () function.
(SuSE) Linux OS discharges a skb and corresponding space thereof by kfree_skb () function.For the packet of stamping the zero-copy mark, because its space is that zero-copy is allocated in advance, so can not allow its release.Therefore, need make amendment to the kfree_skb () function of system, make its difference discharge the packet of zero-copy and protocol stack: for the packet that contains the zero-copy sign, only discharge its skb structure, do not discharge its corresponding kernel spacing, and for the packet of protocol stack, then press the original flow process of kernel and discharge.
Network interface card driver module 120 is by calling the zero-copy space that zero_alloc_skb () function obtains skb and is used to receive packet.
When packet arrived network interface card, network interface card driver module 120 received packet among this space by DMA mechanism.Then, network card equipment triggers hardware interrupts, enters the network interface card interrupt service routine.After the network interface card interrupt service routine is finished associative operation, trigger the soft interruption of packet receiving, the skb that this bag is corresponding is delivered to protocol stack 140 and handles.
140 pairs of packets of protocol stack are handled, the packet hook 141 of flowing through successively, when by hook 141 that zero-copy articulated, zero-copy Hook function is called, this function judges by the zero_flag member who checks skb whether this bag is the packet that belongs to zero-copy, let pass if not then returning NF_ACCEPT, otherwise take out the zero_index sign of skb, it is inserted sign, and (this sign buffer area 150 is assigned with and is mapped to consumer process at the zero-copy initial phase in the buffer area 150, its structure is a unidirectional round-robin queue), and this skb deposited among the skb buffer area 160, returning NF_STOLEN at last, packet transmits no longer backward.
These two symbols of NF_ACCEPT and NF_STOLEN are protocol stack 140 customizations, belong to the Netfilter architecture.How the Hook function that is hung on the hook 141 need handle this packet so that inform protocol stack 140 according to returning corresponding state with the agreement of protocol stack.NF_ACCEPT and NF_STOLEN are two states wherein.Return NF_ACCEPT and represent that the Hook function agrees that this packet continues later flow process.Return NF_STOLEN and inform that then protocol stack 140 no longer is concerned about this packet, transfer to the Hook function entirely and handle.
Fig. 4 is the synoptic diagram of the relevant zero-copy kernel interface of the present invention.As shown in the figure, the present invention will realize two-way zero-copy, need realize in kernel that also corresponding interface calls for consumer process.In an embodiment of the present invention, zero-copy interface 180 comprises mmap () interface and ioctl () interface, by mmap () interface kernel spacing is shone upon, and data in the kernel spacing are carried out respective handling by ioctl (), the character device file in the zero-copy interface 180 (/dev/zerocopy) in user's attitude, be responsible for communicating with the consumer process module.Mmap () is mainly used in this kernel spacing is mapped in the space in the consumer process module 170, consumer process module 170 by call/mmap () of dev/zerocopy with kernel zero-copy spatial mappings in the middle of the user's space of self.The not responsible distribution kernel of mmap () zero-copy space, this space is distributed at zero-copy kernel module initial phase.And ioctl () major control application module is finished corresponding operating, comprises that zero-copy is subcontracted module 210, zero-copy starts module 220 and zero-copy closing module 230.To describe the specific implementation and the function of above-mentioned each module below in detail.
In an embodiment of the present invention, zero-copy interface 180 has adopted the ioctl interface of the character device of an agreement to realize.And by character device file of registration in initialization procedure, name is called " zerocopy ", realizes the mmap () and the ioctl () interface of this device file.User's attitude process module 170 is finished calling relevant interface by visit "/dev/zerocopy " device file.
Mmap () interface is mapped to the kernel spacing of zero-copy in the middle of the space of consumer process, and consumer process module 170 is by calling the first address that mmap () function can obtain mapping space.According to the data block size of this first address and agreement, use and the identical computing method of kernel zero-copy initialization, can carry out data block to this space and cut apart and identify.Because the computing method unanimity is so the sign that obtains is also with the kernel unanimity.
Zero-copy starts module 220 (zero_up ()), can call this function after consumer process module 170 is finished initialization, opens the zero-copy pattern of kernel.
Zero-copy closing module 230 (zero_down ()) can called this function when consumer process module 170 withdraws from, close the zero-copy pattern of kernel.
Zero-copy data is subcontracted module 210 (sendpkt ()), transmits packet (if the Hook function is hung on the hook of bag forwarding) when consumer process by calling this function, and this function parameters is one group of package identification.This function takes out the skb of packet correspondence by sign from skb buffer area 160, and this skb is hung back hook 141, continues later flow process.
Consumer process reads identification information from sign buffer area 150, go out corresponding data block by this identification index, and the packet in this data block is analyzed.Analysis finishes, if this packets need is forwarded or is dropped, then should identify corresponding state and be set to 1 or-1, calls zero-copy in the kernel by zero-copy interface 180 at last and subcontracts 210 pairs of data of module and transmit.Zero-copy is subcontracted module 210 and is taken out corresponding skb according to sign from skb buffer area 160, and according to the state forwarding packet that identifies, if for discarding state then call kfree_skb () this skb is discharged, otherwise this packet is hung back the hook 141 of correspondence, continue the flow process of its back.In order to reduce the system call number of times that consumer process is given out a contract for a project and brought, subcontract module and once can transmit a plurality of packets.
When the life cycle of a packet terminated, protocol stack 140 called kfree_skb () function the kernel spacing and the skb structure of packet correspondence is destroyed.Since there is the skb of zero-copy pattern, thus need make amendment to the original kfree_skb of system () function, so that the packet of zero-copy is distinguished release.Concrete treatment step:
Judge the zero_flag sign of skb, never call kfree () and discharge skb-if be labeled as Zero-copy data Bao Ze the space (kfree () is corresponding to kmalloc ()) of head correspondence; Simultaneously the index in this space is hung back the free_list chain from the used_list chain.If the non-vanishing copy mode of the skb of this packet correspondence is then operated according to protocol stack 140 original flow processs.
Zero-copy mechanism based on protocol stack 140 can be realized as the kernel module form that can load.Linux kernel provides can loading the support of kernel module (Loadable Kernel Module), and this mode makes the user can write the module of oneself (module) and it is loaded in the kernel and moves.
Concrete enforcement is as follows, as shown in Figure 5:
Zero-copy module: zero_copy.ko
The user uses: user
Implement:
Step S501:insmod zero_copy.ko
Module is hung into kernel, and this moment, kernel was supported zero-copy mechanism, but zero-copy pattern not enabled still, kernel keeps original flow process to the processing of packet.
Step S502:mknod/dev/zerocopy c 254 0
Zero-copy interface 180 has been realized the ioctl and the mmap of this character device in kernel, user communicates by letter with the zero-copy interface in the kernel 180 by this device file
Step S503:./user
The run user process, and enable the zero-copy pattern.
Step S504:killall-s 2 user
Send the SIGINT signal to the user process, user catches this signal, carries out and closes the operation of kernel zero-copy pattern, and stop self-operating, can withdraw from after executing operation.
Step S505:rmmod zero_copy
Unloading zero-copy module, kernel is no longer supported zero-copy mechanism.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; being familiar with those of ordinary skill in the art ought can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.

Claims (15)

1. the device based on (SuSE) Linux OS realization zero-copy is characterized in that, comprising:
One zero-copy initialization module is used for when the zero-copy initialization, distributes one section kernel spacing in kernel, described kernel spacing is distributed into a plurality of data blocks, and each data block is identified;
One network interface card driver module is used for sending to the data block of described kernel spacing and depositing receiving packet, the sign of the described data block of record in the skb of described packet, and described skb is sent to protocol stack;
One protocol stack is connected with described network interface card driver module, is used for receiving and analyzing from the network interface card driver module skb of described packet, obtains the sign of described data block;
One sign buffer area is connected with described protocol stack and maps directly to the consumer process module, is used to store the sign of the data block that described protocol stack obtains;
One consumer process module is used for obtaining sign from the sign buffer area of direct mapping, obtains packet in the data block according to described sign correspondence from described kernel spacing, and described packet is carried out analyzing and processing.
2. the device based on (SuSE) Linux OS realization zero-copy according to claim 1 is characterized in that described protocol stack also connects a skb buffer area, is used for depositing described skb after described protocol stack is handled described skb.
3. the device based on (SuSE) Linux OS realization zero-copy according to claim 2 is characterized in that, also comprises:
One zero-copy interface is connected with application module with described consumer process module, and the control signaling that also is used to transmit described consumer process module is finished described consumer process module calling described application module.
4. the device based on (SuSE) Linux OS realization zero-copy according to claim 3 is characterized in that described application module further comprises:
One zero-copy is subcontracted module, is connected with described zero-copy interface, is used for obtaining corresponding skb according to the sign of described packet from described skb buffer area when consumer process is analyzed described packets need and is forwarded, and transmits described packet according to described skb;
One zero-copy starts module, is connected with described zero-copy interface, is used for opening after described consumer process is controlled described initialization module to finish initialization the zero-copy pattern of kernel; With
One zero-copy closing module is connected with described zero-copy interface, is used for closing after described consumer process module withdraws from the zero-copy pattern of kernel.
5. the device based on (SuSE) Linux OS realization zero-copy according to claim 3 is characterized in that described zero-copy interface also comprises:
One character device file is connected with described consumer process module, is used to realize communicating by letter between described consumer process module and the zero-copy interface, realizes described consumer process module calling described zero-copy interface.
6. method of utilizing the described device of claim 1 to realize zero-copy, distribute one section kernel spacing in kernel, the packet that storage network interface card driver module receives is mapped to described kernel spacing in the user's space of consumer process module, it is characterized in that this method is further comprising the steps of:
Step 1 is divided into a plurality of data blocks with described kernel spacing, and each data block is identified;
Step 2, when packet arrived, the network interface card driver module received to described packet in the data block of described kernel spacing, and write down the sign of described data block in the skb of described packet;
Step 3 passes to protocol stack with the skb of described packet and handles, and the sign that described protocol stack extracts described data block is saved in the described sign buffer area;
Step 4, the consumer process module reads identification information from the sign buffer area, find data block corresponding in the kernel spacing according to described sign, obtains stored packet and analyze and handle from described data block.
7. the method for realization zero-copy according to claim 6 is characterized in that, specifically comprises in the described step 1:
Described kernel spacing and the step of user's space to the identical sign of each data block employing.
8. the method for realization zero-copy according to claim 7 is characterized in that, described step 2 also comprises:
The step of record zero-copy sign in the skb of described packet.
9. the method for realization zero-copy according to claim 8 is characterized in that, described step 3 also comprises:
Step 91, described protocol stack judge among the skb of described packet whether the zero-copy sign is arranged;
Step 92 if having, is then extracted the sign of described data block from described skb, be saved to described sign buffer area, and described skb be saved in the skb buffer area termination; If do not have, then described packet is carried out other processing.
10. the method for realization zero-copy according to claim 9 is characterized in that, described step 4 specifically may further comprise the steps:
Step 101 is analyzed stored data packet in the described data block, judges whether described packet needs to be forwarded or to be dropped;
Step 102 if described packets need is forwarded, is then obtained corresponding skb according to described data block sign, and is transmitted described packet according to described skb from described skb buffer area;
Step 103, if described packets need is dropped, then the skb with described packet discharges.
Step 104 if described packet does not need to be forwarded or to be dropped, is then carried out other processing with described packet.
11. the method for realization zero-copy according to claim 10 is characterized in that, described step 102 specifically comprises:
When a plurality of packets needs are forwarded, the step that described a plurality of packets are once all forwarded.
12. the method according to claim 6 or 10 described realization zero-copy is characterized in that, also comprises:
Step 121 is provided with available sign memory module, and the data block sign of store data bag is not left in the described available sign memory module;
Step 122 when network interface card driver module storage packet, is obtained available sign from described available sign memory module, and described packet is stored in the corresponding data block of described available sign, and described sign is deleted from described available sign memory module;
Step 123 when packets need is dropped, discharges the skb of described packet, and the sign that will deposit the data block of described packet is stored in the described available sign memory module.
13. the method according to claim 6 or 10 described realization zero-copy is characterized in that, also comprises:
Step 131, available sign memory module is set and has used the sign memory module, the sign of the data block of store data bag is left in the described available sign memory module, leave in the sign of the data block of store data bag not described with in the sign memory module;
Step 132, when network interface card driver module storage packet, from described available sign memory module, obtain available sign, and described packet is stored in the data block of described available sign correspondence, dump to described sign described from described available sign memory module with the sign memory module;
Step 133 when packets need is dropped, discharges the skb of described packet, and the sign that will deposit the data block of described packet is dumped in the described available sign memory module with the sign memory module by described.
14. the method for realization zero-copy according to claim 6 is characterized in that, further comprises the zero-copy initialization step, comprising:
Step 141 is distributed one section kernel spacing, described kernel spacing is divided into a plurality of data blocks, and each data block is numbered;
Step 1142, the consumer process module is by the first address of the described kernel spacing of described zero-copy interface interchange and the size of each data block, be divided into the data block of equal number according to the big young pathbreaker's kernel spacing of identical data block, and with the numbering of each data block allocations unanimity.
15. the method for realization zero-copy according to claim 6 is characterized in that, only deposits a packet in each data block.
CNB2006101126835A 2006-08-29 2006-08-29 Device and method for realizing zero copy based on Linux operating system Active CN100464304C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101126835A CN100464304C (en) 2006-08-29 2006-08-29 Device and method for realizing zero copy based on Linux operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101126835A CN100464304C (en) 2006-08-29 2006-08-29 Device and method for realizing zero copy based on Linux operating system

Publications (2)

Publication Number Publication Date
CN101135980A true CN101135980A (en) 2008-03-05
CN100464304C CN100464304C (en) 2009-02-25

Family

ID=39160089

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101126835A Active CN100464304C (en) 2006-08-29 2006-08-29 Device and method for realizing zero copy based on Linux operating system

Country Status (1)

Country Link
CN (1) CN100464304C (en)

Cited By (52)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010015142A1 (en) * 2008-08-04 2010-02-11 中兴通讯股份有限公司 Method and system for enabling zero-copy transmission of streaming media data
CN101841470A (en) * 2010-03-29 2010-09-22 东南大学 High-speed capturing method of bottom-layer data packet based on Linux
CN101917350A (en) * 2010-09-13 2010-12-15 南京中兴特种软件有限责任公司 Network card drive-based zero copy Ethernet message capturing and transmitting implementation method under Linux
CN101304373B (en) * 2008-06-25 2011-03-02 中兴通讯股份有限公司 Method and system for implementing high-efficiency transmission chunk data in LAN
CN101267361B (en) * 2008-05-09 2011-05-18 武汉飞思科技有限公司 A high-speed network data packet capturing method based on zero duplication technology
CN102075432A (en) * 2011-01-25 2011-05-25 上海聚欣网络科技有限公司 Method, device, equipment and system for transmitting and receiving message
CN101718981B (en) * 2009-11-03 2012-01-11 四川省电力工业调整试验所 Sampler for data of network of distributed control system
CN102375789A (en) * 2010-08-09 2012-03-14 上海中标软件有限公司 Non-buffer zero-copy method of universal network card and zero-copy system
CN102387212A (en) * 2011-10-25 2012-03-21 曙光信息产业(北京)有限公司 Method for communicating between cluster nodes
CN101409715B (en) * 2008-10-22 2012-04-18 中国科学院计算技术研究所 Method and system for communication using InfiniBand network
CN102497385A (en) * 2011-12-31 2012-06-13 曙光信息产业股份有限公司 Network traffic auditing method and auditing system
CN102508783A (en) * 2011-10-18 2012-06-20 深圳市共进电子股份有限公司 Memory recovery method for avoiding data chaos
CN102638487A (en) * 2011-03-02 2012-08-15 中国科学院地质与地球物理研究所 High-performance data transmission method for large telemetric seismic instrument
CN102663276A (en) * 2012-03-01 2012-09-12 上海大亚科技有限公司 System and method providing uniform interface for user space information abstract, encryption and compression in Linux operation system
CN101789959B (en) * 2009-12-30 2013-05-08 北京天融信科技有限公司 SKB reusing method and device in multinuclear system
CN103617142A (en) * 2013-09-09 2014-03-05 南京邮电大学 High-speed network data collection method based on pf_ring
CN103856474A (en) * 2012-11-29 2014-06-11 北京千橡网景科技发展有限公司 Method and device for processing network data
CN103870318A (en) * 2012-12-11 2014-06-18 正文科技股份有限公司 Non-symmetric-processing multi-core system and network device thereof
CN103905420A (en) * 2013-12-06 2014-07-02 北京太一星晨信息技术有限公司 Method and device for data transmission between protocol stack and application program
CN104011656A (en) * 2011-12-22 2014-08-27 英特尔公司 Storing Data Using A Direct Data Path Architecture To Reduce Energy Consumption And Improve Performance
CN104111891A (en) * 2013-04-19 2014-10-22 珠海扬智电子科技有限公司 Electronic device and data access method thereof
WO2014180397A1 (en) * 2013-12-16 2014-11-13 中兴通讯股份有限公司 Network data packet sending method and device
CN104239249A (en) * 2014-09-16 2014-12-24 国家计算机网络与信息安全管理中心 PCI-E (peripheral component interconnect-express) zero-copy DMA (direct memory access) data transmission method
CN104679532A (en) * 2013-11-27 2015-06-03 腾讯科技(深圳)有限公司 Method and device for loading kernel module
CN104796337A (en) * 2015-04-10 2015-07-22 京信通信系统(广州)有限公司 Method and device for forwarding message
CN104811391A (en) * 2014-01-24 2015-07-29 中兴通讯股份有限公司 Data packet processing method and apparatus, and server
CN105164980A (en) * 2014-04-04 2015-12-16 华为技术有限公司 Method and system for distributing network data in many-core processor
CN105162796A (en) * 2015-09-24 2015-12-16 上海上讯信息技术股份有限公司 Data transmission method and equipment
WO2016078313A1 (en) * 2014-11-20 2016-05-26 中兴通讯股份有限公司 Data writing method and device
CN105635045A (en) * 2014-10-28 2016-06-01 北京启明星辰信息安全技术有限公司 Method and device of tcpdump package snapping realization on the basis of driving zero-copy model system
WO2016197659A1 (en) * 2015-06-12 2016-12-15 中兴通讯股份有限公司 Packet reception method, device and system for network media stream
CN106330887A (en) * 2016-08-22 2017-01-11 苏州华兴源创电子科技有限公司 Data transmission method for multimedia transfer service
CN106413004A (en) * 2016-09-05 2017-02-15 上海斐讯数据通信技术有限公司 Wireless MAC sniffing scanning method and apparatus
CN107302499A (en) * 2017-06-26 2017-10-27 北京赛特斯信息科技股份有限公司 The NFV protocol massages receiving/transmission methods of packet buffer need not be copied
CN108804244A (en) * 2018-05-28 2018-11-13 北京小米移动软件有限公司 Data transmission method for uplink, device and storage medium
CN108875421A (en) * 2018-04-28 2018-11-23 置富科技(深圳)股份有限公司 Copying apparatus, data managing method, storage medium and data destroying, alternate device
WO2018223302A1 (en) * 2017-06-07 2018-12-13 华为技术有限公司 Data reorganization method and apparatus
CN109413106A (en) * 2018-12-12 2019-03-01 中国航空工业集团公司西安航空计算技术研究所 A kind of ICP/IP protocol stack implementation method
CN109962885A (en) * 2017-12-22 2019-07-02 北京安天网络安全技术有限公司 The network safety protection method and internet of things equipment of internet of things equipment
CN110391999A (en) * 2018-04-18 2019-10-29 海能达通信股份有限公司 A kind of data communications method and system
CN110826065A (en) * 2019-10-30 2020-02-21 亚信科技(成都)有限公司 Scanning method, device and system
CN111124948A (en) * 2019-12-04 2020-05-08 北京东土科技股份有限公司 Network data packet capturing method and system of embedded system and storage medium
CN111124506A (en) * 2019-11-12 2020-05-08 中国电子科技集团公司第三十研究所 Operation card driving implementation method based on application layer
CN111539010A (en) * 2020-06-16 2020-08-14 北京明朝万达科技股份有限公司 Clipboard control method and device, electronic equipment and computer-readable storage medium
CN111857731A (en) * 2020-07-31 2020-10-30 广州锦行网络科技有限公司 Flux storage method based on linux platform
CN112835775A (en) * 2021-01-29 2021-05-25 许继集团有限公司 Simulation network communication method and device and relay protection device simulation test system
CN113127183A (en) * 2019-12-30 2021-07-16 阿里巴巴集团控股有限公司 Memory allocation method and device in user mode protocol stack
CN114244917A (en) * 2020-08-31 2022-03-25 华为技术有限公司 Data transmission method, device and system
CN114338647A (en) * 2021-12-16 2022-04-12 中孚安全技术有限公司 Lightweight file transmission method and system based on domestic operating system
CN114610660A (en) * 2022-03-01 2022-06-10 Oppo广东移动通信有限公司 Method, device and system for controlling interface data
CN115103036A (en) * 2022-05-20 2022-09-23 中国科学院计算技术研究所 Efficient TCP/IP datagram processing method and system
CN116166508A (en) * 2023-04-18 2023-05-26 天津市天河计算机技术有限公司 IO data analysis method, device, equipment, storage medium and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5931925A (en) * 1996-12-02 1999-08-03 International Business Machines Corporation System and method for efficiently transferring datastreams in a multimedia system
CN1312577C (en) * 2003-05-07 2007-04-25 中兴通讯股份有限公司 Method for realizing communication process zero copy information queue
US7428730B2 (en) * 2003-12-15 2008-09-23 Intel Corporation Software development environment
CN100486248C (en) * 2005-11-11 2009-05-06 华中科技大学 Zero-copy communication method under real-time environment

Cited By (75)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267361B (en) * 2008-05-09 2011-05-18 武汉飞思科技有限公司 A high-speed network data packet capturing method based on zero duplication technology
CN101304373B (en) * 2008-06-25 2011-03-02 中兴通讯股份有限公司 Method and system for implementing high-efficiency transmission chunk data in LAN
WO2010015142A1 (en) * 2008-08-04 2010-02-11 中兴通讯股份有限公司 Method and system for enabling zero-copy transmission of streaming media data
RU2477930C2 (en) * 2008-08-04 2013-03-20 ЗетТиИ Корпорейшн Method and system for transmitting flow multimedia data with zero copying
CN101409715B (en) * 2008-10-22 2012-04-18 中国科学院计算技术研究所 Method and system for communication using InfiniBand network
CN101718981B (en) * 2009-11-03 2012-01-11 四川省电力工业调整试验所 Sampler for data of network of distributed control system
CN101789959B (en) * 2009-12-30 2013-05-08 北京天融信科技有限公司 SKB reusing method and device in multinuclear system
CN101841470A (en) * 2010-03-29 2010-09-22 东南大学 High-speed capturing method of bottom-layer data packet based on Linux
CN101841470B (en) * 2010-03-29 2012-10-10 东南大学 High-speed capturing method of bottom-layer data packet based on Linux
CN102375789A (en) * 2010-08-09 2012-03-14 上海中标软件有限公司 Non-buffer zero-copy method of universal network card and zero-copy system
CN102375789B (en) * 2010-08-09 2014-05-28 中标软件有限公司 Non-buffer zero-copy method of universal network card and zero-copy system
CN101917350B (en) * 2010-09-13 2012-08-15 南京中兴特种软件有限责任公司 Network card drive-based zero copy Ethernet message capturing and transmitting implementation method under Linux
CN101917350A (en) * 2010-09-13 2010-12-15 南京中兴特种软件有限责任公司 Network card drive-based zero copy Ethernet message capturing and transmitting implementation method under Linux
CN102075432B (en) * 2011-01-25 2012-11-28 上海聚欣网络科技有限公司 Method, device, equipment and system for transmitting and receiving message
CN102075432A (en) * 2011-01-25 2011-05-25 上海聚欣网络科技有限公司 Method, device, equipment and system for transmitting and receiving message
CN102638487B (en) * 2011-03-02 2015-09-16 中国科学院地质与地球物理研究所 Large-scale telemetric seismic instrument high-performance data transmission method
CN102638487A (en) * 2011-03-02 2012-08-15 中国科学院地质与地球物理研究所 High-performance data transmission method for large telemetric seismic instrument
CN102508783A (en) * 2011-10-18 2012-06-20 深圳市共进电子股份有限公司 Memory recovery method for avoiding data chaos
CN102508783B (en) * 2011-10-18 2014-04-09 深圳市共进电子股份有限公司 Memory recovery method for avoiding data chaos
CN102387212A (en) * 2011-10-25 2012-03-21 曙光信息产业(北京)有限公司 Method for communicating between cluster nodes
CN104011656A (en) * 2011-12-22 2014-08-27 英特尔公司 Storing Data Using A Direct Data Path Architecture To Reduce Energy Consumption And Improve Performance
CN102497385A (en) * 2011-12-31 2012-06-13 曙光信息产业股份有限公司 Network traffic auditing method and auditing system
CN102663276A (en) * 2012-03-01 2012-09-12 上海大亚科技有限公司 System and method providing uniform interface for user space information abstract, encryption and compression in Linux operation system
CN102663276B (en) * 2012-03-01 2014-10-15 上海大亚科技有限公司 System and method providing uniform interface for user space information abstract, encryption and compression in Linux operation system
CN103856474A (en) * 2012-11-29 2014-06-11 北京千橡网景科技发展有限公司 Method and device for processing network data
CN103870318A (en) * 2012-12-11 2014-06-18 正文科技股份有限公司 Non-symmetric-processing multi-core system and network device thereof
CN103870318B (en) * 2012-12-11 2017-05-24 正文科技股份有限公司 Non-symmetric-processing multi-core system and network device thereof
CN104111891A (en) * 2013-04-19 2014-10-22 珠海扬智电子科技有限公司 Electronic device and data access method thereof
CN104111891B (en) * 2013-04-19 2017-05-24 珠海扬智电子科技有限公司 Electronic device and data access method thereof
CN103617142A (en) * 2013-09-09 2014-03-05 南京邮电大学 High-speed network data collection method based on pf_ring
CN103617142B (en) * 2013-09-09 2017-03-15 南京邮电大学 A kind of express network collecting method based on pf_ring
CN104679532A (en) * 2013-11-27 2015-06-03 腾讯科技(深圳)有限公司 Method and device for loading kernel module
CN104679532B (en) * 2013-11-27 2018-12-11 腾讯科技(深圳)有限公司 kernel module loading method and device
CN103905420A (en) * 2013-12-06 2014-07-02 北京太一星晨信息技术有限公司 Method and device for data transmission between protocol stack and application program
CN103905420B (en) * 2013-12-06 2017-10-10 北京太一星晨信息技术有限公司 The method and device of data is transmitted between a kind of protocol stack and application program
WO2014180397A1 (en) * 2013-12-16 2014-11-13 中兴通讯股份有限公司 Network data packet sending method and device
CN104717189A (en) * 2013-12-16 2015-06-17 中兴通讯股份有限公司 Network data package sending method and device
CN104811391A (en) * 2014-01-24 2015-07-29 中兴通讯股份有限公司 Data packet processing method and apparatus, and server
CN104811391B (en) * 2014-01-24 2020-04-21 中兴通讯股份有限公司 Data packet processing method and device and server
CN105164980A (en) * 2014-04-04 2015-12-16 华为技术有限公司 Method and system for distributing network data in many-core processor
CN104239249B (en) * 2014-09-16 2017-08-04 国家计算机网络与信息安全管理中心 PCI E zero-copy DMA data transfer methods
CN104239249A (en) * 2014-09-16 2014-12-24 国家计算机网络与信息安全管理中心 PCI-E (peripheral component interconnect-express) zero-copy DMA (direct memory access) data transmission method
CN105635045A (en) * 2014-10-28 2016-06-01 北京启明星辰信息安全技术有限公司 Method and device of tcpdump package snapping realization on the basis of driving zero-copy model system
CN105635045B (en) * 2014-10-28 2019-12-13 北京启明星辰信息安全技术有限公司 Tcpdump packet capture implementation method and device based on drive zero copy mode system
WO2016078313A1 (en) * 2014-11-20 2016-05-26 中兴通讯股份有限公司 Data writing method and device
CN104796337A (en) * 2015-04-10 2015-07-22 京信通信系统(广州)有限公司 Method and device for forwarding message
WO2016197659A1 (en) * 2015-06-12 2016-12-15 中兴通讯股份有限公司 Packet reception method, device and system for network media stream
CN105162796A (en) * 2015-09-24 2015-12-16 上海上讯信息技术股份有限公司 Data transmission method and equipment
CN106330887A (en) * 2016-08-22 2017-01-11 苏州华兴源创电子科技有限公司 Data transmission method for multimedia transfer service
CN106330887B (en) * 2016-08-22 2019-10-29 苏州华兴源创科技股份有限公司 A kind of data transmission method for multimedia transfer service
CN106413004A (en) * 2016-09-05 2017-02-15 上海斐讯数据通信技术有限公司 Wireless MAC sniffing scanning method and apparatus
WO2018223302A1 (en) * 2017-06-07 2018-12-13 华为技术有限公司 Data reorganization method and apparatus
CN107302499A (en) * 2017-06-26 2017-10-27 北京赛特斯信息科技股份有限公司 The NFV protocol massages receiving/transmission methods of packet buffer need not be copied
CN107302499B (en) * 2017-06-26 2020-12-18 北京赛特斯信息科技股份有限公司 NFV protocol message transmitting and receiving method without copying message buffer
CN109962885A (en) * 2017-12-22 2019-07-02 北京安天网络安全技术有限公司 The network safety protection method and internet of things equipment of internet of things equipment
CN110391999B (en) * 2018-04-18 2022-12-16 海能达通信股份有限公司 Data communication method and system
CN110391999A (en) * 2018-04-18 2019-10-29 海能达通信股份有限公司 A kind of data communications method and system
CN108875421A (en) * 2018-04-28 2018-11-23 置富科技(深圳)股份有限公司 Copying apparatus, data managing method, storage medium and data destroying, alternate device
CN108804244A (en) * 2018-05-28 2018-11-13 北京小米移动软件有限公司 Data transmission method for uplink, device and storage medium
CN108804244B (en) * 2018-05-28 2021-01-01 北京小米移动软件有限公司 Data transmission method, device and storage medium
CN109413106A (en) * 2018-12-12 2019-03-01 中国航空工业集团公司西安航空计算技术研究所 A kind of ICP/IP protocol stack implementation method
CN110826065A (en) * 2019-10-30 2020-02-21 亚信科技(成都)有限公司 Scanning method, device and system
CN111124506A (en) * 2019-11-12 2020-05-08 中国电子科技集团公司第三十研究所 Operation card driving implementation method based on application layer
CN111124948A (en) * 2019-12-04 2020-05-08 北京东土科技股份有限公司 Network data packet capturing method and system of embedded system and storage medium
CN113127183A (en) * 2019-12-30 2021-07-16 阿里巴巴集团控股有限公司 Memory allocation method and device in user mode protocol stack
CN111539010A (en) * 2020-06-16 2020-08-14 北京明朝万达科技股份有限公司 Clipboard control method and device, electronic equipment and computer-readable storage medium
CN111539010B (en) * 2020-06-16 2023-09-01 北京明朝万达科技股份有限公司 Clipboard control method, device, electronic equipment and computer readable storage medium
CN111857731A (en) * 2020-07-31 2020-10-30 广州锦行网络科技有限公司 Flux storage method based on linux platform
CN114244917A (en) * 2020-08-31 2022-03-25 华为技术有限公司 Data transmission method, device and system
CN112835775A (en) * 2021-01-29 2021-05-25 许继集团有限公司 Simulation network communication method and device and relay protection device simulation test system
CN112835775B (en) * 2021-01-29 2024-03-01 许继集团有限公司 Simulation network communication method and device and relay protection device simulation test system
CN114338647A (en) * 2021-12-16 2022-04-12 中孚安全技术有限公司 Lightweight file transmission method and system based on domestic operating system
CN114610660A (en) * 2022-03-01 2022-06-10 Oppo广东移动通信有限公司 Method, device and system for controlling interface data
CN115103036A (en) * 2022-05-20 2022-09-23 中国科学院计算技术研究所 Efficient TCP/IP datagram processing method and system
CN116166508A (en) * 2023-04-18 2023-05-26 天津市天河计算机技术有限公司 IO data analysis method, device, equipment, storage medium and system

Also Published As

Publication number Publication date
CN100464304C (en) 2009-02-25

Similar Documents

Publication Publication Date Title
CN100464304C (en) Device and method for realizing zero copy based on Linux operating system
CN111522653B (en) Container-based network function virtualization platform
CN101354693B (en) Communication scheduling system and method among cores of isomerization multi-core processor
US9935899B2 (en) Server switch integration in a virtualized system
US7769031B2 (en) Virtual machine system and method of network communication between virtual machines
US7653754B2 (en) Method, system and protocol that enable unrestricted user-level access to a network interface adapter
US9594842B2 (en) Hashing algorithm for network receive filtering
US8543729B2 (en) Virtualised receive side scaling
CN1593041B (en) Method, apparatus and computer program for the decapsulation and encapsulation of packets with multiple headers
US8392565B2 (en) Network memory pools for packet destinations and virtual machines
EP1546843B1 (en) High data rate stateful protocol processing
US7529224B2 (en) Scheduler, network processor, and methods for weighted best effort scheduling
US7515596B2 (en) Full data link bypass
CN111431757B (en) Virtual network flow acquisition method and device
US8606975B2 (en) Managing interrupts in a virtualized input/output device supporting multiple hosts and functions
EP0960511A1 (en) Method and apparatus for reclaiming buffers
EP0960502A1 (en) Method and apparatus for transmitting multiple copies by replicating data identifiers
US9069592B2 (en) Generic transport layer mechanism for firmware communication
US7466716B2 (en) Reducing latency in a channel adapter by accelerated I/O control block processing
CN110519180A (en) Network card virtualization queue scheduling method and system
US8194670B2 (en) Upper layer based dynamic hardware transmit descriptor reclaiming
CN114500418A (en) Data statistical method and related device
US10445120B2 (en) Tiered application discovery
KR19980086588A (en) System Resource Reduction Tool Using TCP / IP Socket Application
CN114301641A (en) Virtualization security gateway system suitable for RDMA network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: FORTINET INC.

Free format text: FORMER OWNER: FORTINET INFORMATION TECHNOLOGY (BEIJING) CO., LTD.

Effective date: 20091002

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20091002

Address after: California, USA

Patentee after: Fortinet, Inc.

Address before: Room 507, digital media building, No. 7 information road, Beijing, Haidian District

Patentee before: Fortinet,Inc.