Bandwidth control method and device for network switch
AssigneeF 3 Incorporation
InventorJung-You Feng
Life of this patent
Estimating the term…
Abstract
A bandwidth control method and a bandwidth control device for a network switch are disclosed. When a client port has a packet to be transmitted, the average traffic rate Tr[n+1] of the client port generated before the time slot n+1 is determined by Tr[n+1]=g*Tr Δ[n]+(1−g)*Tr[n], where g<1, TrΔ[n] is the traffic rate of the client port in time slot n, and Tr[n] is an actual average traffic rate generated before time slot n. Only when Tr[n+1] is smaller than the bandwidth threshold Tr_pre of the client port, the packet is allowed to be transmitted.
Claims11
A bandwidth control device for a network switch having a plurality of client ports and at least one uplink port to switch packets among the client ports and the uplink port, each client port having a predefined bandwidth threshold, the bandwidth control device comprising:
- a first multiplier for multiplying a traffic rate TrΔ[n] of a client port in a time slot n by a first multiplicator g (g<1), where the time slot n is defined as a time interval from time tn to tn+1, and the traffic rate represents length of transmitted packets;
- a second multiplier for multiplying an average traffic rate Tr[n] of the client port actually generated before time slot n and stored in the register 34 by a second multiplicator 1−g;
- an adder for adding outputs from the first multiplier and the second multiplier, so as to obtain an average traffic rate of the client port before time slot n+1 as Tr[n+1]=g*TrΔ[n]+(1−g)*Tr[n];
- the register provided for temporarily storing the average traffic rate Tr[n+1] of the client port generated before time slot n+1;
- and
- a comparator for comparing the average traffic rate Tr[n+1] of the client port generated before time slot n+1 and a bandwidth threshold Tr_pre of the client port, and if Tr[n+1] is smaller than Tr_pre, the client port being allowed to transmit packets.
A bandwidth control method for a network switch having a plurality of client ports and at least one uplink port to switch packets among the client ports and the uplink port, each client port having a predefined bandwidth threshold, the method comprising the steps of:
- (A) initializing a traffic rate TrΔ[n] of a client port in time time slot n to 0, where the time slot n is defined as a time interval from if time tn to tn+1, and the traffic rate represents length of transmitted packets;
- (B) determining whether there is a packet to be transmitted, and if yes, calculating an average traffic rate of the client port generated before time slot n+1 as Tr[n+1]=g*TrΔ[n]+(1−g)*Tr[n], where g<1 and Tr[n] is an average traffic rate actually generated before time slot n;
- (C) determining whether the average traffic rate Tr[n+1] of the client port generated before time slot n+1 is larger than a bandwidth threshold Tr_pre of the client port, and if no, transmitting the packet;
- and
- (D) updating the traffic rate TrΔ[n] in time slot n as TrΔ[n]=TrΔ[n]+packet length, updating the average traffic rate Tr[n+1] generated before time slot n+1 as Tr[n+1]=g*TrΔ[n]+(1−g)*Tr[n], determining whether to enter into a next time slot, and if no, executing step (B).
Dependencies are inferred from the claim text.