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 the Flow Control frame and stop to send data.
In view of this, the embodiment of the invention provides:
A kind of pause frame sending method comprises:
Judge whether the data in buffer number of frames surpasses the first-class control thresholding in first formation of corresponding first port in the bridge; Described first port is the port that described bridge is connected with server; The data in buffer frame is that inbound port and outbound port at described bridge all are the Frame of described first port in described first formation;
When the described first formation data in buffer number of frames 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 first formation;
Send described first-class control frame by described first port to described server.
A kind of pause frame sending method comprises:
Judge whether the data in buffer number of frames surpasses the Flow Control thresholding in the formation of corresponding first port in the bridge, if, generating the Flow Control frame, described Flow Control frame 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 frame.
A kind of bridge comprises:
First judging unit is used for judging whether the data in buffer number of frames surpasses the first-class control thresholding in first formation of corresponding first port of described bridge; Described first port is the port that described bridge is connected with server; The data in buffer frame is that inbound port and outbound port at described bridge all are the Frame of described first port in described first formation;
Flow Control frame generation unit is used for generating the first-class control frame when the first formation data in buffer number of frames 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 first formation;
First transmitting element is used for sending described first-class control frame by described first port to described server.
A kind of bridge comprises:
Judging unit is used for judging whether the data in buffer number of frames surpasses the Flow Control thresholding in the formation of corresponding first port of described bridge;
Flow Control frame generation unit, be used for when the judged result of described judging unit when being, generate the Flow Control frame, described Flow Control frame 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 frame 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 whether the data in buffer number of frames surpasses the first-class control thresholding in first formation of corresponding first port of bridge; Described first port is the port that described bridge is connected with server; The data in buffer frame is that inbound port and outbound port at described bridge all are the Frame of described first port in described first formation; When the described first formation data in buffer number of frames 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 first formation; Send described first-class control frame by described first port to described server;
Described server is used to receive described first-class control frame, stops to send the Frame that should be cached to described first formation.
A kind of network system comprises: server, the bridge that is connected with server,
Described bridge is used for judging whether the data in buffer number of frames surpasses the Flow Control thresholding in the formation of corresponding first port of bridge, if, generating the Flow Control frame, described Flow Control frame 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 frame;
Described server is used to receive described Flow Control frame, stops to send the Frame that should be cached to described formation.
When the data in buffer number of frames surpasses the first-class control thresholding in first formation of one embodiment of the invention corresponding first port in bridge, send the Flow Control frame by 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 frame, thereby remove congested.
When the data in buffer number of frames 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 the Flow Control frame, 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:
101, judge whether the data in buffer number of frames surpasses the first-class control thresholding in first formation of corresponding first port in the bridge; Described first port is the port that described bridge is connected with server; The data in buffer frame is that inbound port and outbound port at described bridge all are the Frame of described first port in described first formation;
102, when the described first formation data in buffer number of frames 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 first formation;
103, send described first-class control frame by described first port to described server.
Wherein, first formation is the formation in the loopback set of queues of the first port correspondence in the subsequent embodiment two.
When the data in buffer number of frames surpasses the first-class control thresholding in first formation of the embodiment of the invention one corresponding first port in bridge, send the Flow Control frame by 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 frame, 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 frame that Fig. 2 provides for the embodiment of the invention two sends, Fig. 3 sends schematic diagram for the Flow Control frame that the embodiment of the invention two provides, and pause frame sending method specifically comprises:
201, bridge receives Frame from server (such as Server1) by first port, according to the outbound port of this Frame at bridge, this Frame is deposited in the outbound port corresponding queues group of the loopback set of queues of corresponding first port or this Frame.
202, whether the number of data frames of judging formation in the loopback set of queues of corresponding first port reaches the first-class control thresholding, and according to judged result, control PFC frame sends.
203, whether the number of data frames of judging formation (i.e. second formation) in the non-loopback set of queues of corresponding 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 first port reception from Server1.
Frame from Server1 in this step is media interviews control (the MediaAccess Control that has 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 first port at the outbound port of bridge, if 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 MAC Address that prestores and outbound port, search the outbound port of this Frame at bridge, if the MAC Address of target network element is the MAC Address of virtual machine among the Server1, then this Frame is still 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 first port at the outbound port of bridge.
403, this Frame is the Frame that transmits between the Server1 internal virtual machine, need output to virtual machine in the Server1 from the first port loopback, 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 pass to virtual machine 1, then the outbound port of this Frame still is first port, this Frame need be looped back to virtual machine 1 from first port, priority tag according to the Frame that is received, this Frame is cached in the loopback set of queues in should the priority query of priority, such as, be cached in first formation.
404, this Frame need be transferred to other equipment by bridge from Server1, knows the outbound port of this Frame at bridge, and this Frame is sent to buffer memory in this outbound port corresponding queues group.
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 the non-loopback set of queues of this outbound port correspondence; 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 is received, this Frame is cached in the non-loopback set of queues in should the priority query of priority.
Consult Fig. 5, step 202 specifically comprises:
501, judge whether certain priority query's data in buffer number of frames surpasses the first-class control thresholding in the loopback set of queues of corresponding first port, if, carry out 502, if not, 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 first port, this first-class control frame is passed to each virtual machine among the Server1 by 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 frame can be the PFC frame.
Consult Fig. 6, step 203 specifically comprises:
601, whether the non-loopback set of queues medium priority formation data in buffer number of frames of judging corresponding first port surpasses the second Flow Control thresholding, if, carry out 602, if not, process ends.
Wherein, the non-loopback set of queues medium priority formation data in buffer frame of this first port is that the inbound port at this bridge is not first port, is the Frame of first port at the outbound port of this bridge.
602, generate the second Flow Control frame, this second Flow Control frame is used to indicate and stops to send the Frame that should be cached to this priority query, and sending this second Flow Control frame by other ports except that first port on the bridge, the equipment that receives this second Flow Control frame 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 first port of bridge according to Server1 and the ratio of other attachable link bandwidth sums of this bridge are provided with, wherein, other attachable link bandwidth sums of this bridge are the bandwidth sum of other ports except that first port and the link between the corresponding device on this bridge.
In order to make the foregoing description 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 among the Server1 1, 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 first port, this PFC frame is passed to each virtual machine among the Server1 by first port and physical network card, then virtual machine 2 receives this PFC frame, stops to send the Frame of this priority.
When the data in buffer number of frames surpasses the first-class control thresholding in the priority query of the embodiment of the invention two loopback set of queues of corresponding first port in bridge, send the Flow Control frame by 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 frame 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 data in buffer number of frames 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 frame that the embodiment of the invention three provides, and this method specifically comprises:
701, by the Frame of first port reception, Frame is deposited in the set of queues of corresponding first port from server (such as Server1).
Safeguard one group of priority query in the embodiment of the invention in the set of queues of corresponding 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 first port reaches the Flow Control thresholding, if not, process ends is if carry out 703.
703, generate the Flow Control frame, this Flow Control frame is used to indicate and stops to send the Frame that should be cached to this priority query, and sends this Flow Control frame by all of the port of this bridge.
Wherein, this Flow Control frame can be the PFC frame.
The all devices that is connected with this bridge all receives this Flow Control frame, after then the virtual machine of the corresponding priority data frame of transmission is received this Flow Control frame among the Server, stops to send the Frame of corresponding priority.
In order to make the foregoing description 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 among the Server1 1, 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 data in buffer number of frames 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 the Flow Control frame, 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 frame as the virtual machine in congested source in the server, stop to send the Frame of corresponding priority, make that the data in buffer number of frames 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:
First judging unit 901 is used for judging whether the data in buffer number of frames surpasses the first-class control thresholding in first formation of corresponding first port of described bridge; Described first port is the port that described bridge is connected with server; The data in buffer frame is that inbound port and outbound port at described bridge all are the Frame of described first port in described first formation;
Flow Control frame generation unit 902 is used for generating the first-class control frame when the first formation data in buffer number of frames 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 first formation;
First transmitting element 903 is used for sending described first-class control frame by described first port to described server.
When the data in buffer number of frames surpasses the first-class control thresholding in first formation of the embodiment of the invention four corresponding first port in bridge, send the Flow Control frame by 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 frame, the data in buffer number of frames reduces gradually in this first formation thereby make, and is congested to remove.
Consult Figure 10, the embodiment of the invention five provides a kind of bridge, comprise: first judging unit 1001, Flow Control frame generation unit 1002, first transmitting element 1003, second judging unit 1004, second transmitting element 1005, Data Receiving unit 1006, the 3rd judging unit 1007 and preservation unit 1008, wherein
Data Receiving unit 1006 is used for receiving from the data in server frame.
The 3rd judging unit 1007 is used to judge whether described Frame is first port at the outbound port of described bridge, and described first port is the port that described bridge is connected with server.
Preserve unit 1008, be used for when the judged result of described the 3rd judging unit 1007 when being, described Frame is deposited in first formation of corresponding first port, when the judged result of described the 3rd judging unit 1007 for not the time, described Frame is deposited in the outbound port corresponding queues of described Frame.
First judging unit 1001 is used for judging whether the data in buffer number of frames surpasses the first-class control thresholding in first formation of corresponding first port of described bridge; The data in buffer frame is that inbound port and outbound port at described bridge all are the Frame of described first port in described first formation.
Second judging unit 1004, whether the second formation data in buffer number of frames that is used to judge corresponding described first port surpasses the second Flow Control thresholding, and the described second formation data in buffer frame is not first port, is the Frame of described first port at the outbound port of described bridge for the inbound port at described bridge.
Flow Control frame generation unit 1002 is used for generating the first-class control frame when the first formation data in buffer number of frames 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 first formation; When the second formation data in buffer number of frames surpasses the second Flow Control thresholding, generate the second Flow Control frame, the described second Flow Control frame is used to indicate and stops to send the Frame that should be cached to described second formation.
First transmitting element 1003 is used for sending described first-class control frame by described first port to described server.
Second transmitting element 1005 is used for sending the described second Flow Control frame by other ports, and described other ports are the port except that first port on the described bridge.
The embodiment of the invention five corresponding first port in bridge is preserved two formations, when data in buffer number of frames in first formation of corresponding first port surpasses the first-class control thresholding, send the Flow Control frame by 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 frame, the data in buffer number of frames reduces gradually in this first formation thereby make, and is 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 data in buffer number of frames surpasses the Flow Control thresholding in the formation of corresponding first port of described bridge;
Flow Control frame generation unit 1102, be used for when the judged result of described judging unit when being, generate the Flow Control frame, described Flow Control frame 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 frame by all of the port of described bridge.
When the data in buffer number of frames 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 the Flow Control frame, 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 whether the data in buffer number of frames surpasses the first-class control thresholding in first formation of corresponding first port of bridge; Described first port is the port that described bridge is connected with server; The data in buffer frame is that inbound port and outbound port at described bridge all are the Frame of described first port in described first formation; When the described first formation data in buffer number of frames 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 first formation; Send described first-class control frame by described first port to described server.
When the data in buffer number of frames surpasses the first-class control thresholding in first formation of the embodiment of the invention seven corresponding first port in bridge, send the Flow Control frame by 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 frame, the data in buffer number of frames reduces gradually in this first formation thereby make, and is 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 data in buffer number of frames surpasses the Flow Control thresholding in the formation of corresponding first port of bridge, if, generating the Flow Control frame, described Flow Control frame 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 frame.。
When the data in buffer number of frames 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 the Flow Control frame, 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 the foregoing description method is to instruct relevant hardware 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 provided are 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, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.