Flow control method and device, medium and electronic equipment

By sharing inbound and outbound traffic flows and searching and processing in related memory, the problem of low traffic control efficiency in high-speed networks is solved, and more efficient hardware resource utilization and fast traffic control are achieved.

CN119652831AActive Publication Date: 2025-03-18NANJING JINZHEN MICROELECTRONICS TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411808665.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-03-18
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

The existing flow control methods have the problem of low traffic control efficiency in high-speed networks.

Method used

By obtaining the flow controller index associated with the message, the flow controller sharing the inbound and outbound traffic, and searching the flow controller configuration table memory and the next transmission available time memory in the flow controller configuration table, to obtain the flow controller rate configuration status and the next transmission available time, and then perform flow control and update the new next transmission available time.

Benefits of technology

It improves hardware resource utilization, quickly completes flow control requirements, and improves flow control efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652831A_ABST
    Figure CN119652831A_ABST
Patent Text Reader

Abstract

The invention provides a flow control method and device, a medium and electronic equipment. The flow control method comprises the following steps: acquiring a flow controller index associated with a message; based on the flow controller index, searching a flow controller configuration table memory and a next transmission available time memory to obtain a flow controller rate configuration state and a next transmission available time; performing flow control on the flow through the flow controller based on the flow controller rate configuration state and the next transmission available time; and based on the current time and the next transmission available time, obtaining new next transmission available time, and writing back the new next transmission available time to the next transmission available time memory. According to the flow control method, the utilization rate of hardware resources can be improved, and the requirement for flow control can be quickly met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of flow control, and relates to a flow control method, and in particular to a flow control method, device, medium and electronic equipment. Background Art

[0002] Currently, in common switch designs, ASICs (application-specific integrated circuits) designed specifically for network applications are generally used for processing, forwarding, and analyzing switch traffic, while the switch's CPU (central processing unit) is mainly responsible for overall switch management, such as hardware operating status. In order to control the functions of the ASIC, the switch's CPU also needs to process some messages sent by the ASIC, such as LLDP (Link Layer Discovery Protocol), STP (Spanning Tree Protocol), ARP (Address Resolution Protocol) control-related messages, or routing protocol-related messages. In high-speed networks, the demand for large-scale flow control is becoming increasingly strong, and current flow control methods have the problem of low flow control efficiency. Summary of the invention

[0003] The purpose of the present disclosure is to provide a flow control method, device, medium and electronic equipment to solve the problem of low flow control efficiency in current flow control methods.

[0004] In a first aspect, an embodiment of the present disclosure provides a flow control method, comprising: obtaining a flow controller index associated with a message, the flow of the message being inbound flow or outbound flow, and the inbound flow and the outbound flow sharing the flow controller; based on the flow controller index, searching 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; based on the flow controller rate configuration state and the next transmission available time, performing flow control on the flow of the message through the flow controller; based on the current time and the next transmission available time, obtaining a new next transmission available time, and writing the new next transmission available time back to the next transmission available time memory.

[0005] In the flow control method, by making the incoming flow and the outgoing flow share the flow controller, and on this basis, searching and processing the flow controller configuration table memory and the next transmission available time memory, and writing back the new next transmission available time, the hardware resource utilization can be improved and the flow control requirements can be quickly met.

[0006] In one embodiment of the present disclosure, a method for obtaining a flow controller index associated with a message includes: obtaining a flow controller port index associated with the message; and searching a flow controller selection table based on the flow controller port index to obtain the flow controller index.

[0007] In one embodiment of the present disclosure, 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 status and the next transmission available time. The implementation method includes: 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, searching the flow controller configuration table memory and the next transmission available time memory to obtain the flow controller rate configuration status and the next transmission available time.

[0008] In one embodiment of the present disclosure, a method for obtaining a new next transmission available time based on the current time and the next transmission available time includes: when the current time is greater than the next transmission available time, obtaining the new next transmission available time based on the current time and the next transmission available time, and the new next transmission available time is the current time; when the current time is not greater than the next transmission available time, obtaining the new next transmission available time based on the current time and the next transmission available time, and the new next transmission available time is the next transmission available time.

