Embodiment
Embodiment of the present invention provides method and the device that flow-control information transmits in a kind of interconnection applications.For Flow Control in the band, flow-control information is adopted the block encoding transmission manner, make each grouping that marks off can transmit the port traffic control of some, and to each grouping independent error-detection mechanism in addition; Carry out transmitted in packets after then each grouping being packaged into Frame respectively.The port traffic control of transmitted in packets just can not influence each other like this, the port traffic control after namely current mistake can not influence, and mistake can not spread yet, and upgrades the speed of transmitting thereby improved flow-control information.
For the outer Flow Control of band, the synchronization check signal by setting carries out independent verification to each flow-control information, namely flow-control information is carried out verification by turn.The check errors of single port just can not have influence on the flow-control information of other ports like this, makes mistake can not spread; If the result of verification is errorless, can also upgrade the Flow Control state of this flow-control information immediately simultaneously, improve flow-control information and upgrade the speed of transmitting.
For better describing embodiment of the present invention, now by reference to the accompanying drawings the specific embodiment of the present invention is described, be illustrated in figure 3 as a kind of schematic flow sheet of the described method of embodiment of the present invention, described method comprises:
Step 31: will be divided into a plurality of groupings according to port numbers with the port traffic control of interior Flow Control;
When carrying out the transmission of flow-control information, at first will be divided into a plurality of groupings according to port numbers with the port traffic control of interior Flow Control, comprise at least one port traffic control in each grouping.Specifically, the order that can earlier the port traffic control of being with interior Flow Control be increased progressively successively according to port numbers is divided into a plurality of groupings, makes the port traffic control that comprises identical or different quantity in each grouping.
For instance, if the maximum port number of port traffic control is N, the order that increases progressively successively according to port numbers so, N is divided into a plurality of groupings with port traffic control from port 0~port, the packet count that marks off decides according to the port traffic control number that comprises in each grouping, the maximum port number of for example supposing port traffic control is 30, comprises the port traffic control of equal number in the grouping that marks off, and can be redefined for 5; The order that increases progressively successively according to port numbers just has been divided into 6 groupings from port 0~port 30 so, comprises 5 port traffic controls in each grouping, and concrete corresponding relation is as shown in table 1 below:
Grouping |
Corresponding port traffic control |
0 |
Port 0~port 4 |
1 |
Port 5~port 9 |
2 |
Port one 0~port one 4 |
3 |
Port one 5~port one 9 |
4 |
Port 20~port 24 |
5 |
Port 25~port 29 |
Table 1
The sequence number of grouping can also can begin definition from other numeral since 0 definition in the last table 1, as long as grouping serial number just can meet the demands with the port traffic control in the grouping is corresponding.
In addition, also can comprise the port traffic control of varying number in the above-mentioned grouping that marks off, that is to say in some grouping and can comprise 1 port traffic control, can comprise the port traffic control more than 1 in some grouping, just can meet the demands as long as all groupings can be covered the port traffic control of all of the port.For example go up in the grouping 0 in the table 1 and can only comprise port 0, and divide into groups can comprise port one~port 9 in 1, can to cover the port traffic control of all 30 ports just passable as long as go up 6 groupings in the table 1; And for the grouping that comprises the various numbers of ports Flow Control, can increase the field of indication port number in each grouping, corresponding port traffic control can be identified and receive to receiving terminal also like this.
Step 32: for each grouping arranges independently error-detection mechanism respectively.
After port traffic control has been divided into a plurality of groupings, just can independently error-detection mechanism be set respectively for each grouping.Error-detection mechanism described here specifically can comprise: Cyclic Redundancy Check, diagonal angle interweave odd even coding checkout (DIP verification) or hamming code verification (Hamming verification).
Step 33: each grouping is transmitted after being packaged into Frame respectively.
Be exactly specifically, with the grouping serial number of each grouping and the port traffic control corresponding with described grouping serial number, and for each the grouping set independent error-detection mechanism be packaged into Frame, here this independent error-detection mechanism can be packaged in the afterbody of Frame, the whole payload information of cover data frame carries out the verification protection to the integral body of Frame; According to the order of described grouping serial number, the Frame after the encapsulation is carried out transmitted in packets then.
Just include independently error-detection mechanism in each Frame after the encapsulation like this, and corresponding port Flow Control, when the error-detection mechanism verification of some Frames makes mistake, this check errors just just is limited in the port traffic control scope that current data frame covers, mistake just can not be diffused into the Frame of other groupings, to the not influence of transmission of other packet data frames, upgrade the speed of transmitting thereby improved flow-control information, improved efficient and the reliability of system interconnection.
In addition, can also encapsulate the link flow indication information in described Frame, this link flow indication information is used to indicate the transmission that described Frame carries out link flow; Wherein, if described link flow indication information is effectively, represent that then the back-pressure state appears in data link, the back-pressure state also appears in all of the port, and namely described Frame carries out the transmission of link flow and port traffic control; Otherwise, represent that then back-pressure does not appear in data link, this moment, described Frame transmitted according to the port traffic control state.
Above-described link flow indication information can comprise specific indication field, for instance: in described Frame, can encapsulate a specific indication field, for example represent with XOFF, when described specific indication field is 1, represent this link flow indication information for effective, then described Frame carries out the transmission of link flow and port traffic control; Otherwise, when described specific indication field is 0, represent that this link flow indication information is invalid, then described Frame transmits according to the port traffic control state, just according to the order of grouping serial number, the Frame after the encapsulation is carried out transmitted in packets.
So just can make user's side can directly obtain port traffic control and link flow, and not need to do again extra mapping realize the synchronous transmission of link flow and port traffic control with interior Flow Control, saved system resource, improved the efficient that flow-control information transmits.
In addition, the form of above-described Frame can be data/idle pulse frame structure, also can be other data frame structures that remain with the respective extension field.
Embodiment of the present invention also provides the method that flow-control information transmits in the another kind of interconnection applications, is illustrated in figure 4 as the another kind of schematic flow sheet of described method, and described method comprises:
Step 41: for the flow-control information with outer Flow Control arranges the synchronization check signal.
Be exactly specifically, when carrying out the transmission of flow-control information, for the flow-control information with outer Flow Control arranges a synchronization check signal, the error-detection mechanism of synchronization check signal described here can be odd by turn, also can be by turn even parity check or the parity check of iteration; Simultaneously, flow-control information and synchronization check signal are in synchronous regime, that is to say that the synchronization check signal all can carry out the error detection verification to each variation of flow-control information.For instance, can a channel associated clock signal be set for being with outer Flow Control, make flow-control information and synchronization check signal be synchronized with this channel associated clock signal, like this sometime the section in, the verification of synchronization signal just can be realized the verification by turn to flow-control information.
Step 42: flow-control information is carried out verification by turn by described synchronization check signal.
After the flow-control information of Flow Control is provided with the synchronization check signal outside for band, just can carry out verification by turn to flow-control information by this synchronization check signal.Like this in the transmission course of flow-control information, if a certain position of flow-control information transmission has produced check errors, the check errors of this position so, the check errors that is single port just can not have influence on the flow-control information of other ports, feasible mistake can not spread, upgrade the speed of transmitting thereby improved flow-control information, improved efficient and the reliability of system interconnection.
In addition, after the synchronization check signal carries out verification by turn to flow-control information, can also judge whether corresponding Flow Control transmission of Information is wrong, and handle accordingly according to the check results by turn of described synchronization check signal.Specifically, if judge that corresponding Flow Control transmission of Information is errorless, then upgrade the Flow Control state of this flow-control information immediately, be about to output to user's side after this flow-control information decoding, just will after the flow-control information that the line side is obtained is decoded, output on the Flow Control state interface of user's side; If judge that corresponding Flow Control transmission of Information is wrong, then just can abandon this flow-control information, be determined further.By to the verification by turn of flow-control information and judgment processing by turn, just can upgrade the Flow Control state of flow-control information fast like this, improve the speed of flow-control information renewal transmission.
In addition, outside above-described band, can also come the Flow Control transmission of Information is carried out control operation by control signal and Flow Control status signal are set on the Flow Control.It is port traffic control or link flow that wherein said control signal is used to indicate the flow-control information that transmits on the Flow Control status signal, be exactly specifically, when control signal when being effective, can set the flow-control information that transmits on the described Flow Control status signal is link flow; When control signal when being invalid, can set the flow-control information that transmits on the described Flow Control status signal is port traffic control.
For instance, the setting control signal is useful signal when being in high level, and when control signal was high level, the flow-control information that transmits on the Flow Control status signal was exactly link flow like this; Otherwise when control signal was low level, the flow-control information that transmits on the Flow Control status signal was exactly port traffic control.Here control signal is useful signal under what state, can set according to the power of circuit environment and control signal, is useful signal in the time of for example also can setting control signal and be in low level; And the flow-control information that transmits on the Flow Control status signal is to belong to link flow or belong to port traffic control, also can set according to the actual interconnect situation, for example also can set when control signal is high level, the flow-control information that transmits on the Flow Control status signal is port traffic control.
Above-described Flow Control status signal is for the transmission state of the indicated business datum of the current flow-control information of expression, is exactly specifically, and when described Flow Control status signal when being effective, then service data transmission is forbidden in expression; When described Flow Control status signal when being invalid, then expression allows service data transmission.
For instance, can set when the Flow Control status signal is in high level is useful signal, like this when the Flow Control status signal is high level, just service data transmission is forbidden in expression, here the transmission state of business datum is indicated by current flow-control information, and current flow-control information can be link flow, also can be port traffic control, specifically is that the state by the above control signal decides; Otherwise when the Flow Control status signal was low level, just expression allowed service data transmission.In addition, Flow Control status signal described here is useful signal under what state, equally also can set according to the power of circuit environment and control signal, and for example can set when the Flow Control status signal is in low level is useful signal; And the condition of whether forbidding service data transmission also can be set according to the actual interconnect situation, for example can set when the Flow Control status signal is high level, and then expression allows service data transmission.
Like this, control signal and Flow Control status signal by above setting, just can control the flow-control information transmission with outer Flow Control, realize the synchronous transmission of link flow and port traffic control, make user's side can directly obtain port traffic control and link flow, and do not need to do again extra mapping, and saved system resource, improved the efficient that flow-control information transmits.
Embodiment of the present invention also provides the device that flow-control information transmits in a kind of interconnection applications, be illustrated in figure 5 as a kind of structural representation of the described device of embodiment of the present invention, described device comprises that grouping division unit 51, error-detection mechanism arrange unit 52 and encapsulated delivery unit 53, wherein said grouping division unit 51 is used for and will be divided into a plurality of groupings according to port numbers with the port traffic control of interior Flow Control, comprise at least one port traffic control in each grouping, the concrete dividing mode as above step 31 of method execution mode is described.
In addition, can comprise sequential packet division module 511 in the grouping division unit 51 described here, described sequential packet is divided module 511 and is divided into a plurality of groupings for the order that will increase progressively successively according to port numbers with the port traffic control of interior Flow Control, comprises the port traffic control of identical or different quantity in each grouping.For instance, the maximum port number of supposing port traffic control is N, so described sequential packet is divided module 511 just can be according to this maximum port number N, and the order that increases progressively successively according to port numbers, N is divided into a plurality of groupings with port traffic control from port 0~port, and the packet count that marks off decides according to the port traffic control number that comprises in each grouping.For example if the maximum port number of port traffic control is 30, comprise the port traffic control of equal number in the grouping that marks off, can be redefined for 5; The order that increases progressively successively according to port numbers just has been divided into 6 groupings from port 0~port 30 so, comprises 5 port traffic controls in each grouping.
Described error-detection mechanism arranges unit 52 and is used to described each grouping that independently error-detection mechanism is set respectively.
Described encapsulated delivery unit 53 transmits after described each grouping is packaged into Frame respectively.Be exactly specifically, with the grouping serial number of each grouping and the port traffic control corresponding with described grouping serial number, and for each the grouping set independent error-detection mechanism be packaged into Frame, here this independent error-detection mechanism can be packaged in the afterbody of Frame, the whole payload information of cover data frame carries out the verification protection to the integral body of Frame; According to the order of described grouping serial number, the Frame after the encapsulation is carried out transmitted in packets then.
Just include independently error-detection mechanism in each Frame after the encapsulation like this, and corresponding port Flow Control, when the error-detection mechanism verification of some Frames makes mistake, this check errors just just is limited in the port traffic control scope that current data frame covers, mistake just can not be diffused into the Frame of other groupings, to the not influence of transmission of other packet data frames, upgrade the speed of transmitting thereby improved flow-control information, improved efficient and the reliability of system interconnection
In addition, also comprise link flow indication information package module 531 in the above encapsulated delivery unit 53, described link flow indication information package module 531 is used for the link flow indication information is encapsulated in described Frame; Wherein said link flow indication information is used to indicate described Frame and whether carries out the transmission of link flow, when described link flow indication information is that effectively then described Frame carries out the transmission of link flow and port traffic control; Otherwise then described Frame carries out the transmission of port traffic control.
The device of the above flow-control information transmission can be arranged on the network equipment, also can be arranged to independent functional entity.
Embodiment of the present invention also provides the device that flow-control information transmits in the another kind of interconnection applications, be illustrated in figure 6 as another structural representation of the described device of embodiment of the present invention, described device comprises that the synchronization check signal arranges unit 61, and described synchronization check signal arranges unit 61 and is used to the flow-control information of the outer Flow Control of band that the synchronization check signal is set; Wherein said synchronization check signal is used for described flow-control information is carried out verification by turn, and the error-detection mechanism of synchronization check signal described here can be odd by turn, also can be by turn even parity check or the parity check of iteration.
Like this by the by turn verification of described synchronization check signal to flow-control information, make in the transmission course of flow-control information, if a certain position of flow-control information transmission has produced check errors, the check errors of this position so, the check errors that is single port just can not have influence on the flow-control information of other ports, feasible mistake can not spread, and upgrades the speed of transmitting thereby improved flow-control information, has improved efficient and the reliability of system interconnection.
In addition, can also comprise flow-control information transmission processing unit 62 in the above device, the check results by turn that described flow-control information transmission processing unit 62 is used for according to described synchronization check signal is judged whether corresponding Flow Control transmission of Information is wrong, and is handled accordingly; If judge that corresponding Flow Control transmission of Information is errorless, then upgrade the Flow Control state of this flow-control information; If judge that corresponding Flow Control transmission of Information is wrong, then abandon this flow-control information, and be determined further.By to the verification by turn of flow-control information and judgment processing by turn, just can upgrade the Flow Control state of flow-control information fast like this, improve the speed of flow-control information renewal transmission.
In addition, can also comprise that flow control signal arranges unit 63 in the above device, described flow control signal arranges unit 63 and is used to the flow-control information of the outer Flow Control of described band that control signal and Flow Control status signal are set.It is port traffic control or link flow that control signal wherein is used to indicate the flow-control information that transmits on the Flow Control status signal, and specifically: when described control signal when being effective, the flow-control information that transmits on the described Flow Control status signal is link flow; When described control signal when being invalid, the flow-control information that transmits on the described Flow Control status signal is port traffic control.Here control signal is useful signal under what state, can set according to the power of circuit environment and control signal, is useful signal in the time of for example also can setting control signal and be in low level; And the flow-control information that transmits on the Flow Control status signal is to belong to link flow or belong to port traffic control, also can set according to the actual interconnect situation, for example also can set when control signal is high level, the flow-control information that transmits on the Flow Control status signal is port traffic control.
Described Flow Control status signal is used for the transmission state of the indicated business datum of the current flow-control information of expression, and specifically: when described Flow Control status signal when being effective, then service data transmission is forbidden in expression; When described Flow Control status signal when being invalid, then expression allows service data transmission.Flow Control status signal described here is useful signal under what state, equally also can set according to the power of circuit environment and control signal, and for example can set when the Flow Control status signal is in low level is useful signal; And the condition of whether forbidding service data transmission also can be set according to the actual interconnect situation, for example can set when the Flow Control status signal is high level, and then expression allows service data transmission.
The device of above-described flow-control information transmission can be arranged on the network equipment, also can be arranged to independent functional entity.
For further describing embodiment of the present invention, now in conjunction with specific embodiments its technical scheme is described further:
Embodiment 1: be transmitted as example with the block encoding with interior Flow Control, at first according to port numbers, the port traffic control of Flow Control is divided into a plurality of groupings in will being with.In the present embodiment, suppose that maximum port number is 32, the port traffic control quantity that comprises in each grouping is 4, and the grouping that marks off so is exactly 8.
Then for each grouping arranges independent verification scheme, corresponding port Flow Control in such each grouping that marks off, each grouping, and set independent verification scheme has just formed corresponding relation.
With corresponding port Flow Control in above-mentioned each grouping that marks off, each grouping, and set independent verification scheme is packaged into the form of Frame respectively again.In the present embodiment, can be each grouping and setting grouping serial number, represent that with field FC Group wherein the span of FC Group is 0~7, i.e. 8 groupings; And corresponding, set the range of port number that a field FC Bitmap represents port traffic control for the port traffic control in each grouping, as shown in table 2 below is the corresponding relation of respective field in the packet data frame:
Table 2
First classifies time shaft as in the last table 2; Second classifies corresponding port as; The 3rd classifies the value of FC Group as; The 4th classifies the value of corresponding FC Bitmap as.When the value of FC Group was 0, FC Bitmap value was 0~3, and expression port 0 is to the port traffic control of port 3; When FC Group value was 1, FC Bitmap value was 4~7, and expression port 4 is to the port traffic control of port 7; The rest may be inferred, and when FC Group rose to 7, FC Bitmap just can cover maximum port numbers 31; FC Group comes back to 0 more then, begins increasing progressively of a new round.
After through above division and setting; just can be with respective field FC Group and the FC Bitmap of above-mentioned setting; and set verification scheme is packaged into the form of Frame; be illustrated in figure 7 as the interior Flow Control data frame structure schematic diagram of band in the present embodiment 1; comprise FC Group field and FC Bitmap field in the data frame structure among the figure; verification scheme is encapsulated in postamble portion; in present embodiment 1, it is CRC check; it can certainly be other verification scheme; for example interweave odd even coding checkout (DIP verification) or hamming code verification (Hamming verification) etc. of diagonal angle; here the CRC check of Frame afterbody has covered the whole payload information of Frame, and the integral body of Frame is carried out the verification protection.
Just include independently error-detection mechanism in each Frame after the encapsulation like this, when the error-detection mechanism verification of a certain Frame makes mistakes, this check errors just just is limited in the port traffic control scope that current data frame covers, mistake just can not be diffused into the Frame of other groupings, not influence of transmission to other packet data frames, upgrade the speed of transmitting thereby improved flow-control information, improved efficient and the reliability of system interconnection.
In addition, in present embodiment 1, can also comprise an XOFF field in the data frame structure as shown in Figure 7, this XOFF field is the link flow indication information.When this XOFF field when being effective, can set this XOFF field in the present embodiment 1 and get at 1 o'clock for effectively, represent that then described data-frame sync carries out the transmission of link flow and port traffic control; Otherwise, when this XOFF field gets 0, be invalid, then described Frame only carries out the transmission of port traffic control, just according to the order of grouping serial number, the Frame after the encapsulation is carried out transmitted in packets.Pass through the value of the XOFF field of this setting like this, just can realize the synchronous transmission of link flow and port traffic control, make user's side can directly obtain port traffic control and link flow, and do not need to do again extra mapping, save system resource, improved the efficient that flow-control information transmits.
In present embodiment 1, data frame format as shown in Figure 7 can be data/idle pulse frame structure, also can be other data frame structures that remain with the respective extension field.
Embodiment 2: to be verified as example by turn with outer Flow Control, at first the flow-control information for the outer Flow Control of band arranges a synchronization check signal, this synchronization check signal and flow-control information are in synchronous regime, that is to say that the synchronization check signal all can carry out the error detection verification to each variation of flow-control information.In present embodiment 2, can a channel associated clock signal be set for being with outer Flow Control, make flow-control information and synchronization check signal be synchronized with this channel associated clock signal, like this sometime the section in, the verification of synchronization signal just can have been realized the verification by turn of flow-control information.
So, in the transmission course of flow-control information, if a certain position of flow-control information transmission has produced check errors, the check errors of this position so, namely the check errors of single port makes mistake can not spread with regard to not having influence on the flow-control information of other ports.
In present embodiment 2, be with outer Flow Control except being provided with channel associated clock signal and synchronization check signal, a control signal and a Flow Control status signal can also be set, and it is port traffic control or link flow that control signal described here is used to indicate the flow-control information that transmits on the Flow Control status signal; Described Flow Control status signal is used for the transmission state of the indicated business datum of the current flow-control information of expression.
The signal that is illustrated in figure 8 as the outer Flow Control of present embodiment 2 bands transmits the sequential schematic diagram, comprise a channel associated clock signal (fc_clk) among the figure, a control signal (fc_ctrl), a Flow Control status signal (fc_stat) and a synchronization check signal (fc_prty), the Flow Control status signal among the figure, control signal and synchronization check signal are synchronized with channel associated clock signal.Wherein, the transmission state of the Flow Control status signal business datum that can be used for representing that current flow-control information is indicated; It is port traffic control or link flow that control signal is used to refer to the flow-control information that transmits on the Flow Control status signal, and as shown in table 3 below is the value corresponding relation of each holding wire:
Sequence number |
Fc_ctrl |
Fc_stat |
Describe |
1 |
0 |
0 |
Port traffic control: allow business data transmission. |
2 |
0 |
1 |
Port traffic control: forbid business data transmission. |
3 |
1 |
0 |
Link flow: allow business data transmission. |
4 |
1 |
1 |
Link flow: forbid business data transmission. |
Table 3
The list item implication of sequence number 4 is example in the above table 3: when control signal when being effective, what transmit on the expression Flow Control status signal is link flow, setting control signal in present embodiment 2 is effectively when high level (namely getting 1), when being effective as if the Flow Control status signal simultaneously, then business data transmission is forbidden in expression, and setting the Flow Control status signal in present embodiment 2 is effectively when high level (namely getting 1).
Same, for the list item of sequence number 3: control signal gets 1, and the Flow Control status signal was got 0 o'clock, and what transmit on the expression Flow Control status signal is link flow, and allows business data transmission.
List item for sequence number 1: control signal gets 0, and the Flow Control status signal was got 0 o'clock, and what transmit on the expression Flow Control status signal is port traffic control, and allows business data transmission.
List item for sequence number 2: control signal gets 0, and the Flow Control status signal was got 1 o'clock, and what transmit on the expression Flow Control status signal is port traffic control, and forbids business data transmission.
In addition, synchronization check signal as shown in Figure 8 can be used for realizing verification error detection by turn, and detailed process is as follows:
Constantly: 012 ... 64 65 66 67
Control signal: 100 ... 0100
Flow Control status signal: link ch0 ch1 ... ch63 link ch0 ch1
Synchronization check signal: p0 p1 p2 ... p64 p65 p66 p67
In the moment 0, what Flow Control was sent in the band is the link flow of link, sends the synchronization check signal p0 in this moment simultaneously; After receiving terminal is received this link flow link, just can judge according to the error detection verification of p0 whether transmission is wrong immediately, if judge that transmission is errorless, then upgrade the Flow Control state of flow-control information immediately, be about to output to user's side after this flow-control information decoding; If judge that transmission is wrong, then abandon this flow-control information.
Processing in other moment also are identical, because the synchronization check signal carries out verification by turn, front and back do not have dependence in time, and the check errors of a certain like this position just can not have influence on the flow-control information of other ports, makes mistake can not spread.
In sum, embodiment of the present invention can make current check errors can not have influence on the flow-control information of other ports, makes mistake can not spread, and upgrades the speed of transmitting thereby improved flow-control information, has improved efficient and the reliability of system interconnection.
The above; only be the preferable embodiment of the present invention; but protection scope of the present invention is not limited thereto; anyly be familiar with those skilled in the art in the technical scope that the embodiment of the invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.