Summary of the invention
The embodiment of the invention provides a kind of pause frame sending method, relevant device and system, can guarantee to cause congested virtual machine to receive flow control frames and stop to send data.
In view of this, the embodiment of the invention provides:
A kind of pause frame sending method comprises:
Whether the number of data frames of judging buffer memory in the first formation of corresponding the first port in the bridge surpasses the first-class control thresholding; Described the first port is the port that described bridge is connected with server; The Frame of buffer memory is that inbound port and outbound port at described bridge all are the Frame of described the first port in described the first formation;
When the number of data frames of described the first formation buffer memory surpasses the first-class control thresholding, generate the first-class control frame, described first-class control frame is used to indicate and stops to send the Frame that should be cached to described the first formation;
Send described first-class control frame by described the first port to described server.
A kind of pause frame sending method comprises:
Whether the number of data frames of judging buffer memory in the formation of corresponding the first port in the bridge surpasses the Flow Control thresholding, if so, generates flow control frames, and described flow control frames is used to indicate and stops to send the Frame that should be cached to described formation;
All of the port by described bridge sends described flow control frames.
A kind of bridge comprises:
The first judging unit is used for judging whether the number of data frames of buffer memory in the first formation of corresponding the first port of described bridge surpasses the first-class control thresholding; Described the first port is the port that described bridge is connected with server; The Frame of buffer memory is that inbound port and outbound port at described bridge all are the Frame of described the first port in described the first formation;
The flow control frames generation unit is used for generating the first-class control frame when the number of data frames of the first formation buffer memory surpasses the first-class control thresholding, and described first-class control frame is used to indicate and stops to send the Frame that should be cached to described the first formation;
The first transmitting element is used for sending described first-class control frame by described the first port to described server.
A kind of bridge comprises:
Judging unit is used for judging whether the number of data frames of buffer memory in the formation of corresponding the first port of described bridge surpasses the Flow Control thresholding;
The flow control frames generation unit, be used for when the judged result of described judging unit when being, the generation flow control frames, described flow control frames is used to indicate and stops to send the data that should be cached to described formation;
Transmitting element is used for sending described flow control frames by all of the port of described bridge.
A kind of network system comprises: server, the bridge that is connected with described server,
Described bridge is used for judging that whether the number of data frames of buffer memory in the first formation of corresponding the first port of bridge is above the first-class control thresholding; Described the first port is the port that described bridge is connected with server; The Frame of buffer memory is that inbound port and outbound port at described bridge all are the Frame of described the first port in described the first formation; When the number of data frames of described the first formation buffer memory surpasses the first-class control thresholding, generate the first-class control frame, described first-class control frame is used to indicate and stops to send the Frame that should be cached to described the first formation; Send described first-class control frame by described the first port to described server;
Described server is used for receiving described first-class control frame, stops to send the Frame that should be cached to described the first formation.
A kind of network system comprises: server, the bridge that is connected with server,
Described bridge is used for judging whether the number of data frames of buffer memory in the formation of corresponding the first port of bridge surpasses the Flow Control thresholding, if so, the generation flow control frames, described flow control frames is used to indicate and stops to send the Frame that should be cached to described formation; All of the port by described bridge sends described flow control frames;
Described server is used for receiving described flow control frames, stops to send the Frame that should be cached to described formation.
When the number of data frames of buffer memory surpasses the first-class control thresholding in the first formation of one embodiment of the invention corresponding first port in bridge, send flow control frames by the first port to server, the indication server stops to send the Frame that should be cached to this formation, make to stop to send Frame after causing congested virtual machine to receive this flow control frames, thereby remove congested.
When the number of data frames of buffer memory surpasses the Flow Control thresholding in the formation of another embodiment of the present invention corresponding first port in bridge, all of the port by bridge sends flow control frames, the all devices that indication is connected with this bridge all stops to send the Frame that should be cached in this formation, thereby removes congested.
Embodiment
Embodiment one:
Consult Fig. 1, the embodiment of the invention one provides a kind of pause frame sending method, and it comprises:
Whether the number of data frames of 101, judging buffer memory in the first formation of corresponding the first port in the bridge surpasses the first-class control thresholding; Described the first port is the port that described bridge is connected with server; The Frame of buffer memory is that inbound port and outbound port at described bridge all are the Frame of described the first port in described the first formation;
102, when the number of data frames of described the first formation buffer memory surpasses the first-class control thresholding, generate the first-class control frame, described first-class control frame is used to indicate and stops to send the Frame that should be cached to described the first formation;
103, send described first-class control frame by described the first port to described server.
Wherein, first team is classified the formation in the loopback set of queues that the first port is corresponding in the subsequent embodiment two as.
When the number of data frames of buffer memory surpasses the first-class control thresholding in the first formation of the embodiment of the invention one corresponding first port in bridge, send flow control frames by the first port to server, the indication server stops to send the Frame that should be cached to this formation, make to stop to send Frame after causing congested virtual machine to receive this flow control frames, thereby remove congested.
Embodiment two:
Consult Fig. 2-Fig. 6, the embodiment of the invention two provides a kind of pause frame sending method, wherein, and the method flow diagram that the flow control frames that Fig. 2 provides for the embodiment of the invention two sends, Fig. 3 sends schematic diagram for the flow control frames that the embodiment of the invention two provides, and pause frame sending method specifically comprises:
201, bridge is by the Frame of the first port reception from server (such as Server1), according to the outbound port of this Frame at bridge, this Frame is deposited in set of queues corresponding to the outbound port of the loopback set of queues of corresponding the first port or this Frame.
Whether the number of data frames of 202, judging formation in the loopback set of queues of corresponding the first port reaches the first-class control thresholding, and according to judged result, control PFC frame sends.
Whether the number of data frames of 203, judging formation (i.e. the second formation) in the non-loopback set of queues of corresponding the first port reaches the second Flow Control thresholding, and according to judged result, control PFC frame sends.
Consult Fig. 4, step 201 specifically comprises:
401, bridge is by the Frame of the first port reception from Server1.
Frame from Server1 in this step is media interviews control (the MediaAccess Control with priority tag and target network element that certain virtual machine among the Server1 sends, MAC) Frame of address, what suppose reception is the Frame that virtual machine 2 sends.
402, judge whether this Frame is the first port at the outbound port of bridge, if so, carry out 403; If not, carry out 404.
In this step according to the MAC Address of the target network element in the Frame, in the mapping table of the MAC Address that prestores and outbound port, search this Frame at the outbound port of bridge, if the MAC Address of target network element is the MAC Address of virtual machine among the Server1, then this Frame is still the first port at the outbound port of bridge; If the MAC Address of target network element is not the MAC Address of virtual machine among the Server1, then this Frame is not the first port at the outbound port of bridge.
403, this Frame is the Frame that transmits between the Server1 internal virtual machine, need to return the virtual machine that outputs in the Server1 from the first end choma, and this Frame is delivered to buffer memory in the loopback set of queues.
Wherein, safeguard one group of priority query in the loopback set of queues, answer the Frame of the corresponding priority of buffer memory in these formations; As shown in Figure 3, suppose that the Frame that the virtual machine 2 of above-mentioned reception sends need to pass to virtual machine 1, then the outbound port of this Frame still is the first port, this Frame need to be got back to virtual machine 1 from the first end choma, priority tag according to the Frame that receives, with this data frame buffer memory in the loopback set of queues in should the priority query of priority, such as, be cached in the first formation.
404, this Frame need to be transferred to other equipment by bridge from Server1, knows this Frame at the outbound port of bridge, and this Frame is sent to buffer memory in set of queues corresponding to this outbound port.
Wherein, if the target network element of this Frame is the virtual machine of another server, then in this step this Frame is sent in non-loopback set of queues corresponding to this outbound port; Wherein, safeguard one group of priority query in the non-loopback set of queues, answer the Frame of the corresponding priority of buffer memory in these formations, in this step, according to the priority tag of the Frame that receives, with this data frame buffer memory in the non-loopback set of queues in should the priority query of priority.
Consult Fig. 5, step 202 specifically comprises:
Whether the number of data frames of 501, judging certain priority query's buffer memory in the loopback set of queues of corresponding the first port surpasses the first-class control thresholding, if so, carries out 502, if not, and process ends.
502, generate the first-class control frame, this first-class control frame is used to indicate and stops to send the Frame that should be cached to this priority query, and send this first-class control frame by the first port, this first-class control frame is passed to each virtual machine among the Server1 by the first port and physical network card, after the virtual machine that sends the Frame of corresponding priority is received this first-class control frame, stop to send the Frame of corresponding priority.
Wherein, this flow control frames can be the PFC frame.
Consult Fig. 6, step 203 specifically comprises:
601, whether the number of data frames of judging the non-loopback set of queues medium priority formation buffer memory of corresponding the first port surpasses the second Flow Control thresholding, if so, carries out 602, if not, and process ends.
Wherein, the Frame of the non-loopback set of queues medium priority formation buffer memory of this first port is that the inbound port at this bridge is not the first port, is the Frame of the first port at the outbound port of this bridge.
602, generate the second flow control frames, this second flow control frames is used to indicate and stops to send the Frame that should be cached to this priority query, and sending this second flow control frames by other ports except the first port on the bridge, the equipment that receives this second flow control frames stops to send the Frame of corresponding priority.
Wherein, the link bandwidth that first-class control thresholding and the second Flow Control thresholding can link to each other with the first port of bridge according to Server1 and the ratio of other attachable link bandwidth sums of this bridge arrange, wherein, other attachable link bandwidth sums of this bridge are the bandwidth sum of other ports except the first port and the link between the corresponding device on this bridge.
In order to make above-described embodiment two clearer, now give an actual example and describe: the virtual machine 2 of supposition Server1 wants to send the Frame of certain priority to the virtual machine 1 among the Server1, this Frame can be buffered in the loopback set of queues in should the formation of priority, when the number of data frames in detecting this formation surpasses the first-class control thresholding, generate the PFC frame, send the PFC frame by the first port, this PFC frame is passed to each virtual machine among the Server1 by the first port and physical network card, then virtual machine 2 receives this PFC frame, stops to send the Frame of this priority.
When the number of data frames of buffer memory surpasses the first-class control thresholding in the priority query of the embodiment of the invention two loopback set of queues of corresponding the first port in bridge, send flow control frames by the first port to server, stop to send the Frame that should be cached to this priority query with the indication server, after receiving this flow control frames as the virtual machine in congested source in the server, stop to send the Frame of corresponding priority, make in the loopback set of queues that the number of data frames of buffer memory reduces gradually in this priority query, congested to remove.
Embodiment three:
Consult Fig. 7 and Fig. 8, the embodiment of the invention three provides a kind of pause frame sending method, the pause frame sending method flow chart that Fig. 7 provides for the embodiment of the invention three, and Fig. 8 sends schematic diagram for the flow control frames that the embodiment of the invention three provides, and the method specifically comprises:
701, by the Frame of the first port reception from server (such as Server1), Frame is deposited in the set of queues of corresponding the first port.
Safeguard one group of priority query in the embodiment of the invention in the set of queues of corresponding the first port, answer the data of the corresponding priority of buffer memory in these formations.
702, judge whether the number of data frames in the set of queues medium priority formation of corresponding the first port reaches the Flow Control thresholding, if not, process ends if so, carries out 703.
703, generate flow control frames, this flow control frames is used to indicate and stops to send the Frame that should be cached to this priority query, and sends this flow control frames by all of the port of this bridge.
Wherein, this flow control frames can be the PFC frame.
The all devices that is connected with this bridge all receives this flow control frames, after then the virtual machine of the corresponding priority data frame of transmission is received this flow control frames among the Server, stops to send the Frame of corresponding priority.
In order to make above-described embodiment three clearer, now give an actual example and describe: consult Fig. 8, suppose that the virtual machine 2 of Server1 wants to send the Frame of certain priority to the virtual machine 1 among the Server1, this Frame can be buffered in should the priority query of priority, when the number of data frames in detecting this priority query surpasses the Flow Control thresholding, generate the PFC frame, send the PFC frame by all of the port, then each virtual machine among the Server1 all receives this PFC frame, and virtual machine 2 receives the data that stop to send corresponding priority behind this PFC frame.
When the number of data frames of buffer memory surpasses the Flow Control thresholding in the priority query of the embodiment of the invention three corresponding first port in bridge, all of the port by bridge sends flow control frames, the all devices that indication is connected with this bridge all stops to be cached to the Frame of this priority query, after receiving this flow control frames as the virtual machine in congested source in the server, stop to send the Frame of corresponding priority, make that the number of data frames of buffer memory reduces gradually in the formation, thereby remove congested.
Embodiment four:
Consult Fig. 9, the embodiment of the invention four provides a kind of bridge, comprising:
The first judging unit 901 is used for judging whether the number of data frames of buffer memory in the first formation of corresponding the first port of described bridge surpasses the first-class control thresholding; Described the first port is the port that described bridge is connected with server; The Frame of buffer memory is that inbound port and outbound port at described bridge all are the Frame of described the first port in described the first formation;
Flow control frames generation unit 902 is used for generating the first-class control frame when the number of data frames of the first formation buffer memory surpasses the first-class control thresholding, and described first-class control frame is used to indicate and stops to send the Frame that should be cached to described the first formation;
The first transmitting element 903 is used for sending described first-class control frame by described the first port to described server.
When the number of data frames of buffer memory surpasses the first-class control thresholding in the first formation of the embodiment of the invention four corresponding first port in bridge, send flow control frames by the first port to server, the indication server stops to send the Frame that should be cached to this formation, make and stop to send Frame after causing congested virtual machine to receive this flow control frames, thereby the number of data frames of buffer memory in this first formation is reduced gradually, congested to remove.
Consult Figure 10, the embodiment of the invention five provides a kind of bridge, comprise: the first judging unit 1001, flow control frames generation unit 1002, the first transmitting element 1003, the second judging unit 1004, the second transmitting element 1005, data receiver unit 1006, the 3rd judging unit 1007 and storage unit 1008, wherein
Data receiver unit 1006 is used for receiving the Frame from server.
The 3rd judging unit 1007 is used for judging whether described Frame is the first port at the outbound port of described bridge, and described the first port is the port that described bridge is connected with server.
Storage unit 1008, be used for when the judged result of described the 3rd judging unit 1007 when being, described Frame is deposited in the first formation of corresponding the first port, when described the 3rd judging unit 1007 when the determination result is NO, described Frame is deposited in formation corresponding to the outbound port of described Frame.
The first judging unit 1001 is used for judging whether the number of data frames of buffer memory in the first formation of corresponding the first port of described bridge surpasses the first-class control thresholding; The Frame of buffer memory is that inbound port and outbound port at described bridge all are the Frame of described the first port in described the first formation.
The second judging unit 1004, whether number of data frames that be used for to judge the second formation buffer memory of corresponding described the first port surpasses the second Flow Control thresholding, and the Frame of described the second formation buffer memory is not the first port, is the Frame of described the first port at the outbound port of described bridge for the inbound port at described bridge.
Flow control frames generation unit 1002 is used for generating the first-class control frame when the number of data frames of the first formation buffer memory surpasses the first-class control thresholding, and described first-class control frame is used to indicate and stops to send the Frame that should be cached to described the first formation; When the number of data frames of the second formation buffer memory surpasses the second Flow Control thresholding, generate the second flow control frames, described the second flow control frames is used to indicate and stops to send the Frame that should be cached to described the second formation.
The first transmitting element 1003 is used for sending described first-class control frame by described the first port to described server.
The second transmitting element 1005 is used for sending described the second flow control frames by other ports, and described other ports are the port except the first port on the described bridge.
The embodiment of the invention five corresponding first port in bridge is preserved two formations, when the number of data frames of buffer memory in the first formation of corresponding the first port surpasses the first-class control thresholding, send flow control frames by the first port to server, the indication server stops to send the Frame that should be cached to this formation, make and stop to send Frame after causing congested virtual machine to receive this flow control frames, thereby the number of data frames of buffer memory in this first formation is reduced gradually, congested to remove.
Embodiment six:
Consult Figure 11, the embodiment of the invention six provides a kind of bridge, comprising:
Judging unit 1101 is used for judging whether the number of data frames of buffer memory in the formation of corresponding the first port of described bridge surpasses the Flow Control thresholding;
Flow control frames generation unit 1102, be used for when the judged result of described judging unit when being, the generation flow control frames, described flow control frames is used to indicate and stops to send the data that should be cached to described formation;
Transmitting element 1103 is used for sending described flow control frames by all of the port of described bridge.
When the number of data frames of buffer memory surpasses the Flow Control thresholding in the formation of the embodiment of the invention six corresponding first port in bridge, all of the port by bridge sends flow control frames, the all devices that indication is connected with this bridge all stops to send the Frame that should be cached in this formation, thereby the number of data frames in this formation is reduced gradually, congested to remove.
Embodiment seven:
The embodiment of the invention seven provides a kind of network system, comprising: the bridge that is connected with server,
Described bridge is used for judging that whether the number of data frames of buffer memory in the first formation of corresponding the first port of bridge is above the first-class control thresholding; Described the first port is the port that described bridge is connected with server; The Frame of buffer memory is that inbound port and outbound port at described bridge all are the Frame of described the first port in described the first formation; When the number of data frames of described the first formation buffer memory surpasses the first-class control thresholding, generate the first-class control frame, described first-class control frame is used to indicate and stops to send the Frame that should be cached to described the first formation; Send described first-class control frame by described the first port to described server.
When the number of data frames of buffer memory surpasses the first-class control thresholding in the first formation of the embodiment of the invention seven corresponding first port in bridge, send flow control frames by the first port to server, the indication server stops to send the Frame that should be cached to this formation, make and stop to send Frame after causing congested virtual machine to receive this flow control frames, thereby the number of data frames of buffer memory in this first formation is reduced gradually, congested to remove.
Embodiment eight:
The embodiment of the invention eight provides a kind of network system, comprising: the bridge that is connected with server,
Described bridge is used for judging whether the number of data frames of buffer memory in the formation of corresponding the first port of bridge surpasses the Flow Control thresholding, if so, the generation flow control frames, described flow control frames is used to indicate and stops to send the Frame that should be cached to described formation; All of the port by described bridge sends described flow control frames.。
When the number of data frames of buffer memory surpasses the Flow Control thresholding in the formation of the embodiment of the invention eight corresponding first port in bridge, all of the port by bridge sends flow control frames, the all devices that indication is connected with this bridge all stops to send the Frame that should be cached in this formation, thereby the number of data frames in this formation is reduced gradually, congested to remove.
One of ordinary skill in the art will appreciate that all or part of step that realizes in above-described embodiment method is to come the relevant hardware of instruction to finish by program, described program can be stored in a kind of computer-readable recording medium, read-only memory for example, disk or CD etc.
More than pause frame sending method, relevant device and system that the embodiment of the invention is provided be described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.