[0009] In one embodiment of the present disclosure, based on the flow controller port index, a flow controller selection table is searched and processed to obtain the flow controller index. The implementation method includes: under the outbound traffic in the first cycle, the flow controller selection table is searched and processed based on the flow controller port index to obtain the flow controller index; under the inbound traffic in the second cycle, the flow controller selection table is searched and processed based on the flow controller port index to obtain the flow controller index; the clock of the first cycle is an even clock, and the clock of the second cycle is an odd clock.

[0010] In one embodiment of the present disclosure, based on the flow controller index, the flow controller configuration table memory and the next transmission available time memory are searched to obtain the flow controller rate configuration state and the next transmission available time. The implementation method includes the following steps: in the third cycle: the first step is to search the flow controller configuration table memory under the outgoing traffic based on the flow controller index to obtain the flow controller rate configuration state; the second step is to search the next transmission available time memory under the outgoing traffic based on the flow controller index to obtain the next transmission available time; the third step is to read the flow controller status under the outgoing traffic. state; the fourth step, under the outgoing traffic, read the service quality Qos table of the flow controller; in the fourth cycle: the first step, under the incoming traffic, based on the flow controller index, search the flow controller configuration table memory to obtain the flow controller rate configuration state; the second step, under the incoming traffic, based on the flow controller index, search the next transmission available time memory to obtain the next transmission available time; the third step, under the incoming traffic, read the flow controller state; the fourth step, under the incoming traffic, read the flow controller Qos table; the clock of the third cycle is an even clock, and the clock of the fourth cycle is an odd clock.

[0011] In one embodiment of the present disclosure, a method for implementing the method of 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 includes the following steps: within the fourth cycle: the fifth step, under the outgoing traffic, obtaining the 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 sixth step, under the outgoing traffic, updating the flow controller state; within the fifth cycle: the first step, under the incoming traffic, obtaining the 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 second step, under the incoming traffic, updating the flow controller state; the clock of the fifth cycle is an even clock.

[0012] In a second aspect, an embodiment of the present disclosure provides a flow control device, comprising: an index acquisition module, used to obtain a flow controller index associated with a message, the flow of the message being inbound flow or outbound flow, and the inbound flow and the outbound flow share the flow controller; a search processing module, used to perform search processing on a flow controller configuration table memory and a next transmission available time memory based on the flow controller index to obtain a rate configuration state of the flow controller and a next transmission available time; a flow processing module, used to perform flow control on the flow of the message through the flow controller based on the rate configuration state of the flow controller and the next transmission available time; a memory write-back module, used to obtain a new next transmission available time based on a current time and the next transmission available time, and write the new next transmission available time back to the next transmission available time memory.

[0013] In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the flow control method described in any one of the first aspects.

[0014] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, comprising: a memory; and a processor, coupled to the memory and configured to execute the flow control method according to any one of the first aspects.

[0015] As described above, the flow control method, device, medium and electronic device described in the present application have the following beneficial effects:

[0016] In the flow control method, by making the incoming flow and the outgoing flow share the flow controller, and on this basis, searching and processing the flow controller configuration table memory and the next transmission available time memory, and writing back the new next transmission available time, the hardware resource utilization can be improved and the flow control requirements can be quickly met. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 Shown is a schematic diagram of the hardware structure of the aggregated traffic controller according to an embodiment of the present disclosure.

[0018] Figure 2 Shown is a flow chart of a flow control method according to an embodiment of the present disclosure.

[0019] Figure 3 A schematic diagram showing the rate configuration state of a flow controller in a flow controller configuration table memory according to an embodiment of the present disclosure is shown.

[0020] Figure 4 Shown is a structural schematic diagram of the flow control method according to an embodiment of the present disclosure.

[0021] Figure 5 Shown is a flowchart of a method for obtaining a traffic controller index associated with a message according to an embodiment of the present disclosure.

[0022] Figure 6 The flowchart of the implementation method of the embodiment of the present disclosure is to search and process 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.

[0023] Figure 7 Shown is a structural diagram of the number of flow control memory units in an embodiment of the present disclosure.

[0024] Figure 8 A schematic diagram showing the mapping of the next available transmission time to the flow controller configuration table entries according to an embodiment of the present disclosure.

[0025] Fig. 9 Shown is a flowchart of a method for obtaining a new next transmission available time based on the current time and the next transmission available time of the primitives in an embodiment of the present disclosure.

[0026] Fig.10 Shown is a flowchart of an implementation method of the present disclosure for performing a search process on a flow controller selection table to obtain the flow controller index.

[0027] Fig.11 Shown is a schematic diagram of the operation of each clock cycle of the pipeline according to an embodiment of the present disclosure.

[0028] Fig.12 Shown is a schematic diagram of the structure of the flow control device according to an embodiment of the present disclosure.

[0029] Component number description

[0030] 120 Flow control device

[0031] 1210 Index Acquisition Module

[0032] 1220 Search processing module

[0033] 1230 Traffic Processing Module

[0034] 1240 Memory write-back module

[0035] Steps S11-S14

[0036] Steps S21-S22

[0037] S31-S32 Steps

[0038] Steps S41-S42

[0039] Steps S51-S52 DETAILED DESCRIPTION

[0040] The following is an explanation of the embodiments of the present disclosure by specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0041] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present disclosure in a schematic manner, and thus the illustrations only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0042] The principles and implementation methods of the flow control method and flow control device of the embodiments of the present disclosure will be explained in detail below, so that those skilled in the art can understand the flow control method and flow control device of the embodiments of the present disclosure without creative work.

[0043] See also Figure 1 , Figure 1Shown is a schematic diagram of the hardware structure of the aggregation flow controller of this embodiment. Wherein, policerPortIndex represents the traffic controller port index, localPortNumber represents the local port number, PolicyerSelectionTable represents the traffic controller selection table, polIndex represents the traffic controller index, PolicyerRate Config mem represents the traffic controller rate configuration memory, POL 0 represents traffic controller 0, POL 1 represents traffic controller 1, wrPollIdx1 represents the index written to traffic controller 1, newNextTat1 represents the new next available transmission time corresponding to traffic controller 1, wrIdx represents the write index, rdIdx represents the read index, wrData represents the write data, wrPollIdx0 represents the index written to traffic controller 0, newNextTat0 represents the new available transmission time corresponding to traffic controller 0, Egress lookup bus shift register represents the outbound query bus shift register, Ingresslookup bus shift register represents the inbound query bus shift register, Lookup Bus represents the query bus, Egress policing represents the outbound traffic control, Ingress policing represents the inbound traffic control, Egresspolicing results represents the outbound traffic control results, Ingress policing Results represents the inbound flow control result, Even NextTat banks can represent the next transmission available time memory unit corresponding to the even flow controller index, and Odd NextTat banks can represent the next transmission available time memory unit corresponding to the odd flow controller index.

[0044] See also Figure 2 , this embodiment provides a flow control method, including:

[0045] S11, 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.

[0046] Optionally, there may be two flow controllers, and the flow controller index refers to the index pointing to the flow controller. For example, if the index is 1, it may indicate pointing to the first flow controller, and if the index is 2, it may indicate pointing to the second flow controller.

[0047] Optionally, the message may be an Ethernet message.

[0048] S12, based on the flow controller index, searching 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.

[0049] Optionally, the flow controller configuration table memory and the next transmission available time memory can be in 4 flow control memory units, each unit supports 512 addresses, and the 4 flow control memory units support a total of 2K (2×1024) aggregated flow control flow tables (implemented by hardware memory). The inbound and outbound flow controllers can access the same flow control memory unit, but must be accessed separately with odd and even clocks (odd clocks are the access time of the inbound flow controller, and even clocks are the access time of the outbound flow controller).

[0050] Optionally, the flow controller configuration table memory may refer to a memory storing a flow controller configuration table, and the next transmission available time memory may refer to a memory storing a next transmission available time. The next transmission available time may refer to a time point when the message data packet can be sent next time.

[0051] Optionally, the flow controller configuration table memory can be used to store the flow rate parameters of the flow controller, and the flow controller rate configuration state can refer to the flow rate parameters configured by the flow controller. The flow controller configuration table (PolicerConfigTable) is a storage table that can be read by Ethernet messages. The incoming messages and outgoing messages read the accessed flow rate parameters in odd and even clock cycles respectively. Figure 3 As shown, the flow controller configuration table memory may contain the rate configuration status of two flow controllers (Policers). The flow controller index (PolicerIndex), the high 10 bits of its pointer are used as the address of the PolicyConfigTable memory. If the PolicyIndex is i+1, the corresponding message will search for policer i+1, and policer i+1 can represent the policer corresponding to the PolicyIndex with index i+1.

[0052] S13, based on the rate configuration state of the flow controller and the next available time for transmission, control the flow through the flow controller.

[0053] Optionally, based on the rate configuration state of the flow controller and the next available time for transmission, the flow control is performed on the flow by the flow controller, which may refer to the process of limiting the flow of the flow based on the rate configuration state of the flow controller and the next available time for transmission. The process of controlling the flow according to the combination of the rate configuration state of the flow controller and the next available time for transmission may be implemented according to the token bucket algorithm, which will not be elaborated in this embodiment.

[0054] S14, 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.

[0055] Optionally, the Next Transmission Available Time (nextTat) memory can be divided into two groups, one for the flow controller for outbound traffic and one for the flow controller for inbound traffic, each group has a refresh address pointer containing the memory address of the next entry to be refreshed in the group. Each flow controller pipeline refreshes the entry group it uses. The refresh address logic uses the 4-bit nextTatbankConfig (next transmission available time memory cell configuration) register to determine the next address after reaching the end of the 512 memory bank. If they are not divided into two groups, collisions will occur because each nextTat memory bank can be used for either the ingress flow controller or the egress flow controller.

[0056] Optionally, the next transmission available time (nextTat) memory can be divided into two groups, namely, the next transmission available time memory unit corresponding to the odd flow controller index and the next transmission available time memory unit corresponding to the even flow controller index. The clock corresponding to the outgoing traffic is an even clock, and the clock corresponding to the incoming traffic is an odd clock. An even flow controller index can be generated according to the even clock, and an odd flow controller index can be generated according to the odd clock. This embodiment will not be repeated here.

[0057] In one embodiment of the present disclosure, please refer to Figure 4 The flow controller rate configuration state can be Figure 4The rateburstSize (the maximum amount of data allowed to be transmitted within a given time window) in which Single RatePolicer represents a single rate flow controller, outProfile can represent an output profile, tat can represent the next available time for transmission, which can include data transmission rules generated according to tat and rateburstSize to determine how to send message data packets, Policing Result action represents flow control result action, aggPolMode represents aggregation control mode, packetColor represents packet color, NextTatEvenBanks represents the next available time for transmission even memory unit, that is, the next available time for transmission memory unit corresponding to when PolicyerIndex is an even number, NextTatOddBanks represents the next available time for transmission odd memory unit, that is, the next available time for transmission memory unit corresponding to when PolicyerIndex is an odd number, and updateNextTat0 / 1 can represent updating the next available time for transmission of the first flow controller or the second flow controller.

[0058] In one embodiment of the present disclosure, writing to the nextTatbankConfig register triggers a refresh index to be reloaded to the index offset 0 of the storage unit that is assigned the minimum index for the flow controller, and each refresh index is incremented by one independently until it reaches the highest index in the library. For example, when writing to the nextTatbankConfig register triggers a refresh index operation, the index refresh starts from the minimum index, and when the minimum index is 0, each refresh index increments from 0 until the highest index is reached.

[0059] In the flow control method, by making the incoming flow and the outgoing flow share the flow controller, namely the aggregated flow controller, and based on the hardware acceleration architecture of the aggregated flow controller, the flow controller configuration table memory and the next transmission available time memory are searched and processed, and the new next transmission available time is written back, the hardware resource utilization rate can be improved and the flow control (monitoring) requirements can be quickly met.

[0060] See also Figure 5 This embodiment provides a method for obtaining a traffic controller index associated with a message, including:

[0061] S21, obtaining a traffic controller port index associated with the message.

[0062] Optionally, the traffic controller port index (PolicerPortIndex) is generated by the message in the Qos (Quality of Service) classifier (the Ethernet message passes through the Qos classifier and obtains a PolicyerPortIndex). Specifically, when the Ethernet message passes through the Qos classifier, the classifier will analyze the message and assign a traffic controller port index to the message based on the analysis result. The classifier's analysis process of the message can be designed according to actual conditions, and this embodiment will not go into details.

[0063] S22: Based on the flow controller port index, a flow controller selection table is searched to obtain the flow controller index.

[0064] Optionally, the flow controller selection table may have a plurality of entries, each entry corresponding to a flow controller port index and a flow controller index, thereby implementing the search process of the flow controller selection table in step S22.

[0065] See also Figure 6 This embodiment provides a method for searching a flow controller configuration table memory and a next available transmission time memory based on the flow controller index to obtain a rate configuration state of the flow controller and a next available transmission time, including:

[0066] S31, based on the flow controller index, obtaining the number of flow control memory units.

[0067] Optionally, the number of flow control memory units can be expressed as:

[0068] bankNum=2*(policerIndex / (2*PolicerBankEntries))+policerIndex[0]

[0069] Wherein, bankNum represents the number of flow control memory units, which can refer to the flow control memory unit to which the flow controller index belongs. For example, if the number of flow controller memory units is 1, it means the flow control memory unit 1 to which it belongs. policerIndex represents the flow controller index. PolicyBankEntries represents the number of entries in the flow control memory unit. policerIndex[0] represents the starting value of the flow controller index. policerIndex / (2*PolicerBankEntries) represents the integer of the ratio of policerIndex to 2 times PolicyBankEntries. For example, see Figure 7and Figure 8 , the number of entries of the flow controller memory unit is 512, the total number of units of the flow control memory is 4, when the flow controller index is an even number, the starting value of the flow controller index is 0, and when the flow controller index is an odd number, the starting value of the flow controller index is 1. When the flow controller index is 508, bankNum is 0, when the flow controller index is 1030, bankNum is 2, when the flow controller index is 507, bankNum is 1, and when the flow controller index is 1227, bankNum is 3.

[0070] S32, based on the number of flow control memory units and the flow controller index, search 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.

[0071] See also Fig. 9 This embodiment provides a method for obtaining a new next transmission available time based on the current time and the next transmission available time, including:

[0072] 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, the new next transmission available time being the current time.

[0073] S42: When the current time is not greater than the next transmission available time, obtain the new next transmission available time based on the current time and the next transmission available time, and the new next transmission available time is the next transmission available time.

[0074] In one embodiment of the present disclosure, the nextTat memory entry needs to be pulled to currentTime before currentTime (current time) changes too much. For example, when (current time)>=2*(number of bits (nextTat)-1), that is, the number of bits corresponding to the current time that has been transmitted twice as much as nextTat minus 1, it is pulled to currentTime. The number of bits refers to the traffic number. The number of bits (nextTat) can be bit / s*(nextTat). Since supervision only takes effect when nextTat is greater than currentTime, supervision does not take effect when this happens.

[0075] The new next transmission available time can be represented by the following code:

[0076] if(msb(currentTime-nextTime)!=1) / / If the next available time for transmission is less than the current time

[0077] newNextTat = currentTime / / Then the new next available transmission time is the current time

[0078] else / / otherwise

[0079] newNextTat = nextTat / / The new next available transmission time is the next available transmission time

[0080] Among them, msb (currentTime-nextTat) refers to the most significant bit of the subtraction value of currentTime and nextTat.

[0081] See also Fig.10 This embodiment provides a method for searching a flow controller selection table to obtain the flow controller index, including:

[0082] S51, for the outgoing traffic in the first cycle, searching a flow controller selection table based on the flow controller port index to obtain the flow controller index.

[0083] S52, for the inbound traffic in the second cycle, searching a flow controller selection table based on the flow controller port index to obtain the flow controller index.

[0084] The clock of the first cycle is an even-numbered clock, and the clock of the second cycle is an odd-numbered clock.

[0085] This embodiment provides a method for searching a flow controller configuration table memory and a next available transmission time memory based on the flow controller index to obtain a rate configuration state of the flow controller and a next available transmission time, comprising the following steps:

[0086] In the third cycle:

[0087] 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;

[0088] 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;

[0089] The third step is to read the flow controller state under the outgoing flow;

[0090] The fourth step is to read the QoS (Quality of Service) table of the flow controller under the outgoing flow;

[0091] In the fourth cycle:

[0092] 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;

[0093] 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;

[0094] The third step is to read the flow controller state under the inbound flow;

[0095] Step 4: Read the QoS table of the flow controller under the inbound flow;

[0096] The clock of the third cycle is an even-numbered clock, and the clock of the fourth cycle is an odd-numbered clock.

[0097] Optionally, the flow controller state may refer to internal information and parameters maintained by the flow controller during operation, which reflect the current operation status and configuration of the flow controller. The flow controller QoS table may be a table for recording different types of traffic and their corresponding service qualities, which can be used for priority scheduling, resource allocation, and policy execution.

[0098] This embodiment provides a method 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, including the following steps:

[0099] During said fourth cycle:

[0100] 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;

[0101] Step 6: updating the flow controller state under the outgoing flow;

[0102] In the fifth cycle:

[0103] 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;

[0104] The second step is to update the flow controller state under the inbound flow;

[0105] Optionally, the flow controller state can be flexibly set according to actual conditions, which will not be described in detail in this embodiment.

[0106] The clock of the fifth cycle is an even-numbered clock.

[0107] In one embodiment of the present disclosure, please refer to Fig.11 ,Since the policerConfigTable memory and nextTat memory output are shared by the inbound and outbound traffic controllers, the hardware solution has only one set of traffic controllers and a common pipeline shared by the inbound and outbound traffic controllers. This requires that all pipeline tasks are single-cycle, and ingress and egress message lookups enter the common pipeline at different stages to avoid different message lookup accesses to the policerConfigTable and nextTat memory in the same cycle. Fig.10The operations of each clock cycle of the message search pipeline are listed, T0 can represent the first cycle above, read Egress policerSelection Table can represent reading the flow controller selection table under the outbound traffic, T1 can represent the second cycle above, read Ingress policerSelection Table can represent reading the flow controller selection table under the inbound traffic, T2 can represent the third cycle, read Egress policerConfig table can represent reading the flow controller configuration table under the outbound traffic, read Egress policernextTat: partial pktTime and bTime calculation: can be expressed as reading the next available transmission time of the flow controller under the outbound traffic: partial data packet time and bucket time calculation, the bucket can refer to the token bucket, the next available transmission time can be calculated according to the token bucket algorithm, which will not be repeated in this embodiment, read Egress policerStats can represent reading the flow controller status under the outbound traffic, read Egress policer QosTable can represent reading the flow controller Qos table under the outbound traffic, T3 can represent the fourth cycle, read Ingress policerConfig table can represent reading the flow controller configuration table under the inbound traffic, read Ingress policernextTat: partial pktTime and bTime calculation: can be expressed as reading the next available transmission time of the traffic controller under ingress traffic: partial packet time and bucket time calculation, read Ingress policer Stats can represent reading the traffic controller status under ingress traffic, read Ingress policer QosTable can represent reading the traffic controller Qos table under ingress traffic, Egress policer: 1) compute outofProfile 2) computenew nextTat 3) nextTat writeback can be expressed as the traffic controller under ingress traffic: 1) calculate output profile 2) calculate the new next available transmission time 3) write back the next available transmission time, update Egress policerstats represents updating the traffic controller status under outgress traffic, T4 can represent the fifth cycle, update Ingresspolicer stats can represent updating the traffic controller status under ingress traffic.

[0108] In one embodiment of the present disclosure, from the perspective of improving the utilization of hardware resources, incoming traffic and outgoing traffic share an aggregate flow controller. Every two clock cycles are divided into odd and even clock cycles, and the incoming and outgoing traffic occupy odd cycles and even cycles respectively. When the CPU software needs to access hardware resources, it can only be accessed by the CPU software when there is no incoming and outgoing traffic accessing the aggregate flow controller. In addition, only when there is no incoming and outgoing message access, and no CPU software access, the nextTat memory (next transmission available time memory) will be automatically refreshed. The hardware resources of the aggregate flow controller are mainly PolicyerTatStatsTable (flow controller next transmission available time status table), PolicyerConfigTable (flow controller configuration table), QosTable (quality of service table) and other memories.

[0109] The protection scope of the flow control method described in the embodiment of the present disclosure is not limited to the execution order of the steps listed in the embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present disclosure are included in the protection scope of the present disclosure.

[0110] Fig.12 Schematic diagram showing the structure of the flow control device of the embodiment of the present disclosure. Fig.12 As shown, this embodiment provides a flow control device 120, including:

[0111] The index acquisition module 1210 is used to obtain the traffic controller index associated with the message, the traffic of the message is inbound traffic or outbound traffic, and the inbound traffic and the outbound traffic share the traffic controller.

[0112] The search processing module 1220 is used to search 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.

[0113] The traffic processing module 1230 is used to control the traffic of the message through the traffic controller based on the rate configuration state of the traffic controller and the next available transmission time.

[0114] The memory write-back module 1240 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.

[0115] In the flow control device 120 provided in this embodiment, the index acquisition module 1210 and Figure 2The flow control method shown in FIG. 1 corresponds to step S11, and the search processing module 1220 corresponds to step S12 of the flow control method shown in FIG. Figure 2 The flow control method shown in FIG. 1 corresponds to step S12 in one to one, and the flow processing module 1230 corresponds to step S13 in one to step S14 in one to step S15 in one to step S16 in one to step S17 in one to step S18 in one to step S19 in one to step S20 in one to step S21 Figure 2 The flow control method shown in step S13 corresponds to the memory write-back module 1240. Figure 2 Step S14 of the flow control method shown corresponds one to one.

[0116] In the several embodiments provided in the present disclosure, it should be understood that the disclosed device or method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules / units is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules or units, which can be electrical, mechanical or other forms.

[0117] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure. For example, the functional modules / units in the various embodiments of the present disclosure may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0118] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0119] This embodiment provides an electronic device, the electronic device comprising a memory; a processor, coupled to the memory and configured to execute Figure 2 The flow control method shown.

[0120] The present disclosure embodiment also provides a computer-readable storage medium. A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by instructing the processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.

[0121] The embodiments of the present disclosure may also provide a computer program product, which includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiments of the present disclosure is generated 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 site, computer or data center to another website site, computer or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0122] When the computer program product is executed by a computer, the computer executes the method described in the above method embodiment. The computer program product may be a software installation package, and when the above method is required, the computer program product may be downloaded and executed on a computer.

[0123] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0124] The above embodiments are merely illustrative of the principles and effects of the present disclosure, and are not intended to limit the present disclosure. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present disclosure. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present disclosure shall still be covered by the claims of the present disclosure.

Claims

1. A flow control method, characterized in that: include: 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 transmission available time memory to obtain the flow controller rate configuration state and the next transmission available 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. The flow control method according to claim 1, characterized in that: The implementation method of obtaining the traffic controller index associated with the message includes: 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. 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 to obtain the flow controller rate configuration state and the next transmission available time. The implementation method includes: 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. The flow control method according to claim 2, characterized in that: The method for obtaining a new next transmission available time based on the current time and the next transmission available time includes: 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. 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 includes: 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. 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 to obtain the flow controller rate configuration state and the next transmission available time. The implementation method includes the following steps: In 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; 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; 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. The flow control method according to claim 6, characterized in that: The method 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 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. A flow control device, characterized in that: include: 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; The 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. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the flow control method described in any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: include: Memory; A processor is coupled to the memory and configured to execute the flow control method according to claims 1-7.

Citation Information

Patent Citations

  • Flow control method and device based on token scheduling

    CN101729386A

  • Accelerated non-volatile memory device check and forensics

    CN116324726A

  • Ethernet chip adaptive resource management method, chip, device and medium

    CN116996600A

  • Network monitoring system based on multiple assembly line switches

    CN117579349A

  • Method and Apparatus for establishing open flow switch based transmission path in a distributed cloud environment

    KR102116245B1