Patent ID: 9160669
Filing Date: 2015-10-13
Classification: H04L

Abstract:
1. A method for traffic limitation by a leaky bucket, comprising: during traffic-limitation of a group of packets sharing a same leaky bucket and having separate weighted priorities, dividing the overall leaky bucket into multiple sub-buckets according to priority parameters of the packets comprising a number of the weighted priorities and ratios between the weighted priorities, wherein the ratios depend on a requirement on jitter-absorption by traffics with the separate weighted priorities, a sum of volumes of the sub-buckets equals to a volume of the overall leaky bucket, and each of the sub-buckets corresponds to a weighted priority of the packets, the method comprising: after packet information comprising at least lengths and the priority parameters of the packets is received, acquiring parameters relevant to traffic-limitation by a leaky bucket; calculating a total number of tokens to be added to the overall leaky bucket according to the acquired parameters relevant to traffic-limitation by a leaky bucket; performing token-addition on the sub-buckets according to the calculated total number of tokens and the weighted priorities corresponding to the sub-buckets; and forwarding, or discarding, or marking a packet according to a length of the packet and a number of tokens in a sub-bucket corresponding to a weighted priority of the packet, wherein performing token-addition on the overall leaky bucket and the sub-buckets according to the calculated total number of tokens and the weighted priorities corresponding to the sub-buckets comprises: firstly, performing token-addition on the overall leaky bucket according to the calculated total number of tokens, wherein when the overall leaky bucket is overrun with tokens, a number of tokens in the overall leaky bucket equals the volume of the overall leaky bucket, otherwise when the overall leaky bucket is not overrun with tokens, the number of tokens in the overall leaky bucket is a total number after the token-addition; and secondly, when the overall leaky bucket is overrun with tokens, and therefore all the sub-buckets corresponding to the weighted priorities are overrun with tokens, otherwise when not all the sub-buckets corresponding to the weighted priorities are overrun with tokens, dividing, according to the ratios between the weighted priorities, the total number of tokens to be added to the overall leaky bucket into numbers of tokens to be added to the sub-buckets corresponding to the weighted priorities; and performing token-addition on the sub-buckets according to the numbers of tokens to be added to the sub-buckets corresponding to the weighted priorities, and after token-addition is performed on all the sub-buckets, when a sub-bucket is overrun with tokens, allocating any overrunning token to another sub-bucket not overrun with tokens via mutual uptake of overrun.