CN116204298A - Method and related device for determining counter-pressure waterline value - Google Patents

Method and related device for determining counter-pressure waterline value Download PDF

Info

Publication number
CN116204298A
CN116204298A CN202111447056.8A CN202111447056A CN116204298A CN 116204298 A CN116204298 A CN 116204298A CN 202111447056 A CN202111447056 A CN 202111447056A CN 116204298 A CN116204298 A CN 116204298A
Authority
CN
China
Prior art keywords
value
port
queue
priority
cos
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.)
Pending
Application number
CN202111447056.8A
Other languages
Chinese (zh)
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.)
Beijing Huawei Digital Technologies Co Ltd
Original Assignee
Beijing Huawei Digital Technologies 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 Beijing Huawei Digital Technologies Co Ltd filed Critical Beijing Huawei Digital Technologies Co Ltd
Priority to CN202111447056.8A priority Critical patent/CN116204298A/en
Publication of CN116204298A publication Critical patent/CN116204298A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a method for determining a counter-pressure waterline value and a related device. The method comprises the following steps: setting a queue count value, a space reserved value and a port waterline value alpha aiming at a communication port comprising at least two queues with different priorities, wherein the queue count value is used for counting the size of an output queue buffer occupied by data of the queues with different priorities, the space reserved value indicates the reserved space size of the communication port, and alpha indicates the maximum space value which can be occupied by a high-priority queue in the communication port; setting a cache allocation value for each priority queue; and calculating to obtain the high-priority counter-pressure waterline value of the communication port according to the set parameter value. The method can dynamically adjust the back pressure threshold according to the occupation condition of the queue cache, accurately determine the back pressure waterline value and avoid port flow break caused by unbalanced PFC flow control.

Description

Method and related device for determining counter-pressure waterline value
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and a related device for determining a backpressure watermark value.
Background
A communication network typically includes a plurality of network devices that enable communication between different workstations by forwarding messages for the workstations (e.g., hosts or servers, etc.). Where a network device typically has a plurality of egress ports, each with a plurality of queues of different priorities, one queue for each egress port for buffering messages of one priority that need to be forwarded via that egress port. For each received message, the network device generally caches the message into a queue matched with the message, and sends the message in the queue at a certain rate, where the network device adopts flow control devices, i.e. back pressure mechanisms, on both the receiving side and the sending side, so as to prevent packet loss caused by exceeding the processing capability of the network device.
When the downlink outlet scheduling of the current communication chip receives priority-based flow control (PFC) back pressure, back pressure information of a front-stage module is generated based on a static waterline algorithm, when the front-stage flow burst is not large and is in an aperiodic PFC scene, the scheme can well meet performance requirements, but when the front-stage module flow burst is large, and meanwhile, periodic low-priority PFC is carried out and short packets (for example, 64 bytes short packets) are sent, the static waterline value calculated based on the static waterline algorithm can cause head blockage (header) problem of high-low-priority messages, namely, the low-priority PFC causes the output buffer queue to start port-stage PFC to the front-stage module for a long time, so that the high-priority flow is also pressed, the port is cut off, and the flow cannot meet the performance requirements.
Therefore, how to accurately determine the counter-pressure waterline value, so as to avoid flow interruption caused by unbalanced PFC flow control, is a problem to be solved urgently at present.
Disclosure of Invention
The embodiment of the invention discloses a method and a related device for determining a back pressure waterline value, which can improve the cache utilization rate, accurately determine the back pressure waterline value and avoid port flow interruption caused by unbalanced PFC flow control.
In a first aspect, the present application provides a method of determining a backpressure watermark value, the method comprising: setting a queue count value for each communication port of the network device, wherein the communication port comprises at least two queues with different priorities, and the queue count value is used for counting the size of an output queue buffer occupied by data of the at least two queues with different priorities; setting a buffer allocation value for each of the at least two different priority queues, the buffer allocation value indicating the ability of each priority queue to buffer data; setting a space reservation value for each communication port, wherein the space reservation value indicates the reserved space size of the communication port, and the space reservation value is the sum of the space reservation values of the at least two different priority queues; setting a port waterline value alpha for each communication port, wherein alpha indicates the maximum space value which can be occupied by a high-priority queue in the communication port; and calculating to obtain a high-priority counter-pressure waterline value of the communication port according to the queue count value, the cache allocation value, the space reservation value and the alpha.
In the scheme provided by the application, the dynamic threshold factor and the reserved space configuration are adopted to replace the static high-low waterline configuration, so that the cache utilization rate can be improved, the counter-pressure waterline value can be accurately determined, the port outage caused by PFC flow control imbalance is avoided, and the application scene is expanded.
With reference to the first aspect, in a possible implementation manner of the first aspect, a port low waterline offset is set for each communication port, where the port low waterline offset indicates a threshold for low priority backpressure generation; and calculating to obtain a low-priority counter-pressure waterline value according to the high-priority counter-pressure waterline value and the port low-waterline offset.
In the scheme provided by the application, the port low-priority counter-pressure waterline value can be further accurately obtained by utilizing the preset port low-waterline offset.
With reference to the first aspect, in a possible implementation manner of the first aspect, a queue waterline value cos_α is set for each communication port, where cos_α is used to generate a queue back pressure in the communication port; and calculating to obtain the queue back pressure waterline value in the communication port according to the high-priority back pressure waterline value, the space reserved value, the queue count value, the cache allocation value and the cos_alpha.
In the scheme provided by the application, the queue back pressure in the port is generated by utilizing the preset queue waterline value, so that the queue back pressure waterline value in the communication port can be further obtained through calculation according to the parameter value.
With reference to the first aspect, in a possible implementation manner of the first aspect, a high-priority back pressure waterline value calculation formula is used to calculate a high-priority back pressure waterline value of the communication port, where the high-priority back pressure waterline value calculation formula is:
port_th_h=α*(pdo_fifo_total_size(4k)-total_rsv_th-∑port∑(Max[(port_cos_cnt-cos_rsv_th),0])<<β)+port_rsv_th,
wherein the port_th_h represents a high priority back pressure waterline value, the pdo_fifo_total_size (4 k) represents a bandwidth of the communication device, the total_ rsv _th represents a global space reserved value of the communication device, the total_ rsv _th is a sum of space reserved values of each communication port, the port_cos_cnt represents a queue count value, the cos_ rsv _th represents the buffer allocation value, the β represents a correction value of a shared space usage amount, and the port_ rsv _th represents a space reserved value of the communication port.
In the scheme provided by the application, as the port_th_h is updated in real time, which is equivalent to the waterline value determined by the static waterline algorithm, the algorithm provided by the embodiment of the application can dynamically adjust the back pressure threshold according to the occupation condition of the queue cache, so that the obtained waterline value is ensured to be more accurate, the cache is fully utilized, the adverse effects of port cutoff and the like are avoided, and the application scene is greatly expanded.
With reference to the first aspect, in one possible implementation manner of the first aspect, a low-priority backpressure watermark value calculation formula is used to calculate the low-priority backpressure watermark value, where the low-priority backpressure watermark value calculation formula is:
port_th_1=port_th_h-low_th_offset,
wherein, port_th_1 represents a low priority backpressure pipeline value, and low_th_offset represents a port low pipeline offset.
With reference to the first aspect, in one possible implementation manner of the first aspect, a queue backpressure waterline value calculation formula is used to calculate a queue backpressure waterline value in the communication port, where the queue backpressure waterline value calculation formula is:
port_cos_th=port_cos_α*(port_th_h-port_rsv_th-∑(Max[(port_cos_cnt-cos_rsv_th),0])<<β)+cos[x]_rsv_th,
wherein, the port_cos_th represents a queue back pressure waterline value, the port_cos_α represents a queue waterline value, the port_ rsv _th represents a space reserved value of the communication port, the port_cos_cnt represents a queue count value, the cos_ rsv _th represents the buffer allocation value, the β represents a correction value of a shared space usage amount, and the cos [ x ] _ rsv _th represents a buffer allocation value of a queue with a priority of x in the communication port.
In the scheme provided by the application, port_cos_th is also adjusted and changed in real time according to the occupation condition of the queue cache, and the value of the port_cos_th is changed along with the change of the occupation condition of the queue cache, so that the purpose of dynamically adjusting the port_cos_th can be achieved, the determined waterline value is more accurate, and the application scene is effectively expanded.
In a second aspect, the present application provides an apparatus for determining a backpressure watermark value, where the apparatus may be a relay device or a chip within the relay device. The apparatus has the functions related to the network device in the first aspect, and the functions can be implemented by hardware, or can be implemented by executing corresponding software by hardware, where the hardware or the software includes one or more units corresponding to the functions.
In one possible design, the communication device includes: the system comprises a setting module and a calculating module, wherein the setting module is used for setting a queue count value for each communication port of the network equipment, the communication port comprises at least two queues with different priorities, and the queue count value is used for counting the size of an output queue cache occupied by data of the at least two queues with different priorities; setting a buffer allocation value for each of the at least two different priority queues, the buffer allocation value indicating the ability of each priority queue to buffer data; setting a space reservation value for each communication port, wherein the space reservation value indicates the reserved space size of the communication port, and the space reservation value is the sum of the space reservation values of the at least two different priority queues; setting a port waterline value alpha for each communication port, wherein alpha indicates the maximum space value which can be occupied by a high-priority queue in the communication port; the calculation module is configured to calculate, according to the queue count value, the buffer allocation value, the space reservation value, and the α, a high-priority counter-pressure waterline value of the communication port.
In a third aspect, the present application provides a network device comprising a processor and a memory, the memory invoking program code in the memory to perform the method of the first aspect and in combination with any implementation of the first aspect.
In a fourth aspect, the present application provides a computer readable storage medium having instructions stored therein, the instructions being executable by one or more processors on a processing circuit, which when executed on a computer, cause the computer to perform the method described in the first aspect or any of the alternative implementations of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method described in the first aspect or any of the alternative implementations of the first aspect, the computer product being wholly or partly storable on a storage medium encapsulated in a processor and wholly or partly storable on a storage medium encapsulated outside the processor.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a PSTM system architecture according to an embodiment of the present application;
FIG. 2 is a schematic illustration of a head clogging phenomenon provided by an embodiment of the present application;
FIG. 3 is a flow chart of a method for determining a backpressure watermark value according to embodiments of the present application;
FIG. 4 is a schematic structural diagram of a device for determining a counter-pressure waterline value according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a network device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application.
First, some of the expressions and related techniques referred to in the present application are explained in conjunction with the drawings to facilitate understanding by those skilled in the art.
Priority-based flow control (PFC) is an enhancement to conventional flow control suspension mechanisms, in which conventional flow control prevents all traffic on one link when congestion occurs, while PFC allows 8 virtual channels to be created on one ethernet link and assigns a priority level (cos) to each virtual channel, allowing either virtual channel to be suspended and restarted individually, while allowing traffic on the other virtual channels to pass uninterrupted.
A static threshold (static threshold) refers to a back pressure or drop threshold calculated based on a static configuration value when judging traffic back pressure or drop.
The dynamic threshold (dynamic threshold) refers to a back pressure or discard threshold dynamically calculated according to a certain algorithm based on the current buffer occupancy when judging the traffic back pressure or discard.
Shared buffer (sharedbuffer) means that when buffer usage is performed, buffer space is not only statically allocated to a queue, but can be shared among a plurality of queues.
Head of line (HOL) is generally used in a traffic forwarding switching system to describe a situation where traffic of multiple ports or queues fails to be sent to an idle destination due to contention failure of a header packet, and in this application, it can be understood that low priority back pressure causes back pressure to the entire port, thereby affecting high priority traffic.
The line side medium access control convergence Layer (LMAG) is a chip term, and the data link layer of the local area network is divided into two sub-layers, namely a logical Link Layer (LLC) and a medium access control layer (MAC), where the MAC belongs to a sub-layer under the LLC, so as to solve the problem of how to allocate the usage right of a channel when the usage of a shared channel in the local area network competes, and line control, error notification, frame transfer sequence, and optional flow control are also implemented in this sub-layer.
At present, when a communication chip has serious HOL problem in PFC under PUP protocol scheduling management (PUP scheduletrafficmanagement, PSTM) architecture, low priority PFC transmitted from LMAG side will cause a Traffic Queue Management (TQM) module to output a buffered queue long-time start port level PFC to a front-stage Ingress Queue Scheduling (IQSC) module, high priority traffic will also be pressed to cause TQM port to flow, as shown in fig. 1, which illustrates a PSTM system architecture diagram, address management module (ADM) performs address management on received packets, and a cell descriptor (MCD) is stored, a one-station shared buffer module (OSM) stores data in received packets, the PSTM subsystem includes an IQSC module, an Ingress Scheduling (ISC) module, an Egress Scheduling (ESC) module, an Egress Queue Scheduling (EQSC) module, a TQM module, and a central cell cache module (control MCD buffer, CMB) module, where interaction may be performed between the ISC and TQM to complete related functions, for example, the ISC may send a data pre-enqueue notification and a query request to the TQM, the TQM may send a data enqueue success feedback, an enqueue request, and an enqueue event to the ISC, and when an enqueue operation is required, the IQSC sequentially sends an enqueue request to the ISC, the ESC, and the EQSC, and when an enqueue operation is required, the EQSC sequentially issues a credit (credit) to the ISC, and the IQSC. When the PSTM subsystem receives the low priority PFC packet on the LMAG side, it will suppress the low priority queues of TQM, IQSC and EQSC, and the low priority packet is backlogged in the TQM output queue, so that the low priority PFC from TQM to IQSC is gradually generated, when the low priority PFC of LMAG is withdrawn, the low priority overshoot from EQSC to IQSC is very large, the output buffer of TQM will be fully occupied soon, and at the same time, the burst of the TQM output queue will cause much data to the subsequent OSM, so that the port Length (LP) back pressure from the OSM to TQM always exists, so that the TQM cannot output a packet, and the output buffer queue of TQM always satisfies the destination port (targettttqport) PFC back pressure setting condition, as shown in fig. 2, the destination port 0 (tp 0) can normally send a packet outwards in the first several periods, but in the subsequent periods, the traffic performance is seriously affected due to the existence of the LP back pressure, so that the traffic flow is severely affected.
To avoid this, the reverse watermark value of the TQM needs to be set and determined appropriately. The current TQM output queue caches all use a static waterline algorithm to determine the backpressure waterline value of the TQM, in one possible implementation, each TP of the TQM output queue maintains 9 counters, one for counting the TP as a whole, and the other for counting 8 different priority queues, with 1 added when MCD enqueues, and 1 subtracted, two waterlines are configured for each TP, a greater port backpressure waterline value tp_big_hi and a lesser port backpressure waterline value tp_small, two waterlines are also configured for each priority queue, a greater queue backpressure waterline value tp_cos_big and a lesser queue backpressure waterline value tp_cos_small, when the overall count value is greater than the smaller port back pressure waterline value and the queue count value is greater than the smaller queue back pressure waterline value, namely (tp_cnt > tp_small) and (tp_cos_cnt > tp_cos_small), the TQM will generate priority back pressure, namely generate corresponding TP COS PFC, because in most scenes, multiple PFC flows share TP bandwidth and share TP cache, the cache of the whole TP is not 8 times of the worst case, tp_small is configured by default according to 1 time of port rate by message Round Trip Time (RTT), and tp_cos_small is configured by default according to 25% of port rate by RTT; alternatively, when the overall count value is less than or equal to the smaller port backpressure waterline value and the queue count value is greater than the larger queue backpressure waterline value, that is, (tp_cnt is less than or equal to tp_small) and (tp_cos_cnt > tp_cos_big), the TQM will also generate priority backpressure, where in order to solve the problem that a single stream is transmitted, the extreme case of PFC is independently generated, so that the fact that a queue of a certain priority occupies the whole TP buffer to generate a Packet Data Output (PDO) PFC is avoided, and the tp_cos_big is configured by default according to 50% of port rate RTT; in particular, when the overall count value is greater than the larger port backpressure watermark value, i.e., tp_cnt > tp_big_hi, the TQM will generate a TP overall backpressure (i.e., port backpressure) that is configured by default at 3 times the port rate.
It can be seen that when the waterline is determined by using the static waterline algorithm, only overshoot on the RTT time path from the IQSC to the PDO is considered, but a credit burst caused by the bucket depth of the EQSC and the IQSC is not considered, so that the waterline value setting process is caused, and in addition, when the current-stage traffic burst is very large, the existing PDO cache resource is not fully utilized for burst absorption.
Based on the above, the present application provides a method for determining a backpressure waterline value, which improves the backpressure waterline value by sharing and utilizing idle cache resources when PFC backpressure is received, dynamically adjusts a backpressure threshold, improves the cache utilization rate, and avoids port flow break caused by PFC flow control imbalance.
The technical scheme of the embodiment of the application can be applied to any communication system which needs to solve the imbalance of back pressure generation, such as a communication system based on a PSTM architecture, as long as the system has the problems of traffic packet loss, port flow break and the like caused by the imbalance of back pressure generation.
The system architecture of the embodiment of the present application may refer to fig. 1, and the network device related to the embodiment of the present application may be a communication chip supporting a PSTM architecture or a server, a switch, a router, etc. in which the communication chip is inserted, and the communication port related to the embodiment of the present application may be a communication port of a TQM module, and the method for determining a backpressure waterline value provided by the present application is further described below by taking receiving a periodic low-priority PFC from an LMAG as an example.
The method for determining the backpressure watermark provided in the embodiments of the present application will be described in detail below with reference to fig. 3 in conjunction with the schematic diagram shown in fig. 1. The network devices and communication ports depicted in fig. 3 may correspond to the TQM modules and communication ports of the TQM modules, respectively, depicted in fig. 1, as depicted in fig. 3, the method including, but not limited to, the steps of:
s301: a queue count value is set for each communication port of the network device.
Specifically, each TP of the TQM output queues maintains 9 counters, one of which is used to count the TP itself as a whole, and the rest counts 8 different priority queues under the TP respectively, and when a corresponding MCD enqueues, the counter performs 1 increment, and when a corresponding MCD dequeues, the counter performs 1 decrement.
Each priority queue corresponds to a queue count value (i.e., port_cos_cnt) that records the amount of TQM output queue buffering occupied by data from different priority queues. It will be appreciated that the value is required to be updated continuously, which is time-efficient, and will change whenever there is a corresponding enqueue or dequeue operation.
S302: a cache allocation value is set for each priority queue.
Specifically, when a buffer allocation value may be set for each priority queue in advance, that is, a reserved space is allocated for each priority queue for buffering data, where the value may indicate the capability of each priority queue to buffer data, if a queue count value of a certain priority queue exceeds the buffer allocation value, that is, an amount of data to be buffered exceeds a reserved space size corresponding to the priority queue, a shared space in a communication port is required to be used for buffering redundant data, a difference between the queue count value and the buffer allocation value is the size of the shared space occupied by the priority queue, and an exemplary value is that the queue count value of a certain priority queue is 10 mbits, and the buffer allocation value is 8 mbits, and then the shared space occupied by the priority queue is 2 mbits.
Similarly, when the difference between the queue count value and the buffer allocation value is smaller than or equal to 0, the shared space is considered not occupied, and the size of the shared space occupied in the whole communication port can be further calculated, namely, the difference is smaller than 0 and is considered as 0, and the sum of the differences is the size of the shared space occupied in the whole communication port, and because 8 priority queues currently exist, comparison is needed first, and then convergence of the difference 8,4,2,1 is carried out, so that 5-level adders are needed.
S303: a space reserved value is set for each communication port.
Specifically, the space reserved value of each communication port is recorded in real time, the size of the space reserved value is the sum of the space reserved values of each priority queue under the port, the space reserved value of each priority queue is the rest part of the buffer allocation value which is not completely used by each priority queue, and the sum of the space reserved values of all ports is the global reserved space, so that the buffer resources of the network equipment can be shared by different priority queues of different ports, and the buffer utilization rate of the network equipment is greatly improved.
S304: a port waterline value α is set for each communication port.
Specifically, for each communication port, an α is required to be set, where α corresponds to the maximum space value that can be occupied by the high priority in the port, so as to generate the high priority back pressure of the corresponding port level, and in this embodiment, the value of α is preferably 1.
S305: and calculating to obtain a high-priority counter-pressure waterline value of the communication port according to the queue count value, the cache allocation value, the space reservation value and the alpha.
Specifically, after the queue count value and the buffer allocation value are obtained, the shared space occupation value of each priority queue can be obtained, so that the shared space occupation value and the global shared space occupation value in each communication port are further obtained, then the global space reservation value can be obtained according to the space reservation value, and then the high-priority counter-pressure waterline value of the communication port can be calculated by combining alpha.
Further, after the above parameter values are obtained, the high priority backpressure watermark value of the communication port may be calculated by using the following formula 1, where formula 1 is:
Figure BDA0003384182770000071
wherein, the port_th_h represents a high priority back pressure waterline value, the pdo_ifo_total_size (4 k) represents a bandwidth of the communication device, the total_ rsv _th represents a global space reserved value of the communication device, the total_ rsv _th is a sum of space reserved values of each communication port, the port_cos_cnt represents a queue count value, the cos_ rsv _th represents the buffer allocation value, the β represents a correction value of a shared space usage amount, the value of β is preferably 0, the value of β can also be 1, 2 or 3, the application is not limited thereto, the value can shift the global shared space occupied value by 0-3 bits to the left, that is, multiply by 1-8, and the port_ rsv _th represents the space reserved value of the communication port.
In addition, because the calculation of the global shared space occupation value is complex, the calculation can be simplified in a reverse calculation mode, a total usage share count value is maintained to replace the global shared space occupation value, when enqueuing exists, whether the priority queue occupies the shared space is firstly judged, if yes, the total usage share count value is subjected to 1 adding operation, otherwise, the total usage share count value is unchanged; when dequeuing exists, whether the shared space used by the priority queue is judged, if yes, the total use share count value is subjected to 1 subtracting operation, otherwise, the shared space is unchanged.
It should be noted that, the calculation of the port_th_h needs to be updated in real time, and not be performed after a port_th_h is calculated, and the algorithm is in a state of running all the time, and each time there is an enqueuing or dequeuing action, the value of the port_th_h needs to be recalculated, updated, and used for generating operations such as back pressure.
It can be understood that, because port_th_h is updated in real time, which is equivalent to the waterline value determined by the static waterline algorithm, the algorithm provided by the embodiment of the application can dynamically adjust the back pressure threshold according to the occupation condition of the queue cache, ensure that the obtained waterline value is more accurate, fully utilize the cache, avoid adverse effects such as port cutoff, and greatly expand the applicable scene.
In one possible implementation, a port low waterline offset is set for each communication port, the port low waterline offset indicating a threshold for low priority backpressure generation; and calculating to obtain a low-priority counter-pressure waterline value according to the high-priority counter-pressure waterline value and the port low-waterline offset.
Specifically, after the occupiable high waterline of the communication port is obtained, the occupiable amount of each priority queue in the communication port needs to be calculated, the waterline needs to register the front high priority back pressure waterline value, and meanwhile, a port low waterline offset is needed to indicate a threshold for low priority back pressure generation, so that the low priority back pressure waterline value of the communication port is finally calculated by using the port low waterline offset.
Further, the low priority backpressure watermark value of the communication port may be calculated using the following equation 2, where equation 2 is:
port_th_1=port_th_h-low_th_offset equation 2
Wherein, the port_th_1 represents a low priority back-pressure pipeline value, and the low_th_offset represents a port low pipeline offset, which is preferably 50 in this application.
In one possible implementation, a queue waterline value cos_α is set for each communication port, the cos_α being used to generate a queue backpressure within the communication port; and calculating to obtain the queue back pressure waterline value in the communication port according to the high-priority back pressure waterline value, the space reserved value, the queue count value, the cache allocation value and the cos_alpha.
Specifically, after the buffer allocation value of each priority queue is obtained, the buffer allocation value of the communication port can be further obtained, the size of the buffer allocation value is the sum of the buffer allocation values of the priority queues, then the shared space occupation value of each communication port is further obtained according to the queue count value and the buffer allocation value, and then the queue back pressure waterline value in the communication port can be calculated by combining cos_alpha.
Further, after obtaining the above parameter values, the queue backpressure waterline value in the communication port may be calculated by using the following formula 3, where formula 3 is:
Figure BDA0003384182770000081
wherein, the port_cos_th represents a queue back pressure waterline value, the port_cos_α represents a queue waterline value, the port_ rsv _th represents a space reserved value of the communication port, the port_cos_cnt represents a queue count value, the cos_ rsv _th represents the buffer allocation value, the β represents a correction value of a shared space usage amount, and the cos [ x ] _ rsv _th represents a buffer allocation value of a queue with a priority of x in the communication port.
It can be seen that the port_cos_th is also adjusted and changed in real time according to the occupation condition of the queue cache, and the value of the port_cos_th changes along with the change of the occupation condition of the queue cache, so that the purpose of dynamically adjusting the port_cos_th can be achieved, the determined waterline value is more accurate, and the application scene is effectively expanded.
In order to facilitate better implementation of the above-described aspects of the embodiments of the present application, correspondingly, related devices for cooperatively implementing the above-described aspects are also provided below.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an apparatus for determining a backpressure watermark value according to an embodiment of the present application, where the apparatus may be a network device in the method embodiment described in fig. 3, and a method and steps using the network device as an execution body in the method embodiment described in fig. 3 may be executed. As shown in fig. 4, the apparatus 400 includes a setup module 410 and a calculation module 420. Wherein, the liquid crystal display device comprises a liquid crystal display device,
a setting module 410, configured to set a queue count value for each communication port of the network device, where the communication port includes at least two queues with different priorities, where the queue count value is used to count a size of an output queue buffer occupied by data in the at least two queues with different priorities; setting a buffer allocation value for each of the at least two different priority queues, the buffer allocation value indicating the ability of each priority queue to buffer data; setting a space reservation value for each communication port, wherein the space reservation value indicates the reserved space size of the communication port, and the space reservation value is the sum of the space reservation values of the at least two different priority queues; setting a port waterline value alpha for each communication port, wherein alpha indicates the maximum space value which can be occupied by a high-priority queue in the communication port;
And a calculating module 420, configured to calculate a high-priority counter-pressure waterline value of the communication port according to the queue count value, the buffer allocation value, the space reservation value, and the α.
The setting module 410 is further configured to set, for each communication port, a port low water line offset, where the port low water line offset indicates a threshold for low priority backpressure generation; the calculating module 420 is further configured to calculate a low priority backpressure watermark value according to the high priority backpressure watermark value and the port low watermark offset.
As an embodiment, the setting module 410 is further configured to set a queue waterline value cos_α for each communication port, where cos_α is used to generate a queue back pressure in the communication port; the calculation module 420 is further configured to calculate a queue backpressure waterline value in the communication port according to the high-priority backpressure waterline value, the space reserved value, the queue count value, the buffer allocation value, and the cos_α.
As an embodiment, the computing module 420 is specifically configured to: and calculating a high-priority back pressure waterline value of the communication port by adopting a high-priority back pressure waterline value calculation formula, wherein the high-priority back pressure waterline value calculation formula is as follows:
port_th_h=α*(pdo_fifo_total_size(4k)-total_rsv_th-∑port∑(Max[(port_cos_cnt-cos_rsv_th),0])<<β)+port_rsv_th,
Wherein the port_th_h represents a high priority back pressure waterline value, the pdo_fifo_total_size (4 k) represents a bandwidth of the communication device, the total_ rsv _th represents a global space reserved value of the communication device, the total_ rsv _th is a sum of space reserved values of each communication port, the port_cos_cnt represents a queue count value, the cos_ rsv _th represents the buffer allocation value, the β represents a correction value of a shared space usage amount, and the port_ rsv _th represents a space reserved value of the communication port.
As an embodiment, the computing module 420 is specifically configured to: calculating the low-priority back pressure waterline value by adopting a low-priority back pressure waterline value calculation formula, wherein the low-priority back pressure waterline value calculation formula is as follows:
port_th_1=port_th_h-low_th_offset,
wherein, port_th_1 represents a low priority backpressure pipeline value, and low_th_offset represents a port low pipeline offset.
As an embodiment, the computing module 420 is specifically configured to: and calculating a queue back pressure waterline value in the communication port by adopting a queue back pressure waterline value calculation formula, wherein the queue back pressure waterline value calculation formula is as follows:
port_cos_th=port_cos_α*(port_th_h-port_rsv_th-∑(Max[(port_cos_cnt-cos_rsv_th),0])<<β)+cos[x]_rsv_th,
wherein, the port_cos_th represents a queue back pressure waterline value, the port_cos_α represents a queue waterline value, the port_ rsv _th represents a space reserved value of the communication port, the port_cos_cnt represents a queue count value, the cos_ rsv _th represents the buffer allocation value, the β represents a correction value of a shared space usage amount, and the cos [ x ] _ rsv _th represents a buffer allocation value of a queue with a priority of x in the communication port.
It should be noted that the structure of the above apparatus is merely an example, and should not be limited in particular, and each module in the apparatus may be added, reduced, or combined as needed. In addition, the operations and/or functions of the respective modules in the apparatus are to implement the respective flows of the method described in fig. 3, and are not described herein for brevity.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a network device according to an embodiment of the present application. As shown in fig. 5, the network device 500 includes: processor 510, communication interface 520, and memory 530, the processor 510, communication interface 520, and memory 530 being interconnected by an internal bus 540. It should be appreciated that the network device 500 may be a relay device or a relay chip.
The processor 510 may be comprised of one or more general purpose processors, such as a central processing unit (central processing unit, CPU), or a combination of CPU and hardware chips. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (programmable logic device, PLD), or a combination thereof. The PLD may be a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), general-purpose array logic (generic array logic, GAL), or any combination thereof.
Bus 540 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus 540 may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in fig. 5, but not only one bus or one type of bus.
Memory 530 may include volatile memory (volatile memory), such as random access memory (random access memory, RAM); the memory 530 may also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory (flash memory), a hard disk (HDD), or a Solid State Drive (SSD); memory 530 may also include combinations of the above.
It should be noted that, the memory 530 of the network device 500 stores codes corresponding to the respective modules of the apparatus 400 for determining a backpressure watermark, and the processor 510 executes the codes to implement the functions of the respective modules of the apparatus 400 for determining a backpressure watermark, that is, the methods of S301 to S305 are performed.
The present application also provides a computer readable storage medium storing a computer program, which when executed by a processor, can implement some or all of the steps described in any of the above method embodiments.
The embodiments of the present invention also provide a computer program comprising instructions which, when executed by a computer, cause the computer to perform part or all of the steps of any of the methods of determining a backpressure watermark value.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, such as the above-described division of units, merely a division of logic functions, and there may be additional manners of dividing in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, or may be in electrical or other forms.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.

Claims (15)

1. A method of determining a backpressure watermark value, the method comprising:
setting a queue count value for each communication port of the network device, wherein the communication port comprises at least two queues with different priorities, and the queue count value is used for counting the size of an output queue buffer occupied by data of the at least two queues with different priorities;
setting a buffer allocation value for each of the at least two different priority queues, the buffer allocation value indicating the ability of each priority queue to buffer data;
Setting a space reservation value for each communication port, wherein the space reservation value indicates the reserved space size of the communication port, and the space reservation value is the sum of the space reservation values of the at least two different priority queues;
setting a port waterline value alpha for each communication port, wherein alpha indicates the maximum space value which can be occupied by a high-priority queue in the communication port;
and calculating to obtain a high-priority counter-pressure waterline value of the communication port according to the queue count value, the cache allocation value, the space reservation value and the alpha.
2. The method of claim 1, wherein the method further comprises:
setting a port low waterline offset for each communication port, wherein the port low waterline offset indicates a threshold for low priority backpressure generation;
and calculating to obtain a low-priority counter-pressure waterline value according to the high-priority counter-pressure waterline value and the port low-waterline offset.
3. The method of claim 1, wherein the method further comprises:
setting a queue waterline value cos_alpha for each communication port, wherein cos_alpha is used for generating queue back pressure in the communication port;
and calculating to obtain the queue back pressure waterline value in the communication port according to the high-priority back pressure waterline value, the space reserved value, the queue count value, the cache allocation value and the cos_alpha.
4. The method of any of claims 1-3, wherein calculating a high priority backpressure watermark value for the communication port based on the queue count value, the cache allocation value, the space reserved value, and the α comprises:
and calculating a high-priority back pressure waterline value of the communication port by adopting a high-priority back pressure waterline value calculation formula, wherein the high-priority back pressure waterline value calculation formula is as follows:
port_th_h=α*(pdo_fifo_total_size(4k)-total_rsv_th-∑port∑(Max[(port_cos_cnt-cos_rsv_th),0])<<β)+port_rsv_th,
wherein the port_th_h represents a high priority back pressure waterline value, the pdo_fifo_total_size (4 k) represents a bandwidth of the communication device, the total_ rsv _th represents a global space reserved value of the communication device, the total_ rsv _th is a sum of space reserved values of each communication port, the port_cos_cnt represents a queue count value, the cos_ rsv _th represents the buffer allocation value, the β represents a correction value of a shared space usage amount, and the port_ rsv _th represents a space reserved value of the communication port.
5. The method of claim 2, wherein calculating a low priority backpressure watermark value based on the high priority backpressure watermark value and the port low watermark offset comprises:
calculating the low-priority back pressure waterline value by adopting a low-priority back pressure waterline value calculation formula, wherein the low-priority back pressure waterline value calculation formula is as follows:
port_th_1=port_th_h-low_th_offset,
Wherein, port_th_1 represents a low priority backpressure pipeline value, and low_th_offset represents a port low pipeline offset.
6. The method of claim 3, wherein calculating a queue backpressure waterline value within a communication port based on the high priority backpressure waterline value, the space reserved value, the queue count value, the cache allocation value, the cos_α comprises:
and calculating a queue back pressure waterline value in the communication port by adopting a queue back pressure waterline value calculation formula, wherein the queue back pressure waterline value calculation formula is as follows:
port_cos_th=
port_cos_α*(port_th_h-port_rsv_th-∑(Max[(port_cos_cnt-cos_rsv_th),0])<<β)+cos[x]_rsv_th,
wherein, the port_cos_th represents a queue back pressure waterline value, the port_cos_α represents a queue waterline value, the port_ rsv _th represents a space reserved value of the communication port, the port_cos_cnt represents a queue count value, the cos_ rsv _th represents the buffer allocation value, the β represents a correction value of a shared space usage amount, and the cos [ x ] _ rsv _th represents a buffer allocation value of a queue with a priority of x in the communication port.
7. An apparatus for determining a backpressure watermark value, comprising:
the device comprises a setting module, a setting module and a processing module, wherein the setting module is used for setting a queue count value for each communication port of the network equipment, the communication port comprises at least two queues with different priorities, and the queue count value is used for counting the size of an output queue cache occupied by data of the at least two queues with different priorities; setting a buffer allocation value for each of the at least two different priority queues, the buffer allocation value indicating the ability of each priority queue to buffer data; setting a space reservation value for each communication port, wherein the space reservation value indicates the reserved space size of the communication port, and the space reservation value is the sum of the space reservation values of the at least two different priority queues; setting a port waterline value alpha for each communication port, wherein alpha indicates the maximum space value which can be occupied by a high-priority queue in the communication port;
And the calculation module is used for calculating and obtaining the high-priority counter-pressure waterline value of the communication port according to the queue count value, the cache allocation value, the space reservation value and the alpha.
8. The apparatus of claim 7, wherein,
the setting module is further configured to set a port low waterline offset for each communication port, where the port low waterline offset indicates a threshold for low priority backpressure generation;
and the calculation module is also used for calculating the low-priority counter-pressure waterline value according to the high-priority counter-pressure waterline value and the port low-waterline offset.
9. The apparatus of claim 7, wherein,
the setting module is further configured to set a queue waterline value cos_α for each communication port, where cos_α is used to generate a queue back pressure in the communication port;
the calculation module is further configured to calculate a queue back pressure waterline value in the communication port according to the high-priority back pressure waterline value, the space reserved value, the queue count value, the buffer allocation value, and the cos_α.
10. The apparatus according to any of the claims 7-9, wherein the computing module is specifically configured to:
And calculating a high-priority back pressure waterline value of the communication port by adopting a high-priority back pressure waterline value calculation formula, wherein the high-priority back pressure waterline value calculation formula is as follows:
port_th_h=α*(pdo_fifo_total_size(4k)-total_rsv_th-∑port∑(Max[(port_cos_cnt-cos_rsv_th),0])<<β)+port_rsv_th,
wherein the port_th_h represents a high priority back pressure waterline value, the pdo_fifo_total_size (4 k) represents a bandwidth of the communication device, the total_ rsv _th represents a global space reserved value of the communication device, the total_ rsv _th is a sum of space reserved values of each communication port, the port_cos_cnt represents a queue count value, the cos_ rsv _th represents the buffer allocation value, the β represents a correction value of a shared space usage amount, and the port_ rsv _th represents a space reserved value of the communication port.
11. The apparatus of claim 8, wherein the computing module is specifically configured to:
calculating the low-priority back pressure waterline value by adopting a low-priority back pressure waterline value calculation formula, wherein the low-priority back pressure waterline value calculation formula is as follows:
port_th_1=port_th_h-low_th_offset,
wherein, port_th_1 represents a low priority backpressure pipeline value, and low_th_offset represents a port low pipeline offset.
12. The transpose of claim 9 wherein the computing module is operable, in particular:
And calculating a queue back pressure waterline value in the communication port by adopting a queue back pressure waterline value calculation formula, wherein the queue back pressure waterline value calculation formula is as follows:
port_cos_th=
port_cos_α*(port_th_h-port_rsv_th-∑(Max[(port_cos_cnt-cos_rsv-th),0])<<β)+cos[x]_rsv_th,
wherein, the port_cos_th represents a queue back pressure waterline value, the port_cos_α represents a queue waterline value, the port_ rsv _th represents a space reserved value of the communication port, the port_cos_cnt represents a queue count value, the cos_ rsv _th represents the buffer allocation value, the β represents a correction value of a shared space usage amount, and the cos [ x ] _ rsv _th represents a buffer allocation value of a queue with a priority of x in the communication port.
13. A network device comprising a processor and a memory, the memory having a program stored therein, the processor executing the program stored in the memory to implement the method of any of claims 1-6.
14. A chip comprising programmable logic circuits and/or program instructions for implementing the method of any one of claims 1-6 when the chip is run.
15. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-6.
CN202111447056.8A 2021-11-30 2021-11-30 Method and related device for determining counter-pressure waterline value Pending CN116204298A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111447056.8A CN116204298A (en) 2021-11-30 2021-11-30 Method and related device for determining counter-pressure waterline value

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111447056.8A CN116204298A (en) 2021-11-30 2021-11-30 Method and related device for determining counter-pressure waterline value

Publications (1)

Publication Number Publication Date
CN116204298A true CN116204298A (en) 2023-06-02

Family

ID=86509990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111447056.8A Pending CN116204298A (en) 2021-11-30 2021-11-30 Method and related device for determining counter-pressure waterline value

Country Status (1)

Country Link
CN (1) CN116204298A (en)

Similar Documents

Publication Publication Date Title
US8248930B2 (en) Method and apparatus for a network queuing engine and congestion management gateway
US8036117B1 (en) Dequeuing and congestion control systems and methods
US10129151B2 (en) Traffic management implementation method and apparatus, and network device
JP3525656B2 (en) Packet switch and congestion notification method
US7414973B2 (en) Communication traffic management systems and methods
US9154446B2 (en) Device and method for switching data traffic in a digital transmission network
US20210112002A1 (en) Receiver-based precision congestion control
WO2018113426A1 (en) Flow control method and switching device
EP2608467B1 (en) System and method for hierarchical adaptive dynamic egress port and queue buffer management
US11968111B2 (en) Packet scheduling method, scheduler, network device, and network system
US20220303217A1 (en) Data Forwarding Method, Data Buffering Method, Apparatus, and Related Device
CN107948103B (en) Switch PFC control method and control system based on prediction
US10050896B2 (en) Management of an over-subscribed shared buffer
EP2093945B1 (en) A method for realizing back pressure of masses of ports and the device thereof
EP4175232A1 (en) Congestion control method and device
US10419370B2 (en) Hierarchical packet buffer system
Escudero-Sahuquillo et al. Combining congested-flow isolation and injection throttling in hpc interconnection networks
CN109787910B (en) Traffic management method, system and fabric network processor
US20220377016A1 (en) Service Level Adjustment Method and Apparatus, Device, and Storage Medium
EP2670085A1 (en) System for performing Data Cut-Through
Addanki et al. ABM: Active buffer management in datacenters
CN116204298A (en) Method and related device for determining counter-pressure waterline value
CN109787922B (en) Method and device for acquiring queue length and computer readable storage medium
Escudero-Sahuquillo et al. FBICM: Efficient congestion management for high-performance networks using distributed deterministic routing
US20210281524A1 (en) Congestion Control Processing Method, Packet Forwarding Apparatus, and Packet Receiving Apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication