CN106411739B - A kind of data forwarding method and device - Google Patents
A kind of data forwarding method and device Download PDFInfo
- Publication number
- CN106411739B CN106411739B CN201510466494.7A CN201510466494A CN106411739B CN 106411739 B CN106411739 B CN 106411739B CN 201510466494 A CN201510466494 A CN 201510466494A CN 106411739 B CN106411739 B CN 106411739B
- Authority
- CN
- China
- Prior art keywords
- wqe
- data
- data packet
- interchanger
- sent
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/25—Routing or path finding in a switch fabric
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a kind of data forwarding method and devices, this method comprises: electronic equipment takes out the corresponding WQE of data to be sent from transmit queue when electronic equipment carries out data copy in the way of remote direct memory access RDMA;Corresponding first destination address of the WQE and the first source address are matched with the destination address of each list item in default filter table and source address;If first destination address and the first source address in the default filter table destination address and source address be all different, the WQE is packaged into a pending data packet and is sent to interchanger;And the pending data packet is forwarded to by controller by interchanger;The electronic equipment sends interchanger for the data to be sent after the confirmation message for the pending data packet for receiving interchanger transmission.Method and device disclosed by the invention solves the problems, such as that the data forwarding process time delay of existing RDMA technology is bigger.
Description
Technical field
The present invention relates to field of communication technology more particularly to a kind of data forwarding methods and device.
Background technique
Open Flow technology is to separate control function from the network equipment, safeguards flow table on network devices
(flow table) structure, data grouping are forwarded according to flow table, and the generation of flow table, maintenance, configuration are then by center control
Device manages.The flow table structure of Open Flow is by network processes level flattening, so that the processing of network data meets fine granularity
Processing requirement.In the case where this control forwards separation architecture, the logic control function and higher layer policy of network can pass through center
Controller neatly carries out dynamic management and configuration, can be in the case where not influencing traditional network normal discharge, in existing net
New network framework is realized and disposed in network.
Open Flow is proposed initially as the prototype of software defined network (Software Defined Network, SDN)
When, mainly it is made of Open Flow interchanger and controller two parts.Open Flow interchanger forwards data according to flow table
Packet, represents data forwarding plane;Controller realizes that control function, control logic indicate that control is flat by whole network view
Face.
Number is completed in existing remote direct memory access (Remote Direct Memory Access, RDMA) technology
According to copy, process is following (system architecture that the example uses is as shown in Figure 1):
Host side is using the raw requests of remote direct memory access data as a Work Queue Elements (work queue
Element, WQE) it stores into transmit queue (Send Queue, SQ);
When carrying out data access, WQE is taken out from the SQ of RDMA, the data for needing to send are taken out according to WQE, cutting should
Data and the data packet for being packaged into identical destination address and source address, are sent to interchanger one by one.
Interchanger is tabled look-up one by one according to the destination address and source address of data packet, not can determine that the road of data packet if tabled look-up
Forwarding list item under diameter, then be reported to controller for data packet.
Controller is forwarding list item under each data packet accessed path for reporting.
According to above-mentioned RDMA) technical data copy procedure it is recognized that while control plane can by control logic concentrate dispose
To whole network, but the mass data that the reading and writing data request cutting for working as RDMA application obtains pours into Forwarding plane, then passes through
When Forwarding plane pours into control plane, Forwarding plane and control plane will enter an invalid busy state, to will cause
Following problems:
Whole process time delay is bigger, and the data packet of many identical destination addresses and source address needs to repeat in the process
It tables look-up forwarding list item under determining path, so cause a large amount of non-productive work, not only a large amount of moneys of consumption interchangers and controller
Source also postpones the processing of effective data packets.
Summary of the invention
The embodiment of the present invention provides a kind of data forwarding method and device, and method and device provided by the present invention solves existing
The problem for having the data forwarding process time delay of RDMA technology bigger.
In a first aspect, providing data forwarding method, this method is specifically included:
When electronic equipment carries out data copy in the way of remote direct memory access RDMA, the electronic equipment is from hair
It send and takes out the corresponding Work Queue Elements WQE of data to be sent in queue SQ;Wherein, the original of the WQE and the data to be sent
Begin request correspondence;
The electronic equipment will be each in corresponding first destination address of the WQE and the first source address and default filter table
The destination address and source address of list item are matched;
If first destination address and destination address and source address in the first source address and the default filter table
It is all different, the WQE is packaged into a pending data packet and is sent to interchanger by the electronic equipment;
The pending data packet is forwarded to controller by interchanger by the electronic equipment;And receiving interchanger
After the confirmation message for the pending data packet sent, interchanger is sent by the data to be sent.
It with reference to first aspect, in the first possible implementation, include that data are unique in the pending data packet
Mark, the data unique identification is for uniquely indicating the WQE;
It sends the data to be sent to before interchanger, further includes:
The WQE is determined according to the data unique identification;
Obtain the determining corresponding data to be sent of the WQE.
With reference to first aspect or the first possible implementation of first aspect, in second of possible implementation
In, the WQE is packaged into a pending data packet and is sent to interchanger, comprising:
The WQE is stored in queue to be processed;
WQE in the queue to be processed is packaged into a pending data packet and is sent to interchanger.
The possible implementation of second with reference to first aspect, in the third possible implementation, will it is described to
WQE in processing queue is packaged into a pending data packet and is sent to interchanger, comprising:
When determine the WQE quantity in the queue to be processed be greater than preset threshold, then by setting in the queue to be processed
The WQE of fixed number amount encapsulates a pending data packet and is sent to interchanger;Or
The queue to be processed is detected according to predetermined period, and the WQE in the queue to be processed that will test is to encapsulating
Interchanger is sent at a pending data packet.
Any one with reference to first aspect or in the first to three kind of possible implementation of first aspect,
In four kinds of possible implementations, by corresponding first destination address of each Work Queue Elements and the first source address and preset
Before destination address and source address in filter table are matched, further includes:
With obtaining corresponding second destination address of WQE that forward-path has been obtained in the transmit queue SQ and the second source
Location, and the default filter table is generated according to second destination address and the second source address.
Second aspect provides a kind of data forwarding method, and this method specifically includes:
Interchanger receives the transmission when electronic equipment carries out data copy in the way of remote direct memory access RDMA
Pending data packet;
The interchanger is identified according to the inquiry in the pending data packet determines that the pending data packet is for inquiring
The pending data packet is then forwarded to controller by the data packet of data forwarding paths;
The interchanger receives the feedback information that controller is sent, include in the feedback information forwarding data flow entry and
Confirmation message;
The confirmation message is sent the electronic equipment by the interchanger;
The interchanger receives the data that the electronic equipment is sent, and forwards the number according to the flow entry
According to.
In conjunction with second aspect, in the first possible implementation, identified according to the inquiry in the pending data packet
Determine that the pending data packet is the data packet for inquiring data forwarding paths, comprising:
The inquiry mark that obtains inquiry mark from the pending data packet, and will acquire with it is preset
Inquiry list item is matched, and identifies identical mark with the inquiry if be matched in the inquiry list item, it is determined that institute
Stating pending data packet is the data packet for inquiring data forwarding paths.
The third aspect provides a kind of electronic equipment, which specifically includes:
Obtain module, when electronic equipment carries out data copy by remote direct memory access RDMA in the way of, be used for from
The corresponding Work Queue Elements WQE of data to be sent is taken out in transmit queue SQ, wherein the WQE and the data to be sent
Raw requests are corresponding;
Filtering module, for will in corresponding first destination address of the WQE and the first source address and default filter table it is every
The destination address and source address of a list item are matched;
Package module, if the destination address in first destination address and the first source address and the default filter table
It is all different with source address, for the WQE to be packaged into a pending data packet;
Transceiver module, for the pending data packet to be forwarded to controller by interchanger;And receiving exchange
After the confirmation message for the pending data packet that machine is sent, interchanger is sent by the data to be sent.
In conjunction with the third aspect, in the first possible implementation, the transceiver module is also used to add data unique
It is identified in the pending data packet, and the WQE is determined according to the data unique identification;Obtain the determining WQE
The corresponding data to be sent;Wherein, the data unique identification is for uniquely indicating the WQE.
In conjunction with the possible implementation of the first of the third aspect or the third aspect, in second of possible implementation
In, package module is specifically used for for the WQE being stored in queue to be processed;WQE in the queue to be processed is packaged into one
A pending data packet is sent to interchanger.
In conjunction with second of possible implementation of the third aspect, in the third possible implementation, the encapsulation
Module is specifically used for being greater than preset threshold when the WQE quantity in the determining queue to be processed, then will be in the queue to be processed
Setting quantity WQE encapsulate a pending data packet be sent to interchanger;Or it is described wait locate according to predetermined period detection
Queue is managed, and the WQE in the queue to be processed that will test is sent to interchanger to a pending data packet is packaged into.
In conjunction with any one in the first to three kind of possible implementation of the third aspect or the third aspect,
In four kinds of possible implementations, the electronic equipment further include:
Generation module, for obtaining corresponding second destination WQE for having obtained forward-path in the transmit queue SQ
Location and the second source address, and the default filter table is generated according to second destination address and the second source address.
Fourth aspect provides a kind of interchanger, which specifically includes:
Identification module, for receiving when electronic equipment carries out data copy in the way of remote direct memory access RDMA
The pending data packet of transmission identifies according to the inquiry in the pending data packet and determines that the pending data packet is for inquiring
The pending data packet is then forwarded to controller by the data packet of the data forwarding paths;
Receiving module includes the flow table of forwarding data for receiving the feedback information of controller transmission, in the feedback information
Item and confirmation message;
Forwarding module for sending the electronic equipment for the confirmation message, and receives the electronic equipment and sends
The data, the data are forwarded according to the flow entry.
In conjunction with fourth aspect, in the first possible implementation, the identification module is specifically used for from described to from
The inquiry mark is obtained in reason data packet, and the inquiry mark that will acquire is matched with preset inquiry list item,
Identical mark is identified with the inquiry if be matched in the inquiry list item, it is determined that the pending data packet is to use
In the data packet of inquiry data forwarding paths.
In the embodiment of the present invention, if electronic equipment carries out data copy by RDMA technology, will not be to be sent
Data switch to small data block and are sent to before interchanger, and the corresponding WQE of data to be sent is first packaged by electronic equipment
One data packet, and the data are forwarded a packet to by controller by interchanger, so that controller determines data to be sent for WQE
Corresponding path, and determining path is sent to interchanger, it is directed to so as to avoid interchanger and is cut by the data to be sent
The multiple cutting data blocks with same source address and destination address separated, will always remove forwarding list item under controller request path
The problem of, so as to avoid the data block for many identical destination addresses and source address occurred in the prior art, interchanger
Under needing to repeat to table look-up determining path to controller the problem of forwarding list item, therefore the processing money of interchanger and controller is saved
Source improves the forward efficiency of data to be sent.
Detailed description of the invention
Fig. 1 is the system structure diagram that remote direct memory access technology completes data copy in the prior art;
Fig. 2 is a kind of flow diagram for data forwarding method that the embodiment of the present invention one provides;
Fig. 3 is a kind of flow diagram of data forwarding method provided by Embodiment 2 of the present invention;
Fig. 4 is a kind of flow diagram for data forwarding method that the embodiment of the present invention three provides;
Fig. 5 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of interchanger provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of data forwarding system provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
Existing remote direct memory access (Remote Direct Memory Access, RDMA) is to solve network
In transmission servers' data handle delay and generate.When carrying out the storage of data by RDMA technology, RDMA passes through net
Network moves quickly into data the memory block of the directly incoming computer of data in remote system stored device from a system, and
It does not have any impact to operating system, so there is no need to use the processing function of too many computer.Based on RDMA technology, originally
Inventive embodiments provide a kind of data forwarding method, further retouch in detail to work of the embodiment of the present invention with reference to the accompanying drawings of the specification
It states:
Embodiment one
As shown in Fig. 2, the embodiment of the present invention provides a kind of data forwarding method, this method is specifically included:
Step 201, when carrying out data copy in the way of RDMA when electronic equipment, the electronic equipment is from transmit queue
The corresponding Work Queue Elements (work queue element, WQE) of data to be sent are taken out in (Send Queue, SQ);
Wherein, the WQE is corresponding with the raw requests of the data to be sent;And the raw requests refer to that electronic equipment needs
When sending data, request generated is sent for data.If in data forwarding process, data need will be original to be sent
Data be cut into small data block and retransmit, that raw requests raw requests are then the original data to be sent being directed to, and
It is not the data block after cutting.
Step 202, electronic equipment will be in corresponding first destination address of the WQE and the first source address and default filter table
The destination address and source address of each list item are matched;If first destination address and the first source address are preset with described
Destination address and source address in filter table are all different, then are transferred to step 203;Otherwise, directly the corresponding data of the WQE are cut
Distribution is sent to interchanger;
Because the ID of distinct device can be identical in different domains, in true embodiment of the invention, source address can
To be formed by source protection domain identifier and source identifier combination, wherein source protection domain identifier is unique mark of the affiliated protected field of source device
Know;Source is identified as the unique identification of source device.Destination address can protect domain identifier and purpose mark to combine and formed by purpose,
Middle purpose protected field is identified as the unique identification of the affiliated protected field of purpose equipment;Purpose mark is the unique identification of purpose equipment.
Step 203, the WQE is packaged into a pending data packet and is sent to interchanger;It will be described by interchanger
Pending data packet is forwarded to controller;
So that controller determines the corresponding stream of the WQE after the pending data packet is forwarded to controller by interchanger
List item (including the forward-path for forwarding data to be sent in the flow entry), controller sends out flow entry after determining flow entry
It is sent to interchanger;Below if can be carried out according to the flow entry after interchanger receives the corresponding data to be sent of the WQE
Forwarding.
In this embodiment, interchanger judges pending data packet for the data of query path according to preset judgment rule
After packet, then the pending data packet is directly transparent to controller, so that controller is according to asking in the pending data packet
Ask information to determine the forward-path of data to be sent (forward-path adds in the flow entry that controller feeds back to interchanger).
Step 204, which is forwarded to controller for the pending data packet by interchanger;And it is receiving
After the confirmation message for the pending data packet that interchanger is sent, interchanger is sent by the data to be sent.
In embodiments of the present invention, by corresponding first destination address of each Work Queue Elements and the first source address and in advance
If this method may further comprise: before the destination address and source address in filter table are matched
With obtaining corresponding second destination address of WQE that forward-path has been obtained in the transmit queue SQ and the second source
Location, and the default filter table is generated according to second destination address and the second source address.
Also, the filter table can carry out the tune of adaptability according to the variation for having obtained forward-path WQE in transmit queue SQ
It is whole.
In the prior art, if electronic equipment copies data by RDMA mode, directly the data can be cut into multiple
Small data block is subsequently sent to interchanger and is forwarded;If there is no data block (requesting corresponding data) in interchanger
Corresponding forward-path then needs to send the request of to acquisite approachs to controller for each data block, and then controller is directed to
Corresponding path is fed back in each request.Although the corresponding multiple data blocks of same request, path corresponding to multiple data blocks
It is the same, so then will lead to the waste of controller resource according to the scheme of the prior art.For this problem, the present invention is implemented
In scheme provided by example, if electronic equipment carries out data copy by RDMA technology, data to be sent are not being cut
It changes small data block into be sent to before interchanger, the corresponding WQE of data to be sent is first packaged into a number by electronic equipment
The data are forwarded a packet into controller according to packet, and by interchanger, so that controller determines that data to be sent are corresponding for WQE
Path, and determining path is sent to interchanger is directed to so as to avoid interchanger and to be syncopated as by the data to be sent
Multiple cutting data blocks with same source address and destination address will always go asking for forwarding list item under controller request path
Topic, so as to avoid the data block for many identical destination addresses and source address occurred in the prior art, interchanger needs
Under repetition tables look-up determining path to controller the problem of forwarding list item, therefore the process resource of interchanger and controller is saved, mentioned
The high forward efficiency of data to be sent.
Because electronic equipment may initiate the request of data copy for different data, when if there is multiple WQE,
WQE, which is then packaged into the specific implementation that a pending data packet is sent to interchanger, may is that
The WQE is stored in queue to be processed;
WQE in the queue to be processed is packaged into a pending data packet and is sent to interchanger.
Wherein, the condition that can trigger equipment packages pending data packet may include a variety of, two kinds of optimizations presented below
Embodiment, specifically include:
One, when determine the WQE quantity in the queue to be processed be greater than preset threshold, then will be set in the queue to be processed
The WQE of fixed number amount is packaged into a pending data packet and is sent to interchanger;
Two, the queue to be processed is detected according to predetermined period, and the WQE in the queue to be processed that will test is to sealing
It dresses up a pending data packet and is sent to interchanger.
After electronic equipment has sent multiple raw requests to controller, if controller has fed back relevant information,
In order to find the corresponding data of feedback information and be forwarded, then can be accomplished by the following way:
In the entire forwarding process of pending data packet, preset data unique identification is all carried, the data unique identification
For uniquely indicating the WQE, then before the data to be sent are sent interchanger by electronic equipment, further comprise: root
The WQE is determined according to the data unique identification;Obtain the determining corresponding data to be sent of the WQE.
Embodiment two
As shown in figure 3, being used for scheme provided by the more detailed description embodiment of the present invention below for specific
Environment is provided for the embodiments of the invention scheme and is described further, when electronic equipment utilizes remote direct memory access
When RDMA technology carries out data copy, specifically include:
Step 301, the electronic equipment for initiating data copy request presets filter table, includes multiple filter tables in the filter table
, each list item indicates the directory entry for having obtained forward-path;Wherein each list item includes that key message may is that mesh
Id, source id, purpose protected field (Protection Domain, pd) pd, source pd, stream identification and status indicator;List item knot
Structure is as shown in table 1:
Purpose id | Source id | Purpose pd | Source pd |
Table 1
The parameter meaning of each key message is:
Purpose id and source id: the unique identification of purpose equipment and source device;
Purpose pd and source pd: the unique identification of purpose equipment and the affiliated protected field of source device, because can in different domains
To indicate distinct device with same id, so in order to determine unique destination address and source address, then need purpose id and
Purpose pd combines to form destination address;It combines source id and source pd to form source address.
Step 302, electronic equipment takes out WQE from SQ, and obtains the corresponding purpose id of the WQE, source id, purpose pd and source
pd;
Wherein, the corresponding stream identification of the WQE is also obtained in order to uniquely identify the WQE.
Step 303, electronic equipment by the destination address stored in the corresponding destination address of WQE and source address and filter table and
Source address is matched, and the WQE is put into await orders queue or execution queue according to matching result, wherein queue of awaiting orders is used
The transmission instruction in path is not built up also in storage;Queue is executed for storing the instruction for having built up transmitting path.
In this embodiment, destination address can be indicated with purpose id and purpose pd;Source address can use source id and source pd
Mark, if purpose id not corresponding with WQE, source id, purpose pd and the identical list item of source pd in filter table, by the WQE
It is put into queue of awaiting orders;When the state of WQE is adjusted to execution state, then the WQE can be put into and be executed in queue;It awaits orders queue
In WQE carry purpose id, source id, purpose pd, source pd and the stream identification of the WQE;
If having purpose id corresponding with WQE, source id, purpose pd and the identical list item of source pd in filter table, by the WQE
It is put into and executes in queue.
Step 304, electronic equipment selects WQE to form a special data packet with certain period from queue of awaiting orders
SQ_WQE_WAIT sends the packet to interchanger.
SQ_WQE_WAIT includes the partial information of a WQE, multiple WQE or WQE.Choose WQE's from queue of awaiting orders
Principle may is that first to be chosen in sequence, can be according to certain plan for the transmission instruction established for a long time without completion path
Slightly preferential selection.
Step 305, after interchanger receives SQ_WQE_WAIT, judge whether it is the data packet of request path, if
It is then to be forwarded directly to controller, after the confirmation data packet SQ_WQE_OK and flow entry for receiving controller feedback, storage
The flow entry, and will confirm that data packet SQ_WQE_OK is transmitted to electronic equipment;
Interchanger forwarding data packet SQ_WQE_WAIT and SQ_WQE_OK can be realized by mode in detail below:
Preparatory two flow entrys, after a data packet received for identification is special packet SQ_WQE_WAIT, directly
Packing is reported to controller;Another data packet received for identification is transmitted to phase after being feedback data packet SQ_WQE_OK
The host answered.Interchanger is to report controller immediately after receiving SQ_WQE_WAIT, after controller decision forward rule, control
Device processed sends SQ_WQE_OK and flow entry to the interchanger.
Step 306, after electronic equipment receives the SQ_WQE_OK that interchanger forwarding comes, according to what is carried in SQ_WQE_OK
Stream identification finds out the corresponding WQE of the stream identification from the SQ that awaits orders, which is put into and executes SQ.
Step 307, taken out according to WQE and need the data that send, the cutting data and be packaged into identical destination address and
The data packet is sent to interchanger by the data packet of source address one by one;Data destination address is forwarded a packet to by interchanger to correspond to
Equipment.
In this embodiment, it is all corresponding from acquisition WQE progress in SQ is executed that electronic equipment, which carries out data copy operation,
It is long-range direct just to trigger electronic equipment progress so the WQE in the SQ that awaits orders is put into after executing SQ by electronic equipment for data acquisition
Memory access operation.
Embodiment three
Such as Fig. 4, the embodiment of the present invention also provides another data forwarding method, when electronic equipment utilization is long-range directly interior
When accessing RDMA technology progress data copy, this method is specifically included:
Step 401, interchanger is received when electronic equipment carries out data copy in the way of remote direct memory access RDMA
When the pending data packet that sends, identified according to the inquiry in the pending data packet and determine that the pending data packet is for looking into
The data packet of the data forwarding paths is ask, then the pending data packet is forwarded to controller;
Wherein, it is identified according to the inquiry in the pending data packet and determines that the pending data packet is for inquiring the number
Include: according to the data packet of forward-path
The inquiry mark that obtains inquiry mark from the pending data packet, and will acquire with it is preset
Inquiry list item is matched, and identifies identical mark with the inquiry if be matched in the inquiry list item, it is determined that institute
Stating pending data packet is the data packet for inquiring data forwarding paths.
Step 402, the feedback information that controller is sent is received, includes the flow entry for forwarding the data in the feedback information
And confirmation message;
Step 403, the electronic equipment is sent by the confirmation message;
Step 404, the data that the electronic equipment is sent are received, and (are wrapped in the flow entry according to the flow entry
Include the forward-path for forwarding the data) the forwarding data.
In this embodiment, the pending data packet transparent transmission for the request forward-path that interchanger needs to send electronic equipment
To controller, controller is allowed to issue corresponding forward-path for the request.When controller is determining that request is corresponding
After forward-path, then need to feed back forward-path and confirmation message to interchanger and the electronic equipment, because data packet is logical
It crosses interchanger and is forwarded to other equipment, so then being updated with the forward-path received after interchanger receives forward-path
The converting route of itself;In this embodiment, after electronic equipment is it needs to be determined that interchanger has the corresponding forward-path of request, then
The forwarding of data is carried out, so the confirmation message is forwarded to electronics after interchanger receives the confirmation message that controller is fed back
Equipment, so that the data that electronic equipment can be sent according to the confirmation message determination.
In this embodiment, interchanger needs the confirmation message for feeding back controller to be forwarded to electronic equipment, implements
Mode may is that
It will confirm that setting identification is matched with default forwarding table in information, if with a certain list item in default forwarding table
It is identical, then the confirmation message is forwarded to electronic equipment.
Because path forwarding request has passed through the processing of two equipment, in order to guarantee that electronic equipment is receiving confirmation
Information can data to be forwarded corresponding to the corresponding determination confirmation message, so when generating request, then need to
Data to be forwarded gives the stream identification for uniquely indicating the data, when generating the request for obtaining forward-path, at this
Carry the stream identification in request, interchanger is all adding the data flow handling the relevant message receipts of the request with controller
Mark, so that being able to know that and receiving really in the treatment process of data and when electronic equipment finally receives confirmation message
Recognize data corresponding to message.
Example IV
As shown in figure 5, the embodiment of the present invention provides a kind of electronic equipment, which is specifically included:
Module 501 is obtained to be used for when electronic equipment carries out data copy in the way of remote direct memory access RDMA
From the corresponding Work Queue Elements (WQE) of taking-up data to be sent in transmit queue (SQ);Wherein, the WQE with it is described to be sent
The raw requests of data are corresponding;
Filtering module 502, for will be in corresponding first destination address of the WQE and the first source address and default filter table
The destination address and source address of each list item are matched;
Package module 503, if the purpose in first destination address and the first source address and the default filter table
Address and source address be not identical, for the WQE to be packaged into a pending data packet;
Wherein, which is specifically used for for the WQE being stored in queue to be processed;And by the team to be processed
WQE in column is packaged into a pending data packet and is sent to interchanger.
The preset condition can be realized using various ways in a particular application, provide two kinds of optimizations in this embodiment
Mode, specifically:
The package module 503 is specifically used for being greater than preset threshold when the WQE quantity in the determining queue to be processed, then will
The WQE of setting quantity in the queue to be processed encapsulates a pending data packet and is sent to interchanger;Or according to default
Queue to be processed described in cycle detection, and the WQE in the queue to be processed that will test is to being packaged into a pending data
Packet is sent to interchanger.
Transceiver module 504, for the pending data packet to be forwarded to controller by interchanger;And it is handed over receiving
It changes planes after the confirmation message for the pending data packet of transmission, sends interchanger for the data to be sent.
In order to the request that will be forwarded between each equipment it is corresponding with data on, so one can also be added in the request only
The data unique identification of one mark WQE, so the transceiver module 504 is also used to add data unique identification to the number to be processed
According in packet, and the WQE is determined according to the data unique identification;Obtain the determining corresponding number to be sent of the WQE
According to;Wherein, the data unique identification is for uniquely indicating the WQE.
In the embodiment, the electronic equipment further include:
Generation module, for obtaining corresponding second destination WQE for having obtained forward-path in the transmit queue SQ
Location and the second source address, and the default filter table is generated according to second destination address and the second source address.
Further, because the WQE in transmit queue SQ is real-time update, which can also be periodic
The update adjustment of adaptability is carried out according to the variation of transmit queue.
Embodiment five
As shown in fig. 6, the embodiment of the present invention also provides a kind of interchanger, when the electronic equipment is deposited using remote direct memory
When RDMA technology being taken to carry out data copy, which is specifically included:
Identification module 601 is copied for receiving when electronic equipment carries out data in the way of remote direct memory access RDMA
The pending data packet sent when shellfish identifies according to the inquiry in the pending data packet and determines that the pending data packet is to be used for
The data packet of the data forwarding paths is inquired, then the pending data packet is forwarded to controller;
Wherein, which is specifically used for obtaining the inquiry mark from the pending data packet, and will obtain
The inquiry mark got is matched with preset inquiry list item, is looked into if be matched in the inquiry list item with described
It askes and identifies identical mark, it is determined that the pending data packet is the data packet for inquiring data forwarding paths.
Receiving module 602 includes the stream of forwarding data for receiving the feedback information of controller transmission, in the feedback information
List item and confirmation message;
Forwarding module 603 for sending the electronic equipment for the confirmation message, and receives the electronic equipment hair
The data sent forward the data according to the flow entry.
Embodiment six
As shown in fig. 7, the embodiment of the present invention provides a kind of data forwarding system, which includes:
Electronic equipment 701, for taking out the corresponding Work Queue Elements WQE of data to be sent from transmit queue SQ;It will
The destination address and source address of each list item in corresponding first destination address of the WQE and the first source address and default filter table
It is matched, if first destination address and destination address and source address in the first source address and the default filter table
It is not identical;The WQE is packaged into a pending data packet and is sent to interchanger;It is receiving for the pending data
After the confirmation message of packet, interchanger is sent by the data to be sent;Wherein, the WQE and the data to be sent is original
Request corresponds to
Interchanger 702, the pending data packet sent for receiving the electronic equipment, according to the pending data packet
In inquiry identify and determine that the pending data packet is data packet for inquiring the data forwarding paths, then by described wait locate
Reason data packet is forwarded to controller;It include forwarding the number in the feedback information after receiving the feedback information that controller is sent
According to flow entry and confirmation message;The electronic equipment is sent by the confirmation message, and receives the electronic equipment and sends
The data, the data are forwarded according to the flow entry;
Controller 703 for the pending data packet that desampler forwarding comes, and is obtained from the pending data packet
WQE according to the source address and the corresponding forward-path of destination address acquisition in the WQE, and forward-path and confirmation message is sent out
It is sent to interchanger.
Said one or multiple technical solutions in the embodiment of the present application, at least have the following technical effect that:
In the prior art, if electronic equipment copies data by RDMA technology, directly the data can be cut into multiple
Small data block is subsequently sent to interchanger and is forwarded;If there is no data block (requesting corresponding data) in interchanger
Corresponding forward-path then needs to send the request of to acquisite approachs to controller for each data block, and then controller is directed to
Corresponding path is fed back in each request.Although the corresponding multiple data blocks of same request, path corresponding to multiple data blocks
It is the same, so then will lead to the waste of controller resource according to the scheme of the prior art.For this problem, the present invention is implemented
In example, if electronic equipment carries out data copy by RDMA technology, data to be sent are not being switched to small data
Block is sent to before interchanger, and the corresponding WQE of data to be sent is first packaged into a data packet by electronic equipment, and passes through friendship
It changes planes and the data is forwarded a packet into controller, so that controller determines the corresponding path of data to be sent for WQE, and will determine
Path be sent to interchanger, so as to avoid interchanger be directed to by the data to be sent be syncopated as have same source address
With multiple cutting data blocks of destination address, the problem of always removing forwarding list item under controller request path, so as to avoid existing
There is the data block for many identical destination addresses and source address occurred in technology, interchanger needs to repeat to table look-up to controller
The problem of determining forwarding list item under path, therefore the process resource of interchanger and controller has been saved, improve data to be sent
Forward efficiency.
Method of the present invention is not limited to embodiment described in specific embodiment, those skilled in the art according to
Technical solution of the present invention obtains other embodiments, also belongs to the scope of the technical innovation of the present invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (14)
1. a kind of data forwarding method characterized by comprising
When electronic equipment carries out data copy in the way of remote direct memory access RDMA, the electronic equipment from send team
The corresponding Work Queue Elements WQE of data to be sent is taken out in column SQ, wherein the WQE is asked with the original of data to be sent
Ask corresponding;
The electronic equipment is by each list item in corresponding first destination address of the WQE and the first source address and default filter table
Destination address and source address matched;
If destination address and source address in first destination address and the first source address and the default filter table are not
Identical, the WQE is packaged into a pending data packet and is sent to interchanger by the electronic equipment;
The pending data packet is forwarded to controller by interchanger by the electronic equipment;
The electronic equipment receive interchanger transmission the confirmation message for the pending data packet after, will described in
It sends data and is sent to interchanger.
2. the method as described in claim 1, which is characterized in that it include data unique identification in the pending data packet, it should
Data unique identification is for uniquely indicating the WQE;
It sends the data to be sent to before interchanger, further includes:
The WQE is determined according to the data unique identification;
Obtain the determining corresponding data to be sent of the WQE.
3. method according to claim 1 or 2, which is characterized in that the WQE is packaged into a pending data packet and is sent
To interchanger, comprising:
The WQE is stored in queue to be processed;
WQE in the queue to be processed is packaged into a pending data packet and is sent to interchanger.
4. method as claimed in claim 3, which is characterized in that the WQE in the queue to be processed is packaged into one wait locate
Reason data packet is sent to interchanger, comprising:
When determine the WQE quantity in the queue to be processed be greater than preset threshold, then by the setting number in the queue to be processed
The WQE of amount encapsulates a pending data packet and is sent to interchanger;Or
The queue to be processed is detected according to predetermined period, and the WQE in the queue to be processed that will test is packaged into one
Pending data packet is sent to interchanger.
5. method according to claim 1 or 2, which is characterized in that by corresponding first destination of each Work Queue Elements
Location and the first source address are with the destination address in default filter table and before source address matched, further includes:
Corresponding second destination address of WQE and the second source address that forward-path has been obtained in the transmit queue SQ are obtained, and
The default filter table is generated according to second destination address and the second source address.
6. a kind of data forwarding method characterized by comprising
Interchanger receive when electronic equipment carries out data copy in the way of remote direct memory access RDMA transmission wait locate
Manage data packet;
The interchanger is identified according to the inquiry in the pending data packet determines that the pending data packet is for inquiring data
The pending data packet is then forwarded to controller by the data packet of forward-path;
The interchanger receives the feedback information that controller is sent, and includes the flow entry and confirmation of forwarding data in the feedback information
Information;
The confirmation message is sent the electronic equipment by the interchanger;
The interchanger receives the data that the electronic equipment is sent, and forwards the data according to the flow entry.
7. method as claimed in claim 6, which is characterized in that being determined according to the inquiry mark in the pending data packet should be to
Processing data packet is the data packet for inquiring data forwarding paths, comprising:
The inquiry mark and preset inquiry that obtains the inquiry mark from the pending data packet, and will acquire
List item is matched, and identifies identical mark with the inquiry if be matched in the inquiry list item, it is determined that it is described to
Processing data packet is the data packet for inquiring data forwarding paths.
8. a kind of electronic equipment, which is characterized in that the electronic equipment specifically includes:
Module is obtained, when electronic equipment carries out data copy in the way of remote direct memory access RDMA, is used for from transmission
The corresponding Work Queue Elements WQE of data to be sent is taken out in queue SQ;Wherein, the WQE and the data to be sent is original
Request corresponds to;
Filtering module is used for each table in corresponding first destination address of the WQE and the first source address and default filter table
The destination address and source address of item are matched;
Package module, if first destination address and destination address and source in the first source address and the default filter table
Address is all different, for the WQE to be packaged into a pending data packet;
Transceiver module, for the pending data packet to be forwarded to controller by interchanger;And receiving interchanger hair
After the confirmation message for the pending data packet sent, interchanger is sent by the data to be sent.
9. electronic equipment as claimed in claim 8, which is characterized in that the transceiver module is also used to add data unique identification
The WQE is determined into the pending data packet, and according to the data unique identification;It is corresponding to obtain the determining WQE
The data to be sent;Wherein, the data unique identification is for uniquely indicating the WQE.
10. electronic equipment as claimed in claim 8 or 9, which is characterized in that the package module is specifically used for the WQE
It is stored in queue to be processed;And the WQE in the queue to be processed is packaged into a pending data packet and is sent to interchanger.
11. electronic equipment as claimed in claim 10, which is characterized in that the package module be specifically used for when determine it is described to
The WQE quantity handled in queue is greater than preset threshold, then by the WQE of the setting quantity in the queue to be processed encapsulation one to
Processing data packet is sent to interchanger;Or the queue to be processed is detected according to predetermined period, and what be will test is somebody's turn to do wait locate
WQE in reason queue is packaged into a pending data packet and is sent to interchanger.
12. electronic equipment as claimed in claim 8 or 9, which is characterized in that the electronic equipment further include:
Generation module, for obtain obtained in the transmit queue SQ forward-path corresponding second destination address of WQE and
Second source address, and the default filter table is generated according to second destination address and the second source address.
13. a kind of interchanger, which is characterized in that the interchanger specifically includes:
Identification module, for receiving the transmission when electronic equipment carries out data copy in the way of remote direct memory access RDMA
Pending data packet, according in the pending data packet inquiry identify determine the pending data packet be for inquiring data
The pending data packet is then forwarded to controller by the data packet of forward-path;
Receiving module, include for receiving the feedback information of controller transmission, in the feedback information forwarding data flow entry and
Confirmation message;
Forwarding module for sending the electronic equipment for the confirmation message, and receives the institute that the electronic equipment is sent
Data are stated, the data are forwarded according to the flow entry.
14. interchanger as claimed in claim 13, which is characterized in that the identification module is specifically used for from the number to be processed
It is identified according to the inquiry is obtained in packet, and the inquiry mark that will acquire is matched with preset inquiry list item, if
It is matched in the inquiry list item and identifies identical mark with the inquiry, it is determined that the pending data packet is for looking into
Ask the data packet of data forwarding paths.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510466494.7A CN106411739B (en) | 2015-07-31 | 2015-07-31 | A kind of data forwarding method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510466494.7A CN106411739B (en) | 2015-07-31 | 2015-07-31 | A kind of data forwarding method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106411739A CN106411739A (en) | 2017-02-15 |
CN106411739B true CN106411739B (en) | 2019-06-21 |
Family
ID=58007992
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510466494.7A Active CN106411739B (en) | 2015-07-31 | 2015-07-31 | A kind of data forwarding method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106411739B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109391522B (en) * | 2017-08-14 | 2021-04-20 | 华为技术有限公司 | RDMA-based network traffic determination method, forwarding device, analysis server, and storage medium |
CN109691039B (en) | 2018-01-16 | 2020-04-28 | 华为技术有限公司 | Message transmission method and device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6948004B2 (en) * | 2001-03-28 | 2005-09-20 | Intel Corporation | Host-fabric adapter having work queue entry (WQE) ring hardware assist (HWA) mechanism |
US7013353B2 (en) * | 2001-03-30 | 2006-03-14 | Intel Corporation | Host-fabric adapter having an efficient multi-tasking pipelined instruction execution micro-controller subsystem |
US9185166B2 (en) * | 2012-02-28 | 2015-11-10 | International Business Machines Corporation | Disjoint multi-pathing for a data center network |
US9875204B2 (en) * | 2012-05-18 | 2018-01-23 | Dell Products, Lp | System and method for providing a processing node with input/output functionality provided by an I/O complex switch |
CN103067280B (en) * | 2012-12-26 | 2016-06-08 | 华为技术有限公司 | Message processing method and device |
CN104301238A (en) * | 2014-10-17 | 2015-01-21 | 福建星网锐捷网络有限公司 | Message processing method, device and system |
-
2015
- 2015-07-31 CN CN201510466494.7A patent/CN106411739B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN106411739A (en) | 2017-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105554065B (en) | Handle method, converting unit and the applying unit of message | |
CN104283806B (en) | Business chain processing method and equipment | |
CN101841470B (en) | High-speed capturing method of bottom-layer data packet based on Linux | |
CN108475244A (en) | Accelerate network packet processing | |
KR102025680B1 (en) | SDN based ARP implementation method and device | |
CN102047619B (en) | Methods, systems, and computer readable media for dynamically rate limiting slowpath processing of exception packets | |
CN105553880A (en) | Date processing method and device in software-defined networking | |
KR101938623B1 (en) | Openflow communication method, system, controller, and service gateway | |
JP2006101051A5 (en) | ||
CN103312720A (en) | Data transmission method, equipment and system | |
US11316804B2 (en) | Forwarding entry update method and apparatus in a memory | |
US20160277292A1 (en) | Network service processing method and apparatus | |
CN106411739B (en) | A kind of data forwarding method and device | |
CN104301229B (en) | Data packet forwarding method, route table generating method and device | |
CN105531967A (en) | Message transmission method and device and communication system | |
CN105099721A (en) | Multicast member maintenance method and equipment | |
CN105379210A (en) | Data flow processing method and apparatus | |
CN101022414B (en) | Message retransmitting method and apparatus | |
CN106713010A (en) | Communication method and system for avionics network system | |
CN107086960B (en) | Message transmission method and device | |
CN109462497B (en) | Method, device, equipment and storage medium for transmitting management data | |
KR101952187B1 (en) | Method and apparatus for processing service node ability, service classifier and service controller | |
CN105512075A (en) | High-speed output interface circuit, high-speed input interface circuit and data transmission method | |
CN104391751A (en) | Synchronization method and device for algorithmic data processing | |
CN101026578A (en) | Method for rapid response to ICMP echo request message |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210428 Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Device Co.,Ltd. Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd. |
|
TR01 | Transfer of patent right |