Patent ID: 8311052

Claim:
A buffer unit having a packet buffer for temporary storage of data packets, comprising: a plurality of token buckets, each of which allows for temporary storage of tokens, each of the tokens authorizing transmission of a unit of data, wherein the token buckets have different token bucket sizes, respectively, and each token bucket size represents a maximum number of tokens that can be stored in a corresponding one of the token buckets; a plurality of token controllers associated with the respective token buckets, and configured to remove and use equal numbers of tokens from the respective token buckets; a plurality of token generators associated with the respective token buckets, wherein each token generator is configured to generate tokens at a token rate at which tokens are to be generated per unit time for a corresponding one of the token buckets, wherein each token rate is preset such that the larger the token bucket size of the corresponding token bucket, the lower the token rate for the corresponding token bucket, and wherein each token generator is further configured to add the generated tokens to the corresponding token bucket; a plurality of token counters associated with the respective token buckets, wherein each token counter is configured to measure a used-token count which represents a number of tokens that were used from a corresponding one of the token buckets, and measure a stored-token count which represents a number of tokens stored in the corresponding token bucket, such that the stored-token count has a positive value representing a number of the tokens in the corresponding token bucket when the corresponding token bucket is not empty, and the stored-token count has a negative value having an absolute value representing a balance between a number of incoming tokens and a number of outgoing tokens, with respect to the token bucket size, when the corresponding token bucket is empty; and a packet reader configured to read out of the packet buffer a number of data packets which depends on the measured value of the used-token count for each token buffer.