CN1881936A - Dynamic loading and control method for router virtual drive module - Google Patents

Dynamic loading and control method for router virtual drive module Download PDF

Info

Publication number
CN1881936A
CN1881936A CNA2006100780920A CN200610078092A CN1881936A CN 1881936 A CN1881936 A CN 1881936A CN A2006100780920 A CNA2006100780920 A CN A2006100780920A CN 200610078092 A CN200610078092 A CN 200610078092A CN 1881936 A CN1881936 A CN 1881936A
Authority
CN
China
Prior art keywords
equipment
module
virtual
user
data
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
CNA2006100780920A
Other languages
Chinese (zh)
Other versions
CN100464535C (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.)
NATIONAL DIGITAL SWITCH SYSTEM ENGINEERING TECHNOLOGY RESEARCH CENTER
Original Assignee
NATIONAL DIGITAL SWITCH SYSTEM ENGINEERING TECHNOLOGY RESEARCH CENTER
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 NATIONAL DIGITAL SWITCH SYSTEM ENGINEERING TECHNOLOGY RESEARCH CENTER filed Critical NATIONAL DIGITAL SWITCH SYSTEM ENGINEERING TECHNOLOGY RESEARCH CENTER
Priority to CNB2006100780920A priority Critical patent/CN100464535C/en
Publication of CN1881936A publication Critical patent/CN1881936A/en
Application granted granted Critical
Publication of CN100464535C publication Critical patent/CN100464535C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a dynamic load and control method of virtual driving module of distributed high-property route at the multi-user condition, wherein said method comprises: using single inner core module to realize the dynamic simulation of receiving and sending operations of several real interface data pack; first using driving method to complete the dynamic load or abandonment of each virtual interface; at the same time, based on the command of system data maintain module, controlling and refreshing its condition; in addition, the invention can realize the effective data transmission between the standard interfaces of upper protocol software, and the interactions of protocol data and condition command between the internal communication modules of user space. The invention can solve the problems of dynamic load and control of virtual driving that simulating several interfaces, when there is lots of interface types and unconfirmed user number, caused by multi user accesses.

Description

A kind of dynamic load of router virtual drive module and control method
Technical field
The present invention relates to the network route technology in the computer communication field, the dynamic load and the control method of distributed high-performance router virtual drive module under particularly a kind of multi-user's condition based on embedded real-time operating system.
Background technology
At present, though the transmission rate of internet core section for supporting multimedia service or large-scale symmetrical service etc. can not produce the bottleneck in the transmission, and diversification business such as Streaming Media is about to become the main flow business of network.Can not become the subject matter that the diversification mixed service is effectively transmitted and carried out for streaming media service provides the constant network bandwidth but network insertion section devices transfer rate is slow, access procedure is complicated, insert section flow velocity instability and insert section.
Recently in national wide-band-message net (3Tnet) demonstration project, adopted router (Access Convergence Router with large scale cut-in convergent function, ACR) the integrated access of realization network, the advantage of this equipment is under the situation of guaranteeing user's end-to-end bandwidth, convenient to access section equipment enforcement management, and be convenient to introduce new professional and new operation strategy.Utilize access that ACR realizes Network as shown in Figure 1, wherein ACR equipment is by cut-in convergent route host exchange (Access ConvergenceRouter Switcher, ACR-S), ether class combiner-divider (Ethernet MultiplexerDemultiplexer, EMD) and (Remote Interface Unit RIU) forms in the remote interface unit.Though inserting section, miscellaneous service still adopts the encapsulation format of IP packet, on RIU and EMD, data is not exchanged, but by three layers of exchange that ACR-S finishes data, directly enters backbone network then and transmit.Because the transmission rate of core net is enough high, thus in core network segment, do not need streaming media service is kept constant resource occupation, but continue to adopt the burst type transmission means of high bandwidth; In the descending process that inserts section, business is through the link transmission of the chain road direction low rate of excessive rate, and do not carry out three layers of exchange in whole access section, and just carry out shunt processing through EMD and RIU, be easy to realize that the section of access provides fixing link circuit resource to media business.
ACR-S is as the core exchange main frame of ACR, not only to finish the service access that inserts section, also will realize, the centralization of RIU management and configuration EMD, need to finish the exchanges data on the metropolitan area network simultaneously, so ACR-S can realize far-end control and the high-performance router that disposes.
Owing to high-performance router generally adopts distributed frame, the therefore necessary problem that solves accurate on primary processor, quick perception and the whole router external interface location mode of effective control comprises:
1, the number of users that inserts in the ACR system is uncertain.Embedded OS to drive common load mode be with a driver as an integral module, in needs, add kernel work.Because the user of uncertain quantity is when inserting, make that interface unit quantity and the state registered in a certain moment kernel all are uncertain,, can cause kernel excessive if implement disposable loading as much as possible, the system resource redundancy overhead is huge, has greatly influenced the performance of system.Therefore use single kernel, realize virtual to the transmitting-receiving behavior of packet of the real user interface of unknown number.
2, in the embedded OS, driver is that the form with kernel module (Module) operates in kernel spacing, in this system, the virtual driving that needs a plurality of interfaces of registration is in operating system, simulate of the transmitting-receiving behavior of actual user interface to packet, shield the bottom hardware details, the UDI of standard is provided for the upper-layer protocol stack.
Summary of the invention
The technical problem to be solved in the present invention is under the condition that the multi-user inserts, and by single kernel module of embedded OS, based on the actual needs of ACR system, provides a kind of virtual Driven Dynamic of simulating a plurality of interfaces to load and control method.Finish simulation to the transmitting-receiving behavior of data plane actual many interfaces transceive data bag, and, do not consider the ins and outs that bottom hardware is realized when making the transplanting of upper-layer protocol software and function expansion directly for upper-layer protocol stack or the Routing Protocol that runs on Main Processor Unit provides unified standard interface.Simultaneously, the present invention can provide the basis for whole system provides parallel research and development and debugging, shortens the R﹠D cycle of system debug cycle and product.
In order to solve above actual needs, main contents of the present invention can be illustrated from two aspects, the one, and virtual control method and the collocation method of many interfaces is referred to as control section of the present invention under the single module; The 2nd, each interface is referred to as data switch section of the present invention to the transmitting-receiving of packet.Control section has mainly comprised the state indication of single kernel module according to the system data maintenance module of system works, for the dynamic registration of many virtual interfaces, cancel and state configuration and management method, simultaneously because the upper-layer protocol stack when issuing protocol package, need provide the administrative mechanism of corresponding transmit queue for each virtual unit.Data switch section mainly is the exchanges data that has comprised between the intercommunication module of finishing in virtual driving and the native system, and the exchanges data between the upper-layer protocol stack needs the control command of receiving system data maintenance module transmission simultaneously and finishes the control corresponding operation.
Particularly, the main contents of control section of the present invention have:
1, the dynamic load and the control method of distributed high-performance router virtual drive module under a kind of multi-user's condition, the intercommunication module receives the instruction of the virtual condition of the low-level hardware of sending from the system data maintenance module, call the ioct operation of the basic equipment in the virtual drive module, operating system is carried out operation of equipment.
2, the ioct operation of calling the basic equipment in the virtual drive module comprises: create virtual unit and cancel the operation of virtual unit in single kernel module.
The establishment operation of equipment comprises:
1), the RIU in the ACR system detects user's request, need to the system data maintenance module announcement that runs on control plane by the intercommunication module from datum plane then to need the message of device registration;
2) by the ioctl operation of basic equipment, be submitted to kernel module and want information such as the title of device registration, type, to the equipment of operating system registration respective name, i.e. virtual unit;
3), create transmit queue corresponding to this equipment, be used to store the protocol massages that the needs with the encapsulation of skb form that sent by the upper-layer protocol stack issue;
4), the operation of equipment comprises: operations such as ioctl operation, reception operation, transmit operation, Down operation and Up;
Cancelling operation of equipment comprises:
1), the RIU in the ACR system detects the user and cancels from ACR, then needs the message that need cancel to the system data maintenance module announcement that runs on control plane by the intercommunication module from datum plane;
2), system data maintenance module then sends corresponding instruction to inner communication module, in the intercommunication module, ioctl operation by basic equipment, the transmit queue of cancelling the equipment of respective name and finishing corresponding device empties, reclaim the resource relevant simultaneously with this equipment, and delete in the node slave unit formation with this equipment, from operating system, cancel this equipment at last;
3, in operating system module is carried out at first needing to finish the registration of basic equipment in the initialization procedure, and the ioct operation of definition basic equipment.
4, the exception handling of control section of the present invention promptly when appearance is unusual, need empty processing to various formations, closes corresponding socket (Socket) descriptor and cancel corresponding apparatus from operating system nucleus.
5, a kind of method of exchanges data comprises:
1), virtual drive module receives the protocol massages from datum plane internally in the communication module, the reception operation of intercommunication module by the ioctl of respective virtual equipment will data encapsulates with corresponding apparatus information gives the upper-layer protocol that runs on Main Processor Unit stack.
A1, in the intercommunication module when the ioctl of virtual drive module by respective virtual equipment calls Data transmission, in the ioctl operation, finish of the mapping of the virtual memory of user's space data to the kernel virtual memory by copy_from_user () function;
A2, corresponding data are copied to kernel spacing;
A3, the operation of the reception by virtual unit are encapsulated as the skb form with data and corresponding apparatus information;
A4, by giving the upper-layer protocol stack that runs on Main Processor Unit on the canonical function netif_rx ().
2), when the upper-layer protocol stack sends protocol massages downwards, by the transmit operation of this equipment, encapsulated message is put into tail of the queue corresponding to the transmit queue of this equipment with message, waits for that the intercommunication module takes out from team's head with polling mode from virtual drive module.
B1, issue message with skb form encapsulation by dev_start_xmit () function;
B2, in virtual drive module of the present invention, search the corresponding apparatus title;
B3, search equipment formation are judged the corresponding apparatus title whether in device queue, if in formation, and execution in step B4 then, otherwise message is done discard processing;
B4, the skb message of correspondence is put into the tail of the queue of the transmit queue of corresponding device, wait for that the intercommunication module takes out this message in the mode of poll.
The polling mode algorithm comprises:
C1: the ioctl by relevant device passs the memory headroom pointer into virtual drive module, the application memory headroom;
C2:, finish memory-mapped by copy_from_user () function by the ioctl operation;
C3: judge whether the data length on the skb node in the transmit queue of relevant device is less than or equal to the memory headroom of application, if, execution in step B244 then; If not, then execution in step B241, application again;
C4: corresponding message is passed to user's space by copy_to_user ();
C5: this skb node of deletion from transmit queue.
C2:, finish memory-mapped by copy_from_user () function by the ioctl operation;
C3: judge whether the data length on the skb node in the transmit queue of relevant device is less than or equal to the memory headroom of application, if, execution in step B244 then; If not, then execution in step B241, application again;
C4: corresponding message is passed to user's space by copy_to_user ();
C5: this skb node of deletion from transmit queue.
Compared with prior art, the present invention has the following advantages:
Under the condition that the multi-user inserts,,, in primary processor, realized that the virtual Driven Dynamic that can simulate a plurality of interfaces loads and State Control according to the actual needs of ACR system based on single kernel module of embedded OS.Finish simulation to the transmitting-receiving behavior of data plane actual many interfaces transceive data bag, and, do not consider the ins and outs that bottom hardware is realized when making the transplanting of upper-layer protocol software and function expansion directly for upper-layer protocol stack or the Routing Protocol that runs on Main Processor Unit provides unified standard interface.Simultaneously, the present invention can provide the basis for whole system provides parallel research and development and debugging, shortens the R﹠D cycle of system debug cycle and product.
Description of drawings
Fig. 1 is the schematic diagram that ACR realizes the access of Network.
The applied environment that Fig. 2 is the inventive method in whole ACR system.
Fig. 3 is the registration of a plurality of virtual interfaces in embedded OS and the method schematic diagram of cancelling.
Fig. 4 is the structural representation of the inventive method.
Fig. 5 is device queue of the present invention and transmit queue structural representation.
Fig. 6 is the external interface schematic diagram that the present invention need finish.
Fig. 7 is that virtual driving among the present invention is to the data passes algorithm flow of inner communication module.
Embodiment
The dynamic load of distributed high-performance router virtual drive module and the method for control under a kind of multi-user's condition provided by the present invention, for making purpose of the present invention, technical scheme and advantage clearer, following with reference to accompanying drawing, the present invention is described in more detail.
At first, system environments of the present invention and method are carried out describe, in general terms:
As Fig. 2 figure and shown in Figure 3, in the applied environment of ACR system, mainly comprise ACR-S Main Processor Unit and ACR-S from processing unit, between them is ACR-S intercommunication module.Contrast Fig. 3, the actual hardware interface of datum plane wherein is corresponding from processing unit with the ACR-S among Fig. 2, and virtual drive module is in the ACR-S Main Processor Unit.System data module and intercommunication module are transmitted transmitting order to lower levels and are comprised: register, cancel equipment; UP, DOWN interface.The actual hardware interface of datum plane is to inner communication module uploaded state.Operate by the ioctl of based device and the ioctl of equipment between intercommunication module and the virtual drive module.In virtual drive module, finish, the registration new equipment, cancel equipment, UP interface and DOWN operation.
The present invention relates under multi-user's access conditions, need finish on the primary processor of ACR-S a plurality of user interfaces that insert by remote interface unit R IU are simulated, this simulation is based on embedded real-time operating system, with the form realization of driver.Because quantity the unknown that the user inserts, and the state of each actual interface also can constantly change.Therefore, the present invention need finish by the dynamic virtual of single kernel module realization to the behavior of a plurality of actual interface data packet transceive, so at first need finish the dynamic load of each virtual interface or cancel with the form that drives, simultaneously, need finish control and renewal according to the instruction that the system data maintenance module issues to its state.
Therefore, in implementation process, can the present invention be divided into two parts on the structure and implement, the one, need finish control section, the 2nd, need finish the data switch section of data passes function.
Method provided by the present invention comprises:
One, the enforcement of control section of the present invention
As shown in Figure 3, intercommunication module and system data maintenance module are positioned at user's space, and virtual drive module is positioned at kernel spacing; The module of intercommunication simultaneously, system data maintenance module, virtual drive module are positioned at control plane, and the actual hardware interface of datum plane is positioned at datum plane.
Concrete steps comprise:
Step 1: as shown in Figure 4, when the ACR router startup, just in operating system, load this kernel module, and finish the initialization of this kernel module.In initialization procedure, finish whole basic equipment and register, and doubly linked list of initialization links the device queue of each equipment to operating system.
Basic equipment includes only an operation, i.e. the ioctl of basic equipment operation, and also this equipment is in the Down state all the time.Wherein the ioctl of basic equipment operation mainly is according to being called by the ioctl of intercommunication module by this basic equipment, will submitting kernel module to the implementor name of facility registration.In this operation to the equipment of operating system registration respective name, i.e. virtual unit, as shown in Figure 4.According to the interface type that inserts the user, initial condition etc. are finished initialization, and this equipment are added in the device queue as shown in Figure 5 of this kernel module.
Step 2: as shown in Figure 4, when the intercommunication module receive from the system data maintenance module about datum plane on during the instruction of virtual condition of low-level hardware, virtual condition according to low-level hardware, the ioctl operation of intercommunication module invokes basic equipment is finished and is created device directive or nullify device directive, enters step 3 if create device directive; If the cancellation device directive then enters step 4; If the modification status command then enters step 5; Otherwise entering step 6 execute exception handles.
Step 3: carry out and create device directive.As shown in Figure 4, operating mechanism according to whole ACR, if RIU has detected the user when inserting, report to the control plane that is positioned at primary processor by the intercommunication module, system data maintenance module by control plane is carried out facility registration to the virtual drive module that is positioned at kernel spacing to operating system by the intercommunication module, the intercommunication module receives from the instruction of system data maintenance module about the virtual condition of low-level hardware on the datum plane, call the ioctl operation of basic equipment, finish the registered task of each virtual unit according to device name, finish the initialization task of virtual unit simultaneously, virtual drive module is finished after the registration of the equipment with respective name, forwards step 8 end operation to
During virtual unit of wherein every registration, define the opening of this interface simultaneously, close, ioctl operation etc., and initialization is to transmit queue that should equipment.When each virtual unit registration, mainly finish the initialization of equipment, in the initialization of equipment, need to create transmit queue as shown in Figure 5 corresponding to this equipment, be used to store the protocol massages that the needs with the encapsulation of skb form that sent by the upper-layer protocol stack issue.The main operation of equipment comprises ioctl operation, reception operation, transmit operation, Down operation and Up operation etc.Wherein:
The exchange to the intercommunication module data message that runs on user's space is mainly finished in the ioctl operation, state variation indication and configuration (as Down, Up, IP address or the like), and the main contents of this part are finished by data switch section of the present invention.
Receive the protocol massages that comes from datum plane that operation mainly receives in the communication module internally, and after being packaged into the skb form that protocol stack needs, hand in the layer protocol stack by standard interface netif_rx () function.
Transmit operation mainly is to receive the protocol massages with the encapsulation of skb form that the upper strata issues with standard interface dev_start_xmit () function, and search corresponding apparatus according to device name in device queue, and the skb message that will whenever issue adds the afterbody of the transmit queue of corresponding device.
Down operation and Up operation mainly are the status commands that reports the system data maintenance module on the primary processor according to the equipment physical interface, the system data maintenance module is informed the intercommunication module in the mode of message queue, and the ioctl by relevant device operates the state of revising virtual interface by the intercommunication module, and the state of itself and actual physical equipment interface is consistent.
Step 4: the cancel an order of actuating equipment.Cancel the process of a virtual unit the operating system in the master control plane.This process can be briefly described as follows: cancel from ACR in case the RIU in the ACR system detects the user, then need the message that need cancel to the system data maintenance module announcement that runs on control plane by the intercommunication module from datum plane.The system data maintenance module then sends corresponding instruction to inner communication module, in the intercommunication module, ioctl operation by basic equipment, cancel the equipment of respective name, in the ioctl operation corresponding to this order, the transmit queue that need finish corresponding device empties, and reclaims the resource relevant with this equipment simultaneously, and delete in the node slave unit formation with this equipment, from operating system, cancel this equipment at last.
Step 5: the State Control of actuating equipment and update instruction.As shown in Figure 3, the status command of the corresponding actual low-level hardware of assigning according to the system data maintenance module, instruct to virtual driving kernel module transmission relevant device title status modifier by UP and the DOWN operation of the ioctl of respective virtual equipment by the intercommunication module, in kernel module, finish the status modifier of relevant device, keep the state and the state consistency that is positioned at the actual physical device interface on the datum plane of virtual unit, forward step 8 end operation after finishing to.
Step 6: as shown in Figure 4, the invention provides the exception handling of control section, promptly when appearance was unusual, removing module need empty processing to various formations, closes corresponding socket (Socket) descriptor and nullify corresponding apparatus from operating system nucleus.
Step 7: end operation.
Wherein in step 4 and step 5 to the operation of device queue and transmit queue, as shown in Figure 5, have new equipment to add formation, then its chain is gone into the formation afterbody, set up associated queue's head, can normally add skb, deletion skb.Can finish three kinds of operations at the device queue head: increase new equipment, add skb data in skb, the sweep equipment to equipment; If the skb of the equipment of sending to 0 is arranged, receive and skb in the sweep equipment 1 then finish deletion work if then add the chained list afterbody.
Two, the enforcement of data switch section of the present invention:
As shown in Figure 6, the intercommunication module is positioned at user's space, and virtual drive module and protocol stack are arranged in kernel spacing.
This part is finished two external interfaces and mainly contained: one is the interface of virtual drive module and intercommunication module, the exchange of the protocol data message between this interface main complete operation system user space and the kernel spacing.Another is virtual drive module and the upper-layer protocol stack that runs on kernel spacing, and this interface is mainly finished the encapsulation and the decomposition of protocol data message.Finish the smooth transmission of data then.
As shown in Figure 6, concrete steps comprise:
Step 8: if the protocol massages of uploading execution in step 9 then, if the protocol massages execution in step 10 that sends downwards.
Step 9: virtual drive module receives the protocol massages from datum plane internally in the communication module.The ioctl system call of intercommunication module by relevant device, the ioctl operation that the information such as length of the virtual memory address pointer of the user's space at the place of protocol massages and data message are submitted virtual drive module.In the ioctl of virtual driving operation, finish of the mapping of the virtual memory of user's space data by copy_from_user () function, and the data of respective length are copied to kernel spacing to the kernel virtual memory.Reception operation by virtual unit is encapsulated as the skb form with data and corresponding apparatus information, by giving the upper-layer protocol stack that runs on Main Processor Unit on the canonical function netif_rx ().
Step 10: when the upper-layer protocol stack sends protocol massages downwards,, utilize standard interface function d ev_start_xmit () function to issue the message that encapsulates with the skb form by the transmit operation of this equipment.In the transmit operation of this equipment, search the corresponding apparatus title in the slave unit formation, the skb message of correspondence is put into tail of the queue corresponding to the transmit queue of this equipment, wait for that the intercommunication module takes out from virtual drive module, and hand over the ACR datum plane to handle.The flow process that virtual drive module is submitted protocol massages to the intercommunication module that runs on user's space as shown in Figure 7, the intercommunication module is carried out poll according to device queue, ioctl operation by relevant device, enough big memory headroom pointer is passed into virtual drive module, finish memory-mapped by copy_from_user () function, and judge that whether data length on the skb node in the transmit queue of relevant device is less than this memory headroom, if satisfy, then corresponding message be passed to user's space by copy_to_user ().Otherwise, notify user's space, apply for the virtual memory space of corresponding size, reading corresponding data after finishing, is deleted this skb node from transmit queue again.
Step 11: in the device queue in virtual drive module, search the corresponding apparatus title, the skb message of correspondence is put into the tail of the queue of the transmit queue of corresponding device, wait for that the intercommunication module takes out this message in the mode of poll.If can not find corresponding equipment, then abandon this message.
The data passes algorithm of the polling mode of intercommunication module in the step 11 and virtual drive module wherein as shown in Figure 7, specifically comprises step:
Step 701~702: read the array node from the array head node.
Step 703: whether the determination number group polling finishes, if finish then return step 701 and read the array node again; If finish then enter next step.
Step 704: judge whether the head node read is effective, if invalid then return step 702 and read again; If effectively then enter next step.
Step 705: the title that from the data of getting, obtains interface.
Step 706: the space of application store data.
Step 707: fill in ifreq-〉name is interface name, the data territory is the structured fingers that comprises application space and length and flag.
Step 708: carry out ioctl and call.
Step 709: value true and false of judging Flag.Be execution in step 710 very then; For vacation then enters the step 711.
Step 710: adjust buffer length, and return step 708
Step 711: judge that whether the Len value is zero, if be zero then return step 702; Non-vanishingly then enter next step.
Step 712: fill in intercommunication module head according to interface name.
Step 713: send data to veneer, and return step 706.
Used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1, the dynamic load and the control method of distributed high-performance router virtual drive module under a kind of multi-user's condition, it is characterized in that, the intercommunication module receives the instruction of the virtual condition of the low-level hardware of sending from the system data maintenance module, call the ioct operation of the basic equipment in the virtual drive module, operating system is carried out operation of equipment.
2, method according to claim 1 is characterized in that, the ioct operation of calling the basic equipment in the virtual drive module further comprises: create virtual unit and cancel the operation of virtual unit in single kernel module.
3, method according to claim 1 is characterized in that, in operating system module is carried out at first needing to finish the registration of basic equipment in the initialization procedure, and the ioct operation of definition basic equipment.
4, method according to claim 2 is characterized in that, creates operation of equipment and further comprises:
1), the RIU in the ACR system detects user's request, need to the system data maintenance module announcement that runs on control plane by the intercommunication module from datum plane then to need the message of device registration;
2) by the ioct1 operation of basic equipment, be submitted to kernel module and want information such as the title of device registration, type, to the equipment of operating system registration respective name, i.e. virtual unit;
3), create transmit queue corresponding to this equipment, be used to store the protocol massages that the needs with the encapsulation of skb form that sent by the upper-layer protocol stack issue;
4), the operation of equipment comprises: operations such as ioct1 operation, reception operation, transmit operation, Down operation and Up.
5, method according to claim 2 is characterized in that, cancels operation of equipment and further comprises:
1), the RIU in the ACR system detects the user and cancels from ACR, then needs the message that need cancel to the system data maintenance module announcement that runs on control plane by the intercommunication module from datum plane;
2), system data maintenance module then sends corresponding instruction to inner communication module, in the intercommunication module, ioct1 operation by basic equipment, the transmit queue of cancelling the equipment of respective name and finishing corresponding device empties, reclaim the resource relevant simultaneously with this equipment, and delete in the node slave unit formation with this equipment, from operating system, cancel this equipment at last.
6, method according to claim 1, it is characterized in that the exception handling of control section of the present invention is promptly when appearance is unusual, need empty processing to various formations, close corresponding socket (Socket) descriptor and from operating system nucleus, cancel corresponding apparatus.
7, a kind of method of exchanges data is characterized in that, comprising:
1), virtual drive module receives the protocol massages from datum plane internally in the communication module, the reception operation of intercommunication module by the ioct1 of respective virtual equipment will data encapsulates with corresponding apparatus information gives the upper-layer protocol that runs on Main Processor Unit stack;
When 2), the upper-layer protocol stack sends protocol massages downwards, transmit operation by this equipment, encapsulated message is put into tail of the queue corresponding to the transmit queue of this equipment with message, waits for that the intercommunication module takes out from corresponding team head with polling mode from virtual drive module.
8, method according to claim 7 is characterized in that, step 1) comprises:
A1, in the intercommunication module when the ioct1 of virtual drive module by respective virtual equipment calls Data transmission, in the ioct1 operation, finish of the mapping of the virtual memory of user's space data to the kernel virtual memory by copy_from_user () function;
A2, corresponding data are copied to kernel spacing;
A3, the operation of the reception by virtual unit are encapsulated as the skb form with data and corresponding apparatus information;
A4, by giving the upper-layer protocol stack that runs on Main Processor Unit on the canonical function netif_rx ().
9, method according to claim 7 is characterized in that step 2) comprising:
B1, issue message with skb form encapsulation by dev_start_xmit () function;
B2, in virtual drive module of the present invention, search the corresponding apparatus title;
B3, search equipment formation are judged the corresponding apparatus title whether in device queue, if in formation, and execution in step B4 then, otherwise message is done discard processing;
B4, the skb message of correspondence is put into the tail of the queue of the transmit queue of corresponding device, wait for that the intercommunication module takes out this message in the mode of poll from team's head.
10, method according to claim 9 is characterized in that, the polling mode algorithm among the step B4 comprises:
C1: the ioct1 by relevant device passs the memory headroom pointer into virtual drive module, the application memory headroom;
C2:, finish memory-mapped by copy_from_user () function by the ioct1 operation;
C3: judge whether the data length on the skb node in the transmit queue of relevant device is less than or equal to the memory headroom of application, if, execution in step C4 then; If not, then execution in step C1, application again;
C4: corresponding message is passed to user's space by copy_to_user ();
C5: this skb node of deletion from transmit queue.
CNB2006100780920A 2006-05-09 2006-05-09 Dynamic loading and control method for router virtual drive module Expired - Fee Related CN100464535C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100780920A CN100464535C (en) 2006-05-09 2006-05-09 Dynamic loading and control method for router virtual drive module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100780920A CN100464535C (en) 2006-05-09 2006-05-09 Dynamic loading and control method for router virtual drive module

Publications (2)

Publication Number Publication Date
CN1881936A true CN1881936A (en) 2006-12-20
CN100464535C CN100464535C (en) 2009-02-25

Family

ID=37519917

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100780920A Expired - Fee Related CN100464535C (en) 2006-05-09 2006-05-09 Dynamic loading and control method for router virtual drive module

Country Status (1)

Country Link
CN (1) CN100464535C (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102497434A (en) * 2011-12-16 2012-06-13 中国科学院计算技术研究所 Establishing method of kernel state virtual network equipment and packet transmitting and receiving methods thereof
CN102546347A (en) * 2010-12-17 2012-07-04 中兴通讯股份有限公司 Implementation method and implementation system for hot plugging of virtual serial port based on proc technology
CN102830983A (en) * 2011-06-14 2012-12-19 上海未来宽带技术及应用工程研究中心有限公司 Method capable of dynamically loading different terminal exchange chip drives
WO2013044516A1 (en) * 2011-09-30 2013-04-04 华为技术有限公司 Method and apparatus for network dialing
CN104461716A (en) * 2014-12-29 2015-03-25 迈普通信技术股份有限公司 Access method of multi-nucleus heterogeneous system and multi-nucleus heterogeneous system
CN107329892A (en) * 2017-06-07 2017-11-07 珠海市杰理科技股份有限公司 Drive method of testing, device, storage medium and its computer equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231709B (en) * 2011-07-04 2013-07-10 清华大学 Control plane structure of virtual routing device and control method thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7496917B2 (en) * 2003-09-25 2009-02-24 International Business Machines Corporation Virtual devices using a pluarlity of processors
CN1254748C (en) * 2003-10-31 2006-05-03 清华大学 Method for accessing distributed and virtualized storage in local network
CN1299207C (en) * 2005-01-21 2007-02-07 清华大学 Large scale resource memory managing method based on network under SAN environment

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546347A (en) * 2010-12-17 2012-07-04 中兴通讯股份有限公司 Implementation method and implementation system for hot plugging of virtual serial port based on proc technology
CN102546347B (en) * 2010-12-17 2016-03-30 中兴通讯股份有限公司 Based on implementation method and the system of the virtual serial port hot plug of proc technology
CN102830983A (en) * 2011-06-14 2012-12-19 上海未来宽带技术及应用工程研究中心有限公司 Method capable of dynamically loading different terminal exchange chip drives
WO2013044516A1 (en) * 2011-09-30 2013-04-04 华为技术有限公司 Method and apparatus for network dialing
CN103535003A (en) * 2011-09-30 2014-01-22 华为技术有限公司 Method and apparatus for network dialing
CN102497434A (en) * 2011-12-16 2012-06-13 中国科学院计算技术研究所 Establishing method of kernel state virtual network equipment and packet transmitting and receiving methods thereof
CN102497434B (en) * 2011-12-16 2014-11-05 中国科学院计算技术研究所 Establishing method of kernel state virtual network equipment and packet transmitting and receiving methods thereof
CN104461716A (en) * 2014-12-29 2015-03-25 迈普通信技术股份有限公司 Access method of multi-nucleus heterogeneous system and multi-nucleus heterogeneous system
CN104461716B (en) * 2014-12-29 2018-06-15 迈普通信技术股份有限公司 The access method and multi-core heterogeneous system of a kind of multi-core heterogeneous system
CN107329892A (en) * 2017-06-07 2017-11-07 珠海市杰理科技股份有限公司 Drive method of testing, device, storage medium and its computer equipment
CN107329892B (en) * 2017-06-07 2020-09-11 珠海市杰理科技股份有限公司 Drive test method, device, storage medium and computer equipment thereof

Also Published As

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

Similar Documents

Publication Publication Date Title
CN1881936A (en) Dynamic loading and control method for router virtual drive module
CN1904873A (en) Inter core communication method and apparatus for multi-core processor in embedded real-time operating system
CN1647054A (en) Network device driving system structure
CN1685326A (en) Bus connection system
CN1655129A (en) Universal method for dynamical management of storage resource under Windows platform
CN101046786A (en) DMA controller and transmission method of implementing high efficient DMA transmission
CN102662910B (en) Network interaction system based on embedded system and network interaction method
CN1928825A (en) Server implementing method and server system
WO2023115852A1 (en) Pcie-based communication method and apparatus, and computer device and readable storage medium
CN101039215A (en) Method and system for maintaining ternary content addressable memory items
CN101957808A (en) Communication method among various CPUs (Central Processing Units), system and CPU
CN1317640C (en) Multi-task application software module management method in real-time operating system environment
CN1295633C (en) Method for multiple CPU communication
US20220206846A1 (en) Dynamic decomposition and thread allocation
CN1925453A (en) Message transferring method and device
CN1471267A (en) Network protocol measuring method and measuring system thereof
CN100351824C (en) Bus system and bus interface connected to bus
WO2023123902A1 (en) Data transmission processing method in chip system, and related device
CN1949203A (en) Architecture of interface target machine for miniature computer system and data transmitting method
CN108829530B (en) Image processing method and device
CN1180340C (en) Cross expanding device and method via radio communication
CN1976310A (en) Communication method and system using bus interface over a network
CN1215422C (en) Network
CN1955890A (en) Method for raising communication speed of HID equipment
CN1642170A (en) Method for accessing logic equipment utilizing ISCSI agreement

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090225

Termination date: 20160509