CN1266878C - Bandwidth controller and method - Google Patents

Bandwidth controller and method Download PDF

Info

Publication number
CN1266878C
CN1266878C CNB021024650A CN02102465A CN1266878C CN 1266878 C CN1266878 C CN 1266878C CN B021024650 A CNB021024650 A CN B021024650A CN 02102465 A CN02102465 A CN 02102465A CN 1266878 C CN1266878 C CN 1266878C
Authority
CN
China
Prior art keywords
counter
unit
formation
control
bandwidth
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.)
Expired - Lifetime
Application number
CNB021024650A
Other languages
Chinese (zh)
Other versions
CN1434600A (en
Inventor
陈俊儒
吴昌琏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Realtek Semiconductor Corp
Original Assignee
Realtek Semiconductor Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Realtek Semiconductor Corp filed Critical Realtek Semiconductor Corp
Priority to CNB021024650A priority Critical patent/CN1266878C/en
Publication of CN1434600A publication Critical patent/CN1434600A/en
Application granted granted Critical
Publication of CN1266878C publication Critical patent/CN1266878C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Abstract

The present invention provides a bandwidth controlling device and a method thereof, which is used in an exchange controller of a network exchanger for simplifying counting calculation required by bandwidth control and is also used in the design of a dual counter to reach the goals of circuit simplification and the accurate control of bandwidth. The bandwidth controlling device comprises a first counter, a control logic, an action device, a second counter and a timer, wherein signals are increased and decreased so that the operation of adding one or subtracting one from the value of the first counter can be carried out, whether sealed packages can go into a queue in the exchange controller is determined according to the value of the first counter, the action device executes the actions of outputting the sealed packages from and inputting the sealed packages into the queue, the second counter is arranged in the action device, one is added to the value of the second counter for inputting one byte, the second counter is reset to zero when the value of the second counter is accumulated to a unit byte while an increasing signal is transferred to the control logic, and the timer generates a decreasing signal transferred to the control logic at the interval of unit time. The bandwidth controlling method mainly uses the controlling device for inputting the sealed packages; one is subtracted from the value of the first counter at the interval of the unit time, and thereby, the data quantity in the unit time is restricted to only one unit byte which can be fixedly input.

Description

A kind of bandwidth control apparatus and method
Technical field
The present invention relates to a kind of bandwidth control apparatus and method, refer to the required counting computing of a kind of mat simplification bandwidth control especially, and the design of dual counter, to reach the purpose of simplifying circuit and accurate control bandwidth.
Background technology
Because the application of world-wide web is more and more abundant and variation, for the also raising day by day of demand of bandwidth, so the rise of wideband service is inevitable trend.For example, existing more and more many Internet services supplier (Internet Service Provider, abbreviation ISP) provides the wideband online service of Asymmetrical Digital Subscriber Line (asymmetrical digital subscriber line is called for short ADSL) with cable modem (cablemodem).Yet, because these two kinds of wideband services are all used Ethernet online (Ethernet connection) in client, and Ethernet is a target so that maximum bandwidth to be provided as far as possible promptly in design, therefore, if do not control the use of client bandwidth, the ISP dealer just can't provide the rate scheme (promptly collecting different expenses according to different bandwidth) of client different brackets, but also may make ISP dealer's the network equipment can't bear load.In addition, with regard to network manager,, also need manage control bandwidth, to avoid relevant issues such as network congestion in the face of being the network traffics of growing up as the index.
For ISP dealer and network manager, for reaching the purpose of bandwidth control (bandwidth control), network switch (network switch) is the network equipment of using always.And the general networking interchanger is carrying out bandwidth when control, is mostly to adopt the practice of " leaking bucket " (leaky bucket) (for ease of style of writing, below claim with leaky bucket or bucket).Please refer to Fig. 1, it is the running schematic diagram of leaky bucket.Leaky bucket 10 similarly is a funnel, and the inside can be adorned B " token " (token) 11 at most.For etc. for the package 13 to be transmitted, token 11 must be arranged, could be to network by formation 12.Along with the transmission that package 13 continues, token 11 also can with minimizing.After token 11 uses, just can't continue transmission again.Therefore,, just can control the data volume (because of time per unit can only use a certain amount of token 11) that time per unit is exported, reach the purpose of bandwidth control if can as R/second, replenish the token 11 among the bucket 10 with a fixing speed.The data volume of each token 11 representative, then different with different network kenels.For example, in Ethernet, because package 13 is not of uniform size, just with the data volume of a byte as a token 11; And in asynchronous transfer mode (Asynchronous TransferMode is called for short ATM), be unit of transfer with the identical unit of size (cell), with regard to available this data volume as a token 11.In addition, when bucket 10 is full, follow-up additional token 11 just can be dropped, and can not be used.
As on real the work, traditional practice mainly contains two kinds.First kind is the real leaky bucket10 that does in a complete set of ground; Second kind then is the practice of simplifying, and the mode with leaky bucket 10 replenishes token 11 by a fixing speed, changes into every the set time, just is reset to the state of filling.The advantage of first method is, control bandwidth more accurately, but that shortcoming is a cost is too high; Though second method can reduce cost, can't provide accurate bandwidth control.
Then further specify this two kinds of practices again.See first kind earlier.Want the real work in a complete set of ground, have two variablees most important: the capacity B of the storage of token 11 and bucket 10 among the bucket 10.Can must be able to grasp the storage of token 11 by formation 12 in order to judge package 13.If represent token 11 storages of bucket 10 at time t with CNTR (t), and suppose to replenish token 11 with R/second speed, then the value of CNTR (t) is smaller among CNTR (t-1)+R and the capacity B.On real work of circuit, must write down CNTR (t) with a counter (counter), but by the aforementioned value of calculating CNTR (t), the renewal of the value of counter involves the add operation of bigger numerical, thereby the design meeting complexity of its interlock circuit, cost is also quite high.
As for second kind of practice, in order to reduce cost, then be to use the quite simple ripple counter (ripple counter) of circuit, write down the storage of token 11 among the bucket 10.Do to add one or subtract one computing though ripple counter is can be at an easy rate real, be difficult to reach apace the computing of plus-minus bigger numerical.Therefore, this practice is the computing to set just, replaces the computing of addition.If leaky bucket 10 is empty originally, replenish token 11 with per second R speed, will fill up through B/R bucket second 10.It is therefore, real that to do to go up be exactly that just the value with ripple counter is reset to B, avoids first kind of practice need do the signed magnitude arithmetic(al) of bigger numerical with this every B/R second.Yet so the practice can cause coarse bandwidth control.Because at each B/R time section of second, B token 11 not necessarily all uses at every turn, but needs only one to next time section, has B token 11 to use again, so the data output variable of each unit interval is just unfixing, just can't reach accurate bandwidth control naturally.
Summary of the invention
The objective of the invention is to be desirable to provide a kind of bandwidth control apparatus and method simply and accurately, can carry out the accurate bandwidth control of aforementioned first kind of practice, can as aforementioned second kind of practice, reduce circuit design and manufacturing cost again.
According to a first aspect of the invention, provide a kind of bandwidth control apparatus, bandwidth control apparatus is arranged in the exchange control unit of network switch, and this exchange control unit comprises at least one formation, and in order to temporary package waiting for transmission, this bandwidth control apparatus comprises:
Timer produces the signal that successively decreases every a unit interval;
First counter, according to increment signal and this signal that successively decreases, carry out the increase and decrease computing:
The control logic unit connects the timer and first counter respectively, judges that according to the value of this first counter can package enter this formation; And
Movement device comprises second counter, is connected to this formation and this control logic unit, carries out package input and this formation of output, and every input one unit byte, promptly produces this increment signal.
According to a second aspect of the invention, provide a kind of band width control method, this method is applicable to that in the exchange control unit, this exchange control unit comprises at least one formation, and in order to a temporary package waiting for transmission, described method comprises the following steps:
Every a unit interval, produce a timing signal:
Reduce by a count value according to this timing signal;
Increase this count value according to a count signal;
Relatively this count value and a threshold value, and export a control signal according to comparative result;
Wherein, the quantity that this control signal is imported the predetermined quantity of this packet data in this formation and counted this packet data of this formation of input in order to control is to produce this count signal.
The principle of the invention is that the counting computing that leaky bucket is relevant is simplified, so that use any simple counter, as ripple counter, does in fact.In addition, and, reach the accuracy of leaky bucket in bandwidth control by the design of two counters.
Token replenishes with per second R speed, in other words, promptly is every 1/R second of additional token.In addition, allow each token all represent certain data volume, this certain data volume of every transmission promptly reduces by a token.If 1/R is considered as a unit interval second, this certain data volume is considered as a unit data, and then the running of leakybucket just becomes time per unit and increases a token, and every transmission one unit data, promptly reduces by a token.Thus, the computing of the bigger numerical that leaky bucket is originally required, just be reduced to add one with subtract one computing.
Mode based on aforementioned simplified, bandwidth control apparatus of the present invention is promptly with two counters (hereinafter referred to as first counter and second counter), a timer (timer) and a control logic unit, add a movement device of carrying out package turnover formation, come the real leaky bucket that does.Its How It Works is, every a unit interval, timer promptly sends a signal to the control logic unit, and the value of first counter is subtracted one; Every transmission one unit data of movement device, the value that the control logic unit is about to first counter adds one.In the present invention, this unit data calculates with byte, is called unit byte (unitbytes).In addition, first counter has a preset threshold value (threshold), and when first counter arrived this threshold value, the control logic unit promptly disapproved movement device and transmits package again.
In order to know the data of having transmitted a unit byte when, then write down the quantity of the byte of having transmitted with second counter.The present invention is that byte of every transmission is about to its value and adds one with second Counter Design, when its value arrives unit byte big or small, promptly reseting (reset) is zero, and this moment is because of transmitting a unit byte, so the control logic unit can add one with first counter.Because the computing that first and second counter only relates to plus-minus one or resets, so all can use simple counter circuit on real the work.
In sum, by bandwidth control apparatus of the present invention and method, because every through a unit interval, just first counter is subtracted one, this represented in a unit interval, the fixing data volume that can only transmit a unit byte, so control bandwidth accurately, and circuit is real do very simple.
For the ease of understanding bandwidth control apparatus of the present invention and method, the present invention is described in detail below in conjunction with accompanying drawing.
Description of drawings
Fig. 1 is the running schematic diagram of traditional leaky bucket;
Fig. 2 is to use the circuit of the exchange control unit of bandwidth control apparatus of the present invention to link calcspar;
Fig. 3 is that the circuit of bandwidth control apparatus of the present invention links calcspar;
Fig. 4 is a relevant action flow chart of in the band width control method of the present invention package being imported a formation;
Fig. 5 is under different bandwidth and commensurate's byte not, the unit interval choose example schematic.
Drawing reference numeral explanation: 10-leakybucket; The 11-token; The 12-formation; The 13-package; The 20-exchange control unit; The 21-bandwidth control apparatus; 211-first counter; The 212-control logic; The 213-movement device; 2131-second counter; The 214-timer; The 22-formation; The 23-memory; 41 to 51-import the correlation step of a formation with package.
Embodiment
With a preferred embodiment, the present invention is described in detail below in conjunction with accompanying drawing.Referring to Fig. 2, its circuit for the exchange control unit of use bandwidth control apparatus of the present invention links calcspar.As shown in Figure 2, exchange control unit 20 comprises a bandwidth control apparatus 21, at least one formation 22 and a memory 23.Exchange control unit 20 is to be used for a network switch, mainly is the function of carrying out and control packet-switched; Formation 22 is in order to temporary package waiting for transmission; 23 correlated variables values of memory in order to the control of storage bandwidth.
Referring to Fig. 3, it is the circuit binding calcspar of bandwidth control apparatus 21 of the present invention.As shown in Figure 3, bandwidth control apparatus 21 comprises: one first counter 211, a control logic 212, a movement device 213 and a timer 214.First counter 211 is provided with tool one preset threshold value corresponding to this formation.Control logic 212 is coupled to first counter 211, first counter 211 is carried out add one and subtract one computing, and is judged that according to the value of first counter 211 can package enter formation 22.Movement device 213 is coupled to formation 22 and control logic 212, carries out package input and the action of exporting this formation 22, and every input one unit byte, promptly sends one and increases progressively signal to control logic 212.Timer 2 14 is coupled to control logic 212, promptly produces one every a unit interval and successively decreases signal to control logic 212.
Increase progressively signal when control logic 212 receives from movement device 213, and the value of first counter 211 is about to first counter 211 and adds one when not reaching its threshold value; When control logic 212 receives the signal that successively decreases from timer 2 14, and the value of first counter 211 is about to first counter 211 and subtracts one when non-vanishing.
In addition, in movement device 213, corresponding formation 22 is provided with one second counter 2131.When a package is allowed input rank 22, byte of every input, movement device 213 just adds one with the value of second counter 2131; When the value of second counter 2131 arrived a unit byte big or small, movement device 213 promptly produced and increases progressively signal to control logic 212, and second counter 2131 is reset to zero.
As for memory 23, then be coupled to control logic 212, be used for storing the threshold value of first counter 211, the size of unit byte and the correlated variables of the big or small equiband control of unit interval, can be by control logic 212 accesses and setting.
By as can be seen aforementioned, first counter 211 and second counter 2131 are owing to only be the computing of carrying out plus-minus one or reseting, and therefore available any simple counter as ripple counter, does in fact.
Next, will explain orally and how use aforesaid bandwidth control apparatus 21 to carry out bandwidth control.Band width control method of the present invention mainly is every through a unit interval, just produces one by timer 2 14 and successively decreases signal to control logic 212, so that first counter 211 is subtracted one, uses in the restricted unit time the fixing data volume that can only transmit a unit byte.When carrying out bandwidth control as for reality, the relevant action of package transmission then sees also Fig. 4, and it is in the band width control method of the present invention importing package the relevant action flow chart of one formation 22.As shown in Figure 4, this flow process comprises the following steps: to detect a package and arrives at formation 22;
Whether 42 movement devices, 213 inquiry control logics 212 permit this package enters;
Whether the value that 43 control logics 212 are judged first counter 211 less than the threshold value of first counter 211, if, then permit this package and enter, skip to step 45; If not, then disapprove this package and enter, continue following steps;
44 formations 22 are in activating flow control (flow control) and abandoning alternatively in this package.45 movement devices 213 are in regular turn with a byte input rank 22 of this package; 46 movement devices 213 add one with the value of second counter 2131;
Whether the value that 47 movement devices 213 are judged second counter 2131 size of the unit's of arrival byte, if not, then skips to step 50; If then continue following steps;
48 movement devices 213 are reset to zero with second counter 2131, and generation increases progressively signal to control logic 212; 49 control logics 212 add one with the value of first counter 211;
50 judge whether to be input to this package ending; If not, rebound step 45 then; If then continue following steps;
51 finish the action of this package of input.
In abovementioned steps 44, for not meeting the package that sets the bandwidth specification, because it can not enter formation 22, so must do a suitable processing.General commonly used have two kinds of processing modes, and the one, enable flow control, the 2nd, directly abandon package.If adopt the mode of flow control, then exchange control unit 20 must be sent a flow control frame (flow control frame) to the package original device, informs that original device suspends the transmission package.After waiting for a period of time, recover again to transmit.Which kind of, then decide according to the configuration (configuration) of formation 22 as for selecting processing mode.
How size as for the unit interval to determine, mainly comply with fixed bandwidth specification and unit byte size and decide.Please refer to Fig. 5, its form is shown, is in the different bandwidth specification and not under the situation of commensurate's byte, how to choose the example of unit interval.For example, be the situation of 64 bytes with bandwidth 128Kbps in the form (Kbits persecond, promptly 1000 bps) and unit byte, the unit interval is 4ms (a 1ms=signa).With the step of aforementioned band width control method, timer 2 14 every 4ms promptly produce the signal that successively decreases, the value of first counter 211 also with subtract one; In other words, whenever cross the data volume that 4ms just can import a unit byte, i.e. 64 bytes are to formation 22.Equal eight positions according to a byte and convert, but the data volume of per second input rank 22 just equals 128Kb just.
Band width control method of the present invention can also be handled a special case.In principle, the value of first counter 211 can not be added to above its threshold value.But, there is a kind of special case to be:, to be allowed to enter formation 22, as described in step 43 if a package does not reach under the condition of its threshold value in the value of first counter 211; But import successively along with unit byte one by one, just may cause first counter 211 to be added to its threshold value and this package is not imported the special case that finishes.At this moment, band width control method of the present invention allows to continue input, till this package enters formation 22 fully.As for the bandwidth of therefore using up, then from the bandwidth of follow-up unit interval, deduct more.For example, after if this package input finishes, the value of first counter 211 is than its threshold value many, in other words, this package has been used the bandwidth of a unit interval more, therefore, must many one unit interval of wait than normal conditions, first counter 211 is returned to less than its threshold value, restart to import package again to formation 22.
By above-mentioned processing mode, not only can avoid because of run off problem (incomplete package is just as discarded) with waste bandwidth of data that package transmission interrupts causing, see with regard to one period long period, still control bandwidth equally accurately.This also is an advantage of band width control method of the present invention.
About the threshold value of the unit byte-sized and first counter 211, know this field skill person when choosing or adjust with application and other factors easily.As for change slightly and adjustment that the present invention did are used, will not lose main idea of the present invention place, also do not break away from the spirit and scope of the present invention.

Claims (9)

1. bandwidth control apparatus is arranged in the exchange control unit of network switch, and this exchange control unit comprises at least one formation, and in order to temporary package waiting for transmission, this bandwidth control apparatus comprises:
Timer produces the signal that successively decreases every a unit interval;
First counter, according to increment signal and the described signal that successively decreases, carry out the increase and decrease computing:
The control logic unit, the connection timer and first counter judge that according to the value of first counter can package enter this formation respectively; And
Movement device comprises second counter, is connected to described formation and this control logic unit, carries out package input and the operation of exporting this formation, and every input one unit byte, promptly produces this increment signal.
2. bandwidth control apparatus as claimed in claim 1, wherein when this first counter received described increment signal and do not reach threshold value, this first counter added one; When this first counter receives the value of this successively decrease signal and this first counter when non-vanishing, this first counter subtracts one.
3. bandwidth control apparatus as claimed in claim 1, wherein in movement device to should this second counter being set formation, this second counter is imported the byte number of this formation in order to count this package; When the value of this second counter arrived a unit byte big or small, this movement device produced described increment signal, and this second counter is reset to zero.
4. bandwidth control apparatus as claimed in claim 1, wherein this exchange control unit also comprises a memory, be connected to the control logic unit, with the threshold value that stores this first counter, the size of unit byte and the size of unit interval, and for this control logic cell access.
5. bandwidth control apparatus as claimed in claim 1, wherein first counter is a ripple counter.
6. bandwidth control apparatus as claimed in claim 1, wherein unit interval and preset threshold value are adjusted according to the different bandwidth specification.
7. a band width control method is applicable to that in the exchange control unit, this exchange control unit comprises at least one formation, and in order to a temporary package waiting for transmission, described method comprises the following steps:
Every a unit interval, produce a timing signal:
Reduce by a count value according to this timing signal;
Increase this count value according to a count signal;
Relatively this count value and a threshold value, and export a control signal according to comparative result;
Wherein, the quantity that this control signal is imported the predetermined quantity of this packet data in this formation and counted this packet data of this formation of input in order to control is to produce this count signal.
8. band width control method as claimed in claim 7 wherein also comprises continuing this packet data is imported this formation, inputs to this formation fully until this package.
9. band width control method as claimed in claim 7 wherein, if according to control signal, determines this packet data not import in this formation, then carries out flow control and abandons one of this package.
CNB021024650A 2002-01-22 2002-01-22 Bandwidth controller and method Expired - Lifetime CN1266878C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB021024650A CN1266878C (en) 2002-01-22 2002-01-22 Bandwidth controller and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB021024650A CN1266878C (en) 2002-01-22 2002-01-22 Bandwidth controller and method

Publications (2)

Publication Number Publication Date
CN1434600A CN1434600A (en) 2003-08-06
CN1266878C true CN1266878C (en) 2006-07-26

Family

ID=27627570

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB021024650A Expired - Lifetime CN1266878C (en) 2002-01-22 2002-01-22 Bandwidth controller and method

Country Status (1)

Country Link
CN (1) CN1266878C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885879B (en) * 2005-06-21 2010-08-18 华为技术有限公司 Method for preventing VOIP system bandwidth overload
US20070091922A1 (en) * 2005-10-21 2007-04-26 Steven Elliot Method and apparatus for adaptive bandwidth control with a bandwidth guarantee
CN102156281B (en) * 2010-12-17 2012-04-04 浙江大学 Method and device for controlling output data bandwidth of beam former based on single-FPGA (Field Programmable Gate Array)

Also Published As

Publication number Publication date
CN1434600A (en) 2003-08-06

Similar Documents

Publication Publication Date Title
CN1300490A (en) Apparatus and method for monitoring data flow at node on a network
KR100234212B1 (en) The congestion control based on adaptive speed control in packet network
Tang et al. Network traffic characterization using token bucket model
CN101052043A (en) TCP sending algorithm based on sending window and reciprocating time
CN1832483B (en) Method and system for control data transmit in communication system
JP3953819B2 (en) Scheduling apparatus and scheduling method
CN1681262A (en) Method and system for actively managing central queue buffer allocation
CN103457871B (en) Based on the increasing window method of the congestion avoidance phase of deferred constraint in DCN
US20110242974A1 (en) Network transport system with hybrid dynamic bandwidth allocation mechanism and method of operation thereof
CN1465163A (en) Distributed usage metering of multiple networked devices
CN1514609A (en) Rate control based on class and using multithreshold leakage unit
CN101702669A (en) Bandwidth allocation method and system
CN102291389A (en) Cross-layer congestion control method in satellite network
JP2002223240A (en) Method for approximating weighted random early detection buffer admittance algorithm
CN103888317B (en) A kind of unrelated network redundancy flow removing method of agreement
CN1057416C (en) A method and a device for monitoring channel split data packet transmission
CN1285186C (en) Ascending link bandwidth dynamic distribution method and appts. based on ethernet passive optical network
CN1266878C (en) Bandwidth controller and method
CN1638362A (en) Parallel data link layer controllers in a network switching device
CN1536815A (en) Method for making message flow limitation by adopting token leakage cylinder
CN101431424A (en) Accounting method based on data packet
CN103152192A (en) Data transmission method and network management system
CN1581848A (en) Flow regulating method for ensuring integrated flow fairness of guaranted repeat business
CN1638385A (en) Parallel data link layer controllers in a network switching device
CN1134136C (en) Method for implementing hierarchical direction to randomly and early discard queue management mechanism and circuit

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CX01 Expiry of patent term
CX01 Expiry of patent term

Granted publication date: 20060726