CN113645148B - Traffic shaper token updating system and method for time-sensitive network - Google Patents

Traffic shaper token updating system and method for time-sensitive network Download PDF

Info

Publication number
CN113645148B
CN113645148B CN202110750997.2A CN202110750997A CN113645148B CN 113645148 B CN113645148 B CN 113645148B CN 202110750997 A CN202110750997 A CN 202110750997A CN 113645148 B CN113645148 B CN 113645148B
Authority
CN
China
Prior art keywords
updating
update
token
traffic
shaper
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.)
Active
Application number
CN202110750997.2A
Other languages
Chinese (zh)
Other versions
CN113645148A (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.)
Yutai Microelectronics Co ltd
Original Assignee
Yutai Microelectronics Co ltd
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 Yutai Microelectronics Co ltd filed Critical Yutai Microelectronics Co ltd
Priority to CN202110750997.2A priority Critical patent/CN113645148B/en
Publication of CN113645148A publication Critical patent/CN113645148A/en
Application granted granted Critical
Publication of CN113645148B publication Critical patent/CN113645148B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/215Flow control; Congestion control using token-bucket
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping
    • H04L47/225Determination of shaping rate, e.g. using a moving window
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a traffic shaper token updating system and method of a time sensitive network, comprising the following steps: for a non-empty queue, carrying out token updating on an associated traffic shaper when a message is scheduled, configuring the number of tokens of a corresponding token bucket to be a non-positive value when the message is empty after the scheduling is completed, then adding the non-positive value into an empty queue pool, and generating a circular updating signal when a data queue is a non-empty queue and the number of tokens is a negative value; for each empty queue, carrying out token updating on the associated traffic shaper when a new message arrives; obtaining an update level according to the cyclic update signal processing, and putting the flow shaper into an update pool corresponding to the update level so as to update the token bucket according to the cyclic update frequency; and in the process of updating the tokens of each token bucket, when the token bucket of the traffic shaper is detected to be in an effective state, the traffic shaper is moved out of the updating pool to participate in scheduling. The beneficial effect is that the time delay is reduced, and a large number of flow shapers can be supported.

Description

Traffic shaper token updating system and method for time-sensitive network
Technical Field
The present invention relates to the field of data communication networks, and in particular, to a system and a method for updating a traffic shaper token of a time sensitive network.
Background
Time sensitive network TSN (Time Sensitive Networking) refers to a set of protocol standards being developed by the TSN task force in the IEEE802.1 working group. TSNs were originally derived from the application requirements of the audio-video field, and the work of AVB was continued by the IEEE TSN working group, which focused on studying deterministic data transmission mechanisms, further reducing delays in ethernet networks, and transmitting data more stably and securely. Networks for transmitting audio and video information need to comply with strict latency and jitter requirements. The TSN network can well support the requirements of bandwidth and real-time performance of images and audio.
The important 802.1Qav standard in TSNs requires a mechanism for token shaping (CBS, credit based shaper) to achieve an end-to-end deterministic latency. 802.1Qav defines a credit-based hardware traffic shaper implemented based on token bucket principles that first determines if the number of tokens in a token bucket is valid when a message arrives, allows scheduling when the number of tokens is valid, and blocks the message when the number of tokens is invalid. In the prior art, there are cases where a plurality of traffic shapers are operated simultaneously, and the number of the traffic shapers is often thousands. To improve efficiency and save resources, a special module is used to perform centralized processing on all traffic shapers, and a mechanism of cyclic update is adopted for the traditional method of token generation. Under the cyclic update mechanism, assuming that the update rate of each token bucket is 1.5M, about 3G (1.5 m×1k×2) read/write operations are required for one thousand traffic shapers per second, which has very high requirements on the system, and is usually implemented by multiple sets of hardware in parallel. If the number of SHAPERs is increased to a certain number, the number of reads/second may be of a large order of magnitude. Since the number of reads/writes per second of the system is limited, there is a serious system bottleneck.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a traffic shaper token updating system of a time sensitive network, wherein a plurality of traffic shapers are pre-configured, each traffic shaper is associated with a data queue and performs traffic shaping on the data queue through a token bucket; the traffic shaper token update system comprises:
a first updating module, configured to, for non-empty queues in each data queue, perform token updating on the token bucket of the associated traffic shaper when a message in the data queue is scheduled, configure the number of tokens of the corresponding token bucket to be non-positive when the data queue is empty after the scheduling is completed, then add the data queue into an empty queue pool, and generate a cyclic update signal when the data queue is non-empty after the scheduling is completed and the number of tokens of the updated token bucket is negative;
the second updating module is connected with the empty queue pool and is used for carrying out token updating on the token bucket of the associated flow shaper when a new message arrives for each empty queue;
a cyclic update pool comprising a plurality of update pools having different update levels, each of said update pools further having a cyclic update frequency positively associated with said update level;
the third updating module is respectively connected with the first updating module and the cyclic updating pool and is used for processing according to the cyclic updating signal to obtain the corresponding updating level of the flow shaper, and placing the flow shaper into the updating pool corresponding to the updating level so as to update the token bucket according to the cyclic updating frequency;
and the fourth updating module is connected with the circular updating pool and is used for moving the flow shaper out of the updating pool to participate in scheduling when the token quantity of the token bucket corresponding to the flow shaper is detected to be non-negative in the process of carrying out token updating on each token bucket.
Preferably, each of the update pools represents the update level by a pre-configured standard time, and the smaller the standard time, the higher the update level and thus the higher the cyclic update frequency.
Preferably, the third updating module includes:
the processing unit is used for processing the cyclic update signal, the token quantity of the token bucket and a pre-configured token generation rate to obtain an expected time when the token quantity is accumulated to zero;
the matching unit is connected with the processing unit and is used for comparing the expected time with each standard time respectively and taking the update level which is larger than the expected time and corresponds to the standard time closest to the expected time as the update level of the traffic shaper;
and the updating unit is connected with the matching unit and is used for placing the flow shaper into the updating pool corresponding to the updating level so as to update the token bucket according to the cyclic updating frequency.
Preferably, the expected time is a time difference between an expected time when the number of tokens is accumulated to zero and the current time;
the matching unit compares the expected time with each standard time respectively in the change process of the expected time and continuously outputs a comparison result, and outputs an adjustment signal when the comparison result indicates that the update level of the flow shaper is changed;
and the updating unit adjusts the updating pool where the flow shaper is positioned according to the adjusting signal.
Preferably, the system further comprises a bandwidth borrowing updating module connected with the third updating module, wherein each traffic shaper is configured with a borrowing status flag bit and has different priorities; the bandwidth borrowing update module includes:
the storage unit is used for storing a priority queue, and in the priority queue, all the traffic shapers are sequentially arranged according to the order of the priority from high to low;
the first configuration unit is used for configuring the corresponding borrowing state zone bit to be a first value when the data queue associated with the traffic shaper is an empty queue, and configuring the corresponding borrowing state zone bit to be a second value when the data queue associated with the traffic shaper is a non-empty queue;
the second configuration unit is respectively connected with the storage unit and the first configuration unit and is used for binding the two traffic shapers when the borrowing state flag bit of the adjacent traffic shapers with higher priority in the priority queue is the first value, and then unbinding the two traffic shapers when the borrowing state flag bit of the traffic shapers with higher priority is the second value;
when the two traffic shapers are bound, the third updating module takes the bound two traffic shapers as a whole to be put into the corresponding updating pool for token updating.
The invention also provides a traffic shaper token updating method of the time sensitive network, which is applied to the traffic shaper token updating system, wherein a cyclic updating pool is configured in the traffic shaper token updating system, the traffic shaper token updating system comprises a plurality of updating pools with different updating levels, and each updating pool also has a cyclic updating frequency positively related to the updating level;
the traffic shaper token update method comprises:
step S1, the traffic shaper token updating system updates tokens of the associated token bucket of the traffic shaper when a message in each data queue is scheduled according to non-empty queues in each data queue, and judges whether the data queue is empty after scheduling is completed:
if yes, configuring the number of tokens of the corresponding token bucket to be a non-positive value, then adding the data queue into an empty queue pool, and then turning to step S2;
if not, turning to step S3;
step S2, the traffic shaper token updating system updates the token bucket of the associated traffic shaper for each empty queue when a new message arrives, and then returns to the step S1;
step S3, the traffic shaper token updating system judges whether the number of the updated tokens of the token bucket is a negative value or not:
if not, returning to the step S1;
if yes, generating a cyclic update signal, and then turning to step S4;
s4, the flow shaper token updating system processes the circulation updating signal to obtain the corresponding updating level of the flow shaper, and puts the flow shaper into the updating pool corresponding to the updating level so as to update the token bucket according to the circulation updating frequency;
and S5, when the token updating system of the traffic shaper detects that the number of tokens of the token bucket corresponding to the traffic shaper in each updating pool is non-negative in the process of updating the tokens of each token bucket, the traffic shaper is moved out of the updating pool to participate in scheduling.
Preferably, each of the update pools represents the update level by a pre-configured standard time, and the smaller the standard time, the higher the update level and thus the higher the cyclic update frequency.
Preferably, the step S4 includes:
step S41, the flow shaper token updating system processes the cyclic updating signal, the token quantity of the token bucket and a pre-configured token generation rate to obtain an expected time when the token quantity is accumulated to zero;
step S42, the traffic shaper token updating system compares the expected time with each standard time respectively, and takes the updating level which is larger than the expected time and corresponds to the standard time which is closest to the expected time as the updating level of the traffic shaper;
and step S43, the token updating system puts the flow shaper into the updating pool corresponding to the updating level so as to update the token bucket according to the cyclic updating frequency.
Preferably, the expected time is a time difference between an expected time when the number of tokens is accumulated to zero and the current time;
the traffic shaper token updating system compares the expected time with each of the standard times and continuously outputs a comparison result during the change of the expected time, and outputs an adjustment signal when the comparison result indicates that the update level of the traffic shaper is changed in step S42;
in the step S43, the traffic shaper token updating system adjusts the update pool where the traffic shaper is located according to the adjustment signal.
Preferably, before executing the step S4, a bandwidth borrowing update process is further included, each traffic shaper is configured with a borrowing status flag bit, each traffic shaper has different priorities, and each traffic shaper is sequentially arranged from high to low according to the priorities to form a priority queue;
the bandwidth borrowing update procedure includes:
configuring the corresponding borrowing status flag bit to a first value when the data queue associated with the traffic shaper is an empty queue, and configuring the corresponding borrowing status flag bit to a second value when the data queue associated with the traffic shaper is a non-empty queue;
binding, for each of the traffic shapers, the two traffic shapers when the borrowing status flag bit of the traffic shaper having the higher priority in the priority queue is the first value, and then unbinding the two traffic shapers when the borrowing status flag bit of the traffic shaper having the higher priority is the second value;
and in the step S4, when the two traffic shapers are bound, the traffic shaper token updating system puts the bound two traffic shapers as a whole into the corresponding updating pool for token updating.
The technical scheme has the following advantages or beneficial effects:
1) Dividing a data queue into an empty queue and a non-empty queue, wherein the empty queue does not participate in cyclic updating, and effectively reducing the read-write operation times of token updating; the non-empty queue is updated during scheduling and circularly updated when the corresponding token bucket is invalid, an update pool with corresponding circularly updated frequency is configured according to the expected time, and the time delay is reduced while the read-write operation times are further reduced;
2) The empty queue triggers the token update when a new message arrives, and the non-empty queue carries out the cyclic update when the token bucket is invalid, namely, a packet driving update mechanism is combined with an improved cyclic update mechanism to separate the token update from the number of the traffic shapers, so that a large number of traffic shapers can be supported to work simultaneously;
3) Since 802.1Qav creditbased shaper defines that the state of the data queues is to be considered when the traffic shaper updates, the present scheme is naturally friendly to implement 802.1Qav, while bandwidth borrowing is easier to implement.
Drawings
FIG. 1 is a schematic diagram of a traffic shaper token update system for a time sensitive network in accordance with a preferred embodiment of the present invention;
FIG. 2 is a flow chart of a traffic shaper token updating method for a time sensitive network in accordance with a preferred embodiment of the present invention;
FIG. 3 is a flow chart of a traffic shaper token update system according to a cyclic update signal for token updating a traffic shaper in accordance with a preferred embodiment of the present invention.
Detailed Description
The invention will now be described in detail with reference to the drawings and specific examples. The present invention is not limited to the embodiment, and other embodiments may fall within the scope of the present invention as long as they conform to the gist of the present invention.
In a preferred embodiment of the present invention, based on the above-mentioned problems occurring in the prior art, there is now provided a traffic shaper token updating system for a time sensitive network, in which a plurality of traffic shapers are pre-configured, each traffic shaper being associated with a data queue and performing traffic shaping on the data queue through a token bucket; the traffic shaper token update system includes:
the first updating module 1 is configured to perform token updating on token buckets of the associated traffic shaper when a message in each data queue is scheduled for non-empty queues in each data queue, configure the number of tokens of the corresponding token bucket to be non-positive when the data queue is empty after the scheduling is completed, then add the data queue into an empty queue pool 2, and generate a cyclic updating signal when the data queue is non-empty after the scheduling is completed and the number of tokens of the updated token bucket is negative;
the second updating module 3 is connected with the empty queue pool 2 and is used for updating the token of the token bucket of the associated flow shaper when a new message arrives for each empty queue;
a cyclic update pool 4 comprising a plurality of update pools 41 having different update levels, and each update pool 41 further having a cyclic update frequency positively correlated to the update level;
the third updating module 5 is respectively connected with the first updating module 1 and the cyclic updating pool 4, and is used for obtaining the updating level of the corresponding flow shaper according to the cyclic updating signal processing, and placing the flow shaper into the updating pool 41 corresponding to the updating level so as to update the token bucket according to the cyclic updating frequency;
and the fourth updating module 6 is connected with the cyclic updating pool 4 and is used for moving the traffic shaper out of the updating pool to participate in scheduling when the token quantity of the token bucket corresponding to the traffic shaper is detected to be non-negative in the process of carrying out token updating on each token bucket.
In an embodiment, the token updating system of the traffic shaper of the present invention may be configured in a switch or an intelligent network card according to requirements, so as to implement the adjustment of the exit traffic rate of the switch or the intelligent network card. The traffic shaper performs traffic shaping on the data queue via a token bucket principle that may include a token generation portion and a token consumption portion that operate in parallel and independently. For the token generation part, tokens are generally added into a token bucket at a pre-configured token generation rate, and the bucket overflows when full; for the token consumption part, when a message comes in, the state of the token bucket is directly seen, if the number of tokens in the token bucket is a non-negative number, the token bucket is in an effective state, at the moment, the message can pass through, after the message passes through, the number of tokens with the corresponding message length is subtracted in the token bucket, if the number of tokens in the token bucket is a negative number, the token bucket is in an ineffective state, and the message is blocked until the number of tokens waiting in the token bucket is accumulated to be a non-negative number.
In the conventional token updating mechanism, taking one thousand traffic shapers as an example, when the conventional cyclic updating mechanism is adopted, the operation amount is linearly related to the number of the traffic shapers due to the updating in a cyclic access mode, namely, the operation amount linearly grows along with the increase of the number of the traffic shapers, and the simultaneous operation of a large number of the traffic shapers is difficult to realize. And when the token bucket of one or more traffic shapers is effective, the token bucket cannot be scheduled because the token bucket is not updated to the traffic shapers, namely, time delay exists, in order to reduce the time delay, the update rate needs to be improved as much as possible, and because the number of times of reading and writing of a system per second is limited, a serious system bottleneck exists.
Based on the technical problems, in this embodiment, the empty queue triggers the token update when a new message arrives, and the non-empty queue performs the cyclic update when the token bucket is invalid, that is, a packet-driven update mechanism is adopted, and in combination with an improved cyclic update mechanism, the speed bottleneck of the update of the traffic shaper is transferred to the port service rate, so that the token update is separated from the number of the traffic shapers, and a large number of traffic shapers can be supported to work simultaneously.
The packet driving updating mechanism triggers the token updating for the data packet, specifically, when the data queue is an empty queue, no message in the data queue needs to be scheduled, at this time, the associated traffic shaper is not updated circularly, the number of read-write operation times of the token updating can be reduced to a great extent, when a new message in the empty queue arrives, the message contains at least one data packet, and then the token bucket of the traffic shaper corresponding to the empty queue is triggered immediately to update the token. Further, when the data queue is an empty queue, the method further comprises configuring the number of tokens of the corresponding token bucket to be non-positive before adding the empty queue to the empty queue pool according to the requirement of the 802.1Qav standard, preferably, clearing the number of tokens when the number of tokens of the token bucket is positive, and keeping the number of tokens unchanged when the number of tokens of the token bucket is negative.
Triggering token updating of a token bucket of a corresponding traffic shaper when a data queue is a non-empty queue and a message in the non-empty queue is scheduled, and if the data queue only comprises one message, after the message is scheduled, the data queue is an empty queue, and at the moment, no matter what state the token bucket is after the token updating, the traffic shaper associated with the empty queue is circularly updated; if the data queue includes more than one message, after the message is scheduled, the data queue is still a non-empty queue, at this time, the state of the updated token bucket is checked, preferably, the state is checked by obtaining the number of tokens in the token bucket, when the number of tokens is negative, the state is indicated to be invalid, and even if the message exists in the data queue, the message cannot pass through the traffic shaper, at this time, the token can participate in the scheduling again only after the number of tokens in the token bucket of the traffic shaper becomes non-negative, at this time, the traffic shaper can be put into the cyclic update pool 4 for token update.
The cyclic update mechanism in the cyclic update pool 4 is a time-driven update mechanism, and no matter whether a message arrives or not, the cyclic update mechanism in the cyclic update pool 4 is not affected. To further reduce the system data calculation amount, a plurality of update pools 41 are arranged in the cyclic update pool 4. Because the token generation rate of the token bucket is fixed, the expected time for the token bucket of the flow shaper to recover the effective state can be obtained by processing according to the current token quantity of the token bucket and the token generation rate, and based on the expected time, different cyclic update frequencies can be correspondingly configured to further reduce the data calculation amount. In this embodiment, each update pool may be divided into a plurality of update levels according to urgency of update time, where a shorter expected time indicates that the update time is more urgent, and at this time, the update pool is put into an update pool with a higher level for token update, where an update pool with a higher update level has a higher cyclic update frequency, in other words, an update pool with a higher update level is configured with more overhead.
Further, in the process of carrying out token updating in the cyclic updating pool 4, when the token bucket corresponding to the traffic shaper is detected to be in an effective state, the token quantity of the token bucket in the traffic shaper is indicated to be capable of meeting the message passing requirement, in other words, the data queue corresponding to the traffic shaper is qualified to participate in scheduling, and at the moment, the traffic shaper is moved out of the updating pool, so that the time delay is effectively reduced.
In the preferred embodiment of the present invention, each update pool 41 represents an update level by a pre-configured standard time, and the smaller the standard time, the higher the update level and thus the higher the cyclic update frequency.
In a preferred embodiment of the invention, the third updating module 5 comprises:
a processing unit 51, configured to process the cyclic update signal, the token number of the token bucket, and a pre-configured token generation rate to obtain an expected time when the token number is accumulated to zero;
a matching unit 52, coupled to the processing unit 51, for comparing the expected time with each standard time, and taking an update level corresponding to the standard time that is greater than the expected time and closest to the expected time as an update level of the traffic shaper;
an updating unit 53, connected to the matching unit 52, is configured to put the traffic shaper into an update pool corresponding to the update level, so as to update the token bucket with the token according to the cyclic update frequency.
Specifically, in this embodiment, three update pools are taken as an example, where the standard time corresponding to the first update pool may be 30 seconds, the standard time corresponding to the second update pool may be 60 seconds, and the standard time corresponding to the third update pool may be 80 seconds, and then the update level of the corresponding first update pool is higher than the update level of the second update pool, and the update level of the second update pool is higher than the update level of the third update pool. If the expected time is 50 seconds, the traffic shaper is put into a second updating pool for updating.
In a preferred embodiment of the present invention, the expected time is a time difference between an expected time when the number of tokens is accumulated to zero and the current time;
the matching unit 52 compares the expected time with each standard time and continuously outputs a comparison result in the process of changing the expected time, and outputs an adjustment signal when the comparison result indicates that the update level of the flow shaper is changed;
the update unit 53 adjusts the update pool in which the traffic shaper is located according to the adjustment signal.
Specifically, in this embodiment, since the expected time is a time difference between an expected time when the number of tokens is accumulated to zero and the current time, the expected time is in a continuous change process over time, taking the current time as a starting point, and the expected time is 50 seconds as an example, when the flow shaper is initially configured, the flow shaper is put into the second update pool to update, and after 21 seconds, the expected time becomes 29 seconds, and at this time, the flow shaper needs to be put into the first update pool to update. Preferably, the first update pool is configured with the highest cyclic update frequency, so that the token bucket of the traffic shaper in the first update pool can be timely detected to be in an effective state, and the traffic shaper is triggered to be removed from the update pool to participate in scheduling.
In the preferred embodiment, since the update level of the traffic shaper is a real-time adjustment process, the time when the token bucket of the traffic shaper becomes in an effective state can be obtained in time only by performing the query operation on the first update pool, and the query operation on all update pools is not required, so that the data volume is further reduced, and the system overhead is further reduced. The number of the first update pools may be configured according to the requirement, and is not limited herein, and may be one or two.
In the preferred embodiment of the present invention, the system further comprises a bandwidth borrowing update module 7 connected to the third update module 5, wherein each traffic shaper is configured with a borrowing status flag bit and each traffic shaper has a different priority; the bandwidth borrowing update module 7 includes:
a storage unit 71, configured to store a priority queue, where each traffic shaper is sequentially arranged according to a priority order from high to low;
a first configuration unit 72, configured to configure the corresponding borrowing status flag bit to a first value when the data queue associated with the traffic shaper is an empty queue, and configure the corresponding borrowing status flag bit to a second value when the data queue associated with the traffic shaper is a non-empty queue;
a second configuration unit 73, connected to the storage unit 71 and the first configuration unit 72, respectively, for binding the two traffic shapers when the borrowing status flag of the traffic shaper with the higher priority in the priority queue is a first value, and then unbinding the two traffic shapers when the borrowing status flag of the traffic shaper with the higher priority is a second value;
when the two traffic shapers are bound, the third updating module 5 puts the bound two traffic shapers into a corresponding updating pool as a whole for token updating.
Specifically, in this embodiment, in the scenario of supporting bandwidth borrowing, a borrowing status flag bit is added for each traffic shaper to indicate whether the traffic shaper is in a traffic idle state. Preferably, the first value is 1, and the second value is 0. Taking the traffic shaper as three examples, where the priorities of the first traffic shaper, the second traffic shaper and the third traffic shaper are sequentially reduced, when the borrowing status flag bit of the first traffic shaper is 1, it indicates that the data queue corresponding to the first traffic shaper is an empty queue, at this time, the second traffic shaper may borrow the transmission bandwidth of the first traffic shaper, taking the transmission bandwidth of the first traffic shaper as an example 1M, and the transmission bandwidth of the second traffic shaper as an example 2M, and after bandwidth borrowing, the data queue corresponding to the second traffic shaper may be transmitted using the transmission bandwidth of 3M. Similarly, when the borrowing status flag bit of the second traffic shaper is 1, the third traffic shaper may borrow the transmission bandwidth of the second traffic shaper.
Further, when the token is updated in the bandwidth borrowing scenario, as above, the first traffic shaper and the second traffic shaper are updated and used as a whole, when the first traffic shaper is in the borrowing state, and a new message arrives in a corresponding empty queue, as a preferred implementation manner, the borrowing state flag bit of the first traffic shaper may be configured as a first value, and after the current borrowing transmission task is completed, the independence of the first traffic shaper is recovered; as another preferred embodiment, the currently borrowed transmission task may be interrupted, and after the transmission of the own data queue is completed, the borrowed transmission task is resumed.
In summary, it can be seen that, due to the definition of 802.1Qav credit based shaper, the state of the data queue needs to be considered when the traffic shaper updates, and the update pool needs to be distinguished according to the state of the queue when the token is updated according to the technical scheme. Therefore, the technical scheme is very suitable for realizing 802.1Qav, namely the technical scheme is natural and friendly for realizing 802.1 Qav. Further, when a token updating mechanism combining packet driving and cyclic updating is used, the support of bandwidth borrowing can be realized by adding simple logic, and the scheme is simple to realize.
The invention also provides a traffic shaper token updating method of the time sensitive network, which is applied to the traffic shaper token updating system, wherein a cyclic updating pool is configured in the traffic shaper token updating system, the traffic shaper token updating system comprises a plurality of updating pools with different updating levels, and each updating pool also has a cyclic updating frequency positively related to the updating level;
as shown in fig. 2, the traffic shaper token update method includes:
step S1, a token updating system of the traffic shaper updates tokens of token buckets of associated traffic shapers when a message in each data queue is scheduled according to non-empty queues in each data queue, and judges whether the data queue is empty after scheduling is completed:
if yes, the token quantity of the corresponding token bucket is configured to be a non-positive value, then the data queue is added into an empty queue pool, and then the step S2 is performed;
if not, turning to step S3;
step S2, the token updating system of the traffic shaper updates the token bucket of the associated traffic shaper for each empty queue when a new message arrives, and then returns to the step S1;
step S3, the traffic shaper token updating system judges whether the number of tokens of the updated token bucket is a negative value or not:
if not, returning to the step S1;
if yes, generating a cyclic update signal, and then turning to step S4;
s4, the flow shaper token updating system obtains the updating level of the corresponding flow shaper according to the cyclic updating signal processing, and puts the flow shaper into an updating pool corresponding to the updating level so as to update the token bucket according to the cyclic updating frequency;
and S5, when the token updating system of the traffic shaper detects that the number of tokens of the token bucket corresponding to the traffic shaper in each updating pool is a non-negative value in the process of updating the tokens of each token bucket, the traffic shaper is moved out of the updating pool to participate in scheduling.
In a preferred embodiment of the present invention, each update pool represents an update level by a pre-configured standard time, and the smaller the standard time, the higher the update level, and thus the higher the cyclic update frequency.
In a preferred embodiment of the present invention, as shown in fig. 3, step S4 includes:
step S41, the flow shaper token updating system processes the number of tokens of the token bucket and a pre-configured token generation rate according to the cyclic updating signal to obtain an expected time when the number of tokens is accumulated to zero;
step S42, the traffic shaper token updating system compares the expected time with each standard time respectively, and takes the updating level which is larger than the expected time and corresponds to the standard time closest to the expected time as the updating level of the traffic shaper;
and step S43, the token updating system puts the flow shaper into an updating pool corresponding to the updating level so as to update the token bucket according to the cyclic updating frequency.
In a preferred embodiment of the present invention, the expected time is a time difference between an expected time when the number of tokens is accumulated to zero and the current time;
in step S42, the traffic shaper token updating system compares the expected time with each standard time and continuously outputs a comparison result in the process of changing the expected time, and outputs an adjustment signal when the comparison result indicates that the update level of the traffic shaper is changed;
in step S43, the traffic shaper token update system adjusts an update pool in which the traffic shaper resides according to the adjustment signal.
In a preferred embodiment of the present invention, before executing step S4, a bandwidth borrowing update process is further included, each traffic shaper is configured with a borrowing status flag bit, each traffic shaper has different priorities, and each traffic shaper is sequentially arranged according to the order from high priority to low priority to form a priority queue;
the bandwidth borrowing update procedure includes:
when the data queue associated with the flow shaper is an empty queue, configuring the corresponding borrowing state flag bit as a first value, and when the data queue associated with the flow shaper is a non-empty queue, configuring the corresponding borrowing state flag bit as a second value;
for each traffic shaper, binding the two traffic shapers when the borrowing status flag bit of the adjacent traffic shaper with higher priority in the priority queue is a first value, and then unbinding the two traffic shapers when the borrowing status flag bit of the traffic shaper with higher priority is a second value;
in step S4, when the two traffic shapers are bound, the traffic shaper token updating system puts the bound two traffic shapers as a whole into a corresponding updating pool for token updating.
The foregoing description is only illustrative of the preferred embodiments of the present invention and is not to be construed as limiting the scope of the invention, and it will be appreciated by those skilled in the art that equivalent substitutions and obvious variations may be made using the description and drawings, and are intended to be included within the scope of the present invention.

Claims (6)

1. A traffic shaper token update system for a time sensitive network, wherein a plurality of traffic shapers are pre-configured, each traffic shaper being associated with a data queue and traffic shaping the data queue by a token bucket; the traffic shaper token update system comprises:
a first updating module, configured to, for non-empty queues in each data queue, perform token updating on the token bucket of the associated traffic shaper when a message in the data queue is scheduled, configure the number of tokens of the corresponding token bucket to be non-positive when the data queue is empty after the scheduling is completed, then add the data queue into an empty queue pool, and generate a cyclic update signal when the data queue is non-empty after the scheduling is completed and the number of tokens of the updated token bucket is negative;
the second updating module is connected with the empty queue pool and is used for carrying out token updating on the token bucket of the associated flow shaper when a new message arrives for each empty queue;
a cyclic update pool comprising a plurality of update pools having different update levels, each of said update pools further having a cyclic update frequency positively associated with said update level;
the third updating module is respectively connected with the first updating module and the cyclic updating pool and is used for processing according to the cyclic updating signal to obtain the corresponding updating level of the flow shaper, and placing the flow shaper into the updating pool corresponding to the updating level so as to update the token bucket according to the cyclic updating frequency;
a fourth updating module, connected to the cyclic updating pool, configured to, when detecting that the number of tokens in the token bucket corresponding to the traffic shaper is non-negative in a token updating process performed by each token bucket, move the traffic shaper out of the updating pool to participate in scheduling;
each update pool represents the update level through a preset standard time, and the smaller the standard time is, the higher the update level is, and the higher the cyclic update frequency is;
the third update module includes:
the processing unit is used for processing the cyclic update signal, the token quantity of the token bucket and a pre-configured token generation rate to obtain an expected time when the token quantity is accumulated to zero;
the matching unit is connected with the processing unit and is used for comparing the expected time with each standard time respectively and taking the update level which is larger than the expected time and corresponds to the standard time closest to the expected time as the update level of the traffic shaper;
and the updating unit is connected with the matching unit and is used for placing the flow shaper into the updating pool corresponding to the updating level so as to update the token bucket according to the cyclic updating frequency.
2. The traffic shaper token update system of claim 1, wherein the expected time is a time difference between an expected time and a current time at which the number of tokens is accumulated to zero;
the matching unit compares the expected time with each standard time respectively in the change process of the expected time and continuously outputs a comparison result, and outputs an adjustment signal when the comparison result indicates that the update level of the flow shaper is changed;
and the updating unit adjusts the updating pool where the flow shaper is positioned according to the adjusting signal.
3. The traffic shaper token update system of claim 1, further comprising a bandwidth borrowing update module coupled to the third update module, each of the traffic shapers configured with a borrowing status flag and each of the traffic shapers having a different priority; the bandwidth borrowing update module includes:
the storage unit is used for storing a priority queue, and in the priority queue, all the traffic shapers are sequentially arranged according to the order of the priority from high to low;
the first configuration unit is used for configuring the corresponding borrowing state zone bit to be a first value when the data queue associated with the traffic shaper is an empty queue, and configuring the corresponding borrowing state zone bit to be a second value when the data queue associated with the traffic shaper is a non-empty queue;
the second configuration unit is respectively connected with the storage unit and the first configuration unit and is used for binding the two traffic shapers when the borrowing state flag bit of the adjacent traffic shapers with higher priority in the priority queue is the first value, and then unbinding the two traffic shapers when the borrowing state flag bit of the traffic shapers with higher priority is the second value;
when the two traffic shapers are bound, the third updating module takes the bound two traffic shapers as a whole to be put into the corresponding updating pool for token updating.
4. A traffic shaper token update method for a time sensitive network, applied to a traffic shaper token update system according to any of claims 1-3, wherein said traffic shaper token update system is configured with a cyclic update pool comprising a plurality of update pools having different update levels, and wherein each of said update pools further has a cyclic update frequency positively correlated to said update level;
the traffic shaper token update method comprises:
step S1, the traffic shaper token updating system updates tokens of the associated token bucket of the traffic shaper when a message in each data queue is scheduled according to non-empty queues in each data queue, and judges whether the data queue is empty after scheduling is completed:
if yes, configuring the number of tokens of the corresponding token bucket to be a non-positive value, then adding the data queue into an empty queue pool, and then turning to step S2;
if not, turning to step S3;
step S2, the traffic shaper token updating system updates the token bucket of the associated traffic shaper for each empty queue when a new message arrives, and then returns to the step S1;
step S3, the traffic shaper token updating system judges whether the number of the updated tokens of the token bucket is a negative value or not:
if not, returning to the step S1;
if yes, generating a cyclic update signal, and then turning to step S4;
s4, the flow shaper token updating system processes the circulation updating signal to obtain the corresponding updating level of the flow shaper, and puts the flow shaper into the updating pool corresponding to the updating level so as to update the token bucket according to the circulation updating frequency;
step S5, the flow shaper token updating system moves the flow shaper out of the updating pool to participate in scheduling when detecting that the number of tokens of the token bucket corresponding to the flow shaper in each updating pool is non-negative in the process of token updating of each token bucket;
each update pool represents the update level through a preset standard time, and the smaller the standard time is, the higher the update level is, and the higher the cyclic update frequency is;
the step S4 includes:
step S41, the flow shaper token updating system processes the cyclic updating signal, the token quantity of the token bucket and a pre-configured token generation rate to obtain an expected time when the token quantity is accumulated to zero;
step S42, the traffic shaper token updating system compares the expected time with each standard time respectively, and takes the updating level which is larger than the expected time and corresponds to the standard time which is closest to the expected time as the updating level of the traffic shaper;
and step S43, the token updating system puts the flow shaper into the updating pool corresponding to the updating level so as to update the token bucket according to the cyclic updating frequency.
5. The method of claim 1, wherein the expected time is a time difference between an expected time and a current time at which the number of tokens is accumulated to zero;
the traffic shaper token updating system compares the expected time with each of the standard times and continuously outputs a comparison result during the change of the expected time, and outputs an adjustment signal when the comparison result indicates that the update level of the traffic shaper is changed in step S42;
in the step S43, the traffic shaper token updating system adjusts the update pool where the traffic shaper is located according to the adjustment signal.
6. The traffic shaper token update method of claim 1, further comprising a bandwidth borrowing update process, each of said traffic shapers configured with a borrowing status flag, each of said traffic shapers having different priorities, each of said traffic shapers being sequentially arranged in order of said priorities from high to low to form a priority queue;
the bandwidth borrowing update procedure includes:
configuring the corresponding borrowing status flag bit to a first value when the data queue associated with the traffic shaper is an empty queue, and configuring the corresponding borrowing status flag bit to a second value when the data queue associated with the traffic shaper is a non-empty queue;
binding, for each of the traffic shapers, the two traffic shapers when the borrowing status flag bit of the traffic shaper having the higher priority in the priority queue is the first value, and then unbinding the two traffic shapers when the borrowing status flag bit of the traffic shaper having the higher priority is the second value;
and in the step S4, when the two traffic shapers are bound, the traffic shaper token updating system puts the bound two traffic shapers as a whole into the corresponding updating pool for token updating.
CN202110750997.2A 2021-07-01 2021-07-01 Traffic shaper token updating system and method for time-sensitive network Active CN113645148B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110750997.2A CN113645148B (en) 2021-07-01 2021-07-01 Traffic shaper token updating system and method for time-sensitive network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110750997.2A CN113645148B (en) 2021-07-01 2021-07-01 Traffic shaper token updating system and method for time-sensitive network

Publications (2)

Publication Number Publication Date
CN113645148A CN113645148A (en) 2021-11-12
CN113645148B true CN113645148B (en) 2024-04-05

Family

ID=78416607

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110750997.2A Active CN113645148B (en) 2021-07-01 2021-07-01 Traffic shaper token updating system and method for time-sensitive network

Country Status (1)

Country Link
CN (1) CN113645148B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594692A (en) * 2012-02-23 2012-07-18 中兴通讯股份有限公司 Traffic shaping method and device
CN111131066A (en) * 2018-10-31 2020-05-08 深圳市中兴微电子技术有限公司 Traffic shaping method and device
WO2020142867A1 (en) * 2019-01-07 2020-07-16 华为技术有限公司 Traffic shaping method and related device
CN113645147A (en) * 2021-07-01 2021-11-12 苏州裕太微电子有限公司 Token updating system and method of flow shaper

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594692A (en) * 2012-02-23 2012-07-18 中兴通讯股份有限公司 Traffic shaping method and device
CN111131066A (en) * 2018-10-31 2020-05-08 深圳市中兴微电子技术有限公司 Traffic shaping method and device
WO2020142867A1 (en) * 2019-01-07 2020-07-16 华为技术有限公司 Traffic shaping method and related device
CN113645147A (en) * 2021-07-01 2021-11-12 苏州裕太微电子有限公司 Token updating system and method of flow shaper

Also Published As

Publication number Publication date
CN113645148A (en) 2021-11-12

Similar Documents

Publication Publication Date Title
US7313142B2 (en) Packet processing device
JP3002726B1 (en) Variable speed digital switching system
JP3178470B2 (en) Data flow control switch and scheduling method thereof
US20160330128A1 (en) Queue scheduling method and device, and computer storage medium
CN116016371A (en) Method, equipment and system for sending message
CN113645147A (en) Token updating system and method of flow shaper
CN101729386A (en) Flow control method and device based on token scheduling
US7554908B2 (en) Techniques to manage flow control
CN101465794B (en) Method and apparatus for scheduling packet
US20050254480A1 (en) Router using clock synchronizer for distributed traffic control
EP2477366B1 (en) Data transmission method, apparatus and system
CN113645148B (en) Traffic shaper token updating system and method for time-sensitive network
CN101478486A (en) Method, equipment and system for switch network data scheduling
CN110336756B (en) Crossbar flow back pressure control method with port convergence function
CN109450817B (en) Mixed scheduling method for time-triggered Ethernet multi-service message transmission
US7492825B2 (en) Methods and apparatuses for processing data channels
CN115086238B (en) TSN network port output scheduling device
KR20080014842A (en) A system and method for transmitting data
CN114500520A (en) Data transmission method, device and communication node
CN111711994A (en) Multichannel LoRaWAN gateway downlink scheduling method
CN110708253A (en) Message control method, flow table updating method and node equipment
CN110708255A (en) Message control method and node equipment
US11805080B2 (en) System and method for data loss and data latency management in a network-on-chip with buffered switches
CN115865810B (en) Credit value flow scheduling system and method in time sensitive network
CN113422741B (en) Time-triggered Ethernet switch structure

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Room 201, building 4, No. 78, Keling Road, high tech Zone, Suzhou, Jiangsu 215159

Applicant after: Yutai Microelectronics Co.,Ltd.

Address before: Room 201, building 4, No.78, Keling Road, high tech Zone, Suzhou City, Jiangsu Province

Applicant before: Suzhou Yutai Microelectronics Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant