WO2014071636A1 - Packet transmission method and device - Google Patents

Packet transmission method and device

Info

Publication number
WO2014071636A1
WO2014071636A1 PCT/CN2012/084474 CN2012084474W WO2014071636A1 WO 2014071636 A1 WO2014071636 A1 WO 2014071636A1 CN 2012084474 W CN2012084474 W CN 2012084474W WO 2014071636 A1 WO2014071636 A1 WO 2014071636A1
Authority
WO
Grant status
Application
Patent type
Prior art keywords
token
number
time
tokens
delay
Prior art date
Application number
PCT/CN2012/084474
Other languages
French (fr)
Chinese (zh)
Inventor
孙艳平
王运富
黄雪峰
Original Assignee
华为技术有限公司
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

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic regulation in packet switching networks
    • H04L47/10Flow control or congestion control

Abstract

The present invention relates to the field of communications. Disclosed are a packet transmission method and device, capable of reducing the number of calculations of required tokens during the packet transmission process. The method comprises: receiving a packet, and calculating according to the packet length the number of tokens TL used for transmitting the packet (101); acquiring the number of currently available tokens Tadd in a token bucket (102); if the number of the currently available tokens Tadd is smaller than the number of tokens TL used for transmitting the packet, then calculating the delay time Tdelay and starting to keep the time, the delay time being Tdelay = (TL-Tadd)/V, wherein V represents the token filling rate (103); and transmitting the packet when the delay time expires (104). The present invention is applicable to network packet transmission.

Description

A transmission method and apparatus for packet

Technical Field The present invention relates to the field of communications, particularly to a packet transmission method and apparatus. Background technique

Token bucket algorithm is the most common algorithm for the network traffic shaping (Traffic Shaping) and rate limiting (Rate Limiting) for. Wherein the token bucket algorithm may also be used to control the number of transmitting data over a network and allows transmission of data bursts. Token bucket algorithm according to the actual needs of users placed at the speed set by the user to the token bucket, when the number of tokens in the token does not increase the number of buckets reaches capacity; when sending a packet, if the number of tokens to send enough packets the normal transmission, while also decreasing the number of tokens in the transmission process, if the number of tokens less to send packets will not be discarded packets. Token bucket is also a tool to control the flow of data when there is no token bucket token, the message is not being sent, only generates a new token bucket until it can be sent, which can restrict the flow of packets token generation rate is less than equal to only achieve the purpose of flow restrictions. However, the prior art method of filling the token bucket is a timing filled token, this filling method is simple, but frequent operation, when the transmission packet length is longer and at a higher rate, the plurality of times occur it allows packets to pass through the case, this will increase the number of tokens in the demand computing system message sending process after filling. SUMMARY

Embodiments of the invention provide a packet transmission method and apparatus, calculates the number of packets transmitted during the demand token can be reduced. To achieve the above object, embodiments of the present invention adopts the following technical solutions: a first aspect, there is provided a method of sending packets, comprising: receiving a packet, the packet is calculated according to the length of the packet transmission order required TL card number; get the current number of available tokens in the token bucket T add; if the current is less than the number of available tokens T ADD transmission TL of the number of tokens required for packet delay time T delay is calculated and starts timing, the delay time is:! ^^ ^ - D ^) ^, wherein V represents the filling rate of the token; Upon completion of the delay time, transmitting the message 4 Gen. In a first possible implementation, the connection with the first aspect, the acquisition of the current number of available tokens in the token bucket ^, comprises: obtaining the number of tokens T c and T flll filling time from the token information table wherein T c represents the number of complete transmission of a message on the remaining token in the token bucket, T flll represents the time after sending a packet; receiving time calculation of the packet with the filling time ^ 1 T flll interval dT; dT multiplied by the time interval of the token fill rate V, and then rounded down, plus the number of tokens T C, to obtain the currently available number of tokens T add, namely D ^ dibutyl LdT * Vj.

In a second possible implementation, the first possible implementation manner, the method further comprising: acquiring a token from a token flag information table, when the token flag is positive, the calculation is performed step time delay.

In a third possible implementation manner, the binding of a second possible implementation, comprises: if the current is less than the number of available tokens T ADD transmitting the token packet number TL required, then the order card flag modification is negative to indicate that subsequent message is not processed; at the end of the delay time of the token flag modification is positive, processing continues to indicate that subsequent packets. In a fourth possible implementation, the first possible implementation manner, the second possible implementation manner or the third possible implementation, the method further comprising: T n + T delay in updating the filling time token information table T flll, to LT add + V *

T delay -TjJ updating the number of tokens in the token table T e, case, T flll represents sending the packet

In a fifth possible implementation, the first possible implementation manner, the method further comprising: if the current number of available tokens is greater than or equal to the transmission T add the required number of tokens packet T L , places the filling time T flll packets received time T n update the token information table to update the number of T add -TL tokens in the token information table T e, and transmits the packet . A second aspect, there is provided a packet transmission apparatus comprising: a processor and a delay token, which towels: the token processor for receiving the packets, the transmission is calculated according to a length of the packet packets of said required number of tokens TL message; and obtaining the currently available number of tokens in the token bucket of the ADD T; the delay, if the token for the current processor obtains the number of available tokens T add the sent packet is smaller than the required number of tokens T L, the calculated delay time T delay and start timing, the delay time is: T delay = (T L - T add) / V, where V represents the order fill rate cards; the token processor is further configured to, when the end of the delay time, transmitting the message. In a first possible implementation, the combination with the second aspect, the token processor further comprises: a token information acquisition unit for acquiring the number of tokens T c and T fm filling time from the token information table, wherein T c represents the number of complete transmission of a message on the remaining token in the token bucket, T flll represents a time after sending the packets; timing unit, for calculating the packet receiving time T n and the filling time interval dT T flll; token calculating unit for multiplying the time interval dT of the token fill rate V, and then rounded down, plus the number of tokens T c, obtaining the current number of available tokens T add, i.e., T add = T C + LdT * VJ.

In a second possible implementation manner, the binding of a first possible implementation, the delay is further configured to obtain a token from a token flag information table, when the token flag is positive, for calculating a delay time T delay. In a third possible implementation manner, the binding of a second possible implementation manner, the token processor further configured token if the current is less than the available number of tokens T add transmitting the desired message when the number of T L, then the token flag modification is negative to indicate that subsequent message is not processed; at the end of the delay time of the token flag modification is positive, processing continues to indicate that subsequent packets . In a fourth possible implementation manner, the binding of a first possible implementation, the second embodiment may be implemented or third possible implementation, the token processor is further configured to T N + T DELAY token update time of filling of the information table T FLLL, the number of tokens to LT ADD + T c V * T DELAY -T L J updating the token information table, in which case, T flll represents the transmission time newspaper text,

In a fifth possible implementation, the first possible implementation manner, the token processor is further configured to, if the currently available number of tokens is greater than or equal to T add the packet transmission order required card number TL, places the packet receiving time T N token update the table fill time T FLLL, in order to update the token T ADD -TL information table of the number of tokens T C, and then transmits the said the message. A third aspect, there is provided a packet transmission apparatus, comprising: at least one processor, a memory, a communication interface, and a bus, the at least one processor, memory and a communication interface connected via a bus and perform communication with each other; wherein:

The processor via the communication interface for receiving packets, calculating the number of tokens T L required to send the packet according to the length of the packet; and the processor is further configured to obtain the token bucket currently available T add token number; the processor is further configured to, if the currently available number of tokens T add is smaller than the number of tokens sent the packet needs TL, is calculated delay time T dELAY and start timing, the extension when the time is: T delay = (T L - T add) / V, where V represents the filling rate of the token; the processor is further configured to, when the time delay has elapsed, the transmission through the communication interface message. In a first possible implementation, the combination with the third aspect, the processor is further configured to obtain the number of tokens T c and T flll filling time from the token information table, wherein T c represents the complete transmission of a message token bucket number of tokens remaining, T flll represents the time after sending a packet; further for calculating a reception time of the packet ^ Gen time T n T flll with the filling time interval dT; with further the time interval dT in the token fill rate multiplied by V, and then rounded down, plus the number of tokens T c, to give the currently available number of tokens T add, i.e., T add = T c + L dT * Vj.

In a second possible implementation, the first possible implementation manner, the processor is further configured to obtain a token from the token flag information table, when the token flag is positive, with to calculate the delay time T delay. In a third possible implementation manner, the binding of a second possible implementation, the processor is further configured to, if the current is less than the available number of tokens T add transmission T L of the number of tokens required packet, the modified token is then a negative flag to indicate that subsequent message is not processed; at the end of the delay time of the token flag modification is positive, processing continues to indicate that subsequent packets. In a fourth possible implementation, the first possible implementation manner, the second possible implementation manner or the third possible implementation, the processor is further configured to T n + T delay update said token information table fill time T flll, to LT add + v * T delay -Tjj information table update the token number of tokens T c, this time, T fLLL indicates transmission time of the packet, T c denotes the number of tokens are transmitted packets remaining in the token bucket.

In a fifth possible implementation, the first possible implementation manner, the processor is further configured to, if the currently available number of tokens is equal to or greater than T ADD send the packet number of tokens required TL , places the packet receiving time T N is the token updating time of filling information table T FM, in order to update the token T ADD -TL information table of the number of tokens T C, and transmits the packet . Packet transmission method and apparatus embodiments of the present invention provided by the delay processing may be such that token packets filling up through a clearance may be implemented after the delay time period sent, after several packets to avoid filling after allowed to occur through the case, so that the number of computations during message transmission demand token can be reduced by the delay processing. BRIEF DESCRIPTION

Example of the prior art or described in the accompanying drawings are simply required introduction Apparently, the drawings described below are merely some of embodiments of the present invention, those of ordinary skill in the art is concerned, without paying premise creative work can also obtain other drawings based on these drawings. Flow of the method provided a packet transmission embodiment of FIG. 1 is a schematic view of the present disclosure; flow method provided for transmitting packets to another embodiment of the present invention, FIG 2 is a schematic diagram;

Structure diagram of a packet transmission device according to an embodiment of the present invention. FIG. 3; structural diagram of a packet transmission apparatus according to another embodiment of the present invention. FIG. 4;

A schematic structure of a packet transmission apparatus provided in a further embodiment of the present invention. FIG. 5. DETAILED DESCRIPTION OF EMBODIMENTS Hereinafter the present invention in the accompanying drawings, technical solutions in the embodiments will be apparent to the present invention, completely described, obviously, the described embodiments are merely part of embodiments of the present invention, but not all embodiments example. Based on the embodiments of the present invention, all other embodiments of ordinary skill in the art without any creative effort shall fall within the scope of the present invention.

In the area of ​​communications token bucket algorithm is a network traffic shaping (Traffic Shaping) and rate limiting (Rate Limiting) most commonly used in an algorithm. Typically, the token bucket algorithm is used to control the number of transmission data on the network, and may be allowed to send a burst of data. Hence the need for some way to limit network traffic to avoid unexpected traffic to the network brought many problems. The present invention is related to network processor-based or software (e.g., field programmable gate array (Field - Programmable Gate Array, referred FPGA), etc. can program the device), the method adopted by the delay processing of the token bucket in the packet processing , reducing the pressure to bring the system due to multiple calculation, the present invention provides a method of sending packets, with reference to FIG. 1, the process comprising:

101, received packets, calculating the number of tokens required for packet transmission TL the length of the packet. The current number of tokens consumed packets corresponding to the length of the message itself, i.e. the packet length L corresponding to the number of consumed tokens T L, where the time when the number of tokens corresponding to the desired packet length is exactly an integer , the number of tokens required for the text message taken TL; when the number of tokens corresponding to the desired packet length is a decimal, in order to meet the needs of packets sent, then rounded up to obtain the desired number of tokens "TJ to ensure that the subsequent filling process is possible to provide the token number of tokens in packets to meet minimum requirements.

102, retrieves the current number of available tokens in the bucket! ^. Specifically, the token can query information table, acquiring the number of tokens in a token bucket packets remaining token bucket T C are transmitted. Here token information represented as shown in Table 1:

Figure imgf000007_0001

Table 1 contains the token token flag information table T P. s, and the number of tokens fill time T E T FLLL; End where T E represents a number of transmission packets on the remaining token in the token bucket, T FLLL represents the time to transmit a complete packet. As shown in Table 1, it represents a token flag T P. s is positive, sending the packet on a token remaining in the token bucket number T C is 100, sending the packet on a T FLLL time of 50 seconds, of course, where T FLLL unit only seconds Example be described in this embodiment may also be employed microseconds, milliseconds or number of cycles FPGA system as a unit. Wherein the step 102 specifically comprises:

102a, and acquires the number of tokens T C T FLLL filling time from the token information table; where T C denotes a number of the transmission completion message tokens remaining in the token bucket, T FLLL represents the complete transmission of a message time.

102b, the calculation time of the received packets with time T n T fill filling time interval dT; Specifically, the current token flag Tp.s is positive ( "1"), the current fill time τ η can be understood as the current packet arrival time of T a "- induced, where T a" packet arrival time of the current, the current fill time τ η; Last supplementary token will be appreciated that the end time for the complete filling on the number of tokens required for a text message in time, if expressed in T fill; dT indicates if in the time interval, the time interval is: dT = T n -T fill.

102c, multiplied by the time interval dT tokens fill rate V, and then rounded down, plus the number of tokens T c, to give the current number of available tokens T add, i.e. D ^ ^ LdT * Vj. Wherein the number of tokens in the filling time interval is: dT filling rate V is obtained by multiplying the original number of tokens in the bucket is T C (i.e., on a packet information table recorded in the token after updating the number of tokens transferred TJ, the current number of available tokens T ADD is:

T add = T c + LdT * VJ; dT * V where a product may not be an integer. If the case is not an integer, rounding down can be employed (for example, 3.8 is rounded down 3) ^ D is calculated.

103, if the current number of available tokens T ADD is less than the number of tokens required packet transmission TL, is calculated delay time T dela y and start timing. Wherein the delay time is: T delay = (T L - T add) / V, where V represents tokens fill rate. Here the actual delay time may be a decimal carry, such as when the delay time calculation unit for calculating second or seconds, the delay time is a decimal is also possible, but when the computing environment as an FPGA, Since the FPGA in a computing environment, the time value is generally in the form of a pulse occurs, i.e. the number of time periods is calculated, when the time period occurs incomplete, FP GA sometimes difficult to implement computing environment, Thus FPGA delay time computing environment generally rounded up strategies employed while using rounded up strategy ensures minimum required number of tokens can be provided for the packet transmission delay time, specifically, in a computing environment FPGA delay time calculation formula may be adjusted: T dELAY = "(T L - T ADD) / V 1, where V represents the filling rate of the token," 1 represents rounding up.

104, when the time delay has elapsed before transmitting the text Gen. Embodiments of the present invention to provide a packet transmission by the delay processing may be such that only packets the delay period through a token filling up can be achieved after release sent, after several packets avoided after filling by allowing the emergence of the situation, so that the number calculated by the processing delay can be reduced during transmission of packet token requirements.

Specifically, with reference to FIG. 2, a method embodiment of the present invention to provide a packet transmission flow comprises:

201, received packets, calculating the number of tokens required for packet transmission TL the length of the packet. The current number of tokens consumed packets corresponding to the length of the message itself, i.e. the packet length L corresponding to the number of consumed tokens T L. Here when the number of tokens required packet is exactly an integer, the number of tokens required to take the message packet is TL; packets when the number of tokens required for fractional, in order to meet the needs of packets sent, then rounded up to obtain the desired number of tokens "TL1. Thus the number of tokens required packets can get up by rounding.

202, acquiring a token from the token information table flag, flag when a token is positive, step

203.

203, and acquires the number of tokens T C T FLLL filling time from the token information table, where T C denotes the number of tokens have been sent a message on the remaining token bucket, T FLLL represents sending the packets on a time; specifically, the token can query information table, retrieves the current number of available tokens in the bucket; where the token represents e.g. table 2:

Figure imgf000009_0001

Table 2 contains the token token flag information table T P. s, and the number of tokens fill time T T E as shown in Table 2, showing the token flag T p. s is positive, sending the packet on a token remaining in the token bucket number T c is 100, the time to transmit a complete packet T flll 50 seconds, of course, where T flll unit only seconds Example be described in this embodiment may also be employed microseconds, milliseconds or number of cycles FPGA system as a unit.

204, the computation time of the received packets with time T n T fill filling time interval dT; Specifically, the current token flag Tp.s is positive ( "1"), the current fill time T n will be appreciated that with the current packet arrival time T a "- induced, where T a" packet arrival time of the current, the current fill time T n; Last end supplementary token completion of charging time can be understood as the time required for the number of packets in a packet token, if expressed in T fill; dT indicates if in the time interval, the time interval is: dT = T n -Tim "

205, multiplied by the time interval dT tokens fill rate V, and then rounded down, plus the number of tokens T c, to give the current number of available tokens T add, i.e., T add = T c + Ld T * Vj . Wherein the number of the original packet transmission in a number of tokens in the token at the time interval dT is filled with a filling obtained by multiplying the rate V, the token bucket is T c (i.e., the token information recorded in the table after updating the number of tokens T c), the current number of available tokens T add is:

T add = T c + LdT * Vj; dT * V where the product may not be an integer, it is possible to employ rounded down (for example, 3.8 is rounded down 3) ^ D is calculated.

206, if the current number of available tokens T ADD is less than the number of tokens required packet transmission TL, is calculated delay time T dela y and start timing. Wherein the delay time is: T delay = (T L - T add) / V, where V represents tokens fill rate. Here the delay time may not be rounded, the actual delay time may be a decimal carry, where only to embodiments of the invention in an FPGA such calculations, it is required, for example, when the delay time calculation unit seconds, when the second delay time may be calculated to decimal places is. However, when such a computing environment, an FPGA, the delay time will be in the form of a pulse, if it will take the fractional part is achieved may be very difficult, and when the delay time of rounding, rounding up to the embodiment of way of example, but not limited to this implementation there are only rounded upwards. Wherein the delay time is: T delay = "(T L - T add) / V l, where V represents the filling rate of the token," 1 represents rounding up, in order to ensure sufficient number of tokens to send the current packet .

207, the token flag modification is negative to indicate that subsequent message is not processed. If the current number of available tokens T ADD <T L, the T P. s is set to "0" (previously mentioned, 0 represents a negative).

208, when the time delay has elapsed before transmitting the text Gen.

209, the token flag modification is positive, processing continues to indicate that subsequent packets. Refers to the remaining delay time to meet the minimum number of tokens added time consumed by this token, when the end of the delay time to meet the minimum number of tokens added time consumed by this token, the token information table information token flag is set to "1", where 1 represents positive.

210, to fill the time T N + T dela y token update information table T FLLL, to LT ADD + V *

T DELAY -T L j updated token token table number T c, U represents rounding down. Token table update information: T fll dead T fm + dT + T delay; i.e. T fll dead T n + T delay;

T c = LT a dd + V * Tdelay-T L J;

T = 1

i pos Shang

The updated token table, T FLLL represents time transmitted packets; T C represents the number of tokens in the token bucket sending packets remaining; T P. S represents the token after the token flag information table updating is positive, to continue processing the subsequent 4 represents Gen text. Here, not limited in the sequence of steps 210, the present invention can be acquired at the end of step 206 for updating T ADD filling time T fll T N + T dela y , and the number of tokens T C token update information table + V * T dela y - T L, so step 210 may be to any of the packets sent between a step performed after 206. Optionally, the method further comprising:

211, if the current number of available tokens TL token number equal to or greater than T ADD sending packets required, sending packets.

212, the received packets to the time T N token update time information table is filled T FLLL, in order to update the token T ADD -TL token table number Tc. Specifically: if the currently available number of tokens is equal to or greater than T ADD TL message packets the number of tokens consumed, the calculated number of remaining tokens T c, the filling time and update the token information table T flll, packet release . Wherein T c is the number of remaining tokens:

T c = T add - min ( (T add -L): H), i.e. T add -L token bucket depth H and a minimum value. Where H is the depth of the token bucket, representing the current number of available tokens is greater than or equal to T add packets wherein the number of tokens butoxy, token bucket depth H may be set according to the burst data amount itself consumed tolerance, long term when a packet rate token bucket depth H is set larger when the closer is provided by the rate and, thus, the greater the amount of burst data token bucket tolerable, i.e., the number of tokens in the token bucket may satisfy packet text transmission requirements, then through the fill rate of the number of tokens (order of packets on only fill rate is less than or equal to the token) reaches the limit of packet traffic purposes.

T flll = T flll + dT (because there are treatment options to determine the value of an integer, when the rounding dT * V, updating the actual fill time: T flll = T flll + ( LdT * V_ | / V); wherein T flll represents the left side of equation T flll updated, i.e., the packet transmission time; T flll RHS represents T flll before update, i.e. sending the packets over a time Gen 4 .

T p. s = "1" (1 flag indicates the token bucket is positive, 0 negative, the same applies hereinafter).

Here Specifically, for example: in an FPGA environment, system clock as elk 10MHz, V = 1Mbps, T fill = 100, T arr = 205, then:

T n = 205 dT = T n - T fill = \ Q5 dT * V = 105 * {\ I \ 0M) * \ M = 10.5 complement this case there will be a decimal number of tokens, but the number of tokens added is the integer count, i.e., in the case of decimal token bucket is theoretically only tokens replenished to the integer number of bits with a small value, but here only if the number of tokens rounded down, it will forming a loss in the calculation of the number of tokens, but not be adjusted continuously on the time several packets disorders system timing and the calculated number of tokens occurs after transmission, so also here to Tn corresponding processing ie the rounding Tn = 200, the following step is calculated in accordance with all Τη = 200, thus calculated number of tokens is obtained corresponding to the rounding down. Known from step 204: the interval dT is: dT = T n -T fill, so that the calculation updating is:, = dT + T fill = L llll + Tfill = 100 + 100 = 200,

among them,

Figure imgf000013_0001
, DT is the time interval where this

Here, according to the fill time is ^ butoxy. . But since the calculation process is carried out in the same system clock, so clock cycles to calculate the value of the original ignored and overlooked when updating due to the extra clock cycle of the number of tokens after the decimal point in the overall calculation of the arrival of a message the calculation process is compensated, and therefore did not waste time in the long run, the token bucket token nor in vain consumption. Embodiments of the present invention to provide a packet transmission by the delay processing may be such that only packets the delay period through a token filling up can be achieved after release sent, after several packets avoided after filling by allowing the emergence of the situation, so that the number calculated by the processing delay can be reduced during transmission of packet token requirements. Provides a packet transmission apparatus according to 3, of the present invention with reference to FIG. 3, comprising: a delay token processor 31 and 32, wherein: the token processor 31, for receiving packets according to the packet the TL length calculating the number of tokens needed to transmit packets; and obtaining the current number of available tokens in the token bucket T ADD; delayer 32, for causing a current if the number of available tokens T add is less than the desired transmission packets number tiles T L, the calculated delay time T delay and start timing, the delay time is: T delay = (T L - T add) / V, where V represents the filling rate of tokens; token processor 31, further when the delay time for sending messages. Packet transmission apparatus according to embodiments of the present invention is provided by the delay processing may be such that the delay period of up packets through a token release can be achieved after filling transmitted, after several packets avoided only after filling by allowing the emergence of the situation, so that the number calculated by the processing delay can be reduced during transmission of packet token requirements.

Further, referring to FIG. 4, the token processor 31 further comprising: a token information acquiring unit 311, the timing unit 312 and the token calculation unit 313, wherein: the token information acquiring unit 311, a token from information table and acquires the number of tokens fill time T c T flll, wherein T c represents the number of tokens have been sent a message on the remaining token bucket, T flll represents the transmission time of a complete text; timing unit 312, by receiving packets to the calculated time T n and the filling time interval dT T fill; token calculating unit 313, for multiplying the time interval dT tokens fill rate V, and then rounded down, plus a token the number T c, to give the current number of available tokens T add, i.e. D ^ dibutyltin LdT * VJ. Alternatively, referring to FIG. 4, the token processor 31 is also configured to, if the currently available number of tokens is equal to or greater than T ADD packets transmitted packets TL required number of tokens, places the received message update time T N filling time token information table T FLLL, in order to update the token T ADD -TL token table number T C, and send packets. Send the normal processing mode as the currently available number of tokens is greater than or equal to the number of tokens sent packets need to consume, in this embodiment of the support apparatus of the present invention provide the packet. Alternatively, delay 32, further configured to obtain a token from the token information table flag, flag when a token is positive, then for calculating the delay time T dela y. Further, the token processor 31 is further configured to, if the number of tokens T add the currently available number of tokens T L, then the flag is smaller than the token packet transmission is modified to require negative, to indicate that subsequent message is not processed; at the end of the delay time of the token flag modification is positive, processing continues to indicate that subsequent packets. Further, the token processor 31 is also used to fill in time T flll T n + T delay information table update token to LT add + V * T dela y - T L j token update token table the number T c, this time, T flll represents the transmission time of the packet, T c represents the number of packets sent after the rest of the tokens in the token bucket. Packet transmission apparatus according to embodiments of the present invention is provided by the delay processing may be such that the delay period of up packets through a token release can be achieved after filling transmitted, after several packets avoided only after filling by allowing the emergence of the situation, so that the number calculated by the processing delay can be reduced during transmission of packet token requirements.

Example 5 of the present invention provides apparatus for transmitting packets, with reference to FIG. 5, the device 5 transmits packets comprising: at least one processor 51, a memory 52, a communication interface 53 and bus 54, the at least one processing 51, a memory 52 and a communication interface 53 are connected with each other and perform communication via a bus 54.

The bus 54 may be an industry standard architecture (Industry Standard Architecture, abbreviated as ISA) bus, Peripheral Component Interconnect (Peripheral Component, abbreviated as PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus Wait. The bus 54 can be divided into an address bus, a data bus, a control bus and the like. To facilitate expressed only in FIG. 5 with a thick, but does not mean that only one type of bus or a bus. among them:

A memory 52 for storing executable program code, which program code includes computer operating instructions. The memory 52 may include a high-speed RAM memory, and may also include non-volatile memory (non- volatile memory), the at least one disk memory port Example 4 various devices.

The processor 51 may be a central processing unit (Central Processing Unit, abbreviated as CPU), or a specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or configured to implement an embodiment of the present invention, one or more integrated circuit. A communication interface 53, used to realize the present embodiment the communication between the apparatus embodiment. Wherein the packet processor 52 for receiving through the communication interface 53, calculates the number of tokens required for packet transmission TL the length of the packet; processor 52 is further configured to acquire the token bucket currently available number of tokens T add; the processor 52 is also configured to, if the currently available number of tokens T add is smaller than the number of tokens required for sending packets TL, is calculated delay time T dela y and start timing, the delay time is: T dELAY = (T L - T add) / V; when the processor 52 is further configured to end the delay time, the communication interface 54 transmits packets, wherein V represents the filling rate of tokens. Packet transmission apparatus according to embodiments of the present invention is provided by the delay processing may be such that the delay period of up packets through a token release can be achieved after filling transmitted, after several packets avoided only after filling by allowing the emergence of the situation, so that the number calculated by the processing delay can be reduced during transmission of packet token requirements.

Further, the processor 52 is also configured to obtain the number of tokens T c and T flll filling time from the token information table, wherein T c represents the number of tokens have been sent a message on the remaining token bucket, T flll represents the time after sending a packet; further configured to calculate the reception time of a packet and the time of the filling ^ T flll time interval dT; dT further multiplied by the time interval for filling the token rate V, then down rounded, plus the number of tokens T c, to give the current number of available tokens T add, i.e. D ^ ^ L dT * VJ. Optionally, the processor 52, the time T N is further configured to update the token table if the current number of available tokens is greater than or equal to the Add T transmission packets required number of tokens TL packets, received packets places fill time T fm, in order to update the token T add -Tj ^ token information table number T c, and message transmission. Send the normal processing mode as the currently available number of tokens is greater than or equal to the number of tokens sent packets need to consume, in this embodiment of the support apparatus of the present invention provide the packet. Optionally, the processor 52 is also configured to obtain a token from the token information table flag, flag when a token is positive, for calculating the delay time T delay. The processor 52 is also used if the number of tokens in the currently available number of tokens is less than T add packet transmission T L required, then the token flag modification is negative to indicate that subsequent message is not processed; the delay time at the end of the token flag modification is positive, processing continues to indicate that subsequent packets. The processor 52 is further configured to fill the time T n + T dela y token update information table T flll, to LT add + V * T delay -TjJ token update token table number T c, this time, T flll represents the transmission time of the packet, T c represents the number of packets sent after the rest of the tokens in the token bucket. Packet transmission apparatus according to embodiments of the present invention is provided by the delay processing may be such that the delay period of up packets through a token release can be achieved after filling transmitted, after several packets avoided only after filling by allowing the emergence of the situation, so that the number calculated by the processing delay can be reduced during transmission of packet token requirements.

Each packet transmission apparatus according to an embodiment, a method may be used in the embodiment shown in FIGS. 1 and 2 correspond to execute, as shown in FIGS. 1 and for the embodiment has been described in detail, is not repeated here 2 . Those of ordinary skill in the art will be understood: the hardware implementing the above method to complete all or part of the steps associated with embodiments may be implemented by program instructions, the program may be stored in a computer readable storage medium, the program, when executed, performs comprising the steps of the method embodiments described above; and the storage medium comprising: a variety of medium ROM, RAM, magnetic disk, or an optical disc capable of storing program code. The above are merely specific embodiments of the present invention, but the scope of the present invention is not limited thereto, any skilled in the art in the art within the technical scope of the present invention is disclosed, variations or replacement that can be easily, both It should fall within the scope of the present invention. Accordingly, the scope of the present invention should be defined by the scope of the claims.

Claims

Claims
1. A packet transmission method comprising: receiving a packet, the packet length TL is calculated the number of tokens required to send the packet based; obtaining currently available tokens in the token bucket number of T add; if the current is less than the number of available tokens T ADD transmitting the packets required number of tokens TL, in calculating the delay time T delay and start timing, the delay time is: D (1 = ( ^ - D £ 1 (1 (1) / ¥, where V represents the filling rate of the token; upon completion of the delay time, transmitting the message ^ gen.
2. The method according to claim 1, wherein the obtaining the current number of available tokens in the bucket! ^, Comprises: obtaining the number of tokens T c and T flll filling time from the token information table, wherein T c represents the number of complete transmission of a message to the rest of the tokens in the token bucket, showing transmission T flll End on a packet time; calculation time of the packet reception time 1 ^ T flll the filling time interval dT; dT multiplied by the time interval of the token fill rate V, then taken down whole, together with the number of tokens T c, to give the current number of available tokens T add, i.e. D ^ dibutyltin LdT * Vj.
3. The method according to claim 2, characterized in that, said method further comprising: retrieving a token from the token flag information table, when the token flag is positive, performing the calculation delay step time.
4. The method of claim 3, wherein said method further comprises: if the current number of available tokens T ADD is less than the number of tokens transmitted packets require the TL message, then the token flag modification is negative to indicate that subsequent message is not processed; at the end of the delay time of the token flag modification is positive, processing continues to indicate that subsequent packets.
5. The method of claim any one of claim 2-1 in claim 4, characterized in that, said method further comprising: T n + T delay information table update the token filling time T flll, to LT add + V * T delay -TjJ updating the number of tokens in the token table T e, case, T flll represents sending the packet
6. The method of claim 2, wherein said method further comprises: if the current number of available tokens is greater than or equal to T add transmission T L of the number of tokens required packet, receiving places the message updating the time T n is the time of filling the token information table T flll, to
T ADD -TL updating the number of tokens in the token table ^, and sends the packet.
7. A packet transmission apparatus comprising: a processor and a delay token, which towels: the token processor for receiving packets, calculating the length of the packet transmission said message packets TL required number of tokens; and acquires the current number of available tokens in the token bucket T ADD; the delay, if the current token processor obtains the number of available tokens for T add is less than the packet transmission required number of tokens TL, in calculating the delay time T dELAY and start timing, the delay time is: T delay = (T L - T add) / V, where V represents the order fill rate cards; the token processor is further configured to, when the end of the delay time, transmitting the message.
8. The apparatus of claim 7, wherein the token processor further comprises: a token information acquisition unit for acquiring the number of tokens T c T fm and time of filling the token from the information table, wherein T c represents After transmitting a message on the number of remaining tokens in the token bucket, T flll represents a time after sending the packets; timing unit, for calculating a time of receiving the packet with the filling time T n T flll time interval dT;
Token calculating unit for multiplying the time interval dT of the token fill rate V, and then rounded down, plus the number of tokens T C, to obtain the currently available number of tokens T add, i.e., T add = T C + LdT * VJ.
9. The apparatus of claim 8, wherein said delay is further configured to obtain a token from the token flag information table, when the token flag is positive, for calculating the delay time T delay.
10, The apparatus of claim 9, wherein the token processor is further configured to, if the current is less than the number of available tokens T ADD transmitting the token packet number TL required, then the modified token is negative flag to indicate that subsequent message is not processed; at the end of the delay time of the token flag modification is positive, processing continues to indicate that subsequent packets.
11, an apparatus according to any one of claims 8 to 10, wherein the token processor further configured to populate a time T n + T delay updating the token information table T flll, in LT add + v * T delay -Tjj information table update the token number of tokens T c, this time, T flll represents hair
12. The apparatus of claim 8, wherein the token processor is further configured to, if the currently available number of tokens is greater than or equal to the transmission T add token packet number of the TL required, places the packet receiving time T N token update the table fill time T FLLL, T add -TL to update the number of tokens in the token information table T c, and then transmits the packet.
13. A packet transmission apparatus comprising: at least one processor, a memory, a communication interface, and a bus, the at least one processor, memory and a communication interface connected to and communicate with one another via the bus, wherein: the processor via the communication interface for receiving packets, calculating the number of tokens in the packet transmission TL required according to the length of the packet; means for obtaining the current number of available tokens in the token bucket butoxy ^, if the current number of available tokens is less than the number of tokens T ADD TL required to send the packet, the delay time T delay is calculated and start timing, the delay time is: T delay = (T L - T add) / V, where V represents the filling rate of the token;
The processor is further configured to, when the end of the delay time, the interface transmits the packet through the communication.
14. The apparatus of claim 13, wherein the processor is further configured to obtain the number of tokens T c and T flll filling time from the token information table, wherein T c represents the completion of a packet transmission in a token bucket the number of remaining tokens, T flll represents the time after sending a packet; further for calculating a reception time of the packet and the time T n T fill filling time interval dT; the time for further multiplying the token interval dT fill rate V, and then rounded down, plus the number of tokens T c, to give the currently available number of tokens T add, i.e., T add = T c + L dT * VJ.
15. The apparatus of claim 14, wherein the processor is further configured to obtain a token from the token flag information table, when the token is marked as positive for the calculation of delay time T delay.
16. The apparatus of claim 15, wherein the processor is further configured to, if the current is less than the number of available tokens T ADD transmitting the packet number of tokens required TL, then the order card flag modification is negative to indicate that subsequent message is not processed; at the end of the delay time of the token flag modification is positive, processing continues to indicate that subsequent packets.
17. The apparatus according to any one of claims 14 to 16, wherein the processor is further configured to update T n + T delay time T flll filling the token information table to LT add + v * T delay -TjJ updating the number of tokens in the token table T e, case, T flll represents sending the packet
18. The apparatus of claim 14, wherein the processor is further configured to, if the current number of available tokens T ADD equal to or greater than the number of tokens to send the packet TL required, receiving places the message updating the time T n is the time of filling the token information table T flll, the number of tokens T add -T L updating the token information table T e, and transmits the packet.
PCT/CN2012/084474 2012-11-12 2012-11-12 Packet transmission method and device WO2014071636A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/084474 WO2014071636A1 (en) 2012-11-12 2012-11-12 Packet transmission method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 201280002899 CN103229465A (en) 2012-11-12 2012-11-12 Message sending method and device
PCT/CN2012/084474 WO2014071636A1 (en) 2012-11-12 2012-11-12 Packet transmission method and device

Publications (1)

Publication Number Publication Date
WO2014071636A1 true true WO2014071636A1 (en) 2014-05-15

Family

ID=48838350

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/084474 WO2014071636A1 (en) 2012-11-12 2012-11-12 Packet transmission method and device

Country Status (2)

Country Link
CN (1) CN103229465A (en)
WO (1) WO2014071636A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580004B (en) * 2014-12-24 2017-12-01 盛科网络(苏州)有限公司 Non-integer token device and method to achieve traffic shaping

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1601963A (en) * 2003-09-26 2005-03-30 华为技术有限公司 Access rate limiting method based on token pail algorithm
CN1852227A (en) * 2005-08-25 2006-10-25 华为技术有限公司 Method for effectively preventing attack of network apparatus
CN101026561A (en) * 2007-02-09 2007-08-29 中兴通讯股份有限公司 Token bucket fill rate configuration method and device
US7457313B2 (en) * 2000-09-25 2008-11-25 General Instrument Corporation Hierarchical prioritized round robin (HPRR) scheduling

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100471176C (en) * 2006-09-12 2009-03-18 华为技术有限公司 Queue dispatch method and equipment
CN102413042A (en) * 2011-11-14 2012-04-11 盛科网络(苏州)有限公司 Timestamp-updating-token-bucket-based traffic policing method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7457313B2 (en) * 2000-09-25 2008-11-25 General Instrument Corporation Hierarchical prioritized round robin (HPRR) scheduling
CN1601963A (en) * 2003-09-26 2005-03-30 华为技术有限公司 Access rate limiting method based on token pail algorithm
CN1852227A (en) * 2005-08-25 2006-10-25 华为技术有限公司 Method for effectively preventing attack of network apparatus
CN101026561A (en) * 2007-02-09 2007-08-29 中兴通讯股份有限公司 Token bucket fill rate configuration method and device

Also Published As

Publication number Publication date Type
CN103229465A (en) 2013-07-31 application

Similar Documents

Publication Publication Date Title
US6842808B2 (en) Data exchange between users connected by a bus system and having separate time bases
US20110296065A1 (en) Control unit for the exchange of data with a peripheral unit, peripheral unit, and method for data exchange
US20010021196A1 (en) Method and device for the exchange of data between at least two users connected to a bus system
CN101556564A (en) Data receiving/sending method and device
CN101359294A (en) Management method for embedded system timer
US20120311168A1 (en) Method for improving accuracy in computation of one-way transfer time for network time synchronization
US20060067233A1 (en) Network device with traffic shaping functions and bandwidth control method using leaky bucket algorithm
US20110119557A1 (en) Data Transmission Methods and Universal Serial Bus Host Controllers Utilizing the Same
CN103246570A (en) Hadoop scheduling method and system and management node
US20120072761A1 (en) Device and method for implementing clock transparent transmission
CN102270156A (en) A real-time embedded systems management timer
Chokshi et al. Performance analysis of FlexRay-based systems using real-time calculus, revisited
Bordoloi et al. Schedulability analysis of Ethernet AVB switches
Guillemin et al. Extremal traffic and bounds for the mean delay of multiplexed regulated traffic streams
Kliazovich et al. CA-DAG: communication-aware directed acyclic graphs for modeling cloud computing applications
Lakshmanan et al. Integrated end-to-end timing analysis of networked autosar-compliant systems
CN101562838A (en) Method and apparatus for improving transmission time interval bundling
WO2004066526A2 (en) Asynchronous wrapper for a globally asynchronous, locally synchronous (gals) circuit
CN101695045A (en) Method and device for realizing Ethernet messaging
US20020144031A1 (en) Method and apparatus for budget development under universal serial bus protocol in a multiple speed transmission environment
JP2010011255A (en) Wireless communication apparatus, and packet transfer method thereof
JP2010062992A (en) Clock synchronization method and communication system
JP2007050812A (en) Load control system, communication control unit and load control method
US7536580B2 (en) System and method for generating timer output corresponding to timer request from plurality of processes
CN101826890A (en) Implementation method of ZC (Zadoff-Chu) sequence in LTE (Long Term Evolution) system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12887893

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase in:

Ref country code: DE

122 Ep: pct app. not ent. europ. phase

Ref document number: 12887893

Country of ref document: EP

Kind code of ref document: A1