Summary of the invention
The embodiment of the present invention provides changing method and the service card of passage in a kind of service card, in order to solve the low problem of cochain bandwidth availability ratio of service card in prior art.
Therefore, according to the embodiment of the present invention, a kind of service card is provided, be applied in switch, described switch comprises the first draw-in groove, the second draw-in groove and the 3rd draw-in groove, described service card is arranged in described the 3rd draw-in groove, and described service card comprises: controller, multiplexer, the first exchange chip and the second exchange chip, wherein:
Described controller, with described the first draw-in groove, described the second draw-in groove, described multiplexer, described the first exchange chip and described the second exchange chip, be connected, for detection of described the first draw-in groove and described the second draw-in groove, whether have board to insert, and according to testing result control that passage in described multiplexer is communicated with respectively described the first exchange chip and described the second exchange chip, draw-in groove and described the first exchange chip that has board to insert, draw-in groove and described the second exchange chip that the board insertion is arranged; And, obtain the message repeating amount that described the first exchange chip and described the second exchange chip are added up, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold;
Described multiplexer, be connected draw-in groove and described the first exchange chip that uses passage to be communicated with respectively described the first exchange chip and described the second exchange chip, to have board to insert for the control according to described controller, draw-in groove and described the second exchange chip that has board to insert with described controller, described the first exchange chip, described the second exchange chip, described the first draw-in groove and described the second draw-in groove; And, carry out the passage switching according to the control of described controller;
Described the first exchange chip, carry out message repeating accounting message transfer amount respectively for the board of described the second exchange chip be communicated with and/or insertion;
Described the second exchange chip, carry out message repeating accounting message transfer amount respectively for the board of described the first exchange chip be communicated with and/or insertion.
Concrete, described controller, for the passage of controlling described multiplexer according to testing result be communicated with respectively described the first exchange chip and described the second exchange chip, draw-in groove and described the first exchange chip that has board to insert, draw-in groove and described the second exchange chip that the board insertion is arranged, specifically for:
All without board, insert if testing result is described the first draw-in groove and described the second draw-in groove, control described the first exchange chip of all channel connections and described the second exchange chip in described multiplexer;
Described controller, for obtaining the message repeating amount of described the first exchange chip and described the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold, specifically for:
Obtain described first exchange chip of described the first exchange chip statistics and the message repeating amount between described the second exchange chip, or obtain described second exchange chip of described the second exchange chip statistics and the message repeating amount between described the first exchange chip;
If the message repeating amount between described the first exchange chip obtained and described the second exchange chip is less than described second and sets threshold values, keep described the first exchange chip of all channel connections and described the second exchange chip in described multiplexer.
Concrete, described controller, for the passage of controlling described multiplexer according to testing result be communicated with respectively described the first exchange chip and described the second exchange chip, draw-in groove and described the first exchange chip that has board to insert, draw-in groove and described the second exchange chip that the board insertion is arranged, specifically for:
If testing result is described the first draw-in groove and described the second draw-in groove, all have board to insert, the passage of controlling in described multiplexer is communicated with respectively described the first draw-in groove and described the first exchange chip, described the first draw-in groove and described the second exchange chip, described the second draw-in groove and described the first exchange chip, described the second draw-in groove and described the second exchange chip, described the first exchange chip and described the second exchange chip;
Described controller, for obtaining the message repeating amount of described the first exchange chip and described the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold, specifically for:
Respectively and the board in described the second exchange chip, described the first draw-in groove, the message repeating amount between the board in described the second draw-in groove, and described the second exchange chip that obtains described the second exchange chip statistics respectively and the board in described the first exchange chip, described the first draw-in groove, the message repeating amount between the board in described the second draw-in groove for described the first exchange chip that obtains described the first exchange chip statistics;
The message repeating amount of obtaining is compared with described the first setting threshold and described the second setting threshold respectively;
Passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
Concrete, described controller, for the passage of controlling described multiplexer according to testing result be communicated with respectively described the first exchange chip and described the second exchange chip, draw-in groove and described the first exchange chip that has board to insert, draw-in groove and described the second exchange chip that the board insertion is arranged, specifically for:
If testing result is described the first draw-in groove, have board insertion and described the second draw-in groove to insert without board, the passage of controlling in described multiplexer is communicated with respectively described the first draw-in groove and described the first exchange chip, described the first draw-in groove and described the second exchange chip, described the first exchange chip and described the second exchange chip;
Described controller, for obtaining the message repeating amount of described the first exchange chip and described the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold, specifically for:
Respectively and the message repeating amount between the board in described the second exchange chip, described the first draw-in groove, and described the second exchange chip that obtains described the second exchange chip statistics respectively and the message repeating amount between the board in described the first exchange chip, described the first draw-in groove for described the first exchange chip that obtains described the first exchange chip statistics;
The message repeating amount of obtaining is compared with described the first setting threshold and described the second setting threshold respectively;
Passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
Concrete, described controller, for the passage of controlling described multiplexer according to testing result be communicated with respectively described the first exchange chip and described the second exchange chip, draw-in groove and described the first exchange chip that has board to insert, draw-in groove and described the second exchange chip that the board insertion is arranged, specifically for:
If testing result is described the second draw-in groove, have board insertion and described the first draw-in groove to insert without board, the transmission channel of controlling in described multiplexer is communicated with respectively described the second draw-in groove and described the first exchange chip, described the second draw-in groove and described the second exchange chip, described the first exchange chip and described the second exchange chip;
Described controller, for obtaining the message repeating amount of described the first exchange chip and described the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold, specifically for:
Respectively and the message repeating amount between the board in described the second exchange chip, described the second draw-in groove, and described the second exchange chip that obtains described the second exchange chip statistics respectively and the message repeating amount between the board in described the first exchange chip, described the second draw-in groove for described the first exchange chip that obtains described the first exchange chip statistics;
The message repeating amount of obtaining is compared with described the first setting threshold and described the second setting threshold respectively;
Passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
The embodiment of the present invention also provides the changing method of passage in a kind of service card, be applied in switch, described switch comprises the first draw-in groove, the second draw-in groove and the 3rd draw-in groove, described service card is positioned at the 3rd draw-in groove, described service card comprises controller, multiplexer, the first exchange chip and the second exchange chip, and described method comprises:
Whether described controller detects described the first draw-in groove and described the second draw-in groove has board to insert, and according to testing result control that passage in described multiplexer is communicated with respectively described the first exchange chip and described the second exchange chip, draw-in groove and described the first exchange chip that has board to insert, draw-in groove and described the second exchange chip that the board insertion is arranged;
Described the first exchange chip and the board of be communicated with described the second exchange chip and/or insertion carry out message repeating accounting message transfer amount respectively; Described the second exchange chip and the board of be communicated with described the first exchange chip and/or insertion carry out message repeating accounting message transfer amount respectively.
Described controller obtains the message repeating amount of described the first exchange chip and described the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
Concrete, described controller is controlled draw-in groove and described the first exchange chip that passage in described multiplexer is communicated with respectively described the first exchange chip and described the second exchange chip, has board to insert, draw-in groove and described the second exchange chip that the board insertion is arranged according to testing result, specifically comprises:
All without board, insert if testing result is described the first draw-in groove and described the second draw-in groove, control described the first exchange chip of all channel connections and described the second exchange chip in described multiplexer;
Described controller obtains the message repeating amount of described the first exchange chip and described the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold, specifically comprises:
Obtain described first exchange chip of described the first exchange chip statistics and the message repeating amount between described the second exchange chip, or obtain described second exchange chip of described the second exchange chip statistics and the message repeating amount between described the first exchange chip;
If the message repeating amount between described the first exchange chip obtained and described the second exchange chip is less than described second and sets threshold values, keep described the first exchange chip of all channel connections and described the second exchange chip in described multiplexer.
Concrete, described controller is controlled draw-in groove and described the first exchange chip that passage in described multiplexer is communicated with respectively described the first exchange chip and described the second exchange chip, has board to insert, draw-in groove and described the second exchange chip that the board insertion is arranged according to testing result, specifically comprises:
If testing result is described the first draw-in groove and described the second draw-in groove, all have board to insert, the passage of controlling in described multiplexer is communicated with respectively described the first draw-in groove and described the first exchange chip, described the first draw-in groove and described the second exchange chip, described the second draw-in groove and described the first exchange chip, described the second draw-in groove and described the second exchange chip, described the first exchange chip and described the second exchange chip;
Described controller obtains the message repeating amount of described the first exchange chip and described the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold, specifically for:
Respectively and the board in described the second exchange chip, described the first draw-in groove, the message repeating amount between the board in described the second draw-in groove, and described the second exchange chip that obtains described the second exchange chip statistics respectively and the board in described the first exchange chip, described the first draw-in groove, the message repeating amount between the board in described the second draw-in groove for described the first exchange chip that obtains described the first exchange chip statistics;
The message repeating amount of obtaining is compared with described the first setting threshold and described the second setting threshold respectively;
Passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
Concrete, described controller is controlled draw-in groove and described the first exchange chip that passage in described multiplexer is communicated with respectively described the first exchange chip and described the second exchange chip, has board to insert, draw-in groove and described the second exchange chip that the board insertion is arranged according to testing result, specifically comprises:
If testing result is described the first draw-in groove, have board insertion and described the second draw-in groove to insert without board, the passage of controlling in described multiplexer is communicated with respectively described the first draw-in groove and described the first exchange chip, described the first draw-in groove and described the second exchange chip, described the first exchange chip and described the second exchange chip;
Described controller obtains the message repeating amount of described the first exchange chip and described the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold, specifically comprises:
Respectively and the message repeating amount between the board in described the second exchange chip, described the first draw-in groove, and described the second exchange chip that obtains described the second exchange chip statistics respectively and the message repeating amount between the board in described the first exchange chip, described the first draw-in groove for described the first exchange chip that obtains described the first exchange chip statistics;
The message repeating amount of obtaining is compared with described the first setting threshold and described the second setting threshold respectively;
Passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
Concrete, described controller is controlled draw-in groove and described the first exchange chip that passage in described multiplexer is communicated with respectively described the first exchange chip and described the second exchange chip, has board to insert, draw-in groove and described the second exchange chip that the board insertion is arranged according to testing result, specifically comprises:
If testing result is described the second draw-in groove, have board insertion and described the first draw-in groove to insert without board, the transmission channel of controlling in described Multiplexing Unit multiplexer is communicated with respectively described the second draw-in groove and described the first exchange chip, described the second draw-in groove and described the second exchange chip, described the first exchange chip and described the second exchange chip;
Described controller obtains the message repeating amount of described the first exchange chip and described the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold, specifically comprises:
Respectively and the message repeating amount between the board in described the second exchange chip, described the second draw-in groove, and described the second exchange chip that obtains described the second exchange chip statistics respectively and the message repeating amount between the board in described the first exchange chip, described the second draw-in groove for described the first exchange chip that obtains described the first exchange chip statistics;
The message repeating amount of obtaining is compared with described the first setting threshold and described the second setting threshold respectively;
Passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
The service card that the embodiment of the present invention provides and switching bandwidth method of adjustment, by detecting the first draw-in groove and the second draw-in groove, whether there is board to insert, and draw-in groove and the second exchange chip controlling channel connection the first exchange chip and the second exchange chip in multiplexer, the draw-in groove and the first exchange chip that have board to insert, the board insertion is arranged according to testing result; And, obtain the message repeating amount of the first exchange chip and the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold, realized the passage in flexible switching multiplexer, thereby can adjust flexibly between exchange chip, the bandwidth between exchange chip and board, can effectively utilize between exchange chip, the bandwidth between exchange chip and board, improved the cochain bandwidth availability ratio of service card.
Embodiment
The low problem for the cochain bandwidth availability ratio of service card in prior art, the embodiment of the present invention provides a kind of service card, this service card can be arranged on boxlike (Box) fabric switch, also can be arranged on the switch of full mesh (Fullmesh) framework.As shown in Figure 2, switch comprises the first draw-in groove 1, the second draw-in groove 3 and the 3rd draw-in groove 2, when the 3rd draw-in groove 2 Insert service card, the service card inserted can be used same mark with the 3rd draw-in groove, be designated as service card 2, service card 2 comprises controller 20, multiplexer 21, the first exchange chip 22 and the second exchange chip 23.
Controller 20, for being connected with the second exchange chip 23 with the first draw-in groove 1, the second draw-in groove 3, multiplexer 21, the first exchange chip 22, for detection of the first draw-in groove 1 and the second draw-in groove 3, whether have board to insert, and according to testing result control that passage in multiplexer 21 is communicated with respectively the first exchange chip 22 and the second exchange chip 23, draw-in groove and the first exchange chip 22 that has board to insert, draw-in groove and the second exchange chip 23 that the board insertion is arranged; And, obtain the message repeating amount that the first exchange chip 22 and the second exchange chip 23 are added up, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
The first setting threshold and the second setting threshold can be set according to actual needs, the first setting threshold is less than the second setting threshold, the maximum that the first setting threshold is the message repeating amount in the time of passage need to being switched to other passage, the minimum value of message repeating amount when the second setting threshold be come for other passage being switched.
Multiplexer 21, be connected draw-in groove and the first exchange chip 22 that uses passage to be communicated with respectively the first exchange chip 22 and the second exchange chip 23, to have board to insert for the control according to controller 20, draw-in groove and the second exchange chip 23 that has board to insert with the second draw-in groove 3 with controller 20, the first exchange chip 22, the second exchange chip 23, the first draw-in groove 1; And, carry out the passage switching according to the control of controller 20.
The first exchange chip 22, carry out message repeating accounting message transfer amount respectively for the second exchange chip 23 be communicated with and/or the board that inserts.
The first exchange chip 22 is added up respectively is the message repeating amount between the first exchange chip 22 and the second exchange chip 23 and/or the first exchange chip 22 and the board that inserts.
The second exchange chip 23, carry out message repeating accounting message transfer amount respectively for the first exchange chip 22 be communicated with and/or the board that inserts.
The second exchange chip 23 is added up respectively is the message repeating amount between the second exchange chip 23 and the first exchange chip 22 and/or the second exchange chip 23 and the board that inserts.
At first whether this scheme have board to insert by detecting the first draw-in groove and the second draw-in groove, and draw-in groove and the second exchange chip controlling channel connection the first exchange chip and the second exchange chip in multiplexer, the draw-in groove and the first exchange chip that have board to insert, the board insertion is arranged according to testing result; And, obtain the message repeating amount of the first exchange chip and the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold, realized the passage in flexible switching multiplexer, thereby can adjust flexibly between exchange chip, the bandwidth between exchange chip and board, can effectively utilize between exchange chip, the bandwidth between exchange chip and board, improved the cochain bandwidth availability ratio of service card.
Wherein, controller can comprise central processing unit (Central Processing Unit, CPU) and CPLD (Complex Programmable Logic Device, CPLD), CPLD detects the first draw-in groove and whether the second draw-in groove has board to insert, and notify CPU by testing result, CPU according to testing result control that passage in multiplexer is communicated with respectively the first exchange chip and the second exchange chip, draw-in groove and the first exchange chip that has board to insert, draw-in groove and the second exchange chip that the board insertion is arranged; And, obtain the message repeating amount that the first exchange chip and the second exchange chip are added up, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
Multiplexer comprises a plurality of Sub-multiplexers, and data selector, be used for by data-reusing to an output channel (OUT) of N input channel (IN) above, and the internal structure schematic diagram as Fig. 3 is multiplexer, below describe the pin of multiplexer.
1) INA[3:0]+and INA[3:0]-:
Mean 4 input channel A, be respectively INA[3]+and INA[3]-, INA[2]+and INA[2]-, INA[1]+and INA[1]-, INA[0]+and INA[0]-, INA[3:0 wherein]+be the positive pole that differential lines is right, INA[3:0]-be the negative pole that differential lines is right.
2) INB[3:0]+and INB[3:0]-:
Mean 4 input channel B, be respectively INB[3]+and INB[3]-, INB[2]+and INB[2]-, INB[1]+and INB[1]-, INB[0]+and INB[0]-, INB[3:0 wherein]+be the positive pole that differential lines is right, INB[3:0]-be the negative pole that differential lines is right.
3) OUTC[3:0]+and OUTC[3:0]-:
Mean 4 output channel C, be respectively OUTC[3]+and OUTC[3]-, OUTC[2]+and OUTC[2]-, OUTC[1]+and OUTC[1]-, OUTC[0]+and OUTC[0]-, OUTC[3:0 wherein]+be the positive pole that differential lines is right, OUTC[3:0]-be the negative pole that differential lines is right.
4) OUTA[3:0]+and OUTA[3:0]-, OUTB[3:0]+and OUTB[3:0]-, INC[3:0]+and INC[3:0]-explanation with 1), 2), 3) explanation.
From above can, 4 output channels of the corresponding OUTC of 4 input channels of 4 input channels of INA and INB; Controller can be controlled the register of Sub-multiplexer inside and realize the selection to INA and INB, such as selecting INA to be input to OUTC or INB is input to OUTC.
4 output channels of the corresponding OUTA of 4 input channels of INC and 4 output channels of OUTB; Controller can be controlled the register of multiplexer inside and realize the selection to OUTA and OUTB, such as selecting INC to be input to OUTA or INC is input to OUTB.
Between multiplexer and the first draw-in groove, the second draw-in groove, the first exchange chip and the second exchange chip, be connected, and the passage in multiplexer can be PCIE, HIGIG etc.
The first exchange chip and the second exchange chip can be MAC chip etc.
Concrete, above-mentioned controller 20, for the passage of controlling multiplexer 21 according to testing result be communicated with respectively the first exchange chip 22 and the second exchange chip 23, draw-in groove and the first exchange chip 22 that has board to insert, draw-in groove and the second exchange chip 23 that the board insertion is arranged, specifically for:
If testing result is the first draw-in groove 1 and the second draw-in groove 3, all without board, insert, all channel connections the first exchange chip 22 of controlling in multiplexer 21 is illustrated in figure 4 and is connected design sketch with the second exchange chip 23.
Controller 20, for obtaining the message repeating amount of the first exchange chip 22 and the second exchange chip 23 statistics, be switched to passage corresponding to message repeating amount that is less than the first setting threshold in passage corresponding to message repeating amount that is greater than the second setting threshold, specifically for:
Obtain the first exchange chip 22 of the first exchange chip 22 statistics and the message repeating amount between the second exchange chip 23, or obtain the second exchange chip 23 of the second exchange chip 23 statistics and the message repeating amount between the first exchange chip 22;
If the message repeating amount between the first exchange chip 22 obtained and the second exchange chip 23 is less than the second setting threshold values, keep all channel connections the first exchange chip 22 and the second exchange chip 23 in multiplexer 21.
Concrete, above-mentioned controller 20, for the passage of controlling multiplexer 21 according to testing result be communicated with respectively the first exchange chip 22 and the second exchange chip 23, draw-in groove and the first exchange chip 22 that has board to insert, draw-in groove and the second exchange chip 23 that the board insertion is arranged, specifically for:
If testing result is the first draw-in groove 1 and the second draw-in groove 3, all have board to insert, the passage of controlling in multiplexer 21 is communicated with respectively the first draw-in groove 1 and the first exchange chip 22, the first draw-in groove 1 and the second exchange chip 23, the second draw-in groove 2 and the first exchange chip 22, the second draw-in groove 3 and the second exchange chip 23, the first exchange chip 22 and the second exchange chip 23.Be illustrated in figure 5 the connection design sketch.
Controller 20, for obtaining the message repeating amount of the first exchange chip 22 and the second exchange chip 23 statistics, be switched to passage corresponding to message repeating amount that is less than the first setting threshold in passage corresponding to message repeating amount that is greater than the second setting threshold, specifically for:
Respectively and the board in the second exchange chip 23, the first draw-in groove 1, the message repeating amount between the board in the second draw-in groove 3, and the second exchange chip 23 that obtains the second exchange chip 23 statistics respectively and the board in the first exchange chip 22, the first draw-in groove 1, the message repeating amount between the board in the second draw-in groove 3 for the first exchange chip 22 that obtains the first exchange chip 22 statistics;
The message repeating amount of obtaining is compared with the first setting threshold and the second setting threshold respectively;
Passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
When the message repeating amount of the passage had is less than the first setting threshold, when the message repeating amount of the passage simultaneously had is greater than the second setting threshold, passage corresponding to message repeating amount that is less than the first setting threshold can be switched to passage corresponding to message repeating amount that is greater than the second setting threshold; If all message repeating amounts all are less than the first setting threshold or are greater than the second setting threshold, without being switched.
Concrete, above-mentioned controller 20, for the passage of controlling multiplexer 21 according to testing result be communicated with respectively the first exchange chip 22 and the second exchange chip 23, draw-in groove and the first exchange chip 22 that has board to insert, draw-in groove and the second exchange chip 23 that the board insertion is arranged, specifically for:
If testing result is the first draw-in groove 1, have board insertion and the second draw-in groove 3 to insert without board, the passage of controlling in multiplexer 21 is communicated with respectively the first draw-in groove 1 and the first exchange chip 22, the first draw-in groove 1 and the second exchange chip 23, the first exchange chip 2 and the second exchange chip 23.Be illustrated in figure 6 the connection design sketch.
Controller 20, for obtaining the message repeating amount of the first exchange chip 11 and the second exchange chip 23 statistics, be switched to passage corresponding to message repeating amount that is less than the first setting threshold in passage corresponding to message repeating amount that is greater than the second setting threshold, specifically for:
Respectively and the message repeating amount between the board in the second exchange chip 23, the first draw-in groove 1, and the second exchange chip 23 that obtains the second exchange chip 23 statistics respectively and the message repeating amount between the board in the first exchange chip 22, the first draw-in groove 1 for the first exchange chip 22 that obtains the first exchange chip 22 statistics;
The message repeating amount of obtaining is compared with the first setting threshold and the second setting threshold respectively;
Passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
Concrete, above-mentioned controller 20, for the passage of controlling multiplexer 21 according to testing result be communicated with respectively the first exchange chip 22 and the second exchange chip 23, draw-in groove and the first exchange chip 22 that has board to insert, draw-in groove and the second exchange chip 23 that the board insertion is arranged, specifically for:
If testing result is the second draw-in groove 3, have board insertion and the first draw-in groove 1 to insert without board, the transmission channel of controlling in multiplexer 21 is communicated with respectively the second draw-in groove 3 and the first exchange chip 22, the second draw-in groove 3 and the second exchange chip 23, the first exchange chip 22 and the second exchange chip 23.Be illustrated in figure 7 the connection design sketch.
Controller 20, for obtaining the message repeating amount of the first exchange chip 22 and the second exchange chip 23 statistics, be switched to passage corresponding to message repeating amount that is less than the first setting threshold in passage corresponding to message repeating amount that is greater than the second setting threshold, specifically for:
Respectively and the message repeating amount between the board in the second exchange chip 23, the second draw-in groove 3, and the second exchange chip 23 that obtains the second exchange chip 23 statistics respectively and the message repeating amount between the board in the first exchange chip 22, the second draw-in groove 3 for the first exchange chip 22 that obtains the first exchange chip 22 statistics;
The message repeating amount of obtaining is compared with the first setting threshold and the second setting threshold respectively;
Passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
Based on same inventive concept, the embodiment of the present invention provides the changing method of passage in a kind of service card, be applied in switch, switch comprises the first draw-in groove, the second draw-in groove and the 3rd draw-in groove, service card is positioned at the 3rd draw-in groove, service card comprises controller, multiplexer, the first exchange chip and the second exchange chip, and the flow process of the method as shown in Figure 8, comprising:
S80: controller detects the first draw-in groove and whether the second draw-in groove has board to insert, and the passage of controlling in multiplexer according to testing result is communicated with respectively the first exchange chip and the second exchange chip, has draw-in groove and first exchange chip of board insertion, the draw-in groove that has board to insert and second to exchange core.
S81: the first exchange chip and the board of be communicated with the second exchange chip and/or insertion carry out message repeating accounting message transfer amount respectively.
S82: the second exchange chip and the board of be communicated with the first exchange chip and/or insertion carry out message repeating accounting message transfer amount respectively.
S83: controller obtains the message repeating amount of the first exchange chip and the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
Wherein, S80, S81, S82 do not have strict sequencing.
Four kinds of testing results below in conjunction with controller are enumerated four kinds of switching modes.CPLD in controller can according to existing (present) signal whether to have saltus step, judges all whether the first draw-in groove and the second draw-in groove have plate to insert.When the present signal is " 0 " by " 1 " saltus step, mean to have board to insert; When the present signal does not have saltus step, mean not have board to insert.After the present of CPLD signal generation saltus step, low level of CPLD output is to the interrupt signal of CPU, and then CPU carries out interrupt response.
The first, controller in above-mentioned S80 according to testing result control that passage in multiplexer is communicated with respectively the first exchange chip and the second exchange chip, draw-in groove and the first exchange chip that has board to insert, draw-in groove and the second exchange chip that the board insertion is arranged, specifically comprise:
All without board, insert if testing result is the first draw-in groove and the second draw-in groove, control all channel connections the first exchange chip and the second exchange chip in multiplexer.
If CPU detects the first draw-in groove and the second draw-in groove all inserts without board, CPU can control by the II2C interface all channel connections the first exchange chip and second exchange chip of multiplexer.
Controller in above-mentioned S83 obtains the message repeating amount of the first exchange chip and the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold, specifically comprises:
Obtain the first exchange chip of the first exchange chip statistics and the message repeating amount between the second exchange chip, or obtain the second exchange chip of the second exchange chip statistics and the message repeating amount between the first exchange chip;
If the message repeating amount between the first exchange chip obtained and the second exchange chip is less than the second setting threshold values, keep all channel connections the first exchange chip and the second exchange chip in multiplexer.
CPU obtains the message repeating amount between the first exchange chip and the second exchange chip, judge between the first exchange chip and the second exchange chip and whether have message repeating, if the message repeating amount is less than the second setting threshold, still keep all channel connections the first exchange chip and the second exchange chip in multiplexer.
The second, controller in above-mentioned S80 according to testing result control that passage in multiplexer is communicated with respectively the first exchange chip and the second exchange chip, draw-in groove and the first exchange chip that has board to insert, draw-in groove and the second exchange chip that the board insertion is arranged, specifically comprise:
If testing result is the first draw-in groove and the second draw-in groove, all have board to insert, the passage of controlling in multiplexer is communicated with respectively the first draw-in groove and the first exchange chip, the first draw-in groove and the second exchange chip, the second draw-in groove and the first exchange chip, the second draw-in groove and the second exchange chip, the first exchange chip and the second exchange chip.
If CPU detects the first draw-in groove and the second draw-in groove all has board to insert, CPU can control by the II2C interface channel connection the first draw-in groove and the first exchange chip, the first draw-in groove and the second exchange chip, the second draw-in groove and the first exchange chip, the second draw-in groove and the second exchange chip, the first exchange chip and second exchange chip of multiplexer.
If being the first draw-in groove and the second draw-in groove, the testing result in above-mentioned S83 all have board to insert, the passage of controlling in multiplexer is communicated with respectively the first draw-in groove and the first exchange chip, the first draw-in groove and the second exchange chip, the second draw-in groove and the first exchange chip, the second draw-in groove and the second exchange chip, the first exchange chip and the second exchange chip, specifically comprises:
Respectively and the board in the second exchange chip, the first draw-in groove, the message repeating amount between the board in the second draw-in groove, and the second exchange chip that obtains the second exchange chip statistics respectively and the board in the first exchange chip, the first draw-in groove, the message repeating amount between the board in the second draw-in groove for the first exchange chip that obtains the first exchange chip statistics;
The message repeating amount of obtaining is compared with the first setting threshold and the second setting threshold respectively;
Passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
CPU obtains the message repeating amount of the first exchange chip and the second exchange chip statistics, and be less than the first setting threshold in the quantities of messages that obtains of judgement and be greater than the second setting threshold, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
The third, controller in above-mentioned S80 according to testing result control that passage in multiplexer is communicated with respectively the first exchange chip and the second exchange chip, draw-in groove and the first exchange chip that has board to insert, draw-in groove and the second exchange chip that the board insertion is arranged, specifically comprise:
If testing result is the first draw-in groove, have board insertion and the second draw-in groove to insert without board, the passage of controlling in multiplexer is communicated with respectively the first draw-in groove and the first exchange chip, the first draw-in groove and the second exchange chip, the first exchange chip and the second exchange chip.
If CPU detects, only have the first draw-in groove to have board to insert, CPU can control by the II2C interface channel connection the first draw-in groove and the first exchange chip, the first draw-in groove and the second exchange chip, the second exchange chip and first exchange chip of multiplexer.
Controller in above-mentioned S83 obtains the message repeating amount of the first exchange chip and the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold, specifically comprises:
Respectively and the message repeating amount between the board in the second exchange chip, the first draw-in groove, and the second exchange chip that obtains the second exchange chip statistics respectively and the message repeating amount between the board in the first exchange chip, the first draw-in groove for the first exchange chip that obtains the first exchange chip statistics;
The message repeating amount of obtaining is compared with the first setting threshold and the second setting threshold respectively;
Passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
CPU obtains the message repeating amount of the first exchange chip and the second exchange chip statistics, and be less than the first setting threshold in the quantities of messages that obtains of judgement and be greater than the second setting threshold, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
The 4th kind, controller in above-mentioned S80 according to testing result control that passage in multiplexer is communicated with respectively the first exchange chip and the second exchange chip, draw-in groove and the first exchange chip that has board to insert, draw-in groove and the second exchange chip that the board insertion is arranged, specifically comprise:
If testing result is the second draw-in groove, have board insertion and the first draw-in groove to insert without board, the transmission channel of controlling in the Multiplexing Unit multiplexer is communicated with respectively the second draw-in groove and the first exchange chip, the second draw-in groove and the second exchange chip, the first exchange chip and the second exchange chip.
Controller in above-mentioned S83 obtains the message repeating amount of the first exchange chip and the second exchange chip statistics, passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold, specifically comprises:
Respectively and the message repeating amount between the board in the second exchange chip, the second draw-in groove, and the second exchange chip that obtains the second exchange chip statistics respectively and the message repeating amount between the board in the first exchange chip, the second draw-in groove for the first exchange chip that obtains the first exchange chip statistics;
The message repeating amount of obtaining is compared with the first setting threshold and the second setting threshold respectively;
Passage corresponding to message repeating amount that is less than the first setting threshold is switched to passage corresponding to message repeating amount that is greater than the second setting threshold.
With the realization mechanism that only has the first draw-in groove 1 to insert, with the above-mentioned situation of only having the first draw-in groove to insert board, be the same when only having the second draw-in groove 2 to insert, repeat no more here.
Obviously, those skilled in the art can carry out various changes and modification and not break away from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention also is intended to comprise these changes and modification interior.