CN1735018A - Flow control method for communication system - Google Patents
Flow control method for communication system Download PDFInfo
- Publication number
- CN1735018A CN1735018A CN 200410059157 CN200410059157A CN1735018A CN 1735018 A CN1735018 A CN 1735018A CN 200410059157 CN200410059157 CN 200410059157 CN 200410059157 A CN200410059157 A CN 200410059157A CN 1735018 A CN1735018 A CN 1735018A
- Authority
- CN
- China
- Prior art keywords
- flow control
- frame
- frame rate
- time
- ethernet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
This invention discloses a flow control method for Ethernet to realize the system-level flow control composed of a plurality of Ethernet devices. Wherein, the method comprises, determining the processing real frame speed; comparing the real speed and maximum frame speed of system; if the real speed is higher, starting the flow control and flow controlled frame contained flow control time; the opposite end stops sending data frame in the said time after receiving flow controlled frame and continues to send data package when the flow time ends. The invention can manage the system-level flow control effectively, avoids abnormality from overload running, and solves the problem that independent flow in Ethernet device can not be controlled precisely.
Description
Technical field
The present invention relates to the communication technology, relate in particular to a kind of flow control methods of communication system.
Background technology
1997, IEEE 802.3x agreement was put into effect, and as 802.3 replenish, had wherein defined the standard of ethernet traffic control, and each chip manufacturer is one after another according to this standard design Ethernet chip, to support the ethernet traffic controlled function subsequently.Define in the Ethernet Flow Control agreement: the Flow Control frame is that the Frame that is used for suppressing in the certain hour section sends, and wishes the Frame that suppresses the opposite end when an ethernet terminal and send that it need send an Ethernet flow control request frame to the opposite end.
Present a kind of flow control method based on Ethernet chip is the data buffer zone size according to chip, the flow threshold thresholding of configuration ethernet Flow Control, after the data traffic of receiver side reaches the max threshold of configuration, the ethernet mac chip initiatively sends the Flow Control frame, requires the opposite end to suspend the transmission of Frame.After the data surplus for the treatment of local terminal is reduced to minimum threshold, resends the Flow Control frame and stop Flow Control the opposite end.
The reference frame of Ethernet chip level Flow Control is the disposal ability of ethernet device chip self.A system that uses Ethernet as communication carrier often not only comprises an ethernet device, as: use integrated plural Ethernet chip or the like in two servers, the embedded communication processor with card of surfing Internet.In such system,, only dispose the Flow Control function of each network chip, on the whole the needs of resolution system Flow Control if the CPU disposal ability is a bottleneck.
Ethernet chip level Flow Control can only solve the Flow Control needs of Ethernet chip self, wants to solve the Flow Control demand of whole system, must be starting point with the disposal ability of system, and the supervisory control system ethernet traffic is controlled the data traffic that each network connects.Therefore, the single data traffic according to each network chip is carried out Flow Control, accurately resolution system Flow Control demand.
The another kind of at present flow control method based on bit rate is to control enabling and closing of Flow Control function according to the bit rate flow bps that ethernet device receives.As shown in Figure 1, the data in the ethernet device reception data buffer exceed max threshold, then start the Flow Control function, and ethernet device sends the flow control request frame; When the data in the reception data buffer are reduced to below the minimum threshold, then stop Flow Control.
The form of carrying out Flow Control based on bit rate has a variety of, as: utilize the reception fifo buffer of Ethernet chip to set thresholding.Receiving the fifo buffer thresholding is unit with the byte, in fact also is based on the Flow Control principle of bit rate.
Because the bit rate flow usually is a standard that is used for weighing the Ethernet chip disposal ability, therefore, be more suitable for the Flow Control of chip-scale based on the Flow Control of bit rate, but this and be not suitable for system-level Flow Control demand.Because system-level Flow Control needs processing procedure and the disposal ability of taking into account system CPU, and when weighing the CPU disposal ability, it is more objective than using bit rate to use frame rate.Therefore the Flow Control based on bit rate is not suitable for system-level flow-control operation.
Summary of the invention
The invention provides a kind of flow control methods of communication system, to solve the problem that existing fluidics can not satisfy system-level Flow Control demand.
A kind of flow control methods of communication system, described communication system comprise processor and a plurality of ethernet device that is used to receive, send data that is used for deal with data; Said method comprising the steps of:
A, determine the actual frame rate of processor;
The greatest frame rate that the actual frame rate of B, comparator processor and system allow, and actual frame rate start flow control during greater than greatest frame rate and by system in need the ethernet device of Flow Control to send the Flow Control frame that comprises the Flow Control time to the Frame transmitting terminal;
C, the opposite end that receives described Flow Control frame stop to send Frame in described Flow Control in the time, and finish the back in this Flow Control time and recover to send Frame.
The computational methods of described Flow Control time:
According to the Frame rate calculations in the unit interval:
Perhaps, calculate according to the time difference under the same traffic:
N Frame of the fastest reception of Flow Control time=system time-time of a current reception N Frame.
The present invention has following beneficial effect:
1, the Flow Control from chip-scale has risen to system-level Flow Control, has adapted to development of internet technology, makes the configuration management of Ethernet Flow Control more reasonable simultaneously.
2, can avoid the impact of extraneous excess load data traffic to local system, it is unusual to avoid system's overload operation to occur, the stability of raising system operation.
3, improved the reliability of flow system flow control.Solved the flow system flow control problem that each ethernet device independence Flow Control can't accurately embody in the system.
4, accurately calculate the Flow Control time according to actual flow, avoid unnecessary time waste, the precision of Flow Control is provided.
5, can manage the Flow Control of local each ethernet device, can realize effective isolation, avoid the low discharge ethernet device in flow control procedure, to be affected big flow device.
Description of drawings
Figure 1 shows that hardware chip Flow Control thresholding example;
Figure 2 shows that system logic structure figure based on ethernet communication;
Figure 3 shows that the system-level Ethernet flow control method flow chart of the present invention.
Embodiment
At first by system of the analysis of building-block of logic as shown in Figure 2 in the process of utilizing Ethernet to communicate, the bottleneck that may exist.As can be seen from the figure, the whole system bottleneck that may occur in communication process has only two place: CPU, ethernet device.Suppose that ethernet device is a bottleneck, that is to say that so CPU can handle the business datum that ethernet device receives easily, like this, this system has also carried out flow control with regard to not needing.So, have only when CPU is the system communication bottleneck, just need carry out flow control to system.Therefore, the scope of application of this method is: in a system based on ethernet communication, when the disposal ability of CPU becomes the system communication bottleneck, can use the present invention to realize configuration and management to system's Flow Control.
Solve the configuration and the management of the control of flow system flow, reference data that must the resolution system flow control, when start Flow Control and when stop Flow Control.
The reference source of flow system flow yes flow system flow, but flow system flow can have the different forms of expression, as bit rate bps, frame rate fps.The present invention adopts frame rate fps as the reference data of weighing flow system flow, this selection is not random, because frame rate fps not only can representation system flow size, it can also embody the disposal ability of a system, can be used as the criterion of systematic function.
Chosen the reference data of flow system flow control, when decision starts Flow Control, when stops Flow Control again.According to the disposal ability of system CPU, the maximum that can find flow system flow to allow, i.e. the largest frames quantity of system's processing each second: Max fps.When Frame speed from the outside has surpassed the maximum that allows, system CPU can't be loaded, and the situation of admission control will take place, and at this moment, for fear of further loss, just needs to start Flow Control.As for when stopping Flow Control? according to the ethernet traffic control protocol, when sending the flow control request frame, comprised the time length of request Flow Control in the protocol frame.Therefore, when the system start-up Flow Control, can calculate the time of needs Flow Control, be filled in the flow control request frame according to current actual flow.After the Flow Control time finished, data then can be continued to send in the opposite end, and Flow Control has just stopped naturally.
When comprising a plurality of ethernet device in the system, if only there is the received frame speed of an equipment very big in these ethernet devices, the received frame speed of other ethernet devices is very little, to be activated Flow Control just unreasonable for the ethernet device that frame rate is little so, therefore, the ethernet device that frame rate is little does not need to send the Flow Control frame to the opposite end.In order to address this problem, just must add up the frame rate of each ethernet device, have only when the received frame speed of ethernet device is not less than predetermined threshold value, just start this equipment and send the Flow Control frame, this threshold value can be the mean value of greatest frame rate, its computational methods are: the greatest frame rate that allows with system rounds then divided by intrasystem network equipment quantity.
Can use following two kinds of algorithms to determine for the calculating of Flow Control time:
A, according to the Frame rate calculations in the unit interval:
For example: suppose Max fps=400k fps; Unit interval is 1ms; In a unit interval, system receives 800 Frames, Current fps=800k fps so; According to computing formula, the Flow Control time equals 1 unit interval, i.e. 1ms.
B, calculate according to the time difference under the same traffic:
N Frame of the fastest reception of Flow Control time=system time-time of a current reception N Frame gives an example: suppose Max fps=400k fps; Unit interval is 1ms, and receiving 4000 Frames so needs 10ms.If currently receive 4000 Frames and only used 8ms (being equivalent to 500k fps), the Flow Control time equals 10ms-8ms=2ms so.
Obtain Flow Control after the time, also need to convert to the unit that uses in the Flow Control frame, according to the IEEE802.3 agreement, the timeslice unit in the Flow Control frame is the time that transmission 512bits needs on the link.For example: the 100M ethernet link, transmission 512bits needs 5.12us, so 1ms approximates 195 Flow Control timeslices.
As shown in Figure 3, the process of realization Flow Control is as follows:
A, according to the disposal ability of system CPU, the handling property of calculating or test macro can obtain the maximum stream flow that system can handle, and base unit is frame per second (fps), be the greatest frame rate (being the largest frames disposal ability) that system can handle, hereinafter use Max fps to replace.
B, in the system communication process, the number of data frames that statistics CPU receives and handles, these data are equal to the number of data frames sum that all ethernet devices receive in the system, by the frame rate Current fps in this quantity unit of account time, the i.e. actual frame rate of processor.
The greatest frame rate whether actual frame rate that C, decision processor handle can be handled greater than system if then start flow control, and is carried out step D; Otherwise system should start traffic monitoring immediately, prepares flow control next time, promptly carries out step B.
The frame rate of each ethernet device in D, the inquiry system starts this equipment and sends the Flow Control frame when the received frame speed of ethernet device is not less than predetermined threshold value.
E, CPU structure Ethernet flow control request frame calculates and the setting Flow Control time, needs the ethernet device of Flow Control to send to the opposite end by this locality, and the request opposite end stops to send Frame in the time period of setting.
During structure Ethernet Flow Control frame, the address { 01:80:C2:00:00:01} of target MAC (Media Access Control) address use agreement regulation.Source MAC use to send the MAC Address of the ethernet device of data, so different ethernet device is when transmission flow control request frame system in, and source MAC has nothing in common with each other.
If opposite equip. is supported the Ethernet Flow Control in the IEEE802.3x agreement, so in the Flow Control of setting in the time period, the opposite end will be suspended to local terminal transmission Frame.The opposite end is after the Flow Control time receives, and the Frame that restarts local terminal sends.
The traffic monitoring of F, restarting systems enters step B.
Obviously, those skilled in the art can carry out various changes and modification to flow control method of the present invention and not break away from the spirit and scope of the present invention.If of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.
Claims (6)
1, a kind of flow control methods of communication system, described communication system comprise processor and a plurality of ethernet device that is used to receive, send data that is used for deal with data; It is characterized in that said method comprising the steps of:
A, determine that processor works as the actual frame rate of pre-treatment;
The greatest frame rate that the actual frame rate of B, comparator processor and system can handle, and actual frame rate start flow control during greater than greatest frame rate and by system in need the ethernet device of Flow Control to send the Flow Control frame that comprises the Flow Control time to the Frame transmitting terminal;
C, the opposite end that receives described Flow Control frame stop to send Frame in described Flow Control in the time, and finish the back in this Flow Control time and recover to send Frame.
2, the method for claim 1 is characterized in that steps A also comprises step before:
A, according to the disposal ability of processor in the system, by the greatest frame rate of calculating or the handling property of test macro comes initialization system to handle.
3, the method for claim 1 is characterized in that, the number of data frames that receives and handle by the statistical disposition device in the steps A is determined the actual frame rate of processor.
As claim 1,2 or 3 described methods, it is characterized in that 4, the described Flow Control time determines that according to the Frame speed in the unit interval its computing formula is:
Perhaps, the described Flow Control time determines that according to the time difference under the same traffic its computing formula is:
N Frame of the fastest reception of Flow Control time=system time-time of a current reception N Frame
5, the method for claim 1 needing in the system is characterized in that the ethernet device of Flow Control to determine by following step:
The actual reception frame rate of each ethernet device in the statistical system;
Whether judge the actual reception frame rate more than or equal to predetermined threshold value, if then this equipment needs Flow Control, otherwise this equipment does not need Flow Control.
6, method as claimed in claim 5 is characterized in that described predetermined threshold value is the mean value of greatest frame rate, and its computational methods are: the greatest frame rate that allows with system rounds then divided by intrasystem network equipment quantity.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200410059157 CN1735018A (en) | 2004-08-11 | 2004-08-11 | Flow control method for communication system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200410059157 CN1735018A (en) | 2004-08-11 | 2004-08-11 | Flow control method for communication system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN1735018A true CN1735018A (en) | 2006-02-15 |
Family
ID=36077234
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200410059157 Pending CN1735018A (en) | 2004-08-11 | 2004-08-11 | Flow control method for communication system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1735018A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008028418A1 (en) * | 2006-09-06 | 2008-03-13 | Huawei Technologies Co., Ltd. | A method and system for message flow control |
CN101645834B (en) * | 2009-08-28 | 2012-02-22 | 北京星网锐捷网络技术有限公司 | Ethernet flow control method, device and network device |
CN101610220B (en) * | 2009-06-18 | 2012-12-05 | 中兴通讯股份有限公司 | Method and system for controlling service sending flow rate |
CN104852856A (en) * | 2015-05-19 | 2015-08-19 | 烽火通信科技股份有限公司 | Data flow control method for POTS (Plain Old Telephone Service) equipment and system |
-
2004
- 2004-08-11 CN CN 200410059157 patent/CN1735018A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008028418A1 (en) * | 2006-09-06 | 2008-03-13 | Huawei Technologies Co., Ltd. | A method and system for message flow control |
CN101610220B (en) * | 2009-06-18 | 2012-12-05 | 中兴通讯股份有限公司 | Method and system for controlling service sending flow rate |
CN101645834B (en) * | 2009-08-28 | 2012-02-22 | 北京星网锐捷网络技术有限公司 | Ethernet flow control method, device and network device |
CN104852856A (en) * | 2015-05-19 | 2015-08-19 | 烽火通信科技股份有限公司 | Data flow control method for POTS (Plain Old Telephone Service) equipment and system |
CN104852856B (en) * | 2015-05-19 | 2018-01-19 | 烽火通信科技股份有限公司 | Data flow control method and system for POTS equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108536543B (en) | Receive queue with stride-based data dispersal | |
US6901593B2 (en) | Active queue management with flow proportional buffering | |
CN108616458B (en) | System and method for scheduling packet transmissions on a client device | |
US7480238B2 (en) | Dynamic packet training | |
EP1701506B1 (en) | Method and system for transmission control protocol (TCP) traffic smoothing | |
CN1674485A (en) | Method and system for dynamically provisioning computer system resources | |
CN1495588A (en) | Management method of network interface module energy consumption in wireless computing equipment and its system | |
CN1218346A (en) | Communication method, and data communications terminal, with data communication protocol for Inter-layer flow control | |
US8605578B1 (en) | System and method for handling of destination host side congestion | |
CN101069173A (en) | System for low power operation of wireless lan interfaces | |
CN113489575A (en) | Data transmission method and device and electronic equipment | |
CN101047615A (en) | Control method for Ethernet data flow | |
WO2005064861A1 (en) | Method and device for controlling a queue buffer | |
CN1853387A (en) | Speculative pre-fetch of a protocol control block from an external memory unit | |
JP5473406B2 (en) | Network processing apparatus and processing method thereof | |
CN104753813A (en) | DMA (Direct Memory Access) message transfer method | |
CN1735018A (en) | Flow control method for communication system | |
US7472194B2 (en) | Data channel resource optimization for devices in a network | |
CN102148743B (en) | Data flow control method, device and mobile terminal | |
CN112367270A (en) | Method and equipment for sending message | |
CN110022218B (en) | Multicast communication method, terminal device and storage medium | |
CN108234595B (en) | Log transmission method and system | |
US20040240388A1 (en) | System and method for dynamic assignment of timers in a network transport engine | |
CN101494569B (en) | Method and apparatus for processing message | |
CN1266883C (en) | Method for controlling network port flow |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |