[go: up one dir, main page]

CN119652831A - Flow control method, device, medium and electronic equipment - Google Patents

Flow control method, device, medium and electronic equipment Download PDF

Info

Publication number
CN119652831A
CN119652831A CN202411808665.5A CN202411808665A CN119652831A CN 119652831 A CN119652831 A CN 119652831A CN 202411808665 A CN202411808665 A CN 202411808665A CN 119652831 A CN119652831 A CN 119652831A
Authority
CN
China
Prior art keywords
flow
flow controller
available time
next transmission
memory
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
CN202411808665.5A
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.)
Nanjing Jinzhen Microelectronics Technology Co ltd
Original Assignee
Nanjing Jinzhen Microelectronics Technology 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 Nanjing Jinzhen Microelectronics Technology Co ltd filed Critical Nanjing Jinzhen Microelectronics Technology Co ltd
Priority to CN202411808665.5A priority Critical patent/CN119652831A/en
Publication of CN119652831A publication Critical patent/CN119652831A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure provides a flow control method, a flow control device, a flow control medium and electronic equipment. The flow control method comprises the steps of obtaining a flow controller index associated with a message, carrying out search processing on a flow controller configuration table memory and a next transmission available time memory based on the flow controller index to obtain the flow controller rate configuration state and the next transmission available time, carrying out flow control on the flow through the flow controller based on the flow controller rate configuration state and the next transmission available time, obtaining a new next transmission available time based on the current time and the next transmission available time, and writing the new next transmission available time back to the next transmission available time memory. The flow control method can improve the utilization rate of hardware resources and rapidly complete the demand of flow control.

Description

Flow control method, device, medium and electronic equipment
Technical Field
The disclosure belongs to the field of flow control, and relates to a flow control method, in particular to a flow control method, a flow control device, a flow control medium and electronic equipment.
Background
Currently, in a common switch design, an ASIC (application specific integrated circuit) specifically designed for a network application is generally used for processing, forwarding, analyzing and the like of a service flow of the switch, and a CPU (central processing unit) of the switch is mainly responsible for overall management of the switch, such as a hardware working state and the like. In order to control the functions of the ASIC, the CPU of the switch also needs to process some messages sent by the ASIC, such as control related messages of LLDP (link layer discovery protocol), STP (spanning tree protocol), ARP (address resolution protocol), or related messages of routing protocol. In a high-speed network, the demand for large-scale flow control is stronger, and the current flow control method has the problem of low flow control efficiency.
Disclosure of Invention
The disclosure aims to provide a flow control method, a flow control device, a flow control medium and an electronic device, which are used for solving the problem of low flow control efficiency in the current flow control method.
In a first aspect, an embodiment of the present disclosure provides a flow control method, including obtaining a flow controller index associated with a packet, where the flow of the packet is an ingress flow or an egress flow, where the ingress flow and the egress flow share the flow controller, performing a lookup process on a flow controller configuration table memory and a next transmission available time memory based on the flow controller index to obtain the flow controller rate configuration state and a next transmission available time, performing flow control on the flow of the packet by the flow controller based on the flow controller rate configuration state and the next transmission available time, obtaining a new next transmission available time based on a current time and the next transmission available time, and writing the new next transmission available time back to the next transmission available time memory.
In the flow control method, the incoming flow and the outgoing flow share the flow controller, and on the basis, the flow controller is provided with a table memory and a next transmission available time memory for searching and processing, and the new next transmission available time is written back, so that the utilization rate of hardware resources can be improved, and the requirement on flow control can be rapidly met.
In one embodiment of the disclosure, the method for obtaining the message-associated flow controller index includes obtaining the message-associated flow controller port index, and performing a lookup process on a flow controller selection table based on the flow controller port index to obtain the flow controller index.
In one embodiment of the disclosure, the method for searching the flow controller configuration table memory and the next transmission available time memory based on the flow controller index to obtain the flow controller rate configuration state and the next transmission available time includes obtaining a flow control memory unit number based on the flow controller index, and searching the flow controller configuration table memory and the next transmission available time memory based on the flow control memory unit number and the flow controller index to obtain the flow controller rate configuration state and the next transmission available time.
In an embodiment of the present disclosure, the method for obtaining a new next transmission available time based on a current time and the next transmission available time includes obtaining the new next transmission available time based on the current time and the next transmission available time when the current time is greater than the next transmission available time, the new next transmission available time being the current time, and obtaining the new next transmission available time based on the current time and the next transmission available time when the current time is not greater than the next transmission available time.
In an embodiment of the disclosure, the implementation method for searching the flow controller selection table based on the flow controller port index to obtain the flow controller index includes searching the flow controller selection table based on the flow controller port index to obtain the flow controller index under the outbound flow in a first period, searching the flow controller selection table based on the flow controller port index under the inbound flow in a second period to obtain the flow controller index, wherein the clock in the first period is an even clock, and the clock in the second period is an odd clock.
In one embodiment of the disclosure, the method for searching the flow controller configuration table memory and the next transmission available time memory based on the flow controller index to obtain the flow controller rate configuration state and the next transmission available time includes the steps of, in a third period, performing searching processing on the flow controller configuration table memory based on the flow controller index under the outbound flow to obtain the flow controller rate configuration state; step two, under the outgoing flow, searching the next transmission available time memory based on the flow controller index to acquire the next transmission available time; the method comprises the steps of receiving a traffic controller index, reading a traffic controller state, reading the traffic controller state under the outgoing traffic, reading a traffic controller service quality Qos table under the outgoing traffic, searching a traffic controller configuration table memory based on the traffic controller index under the incoming traffic to obtain the traffic controller rate configuration state, searching a next transmission available time memory based on the traffic controller index under the incoming traffic to obtain the next transmission available time, reading the traffic controller state under the incoming traffic, and reading the traffic controller Qos table under the incoming traffic, wherein the clock of the third period is an even clock and the clock of the fourth period is an odd clock.
In an embodiment of the disclosure, a method for obtaining a new next transmission available time based on the current time and the next transmission available time and writing back the new next transmission available time to the next transmission available time memory includes the steps of obtaining a new next transmission available time based on the current time and the next transmission available time in the outgoing traffic and writing back the new next transmission available time to the next transmission available time memory in the outgoing traffic, updating the traffic controller state in the outgoing traffic, and in the fifth period, obtaining a new next transmission available time based on the current time and the next transmission available time in the incoming traffic and writing back the new next transmission available time to the next transmission available time memory in the outgoing traffic, and updating the clock controller state in the fifth period.
In a second aspect, an embodiment of the disclosure provides a flow control device, which includes an index obtaining module, a search processing module, a flow processing module and a memory write-back module, wherein the index obtaining module is used for obtaining a flow controller index associated with a message, the flow of the message is an incoming flow or an outgoing flow, the incoming flow and the outgoing flow share the flow controller, the search processing module is used for carrying out search processing on a flow controller configuration table memory and a next transmission available time memory based on the flow controller index so as to obtain the flow controller rate configuration state and the next transmission available time, the flow processing module is used for carrying out flow control on the flow of the message through the flow controller based on the flow controller rate configuration state and the next transmission available time, and the memory write-back module is used for obtaining a new next transmission available time based on the current time and the next transmission available time and writing the new next transmission available time back to the next transmission available time memory.
In a third aspect, embodiments of the present disclosure provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the flow control method according to any one of the first aspects
In a fourth aspect, an embodiment of the present disclosure provides an electronic device comprising a memory, a processor coupled to the memory and configured to perform the flow control method according to any one of the first aspects.
As described above, the flow control method, the flow control device, the flow control medium and the electronic equipment have the following beneficial effects:
In the flow control method, the incoming flow and the outgoing flow share the flow controller, and on the basis, the flow controller is provided with a table memory and a next transmission available time memory for searching and processing, and the new next transmission available time is written back, so that the utilization rate of hardware resources can be improved, and the requirement on flow control can be rapidly met.
Drawings
Fig. 1 is a schematic diagram of a hardware architecture of an aggregate flow controller according to an embodiment of the disclosure.
Fig. 2 shows a flow chart of a flow control method according to an embodiment of the present disclosure.
Fig. 3 is a schematic diagram showing a rate configuration state of a flow controller in a flow controller configuration table memory according to an embodiment of the disclosure.
Fig. 4 shows a schematic structural diagram of a flow control method according to an embodiment of the present disclosure.
Fig. 5 is a flowchart of an implementation method for obtaining a message-associated flow controller index according to an embodiment of the present disclosure.
Fig. 6 is a flowchart of an implementation method for performing a lookup process on a flow controller configuration table memory and a next transmission available time memory to obtain the flow controller rate configuration state and the next transmission available time according to an embodiment of the present disclosure.
FIG. 7 is a schematic diagram of a flow control memory unit according to an embodiment of the disclosure.
Fig. 8 shows a schematic diagram of mapping next time available for transmission to a flow controller configuration table entry in an embodiment of the present disclosure.
Fig. 9 is a flowchart of an implementation method for obtaining a new next transmission available time for the current time and the next transmission available time according to an embodiment of the present disclosure.
Fig. 10 is a flowchart of an implementation method for performing a lookup process on a flow controller selection table to obtain the flow controller index according to an embodiment of the present disclosure.
FIG. 11 is a schematic diagram illustrating the operation of a pipeline for each clock cycle in accordance with an embodiment of the present disclosure.
Fig. 12 is a schematic structural view of a flow control device according to an embodiment of the present disclosure.
Description of element reference numerals
120. Flow control device
1210. Index acquisition module
1220. Lookup processing module
1230. Flow processing module
1240. Memory write-back module
S11-S14 step
S21-S22 step
S31-S32 step
S41-S42 step
S51-S52 steps
Detailed Description
Other advantages and effects of the present disclosure will become readily apparent to those skilled in the art from the following disclosure, which describes embodiments of the present disclosure by way of specific examples. The disclosure may be embodied or practiced in other different specific embodiments, and details within the subject specification may be modified or changed from various points of view and applications without departing from the spirit of the disclosure. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
It should be noted that, the illustrations provided in the following embodiments merely illustrate the basic concepts of the disclosure by way of illustration, and only the components related to the disclosure are shown in the illustrations, rather than being drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of each component in actual implementation may be arbitrarily changed, and the layout of the components may be more complex.
The principles and implementations of the flow control method and flow control device of the disclosed embodiments will be described in detail below, so that those skilled in the art may understand the flow control method and flow control device of the disclosed embodiments without the need for creative effort.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of an aggregate flow controller according to the present embodiment. Where policerPortIndex denotes a flow controller port index, localPortNumber denotes a local port number, policerSelectionTable denotes a flow controller selection table, polIndex denotes a flow controller index, policer Rate Config mem denotes a flow controller rate configuration memory, POL 0 denotes a flow controller 0, POL 1 denotes a flow controller 1, wrpoweridx 1 denotes an index written to the flow controller 1, newNextTat denotes a new next transmission available time corresponding to the flow controller 1, wrIdx denotes a write index, rdIdx denotes a read index, wrData denotes write data, wrPollIdx0 denotes an index written to the flow controller 0, newNextTat0 denotes a new transmission available time corresponding to the flow controller 0, egress Lookup Bus SHIFT REGISTER denotes a query Bus offset register, ingress Lookup Bus SHIFT REGISTER denotes an ingress to the query Bus offset register, lookup Bus denotes a query Bus, egress policing denotes an ingress to the flow controller, egress policing results denotes an ingress to the flow controller, ingress policing results denotes an ingress to the flow controller, even NextTat banks denotes a next transmission available time corresponding to the even flow controller index, and Odd NextTat banks denotes an odd number of available memory cells corresponding to the next transmission available time corresponding to the even flow controller index.
Referring to fig. 2, the present embodiment provides a flow control method, including:
S11, acquiring a flow controller index associated with a message, wherein the flow of the message is an incoming flow or an outgoing flow, and the incoming flow and the outgoing flow share the flow controller.
Alternatively, the number of flow controllers may be two, and the index of the flow controller refers to an index pointing to the flow controller, for example, the index is 1, which may indicate pointing to the first flow controller, and the index is 2, which may indicate pointing to the second flow controller.
Alternatively, the packet may be an ethernet packet.
S12, based on the flow controller index, searching the flow controller configuration table memory and the next transmission available time memory to acquire the flow controller rate configuration state and the next transmission available time.
Alternatively, the flow controller configuration table memory and the next transmission availability time memory may be in 4 flow control memory units, each unit supporting 512 addresses, 4 flow control memory units supporting a total of 2K (2 x 1024) aggregate flow control flow tables (implemented by hardware memory). The ingress and egress flow controllers may access the same flow control memory unit, but must be accessed separately by separate parity clocks (odd clock for ingress flow controller access time and even clock for egress flow controller access time).
Optionally, the flow controller configuration table memory may refer to a memory storing the flow controller configuration table, and the next transmission available time memory may refer to a memory storing the next transmission available time. The next transmission available time may refer to a point in time when the packet may be transmitted next.
Optionally, the flow controller configuration table memory may be used to store flow rate parameters of the flow controller, where the flow controller rate configuration state may refer to the flow rate parameters of the flow controller configuration, and the flow controller configuration table (PolicerConfigTable) is an ethernet message readable storage table, where the incoming message and the outgoing message respectively read the flow rate parameters accessed by the incoming message and the outgoing message in odd and even clock cycles. As shown in fig. 3, the flow controller configuration table may contain the rate configuration status of two flow controllers (Policer). The flow controller index (PolicerIndex) is used as the address of the memory in the azimuth PolicerConfigTable, if PolicerIndex is i+1, the corresponding message is searched policer i +1, and polier i+1 can represent policer corresponding to PolicerIndex with index i+1.
And S13, controlling the flow rate by the flow controller based on the rate configuration state of the flow controller and the next transmission available time.
Optionally, the flow control of the flow by the flow controller based on the flow controller rate configuration state and the next transmission available time may refer to a process of limiting the flow based on the flow controller rate configuration state and the next transmission available time, and the process of controlling the flow according to the combination of the flow controller rate configuration state and the next transmission available time may be implemented according to a token bucket algorithm, which is not described in detail in this embodiment.
S14, acquiring new next transmission available time based on the current time and the next transmission available time, and writing the new next transmission available time back to the next transmission available time memory.
Alternatively, the next time of transmission availability (Next Transmission Available Time, nextTat) memory may be divided into two groups, one for outbound traffic and one for inbound traffic, each group having a refresh address pointer containing the memory address of the next entry in the group to be refreshed. Each flow controller pipeline flushes the set of entries it uses. The refresh address logic uses a 4-bit nextTatbankConfig (next time available for transfer memory cell configuration) register to determine the next address after reaching 512 the end of the bank. If they are not divided into two groups, a collision occurs because each nextTat bank can be used for either the inlet flow controller or the outlet flow controller.
Optionally, the two groups of memories in the next transmission available time (nextTat) may be respectively a next transmission available time memory unit corresponding to an odd number of flow controller indexes and a next transmission available time memory unit corresponding to an even number of flow controller indexes, the clock corresponding to the outgoing flow is an even number of clocks, the clock corresponding to the incoming flow is an odd number of clocks, the even number of flow controller indexes may be generated according to the even number of clocks, and the odd number of flow controller indexes may be generated according to the odd number of clocks, which will not be described in detail in this embodiment.
In an embodiment of the present disclosure, please refer to fig. 4. The flow controller rate configuration status may be rateburstSize (maximum amount of data allowed to be transmitted in a given time window) in fig. 4, where SINGLE RATE Policer represents a single rate flow controller, outProfile may represent an output configuration file, tat may represent a next transmission available time, where data transmission rules generated according to tat and rateburstSize may be included to determine how to send a packet data packet, policing Result action represents a flow control result action, aggPolMode represents an aggregation control mode, packetColor represents a packet color, nextTatEvenBanks represents a next transmission available time even memory unit, that is, a corresponding next transmission available time memory unit when PolicerIndex is even, nextTatOddBanks represents a next transmission available time odd memory unit, that is, a corresponding next transmission available time memory unit when PolicerIndex is odd, and updateNextTat0/1 may represent a next transmission available time for updating the first flow controller or the second flow controller.
In one embodiment of the present disclosure, writing nextTatbankConfig the register triggers reloading of the refresh index to index offset 0 of the memory location that allocated the smallest index to the flow controller, incrementing independently one at a time every refresh index until it reaches the highest index in the bank. For example, when writing nextTatbankConfig registers, a refresh index operation is triggered, the index refresh is starting from the minimum index, and when the minimum index is 0, each time the index is refreshed, the index is incremented from 0 until the highest index is reached.
In the flow control method, the incoming flow and the outgoing flow share the flow controller, namely the aggregate flow controller, and on the basis of a hardware acceleration architecture of the aggregate flow controller, the flow controller is provided with a table memory and a next transmission available time memory for searching and processing, and the new next transmission available time is written back, so that the utilization rate of hardware resources can be improved, and the requirement on flow control (monitoring) can be rapidly met.
Referring to fig. 5, the present embodiment provides a method for obtaining a flow controller index associated with a message, including:
s21, acquiring a port index of the flow controller associated with the message.
Optionally, the flow controller port index (PolicerPortIndex) is generated in a message Qos (Quality of Service ) classifier (the ethernet message passes through the Qos classifier to obtain a PolicerPortIndex), specifically, when the ethernet message passes through the Qos classifier, the classifier analyzes the message, and allocates a flow controller port index to the message according to the analysis result, and the analysis process of the classifier on the message can be designed according to the actual situation, which is not described in detail in this embodiment.
S22, searching the flow controller selection table based on the flow controller port index to acquire the flow controller index.
Alternatively, the flow controller selection table may have a plurality of entries, each corresponding to one of the flow controller port index and the flow controller index, so as to implement the lookup process of the flow controller selection table in step S22.
Referring to fig. 6, the present embodiment provides a method for implementing searching processing on the basis of the flow controller index, the flow controller configuration table memory and the next transmission available time memory to obtain the flow controller rate configuration state and the next transmission available time, including:
s31, based on the flow controller index, the number of flow control memory units is obtained.
Alternatively, the flow control memory unit number may be expressed as:
bankNum=2*(policerIndex/(2*PolicerBankEntries))+policerIndex[0]
Wherein bankNum denotes the number of flow control memory units, the number of flow control memory units may refer to the flow control memory unit to which the flow controller index belongs, for example, the number of flow control memory units is 1, that is, the number of flow control memory units 1, policindex denotes the flow controller index, policerBankEntries denotes the number of entries of the flow control memory unit, policerIndex [0] denotes the initial value of the flow controller index, policerIndex/(2 x policerbankuntries) denotes an integer of a ratio of policerIndex to 2 times PolicerBankEntries. For example, referring to fig. 7 and 8, the number of entries of the flow controller memory unit is 512, the total number of units of the flow controller memory is 4, the start value of the flow controller index is 0 when the flow controller index is even, and the start value of the flow controller index is 1 when the flow controller index is odd. bankNum is 0 when the flow controller index is 508, bankNum is 2 when the flow controller index is 1030, bankNum is 1 when the flow controller index is 507, bankNum is 3 when the flow controller index is 1227.
S32, based on the flow control memory unit number and the flow controller index, searching the flow controller configuration table memory and the next transmission available time memory to acquire the flow controller rate configuration state and the next transmission available time.
Referring to fig. 9, the present embodiment provides an implementation method for obtaining a new next transmission available time based on a current time and the next transmission available time, including:
and S41, when the current time is greater than the next transmission available time, acquiring the new next transmission available time based on the current time and the next transmission available time, wherein the new next transmission available time is the current time.
S42, when the current time is not greater than the next transmission available time, acquiring the new next transmission available time based on the current time and the next transmission available time, wherein the new next transmission available time is the next transmission available time.
In an embodiment of the present disclosure, the nextTat memory entry needs to be pulled to currentTime before the currentTime (current time) changes too much, for example, when (current time) > = 2 x (number of bits (nextTat) -1) is satisfied, i.e. when the current time has transmitted 2 times of nextTat corresponding to the number of bits minus 1, is pulled to currentTime, the number of bits refers to the number of traffic, and the number of bits (nextTat) may be bit/s x (nextTat). Since the supervision is only active when nextTat is greater than currentTime, the supervision is not active when this occurs.
The new next transmission availability time may be represented by the following code:
if (msb (currentTime-nextTat) |=1)// if the next transmission available time is less than the present time
NewNextTat = currentTime// then the new next transmission availability time is the present time
Else// else
NewNextTat = nextTat// new next transmission availability time is next transmission availability time
Wherein msb (currentTime-nextTat) refers to the most significant bit of the subtraction value of currentTime and nextTat.
Referring to fig. 10, the present embodiment provides a method for implementing searching a flow controller selection table to obtain the flow controller index, including:
S51, under the outgoing flow in the first period, searching the flow controller selection table based on the flow controller port index to acquire the flow controller index.
S52, under the incoming flow in the second period, searching the flow controller selection table based on the flow controller port index to acquire the flow controller index.
The clock of the first period is an even number clock, and the clock of the second period is an odd number clock.
The embodiment provides a method for searching a memory of a configuration table of a flow controller and a memory of a next transmission available time based on the index of the flow controller to acquire the rate configuration state of the flow controller and the next transmission available time, which comprises the following steps:
in a third period:
The first step, under the outgoing flow, searching the memory of the flow controller configuration table based on the flow controller index to obtain the rate configuration state of the flow controller;
Step two, under the outgoing flow, searching the next transmission available time memory based on the flow controller index to acquire the next transmission available time;
Thirdly, reading the state of the flow controller under the outlet flow;
Fourth, under the outgoing flow, reading the Qos (quality of service) table of the flow controller;
in the fourth period:
the first step, under the incoming flow, searching the memory of the flow controller configuration table based on the flow controller index to obtain the rate configuration state of the flow controller;
Step two, under the incoming flow, searching the next transmission available time memory based on the flow controller index to acquire the next transmission available time;
Thirdly, reading the state of the flow controller under the incoming flow;
fourth, reading the Qos table of the flow controller under the incoming flow;
the clock of the third period is an even number clock, and the clock of the fourth period is an odd number clock.
Alternatively, the flow controller status may refer to internal information and parameters maintained by the flow controller during operation, which reflect the current operating conditions and configuration of the flow controller. The flow controller Qos table may be a table for recording different types of flows and corresponding service qualities thereof, and may be used in aspects of priority scheduling, resource allocation, policy execution, and the like.
The embodiment provides a realization method for acquiring a new next transmission available time based on the current time and the next transmission available time, and writing the new next transmission available time back to the next transmission available time memory, comprising the following steps:
In the fourth period:
Fifthly, under the outbound flow, acquiring a new next transmission available time based on the current time and the next transmission available time, and writing the new next transmission available time back to the next transmission available time memory;
Sixth, updating the state of the flow controller under the outlet flow;
In the fifth cycle:
The first step, under the incoming flow, based on the current time and the next transmission available time, acquiring a new next transmission available time, and writing the new next transmission available time back to the next transmission available time memory;
second, updating the state of the flow controller under the incoming flow;
Optionally, the state of the flow controller may be flexibly set according to the actual situation, which is not described in detail in this embodiment.
The clock of the fifth period is an even number clock.
In an embodiment of the present disclosure, referring to fig. 11, since policerConfigTable memory and nextTat memory outputs are shared by ingress and egress flow controllers, the hardware scheme has only one set of flow controllers and a common pipeline shared by ingress and egress flow controllers. This requires that all pipeline tasks be single-cycle, with ingress and egress message lookups entering the common pipeline at different stages to avoid different message lookup accesses to policerConfigTable and nextTat memories in the same cycle. FIG. 10 illustrates operations of the message lookup pipeline for each clock cycle, T0 may represent the first cycle above, READ EGRESS policerSelection Table may represent the under-flow-rate-read flow controller selection table, T1 may represent the second cycle above, READ INGRESS policerSelection Table may represent the under-flow-rate-read flow controller selection table, T2 may represent the third cycle, READ EGRESS policer Config table may represent the under-flow-rate-read flow controller configuration table, READ EGRESS policer nextTat: PARTIAL PKTTIME AND bTime calculation may represent the next transmission availability time to the under-flow-controller for partial packet time and bucket time calculation, bucket may refer to a token bucket, the next transmission availability time may be calculated according to a token bucket algorithm, READ EGRESS policer Stats may represent the under-flow-rate-read flow controller state, READ EGRESS policer QosTable may represent the under-flow-rate-read flow controller Qos table, T3 may represent the fourth cycle, READ INGRESS policer Config table may represent the under-flow-rate-read flow controller configuration table, READ INGRESS policer nextTat: PARTIAL PKTTIME AND bTime calculation may represent the under-rate-controller-read flow-down time for partial packet time and the under-rate-controller for partial flow-rate-available time calculation, READ INGRESS policer Stats may represent the under-rate-flow controller state, 3449: PARTIAL PKTTIME AND bTime calculation may represent the under-rate-controller-down time calculation, egress policer:1) compute outofProfile 2) compute new nextTat) nextTat writeback may be represented as an ingress flow undershoot flow controller 1) calculating an output profile 2) calculating a new next transmission availability time 3) writing back the next transmission availability time update Egress policer stats may represent an update out flow undershoot flow controller state, T4 may represent a fifth cycle, update Ingress policer stats may represent an update in flow undershoot flow controller state.
In one embodiment of the present disclosure, ingress traffic and egress traffic share an aggregate traffic controller from the perspective of improving hardware resource utilization. Every two clock cycles are divided into an odd number clock cycle and an even number clock cycle, and the incoming flow and the outgoing flow occupy the odd number clock cycle and the even number clock cycle respectively. When the CPU software needs to access the hardware resources, the CPU software can only access the flow controller when no ingress and egress flow access changes. In addition, nextTat memory (next transfer available time memory) will be automatically refreshed only when there is no inbound and outbound message access, and no CPU software access. The hardware resources of the aggregate flow controller are mainly memory (memory) such as PolicerTatStatsTable (available time state table for next transmission of the flow controller), policerConfigTable (flow controller configuration table), qosTabel (quality of service table).
The protection scope of the flow control method according to the embodiments of the present disclosure is not limited to the execution sequence of the steps listed in the embodiments, and all the schemes implemented by adding or removing steps and replacing steps according to the prior art according to the principles of the present disclosure are included in the protection scope of the present disclosure.
Fig. 12 is a schematic structural view showing a flow rate control device of an embodiment of the present disclosure. As shown in fig. 12, the present embodiment provides a flow control device 120, including:
The index obtaining module 1210 is configured to obtain a flow controller index associated with a message, where the flow of the message is an ingress flow or an egress flow, and the ingress flow and the egress flow share the flow controller.
The lookup processing module 1220 is configured to perform a lookup process on the flow controller configuration table memory and the next transmission available time memory based on the flow controller index, so as to obtain the flow controller rate configuration state and the next transmission available time.
And a flow processing module 1230, configured to perform flow control on the flow of the packet by the flow controller based on the rate configuration status of the flow controller and the next transmission available time.
The memory write-back module 1240 is configured to obtain a new next transmission available time based on the current time and the next transmission available time, and write back the new next transmission available time to the next transmission available time memory.
In the flow control device 120 provided in this embodiment, the index obtaining module 1210 corresponds to step S11 of the flow control method shown in fig. 2 one by one, the search processing module 1220 corresponds to step S12 of the flow control method shown in fig. 2 one by one, the flow processing module 1230 corresponds to step S13 of the flow control method shown in fig. 2 one by one, and the memory write-back module 1240 corresponds to step S14 of the flow control method shown in fig. 2 one by one.
In several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus or method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules/units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple modules or units 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 modules or units, which may be in electrical, mechanical or other forms.
The modules/units illustrated as separate components may or may not be physically separate, and components shown as modules/units may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules/units may be selected according to actual needs to achieve the objectives of the embodiments of the present disclosure. For example, functional modules/units in various embodiments of the present disclosure may be integrated into one processing module, or each module/unit may exist alone physically, or two or more modules/units may be integrated into one module/unit.
Those of ordinary skill would further appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The present embodiment provides an electronic device comprising a memory, a processor coupled to the memory and configured to perform the flow control method shown in fig. 2.
Embodiments of the present disclosure also provide a computer-readable storage medium. Those of ordinary skill in the art will appreciate that all or part of the steps in a method implementing the above embodiments may be implemented by a program to instruct a processor, where the program may be stored in a computer readable storage medium, where the storage medium is a non-transitory (non-transitory) medium, such as a random access memory, a read only memory, a flash memory, a hard disk, a solid state disk, a magnetic tape (MAGNETIC TAPE), a floppy disk (floppy disk), a compact disk (optical disk), and any combination thereof. The storage media may be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a Solid State Drive (SSD)), or the like.
Embodiments of the present disclosure may also provide a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the processes or functions described in accordance with the embodiments of the present disclosure are produced in whole or in part. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.).
The computer program product is executed by a computer, which performs the method according to the preceding method embodiment. The computer program product may be a software installation package, which may be downloaded and executed on a computer in case the aforementioned method is required.
The descriptions of the processes or structures corresponding to the drawings have emphasis, and the descriptions of other processes or structures may be referred to for the parts of a certain process or structure that are not described in detail.
The above embodiments are merely illustrative of the principles of the present disclosure and its efficacy, and are not intended to limit the disclosure. Modifications and variations may be made to the above-described embodiments by those of ordinary skill in the art without departing from the spirit and scope of the present disclosure. Accordingly, it is intended that all equivalent modifications and variations which a person having ordinary skill in the art would accomplish without departing from the spirit and technical spirit of the present disclosure be covered by the claims of the present disclosure.

Claims (10)

1.一种流量控制方法,其特征在于,包括:1. A flow control method, comprising: 获取报文关联的流量控制器索引,所述报文的流量为入向流量或出向流量,所述入向流量和所述出向流量共享所述流量控制器;Obtaining a flow controller index associated with a message, where the flow of the message is inbound flow or outbound flow, and the inbound flow and the outbound flow share the flow controller; 基于所述流量控制器索引,对流量控制器配置表内存和下一个传输可用时间内存进行查找处理,以获取所述流量控制器速率配置状态和下一个传输可用时间;Based on the flow controller index, searching the flow controller configuration table memory and the next available transmission time memory to obtain the flow controller rate configuration state and the next available transmission time; 基于所述流量控制器速率配置状态和所述下一个传输可用时间,通过所述流量控制器对所述报文的流量进行流量控制;Based on the rate configuration state of the flow controller and the next available time for transmission, flow control is performed on the flow of the message by the flow controller; 基于当前时间和所述下一个传输可用时间,获取新下一个传输可用时间,并且将所述新下一个传输可用时间回写至所述下一个传输可用时间内存。Based on the current time and the next transmission available time, a new next transmission available time is acquired, and the new next transmission available time is written back to the next transmission available time memory. 2.根据权利要求1所述的流量控制方法,其特征在于,获取报文关联的流量控制器索引的实现方法包括:2. The flow control method according to claim 1, characterized in that the method for obtaining the flow controller index associated with the message comprises: 获取报文关联的流量控制器端口索引;Get the traffic controller port index associated with the message; 基于所述流量控制器端口索引,对流量控制器选择表进行查找处理,以获取所述流量控制器索引。Based on the flow controller port index, a flow controller selection table is searched to obtain the flow controller index. 3.根据权利要求2所述的流量控制方法,其特征在于,基于所述流量控制器索引,对流量控制器配置表内存和下一个传输可用时间内存进行查找处理,以获取所述流量控制器速率配置状态和下一个传输可用时间的实现方法包括:3. The flow control method according to claim 2 is characterized in that, based on the flow controller index, the flow controller configuration table memory and the next transmission available time memory are searched and processed to obtain the flow controller rate configuration state and the next transmission available time. The implementation method comprises: 基于所述流量控制器索引,获取流量控制存储器单元数;Based on the flow controller index, obtaining the number of flow control memory units; 基于所述流量控制存储器单元数和所述流量控制器索引,对流量控制器配置表内存和下一个传输可用时间内存进行查找处理,以获取所述流量控制器速率配置状态和所述下一个传输可用时间。Based on the number of flow control memory units and the flow controller index, a flow controller configuration table memory and a next transmission available time memory are searched to obtain the flow controller rate configuration state and the next transmission available time. 4.根据权利要求2所述的流量控制方法,其特征在于,基于当前时间和所述下一个传输可用时间,获取新下一个传输可用时间的实现方法包括:4. The flow control method according to claim 2, characterized in that the method for obtaining the new next available transmission time based on the current time and the next available transmission time comprises: 当所述当前时间大于所述下一个传输可用时间时,基于所述当前时间和所述下一个传输可用时间获取所述新下一个传输可用时间,所述新下一个传输可用时间为所述当前时间;When the current time is greater than the next available time for transmission, acquiring the new next available time for transmission based on the current time and the next available time for transmission, the new next available time for transmission being the current time; 当所述当前时间不大于所述下一个传输可用时间时,基于所述当前时间和所述下一个传输可用时间获取所述新下一个传输可用时间,所述新下一个传输可用时间为所述下一个传输可用时间。When the current time is not greater than the next transmission available time, the new next transmission available time is acquired based on the current time and the next transmission available time, and the new next transmission available time is the next transmission available time. 5.根据权利要求2所述的流量控制方法,其特征在于,基于所述流量控制器端口索引,对流量控制器选择表进行查找处理,以获取所述流量控制器索引的实现方法包括:5. The flow control method according to claim 2, characterized in that, based on the flow controller port index, searching the flow controller selection table to obtain the flow controller index comprises: 在第一周期内的所述出向流量下,基于所述流量控制器端口索引对流量控制器选择表进行查找处理,以获取所述流量控制器索引;Under the outgoing traffic in the first cycle, searching the flow controller selection table based on the flow controller port index to obtain the flow controller index; 在第二周期内的所述入向流量下,基于所述流量控制器端口索引对流量控制器选择表进行查找处理,以获取所述流量控制器索引;Under the inbound traffic in the second cycle, searching the flow controller selection table based on the flow controller port index to obtain the flow controller index; 所述第一周期的时钟为偶数时钟,所述第二周期的时钟为奇数时钟。The clock of the first cycle is an even-numbered clock, and the clock of the second cycle is an odd-numbered clock. 6.根据权利要求2所述的流量控制方法,其特征在于,基于所述流量控制器索引,对流量控制器配置表内存和下一个传输可用时间内存进行查找处理,以获取所述流量控制器速率配置状态和下一个传输可用时间的实现方法包括以下步骤:6. The flow control method according to claim 2, characterized in that, based on the flow controller index, the flow controller configuration table memory and the next transmission available time memory are searched and processed to obtain the flow controller rate configuration state and the next transmission available time. The implementation method comprises the following steps: 在第三周期内:During the third cycle: 第一步,在所述出向流量下,基于所述流量控制器索引对所述流量控制器配置表内存进行查找处理,以获取所述流量控制器速率配置状态;The first step is to search the flow controller configuration table memory based on the flow controller index under the outgoing flow to obtain the flow controller rate configuration state; 第二步,在所述出向流量下,基于所述流量控制器索引对所述下一个传输可用时间内存进行查找处理,以获取所述下一个传输可用时间;The second step is to search the next available transmission time memory based on the traffic controller index under the outgoing traffic to obtain the next available transmission time; 第三步,在所述出向流量下,读取所述流量控制器状态;The third step is to read the flow controller state under the outgoing flow; 第四步,在所述出向流量下,读取所述流量控制器服务质量Qos表;The fourth step is to read the service quality Qos table of the flow controller under the outgoing flow; 在第四周期内:In the fourth cycle: 第一步,在所述入向流量下,基于所述流量控制器索引对所述流量控制器配置表内存进行查找处理,以获取所述流量控制器速率配置状态;The first step is to search the flow controller configuration table memory based on the flow controller index under the inbound flow to obtain the flow controller rate configuration state; 第二步,在所述入向流量下,基于所述流量控制器索引对所述下一个传输可用时间内存进行查找处理,以获取所述下一个传输可用时间;The second step is to search the next available transmission time memory based on the traffic controller index under the inbound traffic to obtain the next available transmission time; 第三步,在所述入向流量下,读取所述流量控制器状态;The third step is to read the flow controller state under the inbound flow; 第四步,在所述入向流量下,读取所述流量控制器Qos表;Step 4: Read the QoS table of the flow controller under the inbound flow; 所述第三周期的时钟为偶数时钟,所述第四周期的时钟为奇数时钟。The clock of the third cycle is an even-numbered clock, and the clock of the fourth cycle is an odd-numbered clock. 7.根据权利要求6所述的流量控制方法,其特征在于,基于所述当前时间和所述下一个传输可用时间,获取新下一个传输可用时间,并且将所述新下一个传输可用时间回写至所述下一个传输可用时间内存的实现方法包括以下步骤:7. The flow control method according to claim 6, characterized in that the method of acquiring a new next transmission available time based on the current time and the next transmission available time, and writing the new next transmission available time back to the next transmission available time memory comprises the following steps: 在所述第四周期内:During said fourth cycle: 第五步,在所述出向流量下,基于所述当前时间和所述下一个传输可用时间,获取新下一个传输可用时间,并且将所述新下一个传输可用时间回写至所述下一个传输可用时间内存;Step 5: Under the outgoing traffic, based on the current time and the next transmission available time, obtain a new next transmission available time, and write the new next transmission available time back to the next transmission available time memory; 第六步,在所述出向流量下,更新所述流量控制器状态;Step 6, updating the flow controller state under the outgoing flow; 在第五周期内:In the fifth cycle: 第一步,在所述入向流量下,基于所述当前时间和所述下一个传输可用时间,获取新下一个传输可用时间,并且将所述新下一个传输可用时间回写至所述下一个传输可用时间内存;The first step is to obtain a new next transmission available time based on the current time and the next transmission available time under the inbound traffic, and write the new next transmission available time back to the next transmission available time memory; 第二步,在所述入向流量下,更新所述流量控制器状态;The second step is to update the flow controller state under the inbound flow; 所述第五周期的时钟为偶数时钟。The clock of the fifth cycle is an even-numbered clock. 8.一种流量控制装置,其特征在于,包括:8. A flow control device, comprising: 索引获取模块,用于获取报文关联的流量控制器索引,所述报文的流量为入向流量或出向流量,所述入向流量和所述出向流量共享所述流量控制器;An index acquisition module, used to acquire a flow controller index associated with a message, wherein the flow of the message is inbound flow or outbound flow, and the inbound flow and the outbound flow share the flow controller; 查找处理模块,用于基于所述流量控制器索引,对流量控制器配置表内存和下一个传输可用时间内存进行查找处理,以获取所述流量控制器速率配置状态和下一个传输可用时间;A search processing module, used for searching the flow controller configuration table memory and the next transmission available time memory based on the flow controller index to obtain the flow controller rate configuration state and the next transmission available time; 流量处理模块,用于基于所述流量控制器速率配置状态和所述下一个传输可用时间,通过所述流量控制器对所述报文的流量进行流量控制;A traffic processing module, configured to perform traffic control on the traffic of the message through the traffic controller based on the rate configuration state of the traffic controller and the next available time for transmission; 内存回写模块,用于基于所述当前时间和所述下一个传输可用时间,获取新下一个传输可用时间,并且将所述新下一个传输可用时间回写至所述下一个传输可用时间内存。A memory write-back module is used to obtain a new next transmission available time based on the current time and the next transmission available time, and write the new next transmission available time back to the next transmission available time memory. 9.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现权利要求1-7任一项所述流量控制方法。9. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the flow control method according to any one of claims 1 to 7. 10.一种电子设备,其特征在于,包括:10. An electronic device, comprising: 存储器;Memory; 处理器,与所述存储器耦合,并且被配置为执行根据权利要求1-7所述的流量控制方法。A processor is coupled to the memory and configured to execute the flow control method according to claims 1-7.
CN202411808665.5A 2024-12-10 2024-12-10 Flow control method, device, medium and electronic equipment Pending CN119652831A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411808665.5A CN119652831A (en) 2024-12-10 2024-12-10 Flow control method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411808665.5A CN119652831A (en) 2024-12-10 2024-12-10 Flow control method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN119652831A true CN119652831A (en) 2025-03-18

Family

ID=94946998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411808665.5A Pending CN119652831A (en) 2024-12-10 2024-12-10 Flow control method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN119652831A (en)

Similar Documents

Publication Publication Date Title
US8732360B2 (en) System and method for accessing memory
CN113535633B (en) On-chip caching device and read-write method
US7599287B2 (en) Tokens in token buckets maintained among primary and secondary storages
US7000061B2 (en) Caching queue status updates
CN103081434B (en) smart storage
US20100083259A1 (en) Directing data units to a core supporting tasks
CN113498106A (en) Scheduling method and device for time-sensitive network TSN (transport stream network) stream
CN101309216A (en) A method and device for classifying IP packets
US10055153B2 (en) Implementing hierarchical distributed-linked lists for network devices
CN113328948B (en) Resource management method, device, network equipment and computer readable storage medium
US11552907B2 (en) Efficient packet queueing for computer networks
CN106209681A (en) A kind of queue management method and device
US11914540B2 (en) On-chip integrated circuit, data processing device, and data processing method
CN119652831A (en) Flow control method, device, medium and electronic equipment
US10817177B1 (en) Multi-stage counters
CN118573629A (en) Signal transmission method, routing node, storage medium and electronic device
US9282051B2 (en) Credit-based resource allocator circuit
US20230129107A1 (en) Method and apparatus to aggregate objects to be stored in a memory to optimize the memory bandwidth
US9767014B2 (en) System and method for implementing distributed-linked lists for network devices
CN116795742A (en) Storage device, information storage method and system
CN114401235A (en) Method, system, medium, equipment and application for processing heavy load in queue management
Wang et al. Block-based packet buffer with deterministic packet departures
US9268600B2 (en) Picoengine pool transactional memory architecture
CN104124962A (en) Multi-level replication counter storage device and method for managing multicast packet processing
CN118467182B (en) Memory access method, computer program product, electronic device, and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination