WO2021115482A1 - Token adjusting method and device - Google Patents

Token adjusting method and device Download PDF

Info

Publication number
WO2021115482A1
WO2021115482A1 PCT/CN2020/136161 CN2020136161W WO2021115482A1 WO 2021115482 A1 WO2021115482 A1 WO 2021115482A1 CN 2020136161 W CN2020136161 W CN 2020136161W WO 2021115482 A1 WO2021115482 A1 WO 2021115482A1
Authority
WO
WIPO (PCT)
Prior art keywords
queue
token
tokens
traffic management
authorization
Prior art date
Application number
PCT/CN2020/136161
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
Application filed by 深圳市中兴微电子技术有限公司 filed Critical 深圳市中兴微电子技术有限公司
Publication of WO2021115482A1 publication Critical patent/WO2021115482A1/en

Links

Images

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/12Avoiding congestion; Recovering from congestion
    • 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
    • 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/12Avoiding congestion; Recovering from congestion
    • H04L47/122Avoiding congestion; Recovering from congestion by diverting traffic away from congested entities
    • 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/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • 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/21Flow control; Congestion control using leaky-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

Definitions

  • This application relates to the field of communications, such as a token adjustment method and device.
  • the new switching network access chip when the clock frequency is limited, to achieve higher traffic management, there is a mode of using two or more sets of traffic management components.
  • the two sets of components independent of each other, can pass through all the links of the switching network to communicate data with the opposite chip.
  • the two sets of components are connected to the switching network through all links.
  • the chip has two cores, and the switching network does not know how many authorizations each core should issue to the opposite end, so it is impossible to coordinate the use of bandwidth for each core.
  • the embodiments of the present application provide a token adjustment method and device, so as to at least avoid the situation that unreasonable authorization in the related technology leads to poor traffic management effects.
  • a token adjustment method including: receiving a token, wherein the token is issued according to an issuing interval, and the issuing interval is based on the number of valid links. And the link congestion level is determined, the received token is shared by multiple traffic management components; adjust the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components Token.
  • an apparatus for adjusting a token including: a receiving module configured to receive a token, wherein the token is issued according to an issuance interval, and the issuance interval It is determined based on the number of effective links and the link congestion level, and the received tokens are shared by multiple traffic management components; the adjustment module is set to be based on the total number of tokens shared by the multiple traffic management components Adjust the tokens of the queues of the plurality of traffic management components.
  • a computer-readable storage medium and a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute any one of the foregoing when running. The steps in the method embodiment.
  • an electronic device including a memory and a processor, the memory is stored with a computer program, and the processor is configured to run the computer program to execute any of the above Steps in the method embodiment.
  • FIG. 1 is a block diagram of the hardware structure of a mobile terminal of a token adjustment method according to an embodiment of the present application
  • FIG. 2 is a flowchart of a token management method according to an embodiment of the present application.
  • Fig. 3 is a structural block diagram of a token management device according to an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of adding an adjustment device between two congestion management modules according to an optional embodiment of the present application
  • FIG. 5 is a schematic structural diagram of a flow balancing device according to an optional embodiment of the present application.
  • FIG. 6 is a schematic diagram of the tokens of each queue at the L3 level of core0 and core1 according to an optional embodiment of the present application;
  • FIG. 7 is a flowchart of a single-chip token addition and consumption process according to an optional embodiment of the present application.
  • FIG. 8 is a flowchart of operations related to entering and dequeuing a single-queue fifo according to an optional embodiment of the present application
  • Fig. 9 is a flowchart of a single-queue token addition and consumption process according to an optional embodiment of the present application.
  • FIG. 1 is a hardware structure block diagram of the management device of a token adjustment method according to an embodiment of the present application.
  • the management device 10 may include at least one (only one is shown in FIG. 1) processor 102 (the processor 102 may include but is not limited to a microprocessor (Micro Control Unit, MCU) or a field programmable logic device) (Field Programmable Gate Array, FPGA) and other processing devices) and a memory 104 configured to store data.
  • MCU Micro Control Unit
  • FPGA Field Programmable Gate Array
  • the above-mentioned management device may further include a transmission device 106 and an input/output device 108 configured to communicate.
  • a transmission device 106 and an input/output device 108 configured to communicate.
  • the management device 10 may also include more or fewer components than those shown in FIG. 1 or have a different configuration from that shown in FIG. 1.
  • the memory 104 may be configured to store computer programs, for example, software programs and modules of application software, such as the computer programs corresponding to the token adjustment method in the embodiment of the present application.
  • the processor 102 runs the computer programs stored in the memory 104, Thereby, various functional applications and data processing are executed, that is, the above-mentioned method is realized.
  • the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic storage device, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may include a memory remotely provided with respect to the processor 102, and these remote memories may be connected to the management device 10 via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 106 is configured to receive or transmit data via a network.
  • the aforementioned network may include, for example, a wireless network provided by a communication provider of the management device 10.
  • the transmission device 106 includes a network adapter (Network Interface Controller, NIC), and the NIC can be connected to other network devices through a base station so as to communicate with the Internet.
  • the transmission device 106 may be a radio frequency (RF) module, and the RF module is configured to communicate with the Internet in a wireless manner.
  • RF radio frequency
  • FIG. 2 is a flowchart of the method for adjusting a token according to an embodiment of the present application. As shown in FIG. 2, the process includes steps S202 to step S204.
  • step S202 a token is received, where the token is issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the received tokens are multiple Shared by traffic management components.
  • step S204 the tokens of the queues of the multiple traffic management components are adjusted according to the total number of tokens shared by the multiple traffic management components.
  • the token is issued according to the issuance interval, the issuance interval is determined according to the number of valid links and the link congestion level, and the received tokens are multiple Shared by the traffic management components; adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components. Therefore, it can avoid the unreasonable authorization in the related technology that leads to poor traffic management effects. Circumstances, improve the efficiency of traffic management.
  • the delivery interval, the number of valid links, and the link congestion level satisfy the following relationship: when the link congestion level remains unchanged and the number of valid links changes, the delivery interval There is an anti-correlation relationship with the number of effective links; when the link congestion level changes and the number of effective links does not change, the delivery interval has a positive correlation relationship with the link congestion level.
  • adjusting the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components includes: reading the token request queue; The designated queue in the token request queue issues tokens.
  • the designated queue is allowed to enter the token request queue:
  • the first condition includes: the number of tokens in the designated queue is less than the stop request threshold, and the designated queue is not in the token request queue; the second condition includes: the designated queue is authorized, or the designated queue is polled .
  • the method further includes: applying for authorization to the superior queue according to the adjusted result.
  • applying for authorization to the upper-level queue according to the adjusted result includes: determining whether to apply for authorization to the upper-level queue according to the number of tokens, the number of valid links, and the link congestion level of the designated queue; The superior queue applies for authorization.
  • requesting authorization from the superior queue includes: generating authorization request information according to the number of valid links, link congestion level, and the number of tokens in the designated queue; sending the authorization request information to the The superior queue.
  • a token adjustment device is also provided, and the device is configured to implement the above-mentioned embodiments and optional implementation manners, and those that have been explained will not be repeated.
  • the term "module” is a combination of software and/or hardware that can implement predetermined functions.
  • Fig. 3 is a structural block diagram of a token adjustment device according to an embodiment of the present application. As shown in Fig. 3, the device includes:
  • the receiving module 31 is configured to receive tokens, where the tokens are issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the number of tokens received is more Shared by all traffic management components;
  • the adjustment module 33 is configured to adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components.
  • the token is issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the received tokens are multiple Shared by the traffic management components; adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components. Therefore, it can avoid the unreasonable authorization in the related technology that leads to poor traffic management effects. Circumstances, improve the efficiency of traffic management.
  • the delivery interval, the number of valid links, and the link congestion level satisfy the following relationship: when the link congestion level remains unchanged and the number of valid links changes, the delivery interval There is an anti-correlation relationship with the number of effective links; when the link congestion level changes and the number of effective links does not change, the delivery interval has a positive correlation relationship with the link congestion level.
  • the adjustment module 33 includes: a reading module, which is set to read the token request queue; and the issuing module, which is set to deliver to the designated queue in the token request queue according to the weight of the pre-configured designated queue Token.
  • the specified queue is allowed to enter the token request queue when the following conditions 1 and 2 are met and there are vacancies in the token request queue:
  • the condition one includes: the number of tokens in the specified queue is less than the stop The application threshold, and the designated queue is not in the token request queue;
  • the second condition includes: the designated queue is authorized, or the designated queue is polled.
  • the device further includes: an application module configured to adjust the tokens of the queues of the plurality of traffic management components according to the total number of tokens shared by the plurality of traffic management components, and then to the superior according to the adjusted result The queue applies for authorization.
  • an application module configured to adjust the tokens of the queues of the plurality of traffic management components according to the total number of tokens shared by the plurality of traffic management components, and then to the superior according to the adjusted result The queue applies for authorization.
  • the application module includes: an application sub-module configured to determine whether to apply for authorization to the upper-level queue according to the number of tokens in the designated queue, the number of valid links, and the link congestion level; The superior queue applies for authorization.
  • the application sub-module includes: an application unit, configured to generate authorization request information according to the number of valid links, the link congestion level, and the number of tokens in the designated queue in response to the determination result of yes; and the sending unit, configured to The authorization request information is sent to the superior queue.
  • each of the above modules can be implemented by software or hardware.
  • it can be implemented in the following manner, but not limited to this: the above modules are all located in the same processor; or, the above modules can be combined in any combination.
  • the forms are located in different processors.
  • the embodiment of the present application provides an adjustment device that can coordinate two independent traffic management components, where each traffic management component includes a congestion management module.
  • each traffic management component includes a congestion management module.
  • the two congestion management modules apply for authorization from bottom to top when certain conditions are met.
  • Each queue of level L0 is 0 ⁇ m0, and it applies to each queue of level L1 for authorization L0_apply[(m0-1):0] in turn.
  • Each queue 0 ⁇ m1 of L1 also applies for authorization to the upper level in turn, and each queue of L4 applies to L5 for authorization L4_apply[(m4-1):0] in turn.
  • the authorization is issued from top to bottom according to the priority and weight of each level of queue configuration.
  • L5 level issues authorization to L4 level, authorization enable L4_val, authorized queue number L4_qnum. L4 is then issued level by level, and finally to L0_val and L0_qnum.
  • FIG. 4 is a schematic structural diagram of adding an adjustment device between two congestion management modules according to an optional embodiment of the present application.
  • an adjustment device is added in this embodiment, and the adjustment device is a single-chip scheduling device.
  • the adjustment device can be added at a certain level, such as between L3 and L4. The following are examples of adding the adjustment device to the L3 level.
  • the input signals of the adjustment device provided in this implementation are the number of effective links and the congestion level. After calculation, the addition conditions con_rdy_c0 and con_rdy_c1 of whether the L3 queues of core0 and core1 can be applied for authorization can be obtained.
  • new core0 and core1 signals L3_apply_new_c0[(n0-1):0] and L3_apply_new_c1[(n1-1):0] are generated to apply for authorization at the L4 level.
  • the added conditions con_rdy_c0 and con_rdy_c1 for the upward application authorization are controlled by the congestion level and the number of effective links.
  • the switching link divides the congestion into levels according to the state of the cell buffer, and sometimes the number of effective links of the switching connection also changes.
  • the switching interface summarizes the congestion level and the number of effective links and sends it to the internal traffic management component.
  • the congestion management module in the traffic management component will reduce the number of token applications for each queue according to the two dimensions of the congestion level and the number of effective links, and then reduce the authorization issuance, thereby reducing the number of messages sent and received, and reducing the congestion of the switching network.
  • FIG. 5 is a schematic structural diagram of a traffic balancing device according to an optional embodiment of the present application. As shown in FIG. 5, the device of this embodiment is divided into three modules: a single-chip token management module, L3 single queue of core0 and core1 Token management module, single-queue first-in, first-out (first input first output, fifo) management module.
  • a single-chip token management module L3 single queue of core0 and core1 Token management module
  • single-queue first-in, first-out (first input first output, fifo) management module single-queue first-in, first-out (first input first output, fifo) management module.
  • the single-chip token management module is set to calculate and maintain the total number of tokens for the two cores. First, query the pre-configured single-chip token issuing interval according to the feedback con_level and the number of valid links serdes-num. According to the token issuance interval, the total tokens added to the two cores. At the same time, when the token is issued from the total token to the L3 level single-queue tokens of core0 and core1, the token is subtracted from the total single-chip token. Maintain the number of tokens and control whether to respond to a single-queue fifo dequeue request.
  • the single-queue token management module is set to calculate and maintain the number of tokens in a single queue at the L3 level of core0 and core1.
  • the single-chip total token module issues a token to a single queue according to the configuration weights of each queue of core0 and core1, the token is added to the queue.
  • the queue token is deducted. Maintain the tokens of all queues at the L3 level of core0 and core1.
  • the single-queue fifo management module is set as follows: each queue at the L3 level of core0 and core1 needs to enter the fifo, and apply for tokens to the single-chip token management module according to a fixed time slot. Manage the operations related to entry and exit of each queue.
  • the traffic of each queue issued is automatically adjusted, and the single chip The total traffic will not exceed the total bandwidth that the link can bear.
  • the traffic is appropriately reduced to reduce the congestion of the exchange.
  • the delivered traffic can be automatically adjusted under different switching congestion levels, so that the traffic does not exceed the total bandwidth that the link can bear. And when the exchange is congested, the traffic is appropriately reduced to control the degree of congestion in the exchange.
  • the authorization application signal of each queue at the L3 level of core0 and core1 the authorization issuance is indirectly controlled, so that the flow of the two cores is balanced when the switching network is congested or the link changes.
  • Fig. 6 is a schematic diagram of each queue token at the L3 level of core0 and core1 according to an optional embodiment of the present application.
  • a single-chip token manages and maintains the total token value of two cores.
  • the single-queue token management module maintains the token values of all the queues under core0 and core1.
  • the queue number of core 0 is ⁇ 1’b0, core0_que_id ⁇
  • the queue number of core1 is ⁇ 1’b1, core1_que_id ⁇ .
  • the single-queue token management module allocates the single-chip token value to the queue token.
  • Fig. 7 is a flowchart of a single-chip token addition and consumption process according to an optional embodiment of the present application. As shown in Fig. 7, the single-chip token addition and consumption process flow.
  • the total token value is added: according to the feedback congestion level and effective link, the single-chip token issuance interval is queried, and the issuance interval is intl cycles. It is fixed every intl cycles to add a token to the total token value to maintain and update the single-chip token value.
  • Single-chip token issuance interval configuration the rules are as follows: under the same congestion level, the configuration issuance interval is inversely proportional to the number of effective links, so that the total traffic of a single chip will not exceed the total bandwidth that the link can bear.
  • the effective link tolerable traffic determines the single-chip token issuance interval, and the relationship is as follows:
  • crdt_value is the authorized value of core0 and core1
  • intl is the number of chip clock cycles included in the actual single-chip token issuance interval
  • T is the chip clock cycle length
  • data_flow is the total bandwidth that the effective link can bear.
  • the issuing interval changes according to a certain ratio.
  • Single-chip token value reduction fixed time slot and when the queue waiting in the single-queue fifo is not empty, and the total single-chip token is greater than 0, it means that there is a queue that can apply for a token from the single-chip token management.
  • the queue information in the single queue fifo is read, and the weight information configured in core0 or core1 corresponding to the queue is read.
  • the weight wt configured in the queue wt tokens are subtracted from the single-chip token value, and wt tokens are added to the queue.
  • the flag of the queue is written as 0 in the fifo, and the single-chip token value is maintained and updated.
  • FIG. 8 is a flow chart of operations related to the enqueue and dequeue of a single-queue fifo according to an optional embodiment of the present application.
  • a single-queue fifo enqueues and dequeues related operations, and there are vacancies in the single-queue fifo
  • each queue of core0 and core1 has three chances to enter the single-queue fifo.
  • One is that there are queues in core0 that are authorized, and core1 has queues that are authorized.
  • a fixed time such as 32 chip clock cycle length (clock, clk) is the cycle, starting from queue number 0 to the maximum queue number, polling check The token value of all queues.
  • the third is after the queued fifo is read out, after adding wt tokens to the single queue.
  • the token value of the queue is negative or positive and the token value is less than the single-queue stop application threshold apply_off_th, and the queue is not in the single-queue fifo (that is, the enq_flag flag is 0), then it is written into the single-queue fifo.
  • the flag enq_flag indicating that the queue is not in the single-queue fifo is written as 1. After writing the single-queue fifo, it represents the queue waiting to apply for a token from the single-chip token management module.
  • Fig. 9 is a flowchart of a single-queue token addition and consumption process according to an optional embodiment of the present application.
  • the single-queue token addition and consumption process flow.
  • the core and the L3 level queue obtain wt tokens distributed by a single chip, they are added to the original token value of the queue to maintain and update the queue token value.
  • the decrease in the queue token value means that after the core and the L3 level queue are authorized, the corresponding token value of the queue is reduced by one operation to maintain and update the queue token value.
  • core0 and core1 are balanced to obtain tokens according to the weights of the queues of each core at the same level.
  • the embodiment of the present application also provides a computer-readable storage medium, and a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute any of the foregoing method embodiments when running. step.
  • the above-mentioned computer-readable storage medium may be configured to store a computer program for executing steps S1 to S2.
  • step S1 a token is received, where the token is issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the received tokens are multiple Shared by traffic management components.
  • step S2 the tokens of the queues of the multiple traffic management components are adjusted according to the total number of tokens shared by the multiple traffic management components.
  • the token is issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the received tokens are multiple Shared by the traffic management components; adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components. Therefore, it can avoid the unreasonable authorization in the related technology that leads to poor traffic management effects. Circumstances, improve the efficiency of traffic management.
  • the foregoing storage medium may include, but is not limited to: U disk, ROM, RAM, mobile hard disk, magnetic disk, or optical disk, and other media that can store computer programs.
  • the embodiment of the present application also provides an electronic device, including a memory and a processor, the memory is stored with a computer program, and the processor is configured to run the computer program to execute the steps in any of the foregoing method embodiments.
  • the aforementioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the aforementioned processor, and the input-output device is connected to the aforementioned processor.
  • the above-mentioned processor may be configured to execute step S1 to step S2 through a computer program.
  • step S1 a token is received, where the token is issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the received tokens are multiple Shared by traffic management components.
  • step S2 the tokens of the queues of the multiple traffic management components are adjusted according to the total number of tokens shared by the multiple traffic management components.
  • the token is issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the received tokens are multiple Shared by the traffic management components; adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components. Therefore, it is possible to avoid unreasonable authorization in the related technology that leads to poor traffic management effects Circumstances, improve the efficiency of traffic management.
  • modules or steps of this application can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed in a network composed of multiple computing devices.
  • they can be implemented with program codes executable by a computing device, so that they can be stored in a storage device for execution by the computing device, and in some cases, they can be executed in a different order than here.

Landscapes

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

Abstract

Provided in the present application are a token adjusting method and device. The adjusting method comprises: receiving tokens, wherein the tokens are issued at an issuing interval, the issuing interval is determined according to the number of active links and the level of link congestion, and the received tokens are shared by a plurality of traffic management components; and adjusting the queuing tokens of the plurality of traffic management components according to the total number of tokens shared by the plurality of traffic management components.

Description

一种令牌的调整方法及装置Method and device for adjusting token
本申请要求在2019年12月13日提交中国专利局、申请号为201911285491.8的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office with an application number of 201911285491.8 on December 13, 2019. The entire content of this application is incorporated into this application by reference.
技术领域Technical field
本申请涉及通信领域,例如一种令牌的调整方法及装置。This application relates to the field of communications, such as a token adjustment method and device.
背景技术Background technique
在新的交换网接入芯片,当时钟频率有限时,要到达较高的流量管理,有采用两套或多套流量管理组件的模式。此处以两套举例。两套组件,相互独立,都可以经过交换网的所有链路,和对端芯片互通数据。正常通流时,两套组件通过所有链路连接到交换网络。这里举例,当交换网有效链路变化时,芯片两个核心(core),交换网络不知道每个core应该下发多少授权给对端,这样就无法给每个core协调使用多少带宽。In the new switching network access chip, when the clock frequency is limited, to achieve higher traffic management, there is a mode of using two or more sets of traffic management components. Here are two sets of examples. The two sets of components, independent of each other, can pass through all the links of the switching network to communicate data with the opposite chip. During normal flow, the two sets of components are connected to the switching network through all links. Here, for example, when the effective link of the switching network changes, the chip has two cores, and the switching network does not know how many authorizations each core should issue to the opposite end, so it is impossible to coordinate the use of bandwidth for each core.
针对相关技术中,授权不合理导致流量管理效果较差的情况,尚不存在较好的解决方案。Regarding the situation in related technologies where unreasonable authorization leads to poor traffic management effects, there is no better solution yet.
发明内容Summary of the invention
本申请实施例提供了一种令牌的调整方法及装置,以至少避免相关技术中授权不合理导致流量管理效果较差的情况。The embodiments of the present application provide a token adjustment method and device, so as to at least avoid the situation that unreasonable authorization in the related technology leads to poor traffic management effects.
根据本申请的一个实施例,提供了一种令牌的调整方法,包括:接收令牌,其中,所述令牌是按照下发间隔下发的,所述下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的所述令牌为多个流量管理组件所共用;根据所述多个流量管理组件所共用的总令牌数调整所述多个流量管理组件的队列的令牌。According to an embodiment of the present application, there is provided a token adjustment method, including: receiving a token, wherein the token is issued according to an issuing interval, and the issuing interval is based on the number of valid links. And the link congestion level is determined, the received token is shared by multiple traffic management components; adjust the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components Token.
根据本申请的另一个实施例,提供了一种令牌的调整装置,包括:接收模块,设置为接收令牌,其中,所述令牌是按照下发间隔下发的,所述下发间隔 是根据有效链路数和链路拥塞等级所确定的,接收的所述令牌为多个流量管理组件所共用;调整模块,设置为根据所述多个流量管理组件所共用的总令牌数调整所述多个流量管理组件的队列的令牌。According to another embodiment of the present application, an apparatus for adjusting a token is provided, including: a receiving module configured to receive a token, wherein the token is issued according to an issuance interval, and the issuance interval It is determined based on the number of effective links and the link congestion level, and the received tokens are shared by multiple traffic management components; the adjustment module is set to be based on the total number of tokens shared by the multiple traffic management components Adjust the tokens of the queues of the plurality of traffic management components.
根据本申请的又一个实施例,还提供了一种计算机可读的存储介质,所述计算机可读的存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present application, there is also provided a computer-readable storage medium, and a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute any one of the foregoing when running. The steps in the method embodiment.
根据本申请的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to another embodiment of the present application, there is also provided an electronic device, including a memory and a processor, the memory is stored with a computer program, and the processor is configured to run the computer program to execute any of the above Steps in the method embodiment.
附图说明Description of the drawings
图1是本申请实施例的一种令牌的调整方法的移动终端的硬件结构框图;FIG. 1 is a block diagram of the hardware structure of a mobile terminal of a token adjustment method according to an embodiment of the present application;
图2是根据本申请实施例的令牌的管理方法的流程图;Figure 2 is a flowchart of a token management method according to an embodiment of the present application;
图3是根据本申请实施例的令牌的管理装置的结构框图;Fig. 3 is a structural block diagram of a token management device according to an embodiment of the present application;
图4是根据本申请可选实施例的两个拥塞管理模块间添加调整装置的的结构示意图;4 is a schematic structural diagram of adding an adjustment device between two congestion management modules according to an optional embodiment of the present application;
图5是根据本申请可选实施例的流量均衡装置的结构示意图;FIG. 5 is a schematic structural diagram of a flow balancing device according to an optional embodiment of the present application;
图6是根据本申请可选实施例的core0、core1的L3级各队列令牌示意图;FIG. 6 is a schematic diagram of the tokens of each queue at the L3 level of core0 and core1 according to an optional embodiment of the present application;
图7是根据本申请可选实施例的单芯片令牌添加和消耗过程的流程图;FIG. 7 is a flowchart of a single-chip token addition and consumption process according to an optional embodiment of the present application;
图8是根据本申请可选实施例的单队列fifo入队、出队相关操作的流程图;FIG. 8 is a flowchart of operations related to entering and dequeuing a single-queue fifo according to an optional embodiment of the present application;
图9是根据本申请可选实施例的单队列令牌添加和消耗过程的流程图。Fig. 9 is a flowchart of a single-queue token addition and consumption process according to an optional embodiment of the present application.
具体实施方式Detailed ways
下文中将参考附图并结合实施例来详细说明本申请。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present application will be described in detail with reference to the drawings and in conjunction with the embodiments. It should be noted that the embodiments in the application and the features in the embodiments can be combined with each other if there is no conflict.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、 “第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms “first” and “second” in the specification and claims of the application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence.
实施例1Example 1
本申请实施例一所提供的方法实施例可以在管理装置、计算机终端或者类似的运算装置中执行。以运行在管理装置上为例,图1是本申请实施例的一种令牌的调整方法的管理装置的硬件结构框图。如图1所示,管理装置10可以包括至少一个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器(Micro Control Unit,MCU)或现场可编程逻辑器件(Field Programmable Gate Array,FPGA)等的处理装置)和设置为存储数据的存储器104,可选地,上述管理装置还可以包括设置为通信的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述管理装置的结构造成限定。例如,管理装置10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiment provided in Embodiment 1 of the present application may be executed in a management device, a computer terminal, or a similar computing device. Taking the operation on the management device as an example, FIG. 1 is a hardware structure block diagram of the management device of a token adjustment method according to an embodiment of the present application. As shown in FIG. 1, the management device 10 may include at least one (only one is shown in FIG. 1) processor 102 (the processor 102 may include but is not limited to a microprocessor (Micro Control Unit, MCU) or a field programmable logic device) (Field Programmable Gate Array, FPGA) and other processing devices) and a memory 104 configured to store data. Optionally, the above-mentioned management device may further include a transmission device 106 and an input/output device 108 configured to communicate. A person of ordinary skill in the art can understand that the structure shown in FIG. 1 is only for illustration, and it does not limit the structure of the foregoing management device. For example, the management device 10 may also include more or fewer components than those shown in FIG. 1 or have a different configuration from that shown in FIG. 1.
存储器104可设置为存储计算机程序,例如,应用软件的软件程序以及模块,如本申请实施例中的令牌的调整方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如至少一个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至管理装置10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 may be configured to store computer programs, for example, software programs and modules of application software, such as the computer programs corresponding to the token adjustment method in the embodiment of the present application. The processor 102 runs the computer programs stored in the memory 104, Thereby, various functional applications and data processing are executed, that is, the above-mentioned method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic storage device, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may include a memory remotely provided with respect to the processor 102, and these remote memories may be connected to the management device 10 via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
传输装置106设置为经由一个网络接收或者发送数据。上述的网络例如可包括管理装置10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,NIC),NIC可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,RF)模块,RF模块设置为通过无线方式与互联网 进行通讯。The transmission device 106 is configured to receive or transmit data via a network. The aforementioned network may include, for example, a wireless network provided by a communication provider of the management device 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), and the NIC can be connected to other network devices through a base station so as to communicate with the Internet. In an example, the transmission device 106 may be a radio frequency (RF) module, and the RF module is configured to communicate with the Internet in a wireless manner.
在本实施例中提供了一种运行于上述移动管理装置的令牌的调整方法,图2是根据本申请实施例的令牌的调整方法的流程图,如图2所示,该流程包括步骤S202至步骤S204。In this embodiment, a method for adjusting a token running on the above-mentioned mobility management device is provided. FIG. 2 is a flowchart of the method for adjusting a token according to an embodiment of the present application. As shown in FIG. 2, the process includes steps S202 to step S204.
在步骤S202中,接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用。In step S202, a token is received, where the token is issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the received tokens are multiple Shared by traffic management components.
在步骤S204中,根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌。In step S204, the tokens of the queues of the multiple traffic management components are adjusted according to the total number of tokens shared by the multiple traffic management components.
通过上述步骤,由于接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用;根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌,因此,可以避免相关技术中授权不合理导致流量管理效果较差的情况,提高流量管理效率。Through the above steps, because the token is received, the token is issued according to the issuance interval, the issuance interval is determined according to the number of valid links and the link congestion level, and the received tokens are multiple Shared by the traffic management components; adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components. Therefore, it can avoid the unreasonable authorization in the related technology that leads to poor traffic management effects. Circumstances, improve the efficiency of traffic management.
可选地,该下发间隔、该有效链路数和该链路拥塞等级,满足以下关系:在该链路拥塞等级不变,且该有效链路数发生变化的情况下,该下发间隔与该有效链路数呈反相关关系;在该链路拥塞等级发生变化,且该有效链路数不变的情况下,该下发间隔与该链路拥塞等级呈正相关关系。Optionally, the delivery interval, the number of valid links, and the link congestion level satisfy the following relationship: when the link congestion level remains unchanged and the number of valid links changes, the delivery interval There is an anti-correlation relationship with the number of effective links; when the link congestion level changes and the number of effective links does not change, the delivery interval has a positive correlation relationship with the link congestion level.
可选地,根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌,包括:读取令牌请求队列;根据预先配置的指定队列的权重向该令牌请求队列中的该指定队列下发令牌。Optionally, adjusting the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components includes: reading the token request queue; The designated queue in the token request queue issues tokens.
可选地,在满足以下条件一和条件二且该令牌请求队列中存在空位的情况下,允许该指定队列进入该令牌请求队列:Optionally, in the case that the following conditions 1 and 2 are met and there are vacancies in the token request queue, the designated queue is allowed to enter the token request queue:
该条件一包括:该指定队列的令牌数小于停止申请门限,以及,该指定队列不在该令牌请求队列中;该条件二包括:该指定队列得到了授权,或者,该 指定队列被轮询。The first condition includes: the number of tokens in the designated queue is less than the stop request threshold, and the designated queue is not in the token request queue; the second condition includes: the designated queue is authorized, or the designated queue is polled .
可选地,在根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌之后,该方法还包括:根据调整后的结果向上级队列申请授权。Optionally, after adjusting the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components, the method further includes: applying for authorization to the superior queue according to the adjusted result.
可选地,根据调整后的结果向上级队列申请授权,包括:根据指定队列的令牌数、有效链路数和链路拥塞等级确定是否向该上级队列申请授权;响应于是的确定结果,向该上级队列申请授权。Optionally, applying for authorization to the upper-level queue according to the adjusted result includes: determining whether to apply for authorization to the upper-level queue according to the number of tokens, the number of valid links, and the link congestion level of the designated queue; The superior queue applies for authorization.
可选地,响应于是的确定结果,向该上级队列申请授权,包括:根据有效链路数、链路拥塞等级和该指定队列的令牌数生成授权请求信息;将该授权请求信息发送给该上级队列。Optionally, in response to the determination result of yes, requesting authorization from the superior queue includes: generating authorization request information according to the number of valid links, link congestion level, and the number of tokens in the designated queue; sending the authorization request information to the The superior queue.
在本实施例中还提供了一种令牌的调整装置,该装置设置为实现上述实施例及可选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”为可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置可以以软件来实现,硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a token adjustment device is also provided, and the device is configured to implement the above-mentioned embodiments and optional implementation manners, and those that have been explained will not be repeated. As used below, the term "module" is a combination of software and/or hardware that can implement predetermined functions. Although the devices described in the following embodiments can be implemented by software, implementation by hardware or a combination of software and hardware is also possible and conceived.
图3是根据本申请实施例的令牌的调整装置的结构框图,如图3所示,该装置包括:Fig. 3 is a structural block diagram of a token adjustment device according to an embodiment of the present application. As shown in Fig. 3, the device includes:
接收模块31,设置为接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用;The receiving module 31 is configured to receive tokens, where the tokens are issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the number of tokens received is more Shared by all traffic management components;
调整模块33,设置为根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌。The adjustment module 33 is configured to adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components.
通过上述模块,由于接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用;根据该多个流量管理组件所共用的总令牌数调整该多个流 量管理组件的队列的令牌,因此,可以避免相关技术中授权不合理导致流量管理效果较差的情况,提高流量管理效率。Through the above module, because the token is received, the token is issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the received tokens are multiple Shared by the traffic management components; adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components. Therefore, it can avoid the unreasonable authorization in the related technology that leads to poor traffic management effects. Circumstances, improve the efficiency of traffic management.
可选地,该下发间隔、该有效链路数和该链路拥塞等级,满足以下关系:在该链路拥塞等级不变,且该有效链路数发生变化的情况下,该下发间隔与该有效链路数呈反相关关系;在该链路拥塞等级发生变化,且该有效链路数不变的情况下,该下发间隔与该链路拥塞等级呈正相关关系。Optionally, the delivery interval, the number of valid links, and the link congestion level satisfy the following relationship: when the link congestion level remains unchanged and the number of valid links changes, the delivery interval There is an anti-correlation relationship with the number of effective links; when the link congestion level changes and the number of effective links does not change, the delivery interval has a positive correlation relationship with the link congestion level.
可选地,调整模块33,包括:读取模块,设置为读取令牌请求队列;下发模块,设置为根据预先配置的指定队列的权重向该令牌请求队列中的该指定队列下发令牌。Optionally, the adjustment module 33 includes: a reading module, which is set to read the token request queue; and the issuing module, which is set to deliver to the designated queue in the token request queue according to the weight of the pre-configured designated queue Token.
可选地,在满足以下条件一和条件二且该令牌请求队列中存在空位的情况下,允许该指定队列进入该令牌请求队列:该条件一包括:该指定队列的令牌数小于停止申请门限,以及,该指定队列不在该令牌请求队列中;该条件二包括:该指定队列得到了授权,或者,该指定队列被轮询。Optionally, the specified queue is allowed to enter the token request queue when the following conditions 1 and 2 are met and there are vacancies in the token request queue: The condition one includes: the number of tokens in the specified queue is less than the stop The application threshold, and the designated queue is not in the token request queue; the second condition includes: the designated queue is authorized, or the designated queue is polled.
可选地,该装置还包括:申请模块,设置为在根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌之后,根据调整后的结果向上级队列申请授权。Optionally, the device further includes: an application module configured to adjust the tokens of the queues of the plurality of traffic management components according to the total number of tokens shared by the plurality of traffic management components, and then to the superior according to the adjusted result The queue applies for authorization.
可选地,该申请模块,包括:申请子模块,设置为根据指定队列的令牌数、有效链路数和链路拥塞等级确定是否向该上级队列申请授权;响应于是的确定结果,向该上级队列申请授权。Optionally, the application module includes: an application sub-module configured to determine whether to apply for authorization to the upper-level queue according to the number of tokens in the designated queue, the number of valid links, and the link congestion level; The superior queue applies for authorization.
可选地,该申请子模块包括:申请单元,设置为响应于是的确定结果,根据有效链路数、链路拥塞等级和该指定队列的令牌数生成授权请求信息;发送单元,设置为将该授权请求信息发送给该上级队列。Optionally, the application sub-module includes: an application unit, configured to generate authorization request information according to the number of valid links, the link congestion level, and the number of tokens in the designated queue in response to the determination result of yes; and the sending unit, configured to The authorization request information is sent to the superior queue.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that each of the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following manner, but not limited to this: the above modules are all located in the same processor; or, the above modules can be combined in any combination. The forms are located in different processors.
可选实施方式Alternative implementation
本申请实施例提供了一种调整装置,可以协调两个独立的流量管理组件,其中每个流量管理组件分别包括一个拥塞管理模块。在队列申请授权时,根据交换网拥塞情况,自动控制部分授权申请,使两个core之间协调使用交换网的带宽。The embodiment of the present application provides an adjustment device that can coordinate two independent traffic management components, where each traffic management component includes a congestion management module. When the queue applies for authorization, according to the congestion of the switching network, part of the authorization application is automatically controlled, so that the two cores use the bandwidth of the switching network in coordination.
两个拥塞管理模块,满足一定条件时,从下到上逐级申请授权。L0级各队列0~m0,依次向L1级各队列申请授权L0_apply[(m0-1):0]。L1各队列0~m1也依次向上一级申请授权,L4各队列依次向L5申请授权L4_apply[(m4-1):0]。在挂接正常时,按照每级队列配置的优先级和权重等,从上到下逐级下发授权。L5级向L4级下发授权,授权使能L4_val、授权的队列号L4_qnum。L4再逐级下发,最后到L0_val、L0_qnum。图4是根据本申请可选实施例的两个拥塞管理模块间添加调整装置的结构示意图,如图4所示,本实施例中增加了调整装置,该调整装置是一种单芯片调度装置,该调整装置可以添加在某一级,如加在L3到L4两级之间。下面都是按照该调整装置添加在L3级举例说明。本实施提供的调整装置的输入信号是有效链路数和拥塞等级,经过计算,得到core0、core1的L3级各队列能否向上申请授权的添加条件con_rdy_c0、con_rdy_c1。这些条件与原来的L3_apply_c0、L3_apply_c1按位相与后,生成新的core0、core1向L4级申请授权的信号L3_apply_new_c0[(n0-1):0]、L3_apply_new_c1[(n1-1):0]。从而影响到core0、core1级的申请授权信号。其中,增加的这个向上申请授权的条件con_rdy_c0、con_rdy_c1,受拥塞等级和有效链路数控制。在拥塞时或者有效链路数变化时,con_rdy_0和con_rdy_1各队列有对应位的变化,则向上申请授权使能变化,从而自动调节两个core下发的授权。The two congestion management modules apply for authorization from bottom to top when certain conditions are met. Each queue of level L0 is 0~m0, and it applies to each queue of level L1 for authorization L0_apply[(m0-1):0] in turn. Each queue 0~m1 of L1 also applies for authorization to the upper level in turn, and each queue of L4 applies to L5 for authorization L4_apply[(m4-1):0] in turn. When the connection is normal, the authorization is issued from top to bottom according to the priority and weight of each level of queue configuration. L5 level issues authorization to L4 level, authorization enable L4_val, authorized queue number L4_qnum. L4 is then issued level by level, and finally to L0_val and L0_qnum. FIG. 4 is a schematic structural diagram of adding an adjustment device between two congestion management modules according to an optional embodiment of the present application. As shown in FIG. 4, an adjustment device is added in this embodiment, and the adjustment device is a single-chip scheduling device. The adjustment device can be added at a certain level, such as between L3 and L4. The following are examples of adding the adjustment device to the L3 level. The input signals of the adjustment device provided in this implementation are the number of effective links and the congestion level. After calculation, the addition conditions con_rdy_c0 and con_rdy_c1 of whether the L3 queues of core0 and core1 can be applied for authorization can be obtained. After these conditions and the original L3_apply_c0 and L3_apply_c1 are bitwise ANDed, new core0 and core1 signals L3_apply_new_c0[(n0-1):0] and L3_apply_new_c1[(n1-1):0] are generated to apply for authorization at the L4 level. This affects the core0 and core1 level application authorization signals. Among them, the added conditions con_rdy_c0 and con_rdy_c1 for the upward application authorization are controlled by the congestion level and the number of effective links. When congestion or when the number of effective links changes, if there is a change in the corresponding bits in each queue of con_rdy_0 and con_rdy_1, the authorization enable change is applied upwards, thereby automatically adjusting the authorization issued by the two cores.
示例性地,交换链路会根据信元缓存的状态将拥塞分为等级,有时候交换连接的有效链路数也会变化。交换接口把这个拥塞等级和有效链路数汇总发到内部流量管理组件。流量管理组件中的拥塞管理模块会根据拥塞等级和有效链路数这两个维度,减少各队列令牌申请,然后减少授权下发,从而使收发的报 文减少,减少交换网络的拥塞。Exemplarily, the switching link divides the congestion into levels according to the state of the cell buffer, and sometimes the number of effective links of the switching connection also changes. The switching interface summarizes the congestion level and the number of effective links and sends it to the internal traffic management component. The congestion management module in the traffic management component will reduce the number of token applications for each queue according to the two dimensions of the congestion level and the number of effective links, and then reduce the authorization issuance, thereby reducing the number of messages sent and received, and reducing the congestion of the switching network.
图5是根据本申请可选实施例的流量均衡装置的结构示意图,如图5所示,本实施例的装置分为3个模块:单芯片令牌管理模块,core0、core1的L3级单队列令牌管理模块,单队列先入先出(first input first output,fifo)管理模块。FIG. 5 is a schematic structural diagram of a traffic balancing device according to an optional embodiment of the present application. As shown in FIG. 5, the device of this embodiment is divided into three modules: a single-chip token management module, L3 single queue of core0 and core1 Token management module, single-queue first-in, first-out (first input first output, fifo) management module.
单芯片令牌管理模块设置为:计算维护两个core总令牌数量。首先根据反馈的拥塞等级con_level和有效链路数serdes-num,来查询预先配置好的单芯片令牌下发间隔。按照令牌下发间隔,添加到两个core的总令牌。同时当令牌从总令牌下发给core0、core1的L3级单队列令牌时,在单芯片总令牌中减掉令牌。维护令牌数量,控制是否响应单队列fifo出队请求。The single-chip token management module is set to calculate and maintain the total number of tokens for the two cores. First, query the pre-configured single-chip token issuing interval according to the feedback con_level and the number of valid links serdes-num. According to the token issuance interval, the total tokens added to the two cores. At the same time, when the token is issued from the total token to the L3 level single-queue tokens of core0 and core1, the token is subtracted from the total single-chip token. Maintain the number of tokens and control whether to respond to a single-queue fifo dequeue request.
单队列令牌管理模块设置为:计算维护core0、core1的L3级单个队列令牌数量。当单芯片总令牌模块按照core0、core1各队列配置权重下发令牌给单队列时,向该队列添加令牌。当该级有队列向上申请授权并且得到授权时,减掉该队列令牌。维护core0、core1的L3级的所有队列的令牌。The single-queue token management module is set to calculate and maintain the number of tokens in a single queue at the L3 level of core0 and core1. When the single-chip total token module issues a token to a single queue according to the configuration weights of each queue of core0 and core1, the token is added to the queue. When a queue at this level applies for authorization upwards and is authorized, the queue token is deducted. Maintain the tokens of all queues at the L3 level of core0 and core1.
单队列fifo管理模块设置为:core0、core1的L3级各队列需要进入该fifo,按固定时隙排队向单芯片令牌管理模块申请令牌。管理各队列的入队、出队相关操作。The single-queue fifo management module is set as follows: each queue at the L3 level of core0 and core1 needs to enter the fifo, and apply for tokens to the single-chip token management module according to a fixed time slot. Manage the operations related to entry and exit of each queue.
本实施例在两个拥塞管理模块之间,在不同的链路总带宽、不同的交换拥塞程度下,按照L3级各队列配置权重,自动调整下发的每个队列的流量,并且使得单芯片总流量不会超过链路可承受的总带宽。在交换拥塞时适当下调流量,来减轻交换的拥塞程度。In this embodiment, between the two congestion management modules, under different total link bandwidths and different exchange congestion levels, according to the configuration weight of each queue at the L3 level, the traffic of each queue issued is automatically adjusted, and the single chip The total traffic will not exceed the total bandwidth that the link can bear. When the exchange is congested, the traffic is appropriately reduced to reduce the congestion of the exchange.
本实施例可以在不同的交换拥塞程度下,自动的调整下发的流量,使得流量不会超过链路可承受的总带宽。并且在交换拥塞时适当下调流量,来控制交换的拥塞程度。通过控制core0、core1的L3级各队列的授权申请信号,来间接控制授权下发,实现有交换网拥塞或者链路变化时,两个core的流量均衡。In this embodiment, the delivered traffic can be automatically adjusted under different switching congestion levels, so that the traffic does not exceed the total bandwidth that the link can bear. And when the exchange is congested, the traffic is appropriately reduced to control the degree of congestion in the exchange. By controlling the authorization application signal of each queue at the L3 level of core0 and core1, the authorization issuance is indirectly controlled, so that the flow of the two cores is balanced when the switching network is congested or the link changes.
图6是根据本申请可选实施例的core0、core1的L3级各队列令牌示意图, 如图6所示,单芯片令牌管理维护两个core总的令牌值。单队列令牌管理模块,是维护core0和core1下面所有队列的令牌值,core的0队列号是{1’b0,core0_que_id},core1的队列号是{1’b1,core1_que_id}。core0、core1的所有队列满足一定条件时,写入单队列fifo,排队向单芯片令牌管理申请自己队列的单队列令牌。轮到某队列时,单队列令牌管理模块将单芯片令牌值分配给该队列令牌。Fig. 6 is a schematic diagram of each queue token at the L3 level of core0 and core1 according to an optional embodiment of the present application. As shown in Fig. 6, a single-chip token manages and maintains the total token value of two cores. The single-queue token management module maintains the token values of all the queues under core0 and core1. The queue number of core 0 is {1’b0, core0_que_id}, and the queue number of core1 is {1’b1, core1_que_id}. When all the queues of core0 and core1 meet certain conditions, they are written into the single-queue fifo, and the queue applies to the single-chip token management for the single-queue token of its own queue. When it is the turn of a certain queue, the single-queue token management module allocates the single-chip token value to the queue token.
图7是根据本申请可选实施例的单芯片令牌添加和消耗过程的流程图,如图7所示,单芯片令牌添加和消耗过程流程。对于单芯片令牌管理来说,总令牌值添加:根据反馈的拥塞等级和有效链路,查询单芯片令牌下发间隔,下发间隔为intl个周期。固定每隔intl个周期,向总令牌值添加一个令牌,维护更新单芯片令牌值。Fig. 7 is a flowchart of a single-chip token addition and consumption process according to an optional embodiment of the present application. As shown in Fig. 7, the single-chip token addition and consumption process flow. For single-chip token management, the total token value is added: according to the feedback congestion level and effective link, the single-chip token issuance interval is queried, and the issuance interval is intl cycles. It is fixed every intl cycles to add a token to the total token value to maintain and update the single-chip token value.
单芯片令牌下发间隔配置,规则如下:同一拥塞等级下,配置下发间隔跟有效链路数成反比关系,使得单芯片总流量不会超过链路可承受的总带宽。Single-chip token issuance interval configuration, the rules are as follows: under the same congestion level, the configuration issuance interval is inversely proportional to the number of effective links, so that the total traffic of a single chip will not exceed the total bandwidth that the link can bear.
有效链路可承受流量决定了单芯片令牌下发间隔,关系如以下公式:The effective link tolerable traffic determines the single-chip token issuance interval, and the relationship is as follows:
crdt_value/(intl*T)=data_flowcrdt_value/(intl*T)=data_flow
其中crdt_value为core0、core1的授权价值,intl为实际单芯片令牌下发间隔包括的芯片时钟周期的数量,T为芯片时钟周期长度,data_flow为有效链路可承受的总带宽。Where crdt_value is the authorized value of core0 and core1, intl is the number of chip clock cycles included in the actual single-chip token issuance interval, T is the chip clock cycle length, and data_flow is the total bandwidth that the effective link can bear.
相同拥塞等级下,有效链路数变化,可承受的总带宽data_flow也在变化。每条有效链路所支持的最大带宽相加,就是有效链路可承受的总带宽。不同拥塞等级下,有效链路数相同时,下发间隔按照一定的比例变化。Under the same congestion level, the number of effective links changes, and the tolerable total bandwidth data_flow also changes. The sum of the maximum bandwidth supported by each effective link is the total bandwidth that the effective link can bear. Under different congestion levels, when the number of effective links is the same, the issuing interval changes according to a certain ratio.
单芯片令牌值减少:固定时隙且当单队列fifo中等待的队列不为空,并且单芯片总令牌大于0时,表示有队列可以向单芯片令牌管理申请令牌,此时读出单队列fifo中的队列信息,读出该队列对应core0或者core1内配置的权重信息。按照该队列配置的权重wt,在单芯片令牌值减掉wt个令牌,该队列增加 wt个令牌,该队列在fifo内标志写0,维护更新单芯片令牌值。Single-chip token value reduction: fixed time slot and when the queue waiting in the single-queue fifo is not empty, and the total single-chip token is greater than 0, it means that there is a queue that can apply for a token from the single-chip token management. Read at this time The queue information in the single queue fifo is read, and the weight information configured in core0 or core1 corresponding to the queue is read. According to the weight wt configured in the queue, wt tokens are subtracted from the single-chip token value, and wt tokens are added to the queue. The flag of the queue is written as 0 in the fifo, and the single-chip token value is maintained and updated.
图8是根据本申请可选实施例的单队列fifo入队、出队相关操作的流程图,如图8所示,单队列fifo入队、出队相关操作流程,在单队列fifo存在空位的情况下,首先core0和core1的每个队列,有三次进入单队列fifo的机会。一是在core0有队列得到授权、core1有队列有得到授权。二是在轮询扫描时刻,为了避免一些特殊情况长久没服务到的队列,固定时间如32个芯片时钟周期长度(clock,clk)为周期,从队列号0开始到最大队列号,轮询检查全部队列的令牌值。三是在入队fifo读出后,向该单队列添加完wt个令牌后。同时该队列令牌值为负,或者为正且令牌值小于单队列停止申请门限apply_off_th时,并且该队列不在单队列fifo中(即enq_flag标志为0),则写入单队列fifo中。同时将表示该队列在不在单队列fifo中的标志enq_flag写为1。写入单队列fifo后,代表该队列排队等待向单芯片令牌管理模块申请令牌。Figure 8 is a flow chart of operations related to the enqueue and dequeue of a single-queue fifo according to an optional embodiment of the present application. As shown in Fig. 8, a single-queue fifo enqueues and dequeues related operations, and there are vacancies in the single-queue fifo In this case, first, each queue of core0 and core1 has three chances to enter the single-queue fifo. One is that there are queues in core0 that are authorized, and core1 has queues that are authorized. Second, at the time of polling scan, in order to avoid queues that have not been served for a long time under special circumstances, a fixed time such as 32 chip clock cycle length (clock, clk) is the cycle, starting from queue number 0 to the maximum queue number, polling check The token value of all queues. The third is after the queued fifo is read out, after adding wt tokens to the single queue. At the same time, when the token value of the queue is negative or positive and the token value is less than the single-queue stop application threshold apply_off_th, and the queue is not in the single-queue fifo (that is, the enq_flag flag is 0), then it is written into the single-queue fifo. At the same time, the flag enq_flag indicating that the queue is not in the single-queue fifo is written as 1. After writing the single-queue fifo, it represents the queue waiting to apply for a token from the single-chip token management module.
在固定时隙,并且单队列fifo不为空时,读取fifo内的队列信息,并且该队列在不在单队列fifo中的标志enq_flag写为0。将然后读取该core该队列的分配权重wt。根据队列信息和分配权重,单芯片令牌值减掉wt个令牌,该队列的令牌值加上wt个令牌。维护更新单芯片令牌值和该队列令牌值。In a fixed time slot, and the single-queue fifo is not empty, read the queue information in the fifo, and the flag enq_flag of the single-queue fifo that the queue is not in the single-queue fifo is written as 0. Then read the distribution weight wt of the core and the queue. According to the queue information and the distribution weight, the token value of a single chip is reduced by wt tokens, and the token value of the queue is added by wt tokens. Maintain and update the single-chip token value and the queue token value.
图9是根据本申请可选实施例的单队列令牌添加和消耗过程的流程图,如图9所示,单队列令牌添加和消耗过程流程。对单队列令牌值来说,该core该L3级队列得到单芯片分发的wt个令牌后,与原来该队列的令牌值相加后,维护更新该队列令牌值。该队列令牌值减少,是该core该L3级队列得到授权后,对该队列对应令牌值减1操作,维护更新该队列令牌值。这样,core0和core1在同一级下面按照各core各队列权重均衡得到令牌。根据每个队列的令牌值,计算两个core申请授权添加条件信号con_rdy,con_rdy影响是否向上一级申请授权。例如,如果该core0该队列令牌值小于或等于0,则con_rdy_c0[i]=0,(i为{1’b0,core0_que_id})。如果该core0该队列令牌值大于0,则con_rdy_c0[i]=1。同理core1生成con_rdy_c1[(n1-1):0]。Fig. 9 is a flowchart of a single-queue token addition and consumption process according to an optional embodiment of the present application. As shown in Fig. 9, the single-queue token addition and consumption process flow. For a single-queue token value, after the core and the L3 level queue obtain wt tokens distributed by a single chip, they are added to the original token value of the queue to maintain and update the queue token value. The decrease in the queue token value means that after the core and the L3 level queue are authorized, the corresponding token value of the queue is reduced by one operation to maintain and update the queue token value. In this way, core0 and core1 are balanced to obtain tokens according to the weights of the queues of each core at the same level. According to the token value of each queue, calculate the condition signal con_rdy for two cores to apply for authorization, and con_rdy affects whether to apply for authorization to the upper level. For example, if the queue token value of the core0 is less than or equal to 0, then con_rdy_c0[i]=0, (i is {1'b0, core0_que_id}). If the queue token value of the core0 is greater than 0, then con_rdy_c0[i]=1. Similarly, core1 generates con_rdy_c1[(n1-1):0].
两个core,得到core0、core1的L3级各队列能否向上申请授权的添加条件con_rdy_c0[(n0-1):0]、con_rdy_c1[(n1-1):0]。这些条件与原来的L3_apply_c0[(n0-1):0]、L3_apply_c1[(n1-1):0]按位相与后,生成新的core0、core1向L4级申请授权的信号L3_apply_new_c0[(n0-1):0]、L3_apply_new_c1[(n1-1):0]。Two cores, get the additional conditions con_rdy_c0[(n0-1):0], con_rdy_c1[(n1-1):0] whether the L3 queues of core0 and core1 can apply for authorization upwards. After these conditions and the original L3_apply_c0[(n0-1):0], L3_apply_c1[(n1-1):0] are phased with each other, a new core0 and core1 signal L3_apply_new_c0[(n0-1) to apply for authorization at the L4 level is generated. ):0], L3_apply_new_c1[(n1-1):0].
以上本实施例所述,只是两个流量管理组件间的实施案例而已,并非本申请的限定范围,同样适用于多个流量管理组件间的自动均衡流量。The above description of this embodiment is only an implementation case between two traffic management components, and is not a limitation of this application, and it is also applicable to automatic balancing of traffic among multiple traffic management components.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如只读存储器(Read-Only Memory,ROM)/随机存取存储器(Random Access Memory,RAM)、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is Better implementation. Based on this understanding, the technical solution of this application essentially or the part that contributes to the related technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as a read-only memory (Read-Only Memory)). , ROM)/Random Access Memory (Random Access Memory, RAM, magnetic disk, optical disk), including several instructions to make a terminal device (can be a mobile phone, computer, server, or network device, etc.) execute this application The method described in each embodiment.
本申请的实施例还提供了一种计算机可读的存储介质,该计算机可读的存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。The embodiment of the present application also provides a computer-readable storage medium, and a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute any of the foregoing method embodiments when running. step.
可选地,在本实施例中,上述计算机可读的存储介质可以被设置为存储用于执行步骤S1至步骤S2的计算机程序。Optionally, in this embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing steps S1 to S2.
在步骤S1中,接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用。In step S1, a token is received, where the token is issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the received tokens are multiple Shared by traffic management components.
在步骤S2中,根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌。In step S2, the tokens of the queues of the multiple traffic management components are adjusted according to the total number of tokens shared by the multiple traffic management components.
通过上述步骤,由于接收令牌,其中,该令牌是按照下发间隔下发的,该 下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用;根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌,因此,可以避免相关技术中授权不合理导致流量管理效果较差的情况,提高流量管理效率。Through the above steps, because the token is received, the token is issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the received tokens are multiple Shared by the traffic management components; adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components. Therefore, it can avoid the unreasonable authorization in the related technology that leads to poor traffic management effects. Circumstances, improve the efficiency of traffic management.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the above-mentioned embodiments and optional implementation manners, and details are not described herein again in this embodiment.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、ROM、RAM、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。Optionally, in this embodiment, the foregoing storage medium may include, but is not limited to: U disk, ROM, RAM, mobile hard disk, magnetic disk, or optical disk, and other media that can store computer programs.
本申请的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。The embodiment of the present application also provides an electronic device, including a memory and a processor, the memory is stored with a computer program, and the processor is configured to run the computer program to execute the steps in any of the foregoing method embodiments.
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the aforementioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the aforementioned processor, and the input-output device is connected to the aforementioned processor.
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行步骤S1至步骤S2。Optionally, in this embodiment, the above-mentioned processor may be configured to execute step S1 to step S2 through a computer program.
在步骤S1中,接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用。In step S1, a token is received, where the token is issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the received tokens are multiple Shared by traffic management components.
在步骤S2中,根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌。In step S2, the tokens of the queues of the multiple traffic management components are adjusted according to the total number of tokens shared by the multiple traffic management components.
通过上述步骤,由于接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用;根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌,因此,可以避免相关技术中授权不合理导致流量管理效果较差的情况,提高流量管理效率。Through the above steps, because the token is received, the token is issued according to the issuance interval, the issuance interval is determined according to the number of effective links and the link congestion level, and the received tokens are multiple Shared by the traffic management components; adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components. Therefore, it is possible to avoid unreasonable authorization in the related technology that leads to poor traffic management effects Circumstances, improve the efficiency of traffic management.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the above-mentioned embodiments and optional implementation manners, and details are not described herein again in this embodiment.
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of this application can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed in a network composed of multiple computing devices. Above, alternatively, they can be implemented with program codes executable by a computing device, so that they can be stored in a storage device for execution by the computing device, and in some cases, they can be executed in a different order than here. Perform the steps shown or described, or fabricate them into individual integrated circuit modules respectively, or fabricate multiple modules or steps of them into a single integrated circuit module for implementation. In this way, this application is not limited to any specific combination of hardware and software.

Claims (10)

  1. 一种令牌的调整方法,包括:A token adjustment method, including:
    接收令牌,其中,所述令牌是按照下发间隔下发的,所述下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的所述令牌为多个流量管理组件所共用;A token is received, wherein the token is issued according to an issuance interval, the issuance interval is determined according to the number of valid links and the link congestion level, and the received token is for multiple traffic management Shared by components;
    根据所述多个流量管理组件所共用的总令牌数,调整所述多个流量管理组件的队列的令牌。According to the total number of tokens shared by the multiple traffic management components, the tokens of the queues of the multiple traffic management components are adjusted.
  2. 根据权利要求1所述的方法,其中,所述下发间隔、所述有效链路数和所述链路拥塞等级,满足以下关系:The method according to claim 1, wherein the delivery interval, the number of effective links, and the link congestion level satisfy the following relationship:
    在所述链路拥塞等级不变,且所述有效链路数发生变化的情况下,所述下发间隔与所述有效链路数呈反相关关系;In a case where the link congestion level remains unchanged and the number of effective links changes, the delivery interval and the number of effective links are in an inverse correlation;
    在所述链路拥塞等级发生变化,且所述有效链路数不变的情况下,所述下发间隔与所述链路拥塞等级呈正相关关系。When the link congestion level changes and the number of effective links remains unchanged, the delivery interval is in a positive correlation with the link congestion level.
  3. 根据权利要求1或2所述的方法,其中,根据所述多个流量管理组件所共用的总令牌数,调整所述多个流量管理组件的队列的令牌,包括:The method according to claim 1 or 2, wherein adjusting the tokens of the queues of the plurality of traffic management components according to the total number of tokens shared by the plurality of traffic management components includes:
    读取令牌请求队列;Read the token request queue;
    根据预先配置的指定队列的权重,向所述令牌请求队列中的所述指定队列下发令牌。According to the pre-configured weight of the designated queue, the token is issued to the designated queue in the token request queue.
  4. 根据权利要求3所述的方法,其中,在满足以下条件一和条件二且所述令牌请求队列中存在空位的情况下,允许所述指定队列进入所述令牌请求队列:The method according to claim 3, wherein the specified queue is allowed to enter the token request queue when the following conditions 1 and 2 are satisfied and there is a space in the token request queue:
    所述条件一包括:所述指定队列的令牌数小于停止申请门限,以及,所述指定队列不在所述令牌请求队列中;The condition one includes: the number of tokens in the designated queue is less than a stop application threshold, and the designated queue is not in the token request queue;
    所述条件二包括:所述指定队列得到了授权,或者,所述指定队列被轮询。The second condition includes: the designated queue is authorized, or the designated queue is polled.
  5. 根据权利要求1所述的方法,在根据所述多个流量管理组件所共用的总令牌数,调整所述多个流量管理组件的队列的令牌之后,还包括:The method according to claim 1, after adjusting the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components, further comprising:
    根据调整后的结果向上级队列申请授权。Apply for authorization from the superior queue according to the adjusted result.
  6. 根据权利要求5所述的方法,其中,根据调整后的结果向上级队列申请 授权,包括:The method according to claim 5, wherein applying for authorization to the superior queue according to the adjusted result comprises:
    根据指定队列的令牌数、有效链路数和链路拥塞等级确定是否向所述上级队列申请授权;响应于是的确定结果,向所述上级队列申请授权。Determine whether to apply for authorization from the upper-level queue according to the number of tokens in the designated queue, the number of valid links, and the link congestion level; in response to the determination result of yes, apply for authorization from the upper-level queue.
  7. 根据权利要求6所述的方法,其中,响应于是的确定结果,向所述上级队列申请授权,包括:The method according to claim 6, wherein in response to the determination result of yes, applying for authorization from the upper-level queue comprises:
    根据有效链路数、链路拥塞等级和所述指定队列的令牌数生成授权请求信息;Generating authorization request information according to the number of valid links, the link congestion level, and the number of tokens in the designated queue;
    将所述授权请求信息发送给所述上级队列。Sending the authorization request information to the upper-level queue.
  8. 一种令牌的调整装置,包括:A token adjustment device, including:
    接收模块,设置为接收令牌,其中,所述令牌是按照下发间隔下发的,所述下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的所述令牌为多个流量管理组件所共用;The receiving module is configured to receive tokens, wherein the tokens are issued according to the issuing interval, the issuing interval is determined according to the number of effective links and the link congestion level, and the received token Shared by multiple traffic management components;
    调整模块,设置为根据所述多个流量管理组件所共用的总令牌数,调整所述多个流量管理组件的队列的令牌。The adjustment module is configured to adjust the tokens of the queues of the plurality of flow management components according to the total number of tokens shared by the plurality of flow management components.
  9. 一种计算机可读的存储介质,所述计算机可读的存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时,执行所述权利要求1至7任一项中所述的方法。A computer-readable storage medium having a computer program stored in the computer-readable storage medium, wherein the computer program is configured to execute the method described in any one of claims 1 to 7 when it is set to run method.
  10. 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序,以执行所述权利要求1至7任一项中所述的方法。An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method described in any one of claims 1 to 7 .
PCT/CN2020/136161 2019-12-13 2020-12-14 Token adjusting method and device WO2021115482A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911285491.8A CN112995058B (en) 2019-12-13 2019-12-13 Token adjusting method and device
CN201911285491.8 2019-12-13

Publications (1)

Publication Number Publication Date
WO2021115482A1 true WO2021115482A1 (en) 2021-06-17

Family

ID=76329639

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/136161 WO2021115482A1 (en) 2019-12-13 2020-12-14 Token adjusting method and device

Country Status (2)

Country Link
CN (1) CN112995058B (en)
WO (1) WO2021115482A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113783727A (en) * 2021-09-07 2021-12-10 山石网科通信技术股份有限公司 Method and device for adjusting bandwidth of distributed equipment, storage medium and processor

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118671B (en) * 2022-05-30 2024-01-26 中国信息通信研究院 Method and device for token ring scheduling, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8504691B1 (en) * 2010-12-29 2013-08-06 Amazon Technologies, Inc. System and method for allocating resources for heterogeneous service requests
CN104753809A (en) * 2013-12-25 2015-07-01 深圳市中兴微电子技术有限公司 Method and device for adding token into traffic shaping
CN105791155A (en) * 2014-12-24 2016-07-20 深圳市中兴微电子技术有限公司 Congestion flow management method and apparatus
CN108848038A (en) * 2018-08-30 2018-11-20 华为技术有限公司 Flow managing method and token bucket node based on token bucket

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8504691B1 (en) * 2010-12-29 2013-08-06 Amazon Technologies, Inc. System and method for allocating resources for heterogeneous service requests
CN104753809A (en) * 2013-12-25 2015-07-01 深圳市中兴微电子技术有限公司 Method and device for adding token into traffic shaping
CN105791155A (en) * 2014-12-24 2016-07-20 深圳市中兴微电子技术有限公司 Congestion flow management method and apparatus
CN108848038A (en) * 2018-08-30 2018-11-20 华为技术有限公司 Flow managing method and token bucket node based on token bucket

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113783727A (en) * 2021-09-07 2021-12-10 山石网科通信技术股份有限公司 Method and device for adjusting bandwidth of distributed equipment, storage medium and processor
CN113783727B (en) * 2021-09-07 2024-04-26 山石网科通信技术股份有限公司 Method and device for adjusting bandwidth of distributed equipment, storage medium and processor

Also Published As

Publication number Publication date
CN112995058B (en) 2023-11-24
CN112995058A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
KR101670642B1 (en) System and method for scheduling packet transmission on a client device
US10097478B2 (en) Controlling fair bandwidth allocation efficiently
EP2466824B1 (en) Service scheduling method and device
WO2018120993A1 (en) Method and device for allocating distributed system task
CN103460199B (en) Self-adaptation based on class of service interrupts adjustment
WO2021115482A1 (en) Token adjusting method and device
US10324513B2 (en) Control of peripheral device data exchange based on CPU power state
US10834008B2 (en) Arbitration of multiple-thousands of flows for convergence enhanced ethernet
US10146583B2 (en) System and method for dynamically managing compute and I/O resources in data processing systems
EP2783490A1 (en) Time-sensitive data delivery
US10037225B2 (en) Method and system for scheduling computing
CN107257962A (en) Protocol adaptation layers data flow control for USB
CN104657207A (en) Remote authorization request scheduling method, service server and scheduling system
WO2012116540A1 (en) Traffic management method and management device
US20140341040A1 (en) Method and system for providing deterministic quality of service for communication devices
WO2019109902A1 (en) Queue scheduling method and apparatus, communication device, and storage medium
CN114286447A (en) Method, device and storage medium for adjusting scheduling priority
WO2022048407A1 (en) Method and apparatus for mixed scheduling of messages, and electronic device and storage medium
US11909841B2 (en) System, apparatus and method for adaptive peer-to-peer communication with edge platform
CN115242727B (en) User request processing method, device, equipment and medium
CN118301085B (en) Descriptor-based DPU network card priority scheduling method, device, medium and terminal
US12132664B2 (en) Methods and apparatus to schedule service requests in a network computing system using hardware queue managers
WO2023284337A1 (en) Mapping method for optical service unit, apparatus, storage medium, and electronic apparatus
WO2024174581A1 (en) Data transmission control method and apparatus, electronic device, and storage medium
US20240275736A1 (en) Rdma transmit flow scheduling and pacing scheme for congestion management in high-performance ai/ml networks

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: 20897838

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20897838

Country of ref document: EP

Kind code of ref document: A1