WO2019232694A1 - Queue control method, device and storage medium - Google Patents

Queue control method, device and storage medium Download PDF

Info

Publication number
WO2019232694A1
WO2019232694A1 PCT/CN2018/089935 CN2018089935W WO2019232694A1 WO 2019232694 A1 WO2019232694 A1 WO 2019232694A1 CN 2018089935 W CN2018089935 W CN 2018089935W WO 2019232694 A1 WO2019232694 A1 WO 2019232694A1
Authority
WO
WIPO (PCT)
Prior art keywords
transmission
queue
stream
transmission queue
logical port
Prior art date
Application number
PCT/CN2018/089935
Other languages
French (fr)
Chinese (zh)
Inventor
林云
吕晖
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201880094199.5A priority Critical patent/CN112272933B/en
Priority to PCT/CN2018/089935 priority patent/WO2019232694A1/en
Publication of WO2019232694A1 publication Critical patent/WO2019232694A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3045Virtual queuing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/621Individual queue per connection or flow, e.g. per VC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order
    • H04L47/623Weighted service order
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3027Output queuing

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a queue control method, device, and storage medium.
  • a switching network (SF) system consists of an upstream switching network interface chip (iFIC), a downstream switching network interface chip (eFIC), and multiple intermediate-level switching units (eFIC). switch element (SE).
  • the SF system is used to exchange the data stream received by the iFIC to the eFIC.
  • multiple virtual output queues (VOQ) can be set up in the iFIC to buffer data flows to different destination eFICs or multiple egress ports included in each eFIC to prevent The problem that the data flow to different ports is blocked.
  • N is a positive integer.
  • At least N VOQs can be set in the iFIC to correspond to N eFICs. If each eFIC output port is further subdivided into more granularity (for example, priority ( class, service, Cos), at this time, iFIC may need to set more VOQs to transmit the received data stream to the SE according to the destination output port or destination port priority, and then to the destination output port.
  • priority class, service, Cos
  • each eFIC has 48 ports, and each port is subdivided into 8 priorities.
  • the number of VOQs that need to be set in iFIC is: 768K, which is obtained according to 2K times 48 times 8; such a large number of VOQs need to be costly to achieve.
  • VOQs in order to reduce the complexity of the SF system and reduce the resources consumed by VOQ, only a part of VOQs can be set.
  • the number of VOQs in this part is less than the maximum number of VOQs required in the SF system.
  • the number of eFIC's output ports and the number of theoretical VOQs required by the SF system determined by the number of port priorities. For example, when the maximum number of theoretical VOQs required by the SF system is N1, only N1 / 2 VOQs can be set, and the number of data streams transmitted simultaneously in the SF system cannot exceed N1 / 2, where N1 is a positive integer.
  • Embodiments of the present application provide a queue control method, device, and storage medium to solve the problem of data flow loss caused by exhaustion of a set queue resource in the prior art.
  • a first aspect of the present application provides a queue control method.
  • the method is applied to a switching system.
  • the switching system is provided with at least two logical ports, at least two transmission queues, and a mapping table.
  • the mapping table stores at least A mapping relationship between a transmission queue and at least one logical port, each logical port corresponds to a transmission stream, and the number of the transmission queues is less than the number of the logical ports.
  • the method includes:
  • the first transmission stream originally transmitted through the first transmission queue and the second transmission stream originally transmitted through the second transmission queue are all passed through The first transmission queue transmission, the first threshold value is less than the number of transmission queues set in the switching system;
  • the first transmission queue has a mapping relationship with the first logical port and the second logical port.
  • transmitting at least two transmission streams through one transmission queue can Ensuring that there are enough transmission queues in the switching system for the use of the received transmission stream, avoiding the problem of data stream loss or backpressure on the upstream system caused by exhaustion of the set transmission queue resources in the prior art, and high flexibility.
  • the method further includes:
  • mapping relationship between the third transmission queue and the third transmission port is stored in the mapping table.
  • the switching system when the switching system receives a new transmission stream, it can ensure that an idle state queue is available in the transmission stream, which avoids the loss of the transmission stream due to the exhaustion of the resources of the transmission queue or the reaction to the upstream system.
  • Pressure high flexibility, which ensures that the transport stream received by the uplink interface of the switching system can be smoothly switched to the downlink interface output.
  • the first logical port and the second logical port are located on a same port module.
  • the complexity of the switching system can be simplified, and it is convenient to disassemble the originally merged queue when the number of subsequent idle state queues in the switching system is large. separate.
  • the number of transmission streams in the first transmission queue and the second transmission queue are both less than a preset value.
  • the transmission streams transmitted in the first transmission queue and the transmission streams transmitted in the second transmission queue can be classified into one transmission queue for transmission.
  • the complexity of the switching system is simplified, and the flexibility of the switching system is high.
  • the method further includes:
  • the first transmission stream and the second transmission stream to be transmitted through the first transmission queue are transmitted through the first transmission queue and the In the fourth transmission queue transmission
  • the second threshold value is greater than the first threshold value and less than the number of transmission queues set in the switching system
  • the fourth transmission queue is a transmission in an idle state in the switching system. Any one in the queue.
  • the transmission streams that were originally merged and transmitted are redistributed to multiple transmission queues for transmission, thereby decompressing the transmission queues and improving the performance of the switching system.
  • the first transmission stream and the second transmission stream to be transmitted through the first transmission queue are transmitted through the first transmission queue and the fourth transmission queue.
  • the method further includes:
  • a mapping relationship between the first transmission queue and the first logical port, and a mapping relationship between the fourth transmission queue and the second logical port are stored.
  • the first transmission stream and the second transmission stream to be transmitted through the first transmission queue are transmitted through the first transmission queue and the fourth transmission queue.
  • Transmission including:
  • the method further includes:
  • mapping relationship between the first transmission queue and the second logical port, and the mapping relationship between the fourth transmission queue and the first logical port are saved.
  • a new transmission queue is allocated for it, that is, only in the first transmission queue.
  • a new allocation is allowed to be scheduled after the transport packets of a certain transport stream in the queue are emptied, which can ensure that the corresponding logical port receives the complete transport stream.
  • the switching system is any one of the following: a switching network system and a traffic management system.
  • the second aspect of the present application provides a queue control device.
  • the device is integrated in a switching system.
  • the switching system is provided with at least two logical ports, at least two transmission queues, and a mapping table.
  • the mapping table stores at least There is a mapping relationship between a transmission queue and at least one logical port, and each logical port corresponds to one transmission stream.
  • the number of the transmission queues is less than the number of the logical ports.
  • the device includes: an interface device, a queue manager, and a processor. ;
  • the interface device is configured to receive a first transport stream corresponding to a first logical port and a second transport stream corresponding to a second logical port;
  • the queue manager is configured to: when the number of idle state queues in the switching system is less than a first threshold, the first transmission stream that was originally transmitted through the first transmission queue and all the addresses that were originally transmitted through the second transmission queue.
  • the second transmission streams are all transmitted through the first transmission queue, and the first threshold is less than the number of transmission queues set in the switching system;
  • the processor is configured to update the mapping table, and in the updated mapping table, the first transmission queue has a mapping relationship with the first logical port and the second logical port.
  • the interface device is further configured to receive a third transmission stream corresponding to a third logical port, and the third logical port and the at least two transmission queues No mapping relationship exists in any of them;
  • the queue manager is further configured to use a third transmission queue to transmit the third transmission stream, where the third transmission queue is any one of the transmission queues in an idle state in the switching system;
  • the processor is further configured to save a mapping relationship between the third transmission queue and the third transmission port in the mapping table.
  • the first logical port and the second logical port are located on a same port module.
  • the number of transmission streams in the first transmission queue and the second transmission queue are both less than a preset value.
  • the queue manager is further configured to: when the number of idle state queues in the switching system is greater than a second threshold, the queue manager will pass the first transmission The first transmission stream and the second transmission stream transmitted in a queue are transmitted through the first transmission queue and the fourth transmission queue, and the second threshold value is larger than the first threshold value and smaller than the exchange.
  • the number of transmission queues set in the system, and the fourth transmission queue is any one of the transmission queues in an idle state in the switching system.
  • the queue manager is configured to transfer the first transmission stream and the second transmission stream transmitted through the first transmission queue through the first transmission queue and the second transmission stream.
  • the fourth transmission queue transmission is described as follows:
  • the queue manager is configured to transmit the first transmission stream through the first transmission queue when the transmission packet of the second transmission stream does not exist in the first transmission queue, and pass the fourth transmission queue.
  • the transmission queue transmits the second transmission stream;
  • the processor is further configured to save a mapping relationship between the first transmission queue and the first logical port, and a mapping relationship between the fourth transmission queue and the second logical port.
  • the queue manager is configured to send the first transmission stream and the second transmission stream transmitted through the first transmission queue through the first transmission queue and
  • the fourth transmission queue transmission is specifically:
  • the queue manager is configured to transmit the second transmission stream through the first transmission queue when the transmission packet of the first transmission stream does not exist in the first transmission queue, and pass the fourth transmission queue.
  • the transmission queue transmits the first transmission stream
  • the processor is further configured to save a mapping relationship between the first transmission queue and the second logical port, and a mapping relationship between the fourth transmission queue and the first logical port.
  • the switching system is any one of the following: a switching network system and a traffic management system.
  • a third aspect of the embodiments of the present application provides a queue control apparatus.
  • the queue control apparatus includes a receiving module and a processing module, and the receiving module and the processing module are configured to execute the method provided in the first aspect of the present application.
  • a fourth aspect of the embodiments of the present application provides a queue control apparatus including at least one processing element (or chip) for executing the embodiments of the first aspect above.
  • a fifth aspect of the embodiments of the present application provides a storage medium.
  • the storage medium stores instructions that, when run on a computer, cause the computer to execute the method provided by the first aspect.
  • a sixth aspect of the embodiments of the present application provides a computer program product containing instructions, which when executed on a computer, causes the computer to execute the method provided by the first aspect.
  • the original traffic will be passed through the first
  • the first transmission stream transmitted by the transmission queue and the second transmission stream originally transmitted through the second transmission queue are transmitted through the first transmission queue.
  • the mapping table is updated.
  • the first transmission queue, the first logical port, and the first The two logical ports have a mapping relationship, which can ensure that there are enough transmission queues in the switching system for the received transmission stream, and avoids the loss of data flow or the occurrence of upstream systems due to the exhaustion of the set transmission queue resources in the prior art.
  • the back pressure problem is highly flexible.
  • FIG. 1 is a schematic structural diagram of a switching system according to an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of a switching network system according to an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of an iFIC in a switching network system according to an embodiment of the present application
  • FIG. 4 is a schematic flowchart of a first embodiment of a queue control method according to an embodiment of the present application
  • FIG. 5 is a schematic flowchart of a second embodiment of a queue control method according to an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a third embodiment of a queue control method according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a traffic management system applicable to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a first embodiment of a queue control apparatus according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a second embodiment of a queue control apparatus according to an embodiment of the present application.
  • FIG. 1 is a schematic structural diagram of a switching system according to an embodiment of the present application.
  • the switching system may include at least one uplink interface 11 and at least one downlink interface 12.
  • the number of uplink interfaces 11 and the number of downlink interfaces 12 may be the same or different.
  • FIG. 1 exemplarily shows n uplink interfaces 11 and n downlink interfaces 12.
  • the uplink interface 11 may receive a transmission stream from the outside of the switching system through an input port, and switch to the output port of the downlink interface 12 for output.
  • the switching system may further include a switching unit, and a plurality of switching units constitute a switching network according to a certain topology structure and a control method, thereby realizing non-blocking switching.
  • the embodiments of the present application do not limit the level and specific number of the switching units, which may be determined according to actual conditions.
  • the switching system in the embodiment of the present application may be a switching network (SF) system, a traffic management (TM) system, or a node switching system.
  • SF switching network
  • TM traffic management
  • a node switching system a switching network
  • the system architecture and business scenarios described in the embodiments of the present application are to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application.
  • Those of ordinary skill in the art may know that with the communication
  • the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
  • FIG. 2 is a schematic structural diagram of a switching network system according to an embodiment of the present application.
  • the SF system includes an uplink switching network interface chip (iFIC) and a downlink switching network interface chip (egress interface interface chip). eFIC) and multiple intermediate-level switching elements (SE).
  • FIG. 2 exemplarily shows that an NxN SF system includes N iFICs and N eFICs, and m SEs. Where N and m are both positive integers.
  • the uplink switching network interface chip iFIC in the embodiments of the present application can also be interpreted as an uplink switching network interface device or an uplink switching network interface device
  • the downlink switching network interface chip eFIC can also be interpreted as a downlink switching network interface device or a downlink
  • the switching network interface device is not limited in the embodiment of the present application.
  • the SF system switches the data stream received by the iFIC through the input port to the eFIC output port for output.
  • the length of the data stream can be maintained unchanged (that is, the data stream maintains the original variable-length packet format), or it can be cut into cells by iFIC ( Cell), after the eFIC has collected all the cells of each data stream, it is reassembled into a complete data stream. How to split and reorganize the data stream is common knowledge of those skilled in the art, and is not repeated here.
  • the SF system may include one or more levels of SEs, and the switching network system shown in FIG. 2 includes one level of SEs, and N iFICs and N eFICs.
  • the connection relationship between iFIC and SE, and eFIC and SE is not limited to the structure shown in FIG. 2.
  • the iFIC and the eFIC may be directly interconnected without a SE, for example, the iFIC and the eFIC are interconnected through a wireless mesh (Mesh).
  • the iFIC and eFIC shown in Figure 2 are distributed on both sides of the SE.
  • a physical FIC chip can contain both iFIC and eFIC.
  • the iFIC usually needs to distribute the data stream to each SE as evenly as possible. Since the data stream sent by the iFIC usually carries the information of the destination eFIC, the SE can forward the data stream to the corresponding eFIC accordingly.
  • FIG. 3 is a schematic structural diagram of an iFIC in a switching network system according to an embodiment of the present application.
  • the iFIC receives a data stream from the outside of the SF system through an input port (IP).
  • IP input port
  • multiple virtual output queues virtual output queue (VOQ) is used to buffer data streams corresponding to multiple destination eFICs or multiple output ports (OPs) included in the eFIC.
  • VOQ is a commonly used method in the industry to ensure quality of service (QoS) and prevent head-of-line (HOL) blocking.
  • the iFIC is provided with a queue manager (QM) and a scheduler (ISC).
  • QM is set between the input port and the switching network interface for management.
  • the VOQ set in the iFIC is connected to the QM and the switching network interface.
  • the switching network interface is used to obtain the congestion information of other iFICs and eFICs. It is responsible for scheduling the VOQ in the QM.
  • the scheduled data flow can be sent to the iFIC through the switching network interface And eFIC.
  • the number of VOQs that need to be set in the iFIC will be large.
  • the SF system has 2K eFICs
  • each eFIC has 48 ports, and each port is subdivided into 8 priorities.
  • the number of VOQs that need to be set in the iFIC is: 768K, which is based on 2K multiplied by Multiply 48 by 8 to get such a large number of VOQs at a great cost.
  • the theoretical VOQ number required by the switching network system is determined according to the number of ports of the eFIC and the number of port priorities, and only a part of the VOQ can be set, that is, the set VOQ number is less than the theoretical VOQ number.
  • the set VOQ number is less than the theoretical VOQ number.
  • embodiments of the present application provide a queue control method, device, and storage medium, which are used to solve the problem of data flow loss in the prior art due to exhaustion of the set VOQ resources. problem.
  • FIG. 4 is a schematic flowchart of a first embodiment of a queue control method according to an embodiment of the present application.
  • the queue control method can be applied to a switching system.
  • the switching system is provided with at least two logical ports, at least two transmission queues, and a mapping table.
  • the mapping table stores at least one mapping relationship between a transmission queue and at least one logical port.
  • Each logical port corresponds to a transport stream.
  • the number of transmission queues is less than the number of logical ports.
  • the logical ports in the embodiments of the present application include specific physical ports, and each physical port is subdivided according to priorities or user requirements.
  • the switching network system is a NxN switching network system, and the transmission queue is a virtual output queue VOQ.
  • the switching network system may include N iFICs and N eFICs, each eFIC includes K ports, and each port is subdivided into L priorities.
  • N iFICs and N eFICs each eFIC includes K ports, and each port is subdivided into L priorities.
  • the number of ports of each eFIC is the same.
  • the system allows eFICs to have different numbers of ports; the number of priorities of each port may also be different.
  • each port can be further divided into multiple logical ports, which requires more VOQ to correspond to it.
  • N, K, L are all positive integers.
  • switching system in the embodiment of the present application can also be applied to the queue design (VOQ in the switching network system) described above or in more ways.
  • each eFIC includes K ports, and each port is subdivided into L priorities
  • the maximum number of logical ports in the switching network system is “N ⁇ K ⁇ L ".
  • each iFIC does not communicate with all N ⁇ K ⁇ L logical ports at the same time, that is, when the theoretical VOQ number is large, iFIC rarely receives Transport stream. Therefore, only M VOQs can be set in the iFIC to reduce the implementation cost, where M is a positive integer less than N ⁇ K ⁇ L.
  • M VOQs can be dynamically allocated to the streams in transmission (ie, active streams).
  • the transmission packets received from the same source port (iFIC) and destined for the same destination logical port are defined as the same "flow".
  • the transport packet when the transport stream is a data stream, the transport packet here may be interpreted as a data packet.
  • a mapping table with a depth of N ⁇ K ⁇ L may be set in the switching network system, and the width of the mapping table is not less than log 2 M, where log 2 M represents the number of transmission queues that are set. Required resources.
  • mapping table may be implemented in the form of a hash table and an index table, which may be determined according to actual conditions.
  • the embodiment of the present application does not limit the form of the mapping table.
  • the queue control method may include the following steps:
  • Step 41 Receive a first transport stream corresponding to the first logical port and a second transport stream corresponding to the second logical port.
  • the switching system when the switching system receives the first transport stream corresponding to the first logical port and the second transport stream corresponding to the second logical port, optionally, by querying the above mapping table, it can be known that the switching system exists The first transmission queue corresponding to the first logical port and the second transmission queue corresponding to the second logical port. Therefore, under normal circumstances, the first transmission stream should be transmitted to the first logical port through the first transmission queue, and the second transmission The stream should be transmitted to the second logical port through the second transmission queue.
  • first and “second” in the embodiments of the present application do not indicate a sequential relationship, but are used to indicate that the two are different.
  • first logical port and the second logical port are used to represent two different logical ports
  • first transport stream and the second transport stream are used to represent two different transport streams
  • first transmission queue and the second transmission queue are used to Represents two different transmission queues, etc.
  • Step 42 Determine whether the number of idle queues in the switching system is less than the first threshold; if yes, go to step 43, if no, go to step 45.
  • the first threshold is less than the number of transmission queues set in the switching system.
  • the switching system after receiving the first transport stream and the second transport stream, the switching system first determines whether the number of idle state queues in the switching system is sufficient, and determines how to receive the first A transport stream and a second transport stream are transmitted to corresponding logical ports.
  • a first threshold value may be set, and the first threshold value is smaller than the number of transmission queues set in the switching system, and the switching system may, according to the size relationship between the number of idle queues and the first threshold, Transport stream for processing.
  • multiple thresholds may be set in the switching system, and when the number of idle queues is less than one threshold, a corresponding action is performed. For example, when two thresholds are set in the switching system, when the idle queue is less than the first threshold, a notification such as a warning can be issued. When the idle queue is less than the second threshold, you can The nature of the work queue or the destination port of the work status queue for the transport stream to be transmitted. Several received transport streams are transmitted using a transmission queue.
  • This embodiment of the present application does not limit the number of thresholds set in the switching system, and may be selected according to actual conditions.
  • Step 43 Both the first transmission stream originally transmitted through the first transmission queue and the second transmission stream originally transmitted through the second transmission queue are transmitted through the first transmission queue.
  • the number of idle queues in the switching system when the number of idle queues in the switching system is less than the first threshold, that is, the number of transmission queues in the idle state in the switching system may be less than the number of transmission streams to be received at a certain time.
  • the exhaustion of resources in the idle queue causes the received transport stream to be discarded.
  • the first transport stream originally transmitted through the first transmission queue and the second transport stream originally transmitted through the second transmission queue can be passed.
  • the first transmission queue transmits, so that the second transmission queue becomes an idle transmission queue, so that it can use it to transmit the newly received transmission stream.
  • the transmission queue By using the first transmission queue that originally transmitted only the first transmission stream to transmit the first transmission stream and the second transmission stream, this can increase the number of idle state queues in the switching system, thereby ensuring that newly received transmission streams are accessible.
  • the transmission queue avoids the problem that the transmission stream is discarded, and can also prevent the switching system from causing back pressure on the system that transports the transmission stream upstream.
  • this step may also be implemented by the following steps, that is, the first transmission stream originally transmitted through the first transmission queue and the second transmission stream originally transmitted through the second transmission queue are both Through the second transmission queue transmission, the embodiments of the present application do not limit the bearable transmission queues of the first transmission stream and the second transmission stream, which can be determined according to actual conditions.
  • the above-mentioned solution that the transmission streams originally transmitted through the two transmission queues are transmitted through only one of the transmission queues may be referred to as "queue merging" or "queue compression”.
  • the first logical port corresponding to the first transport stream and the second logical port corresponding to the second transport stream need to satisfy the following rules, that is, the first logical port and the second logical port
  • the logical ports are located on the same output port module.
  • logical ports may be located on the same eFIC, but at least two transport streams corresponding to different logical ports are transmitted using only a transmission queue corresponding to one of the transport streams.
  • the first logical port corresponding to the first transmission stream is located on the first eFIC
  • the second logical port corresponding to the second transmission stream is also located on the first eFIC
  • the third logical port corresponding to the third transmission queue is located on the first eFIC.
  • the first transmission stream is transmitted through the first transmission queue
  • the second transmission stream is transmitted through the second transmission queue
  • the third transmission stream is transmitted through the third transmission queue.
  • the number of idle state queues in the switching network system When it is less than the set first threshold, the first transmission stream originally transmitted through the first transmission queue and the second transmission stream originally transmitted through the second transmission queue may be transmitted using the first transmission queue or the second transmission queue without Change the relationship between the third transmission stream and the third transmission queue.
  • the complexity of the switching system can be simplified, and it is convenient to disassemble the originally merged queue when the number of subsequent idle state queues in the switching system is large.
  • the first transmission queue and the second transmission queue need to satisfy a rule that the number of transmission streams in the first transmission queue and the second transmission queue is less than a preset Value.
  • the first logical port corresponding to the first transport stream and the second logical port corresponding to the second transport stream are not on the same output port module, but when the idle state queue in the switching system is less than the first threshold, this At this time, the number of transmission streams in the first transmission queue corresponding to the first logical port and the second transmission queue corresponding to the second logical port can be viewed.
  • the transport stream transmitted using the first transmission queue and the second transmission queue is transmitted using one of the transmission queues.
  • queue control may be performed according to one of the rules, or in some cases, the above two rules may be combined to perform queue control. It can be determined according to the actual situation and will not be repeated here.
  • Step 44 Update the above mapping table.
  • the first transmission queue has a mapping relationship with the first logical port and the second logical port.
  • the mapping relationship between the logical port and the transmission queue is scheduled. Therefore, the above mapping table needs to be updated.
  • the first transmission queue has a mapping relationship with the first logical port and the second logical port, so that the switching system receives the first transmission stream and the first logical port corresponding to the first logical port again.
  • the second transport stream corresponding to the second logical port is used, according to the mapping relationship in the updated mapping table, the first transport stream and the second transport stream are transmitted by using the first transmission queue.
  • Step 45 Use the first transmission queue corresponding to the first logical port to transmit the first transmission stream, and use the second transmission queue corresponding to the second logical port to transmit the second transmission stream.
  • the mapping relationship between the logical port and the transmission queue set in the mapping table may be used to determine the The first transmission queue and the second transmission queue corresponding to the second logical port further use the first transmission queue to transmit the first transmission stream, and use the second transmission queue to transmit the second transmission stream.
  • the manner in which at least two transport streams are transmitted using one transmission queue can be very flexible, that is, the degree of queue compression can be determined according to requirements, that is, after the queue is compressed, there is always idle in the switching system.
  • the status queue is used by newly received transport streams.
  • the queue control method by receiving a first transport stream corresponding to a first logical port and a second transport stream corresponding to a second logical port, when the number of idle state queues in the switching system is less than a first threshold, The first transmission stream originally transmitted through the first transmission queue and the second transmission stream originally transmitted through the second transmission queue are transmitted through the first transmission queue.
  • the mapping table is updated. In the updated mapping table, the first transmission queue and the first transmission queue are updated.
  • the logical port and the second logical port have a mapping relationship.
  • FIG. 5 is a schematic flowchart of Embodiment 2 of a queue control method according to an embodiment of the present application.
  • the queue control method provided in the embodiment of the present application may further include the following steps:
  • Step 51 Receive a third transmission stream corresponding to the third logical port, and there is no mapping relationship between the third logical port and any one of the at least two transmission queues set in the switching system.
  • the switching system when the switching system receives the third transport stream corresponding to the third logical port, it is learned by querying the mapping table of the switching system that the third logical port and the switching system are not stored in the mapping table. Any one of the at least two transmission queues set in the mapping relationship, that is, there is no transmission queue set in the switching system for transmitting the third transmission stream.
  • Step 52 Use a third transmission queue to transmit the third transmission stream, and the third transmission queue is any one of the transmission queues in an idle state in the switching system.
  • a transmission queue can be allocated from the idle state queue to the third transmission stream.
  • the transmission queue allocated to the third transmission stream may be named a third transmission queue, and then the third transmission queue is used to transmit the third transmission stream.
  • the third transmission queue may be any one of the transmission queues in an idle state in the switching system.
  • Step 53 Save the mapping relationship between the third transmission queue and the third transmission port to a mapping table.
  • the third transmission queue and the The mapping relationship between the third transmission ports is stored in the mapping table. For example, the number or address of the third transmission queue is written into the mapping table, so that the switching system will subsequently receive the third transmission stream corresponding to the third logical port. At this time, the third transmission queue may be directly used for transmission.
  • the queue control method provided in the embodiment of the present application receives a third transmission stream corresponding to a third logical port, and there is no mapping relationship between the third logical port and any one of the at least two transmission queues set in the switching system.
  • one of the idle transmission queues in the switching system can be selected as the third transmission queue, and the third transmission queue is used to transmit the third transmission stream, and then the third transmission queue and the third transmission port are The mapping relationship between them is saved in the mapping table.
  • the technical solution can ensure that an idle state queue is available in the switching system when a new transmission stream is received, avoiding the loss of the transmission stream due to the exhaustion of the resources of the transmission queue or the problem of back pressure on the upstream system, and has high flexibility. It ensures that the transport stream received by the uplink interface of the switching system can be smoothly switched to the output of the downlink interface.
  • FIG. 6 is a schematic flowchart of Embodiment 3 of a queue control method according to an embodiment of the present application.
  • the queue control method provided in the embodiment of the present application may further include the following steps:
  • Step 61 Determine whether the number of idle queues in the switching system is greater than the second threshold; if yes, go to step 62; if no, go to step 63.
  • the second threshold is larger than the first threshold and smaller than the number of transmission queues set in the switching system.
  • the active or idle transmission queues in the switching system are scanned in real time or periodically to obtain the number of idle queues in the switching system. Therefore, the idle status in the switching system can be determined.
  • the number of state queues is related to the size of the set second threshold, and a transmission queue for transmitting the received transmission stream is determined according to the number of idle state queues.
  • the second threshold value needs to be a number greater than the first threshold value, but the maximum value of the second threshold value cannot be higher than the number of transmission queues set in the switching system, that is, the idle state queue in the switching system.
  • the number is less than the number of transmission queues set in the switching system.
  • the second threshold and the first threshold in this embodiment are only two judgment thresholds set in the switching system, which can be determined according to actual conditions, which are not limited in the embodiments of the present application.
  • Step 62 The first transmission stream and the second transmission stream transmitted through the first transmission queue are transmitted through the first transmission queue and the fourth transmission queue.
  • the fourth transmission queue is any one of the transmission queues in an idle state in the switching system.
  • a transmission queue may be utilized
  • the two transmission streams transmitted are then dispersed into two transmission queues for transmission, which can be interpreted as "queue decompression".
  • the uplink interface of the switching system receives the first transport stream and the second transport stream compressed and transmitted to the first transmission queue, it is determined that the number of idle queues in the switching system is greater than the second threshold set above. At this time, a transmission queue may be selected from the idle state queue, and the first transmission queue and the second transmission stream may be transmitted together with the first transmission queue.
  • the transmission queue selected from the idle transmission queue in the switching system is the fourth transmission queue
  • the first transmission that was originally transmitted through the first transmission queue can be transmitted through the first transmission queue and the fourth transmission queue.
  • the correspondence between the first transmission queue and the fourth transmission queue and the first transmission stream and the second transmission stream may be determined according to actual conditions, and are not limited herein.
  • this step that is, the first transmission stream and the second transmission stream to be transmitted through the first transmission queue, and the transmission through the first transmission queue and the fourth transmission queue may be implemented by the following steps:
  • the first transmission stream is transmitted through the first transmission queue, and the second transmission stream is transmitted through the fourth transmission queue;
  • the mapping relationship between the first transmission queue and the first logical port and the mapping relationship between the fourth transmission queue and the second logical port are saved.
  • the second transmission stream when there is no transmission packet of the first transmission stream in the first transmission queue, the second transmission stream is transmitted through the first transmission queue, and the first transmission stream is transmitted through the fourth transmission queue; accordingly
  • the mapping relationship between the first transmission queue and the second logical port and the mapping relationship between the fourth transmission queue and the first logical port are stored.
  • a new transmission queue is allocated for a newly received transport stream that belongs to a merge queue (in this embodiment, the merge queue is the first transmission queue and the transmission stream is the first transmission stream or the second transmission stream),
  • new allocations can only be scheduled after the merge queue has emptied the transport packets of the transport stream; otherwise, the transport stream received by the logical port may be incomplete.
  • a counter may be set in the first transmission queue for the first transmission stream and the second transmission stream, respectively, for counting the transmission of each transmission stream in the first transmission queue. Number of packets.
  • the first transport stream and the second transport stream that were originally transmitted using the first transmission queue are received, it is only when the counter of the first transport stream or the second transport stream in the first transmission queue is 0. It allocates a new transmission queue. A newly allocated transmission queue for the first transport stream or the second transport stream in this way allows immediate scheduling.
  • the mapping between the transmission queue corresponding to the transmission stream and the logical port is saved in time. relationship.
  • the mapping relationship between the first transmission queue and the first logical port and the mapping relationship between the fourth transmission queue and the second logical port are saved, so that the switching system receives the first transmission stream and the second transmission stream again. Can automatically enter their respective transmission queues.
  • Step 63 Use the first transmission queue to transmit the first transport stream and the second transport stream.
  • the number of idle queues in the switching system when the number of idle queues in the switching system is not greater than the second threshold, it indicates that there are not many idle transmission queues in the switching system. At this time, the first transmission queue may not be transmitted. To perform any processing, that is, still use the first transmission queue to transmit the first transport stream and the second transport stream.
  • the first transmission stream and the second transmission stream transmitted through the first transmission queue are transmitted through the first transmission queue and the third transmission queue.
  • the fourth transmission queue is any one of transmission queues in an idle state in the switching system.
  • the embodiments of the present application perform compression and decompression processing on transmission queues (for example, the switching system has 100 logical ports. In theory, the number of transmission queues required should be 100. However, the embodiments of the present application can Only 50 transmission queues are set.
  • the foregoing switching system is not limited to a switching network system, and may also be a traffic management system or the like.
  • FIG. 7 is a schematic structural diagram of a traffic management system applicable to an embodiment of the present application. This embodiment is described with a traffic management system having a 3-layer scheduler. As shown in FIG. 7, it is assumed that the traffic management system has K parent ports, and each parent port includes L child ports, and each child port can be divided into P granularities (for example, priorities), so that the traffic management system has " K times L times P "port particles. Correspondingly, the maximum number of flow queues required by the traffic management system is" K times L times P ".
  • a mapping table and at least two flow queues may be set in the traffic management system.
  • the mapping table stores a mapping relationship between at least one flow queue and at least one port particle, and each port particle corresponds to For a transport stream, the number of stream queues is less than the number of port particles.
  • the depth of the mapping table is "K times L times P", and the mapping table is used to flexibly allocate and recycle resources of the flow queue.
  • the transport streams originally transmitted by using the stream queues may be transmitted by using one stream queue, and when the number of idle state flow queues in the traffic management system is greater than the second threshold, the original merged and transmitted transmission streams are respectively allocated to the flow queues for transmission.
  • the first transport stream originally transmitted through the first stream queue and the second transport stream originally transmitted through the second stream queue are all passed through the first stream queue or the second stream queue. Transmission to release the idle state flow queue.
  • the first transport stream and the second transport stream that are transmitted through the first stream queue are transmitted through one stream queue in the first stream queue and the idle state stream queue.
  • the first port particles corresponding to the first transport stream and the second port particles corresponding to the second transport stream belong to the same subport, or
  • the number of transport streams is less than a preset value.
  • the queue control method in the embodiment of the present application is also suitable for solving the problem that the flow management system needs a large number of flow queues, which results in a high cost of the flow management system, or because the number of flow queues is too small.
  • FIG. 8 is a schematic structural diagram of a first embodiment of a queue control apparatus according to an embodiment of the present application.
  • the queue control device may be integrated in a switching system.
  • the switching system is provided with at least two logical ports, at least two transmission queues, and a mapping table.
  • the mapping table stores at least one mapping relationship between a transmission queue and at least one logical port. , Each logical port corresponds to a transport stream, and the number of transmission queues set in the switching system is less than the number of the aforementioned logical ports.
  • the queue control apparatus may include: an interface device 81, a queue manager 82, and a processor 83.
  • the interface device 81 is configured to receive a first transport stream corresponding to a first logical port and a second transport stream corresponding to a second logical port.
  • the queue manager 82 is configured to: when the number of idle queues in the switching system is less than a first threshold, the first transmission stream that was originally transmitted through the first transmission queue and all the addresses that were originally transmitted through the second transmission queue are transmitted. The second transmission stream is transmitted through the first transmission queue.
  • the first threshold is less than the number of transmission queues set in the switching system
  • the processor 83 is configured to update the mapping table.
  • the first transmission queue has a mapping relationship with the first logical port and the second logical port.
  • the queue control apparatus may further include a memory, and the memory is configured to store execution instructions of the queue manager 82 and the processor 83.
  • the memory may be used to store the above mapping table and save the mapping relationship between the transmission queue and the logical port.
  • the foregoing interface device 81 is further configured to receive a third transport stream corresponding to the third logical port.
  • the queue manager 82 is further configured to use a third transmission queue to transmit the third transmission stream, and the third transmission queue is any one of the transmission queues in an idle state in the switching system.
  • the processor 83 is further configured to save a mapping relationship between the third transmission queue and the third transmission port in the mapping table.
  • the first logical port and the second logical port are located on a same port module.
  • the number of transmission streams in the first transmission queue and the second transmission queue is less than a preset value.
  • the queue manager 82 is further configured to pass the first queue when the number of idle state queues in the switching system is greater than a second threshold.
  • the first transmission stream and the second transmission stream transmitted by the transmission queue are transmitted through the first transmission queue and the fourth transmission queue.
  • the second threshold is greater than the first threshold and less than the number of transmission queues set in the switching system, and the fourth transmission queue is any one of the transmission queues in the idle state in the switching system. .
  • the above-mentioned queue manager 82 is configured to pass the first transmission stream and the second transmission stream transmitted through the first transmission queue through The transmission of the first transmission queue and the fourth transmission queue are specifically:
  • the queue manager 82 is configured to transmit the first transmission stream through the first transmission queue when the transmission packet of the second transmission stream does not exist in the first transmission queue, and pass the fourth transmission queue.
  • the transmission queue transmits the second transmission stream.
  • the processor 83 is further configured to save a mapping relationship between the first transmission queue and the first logical port, and a mapping relationship between the fourth transmission queue and the second logical port.
  • the queue manager 82 is configured to transfer the first transport stream and the second transport stream transmitted through the first transmission queue through The transmission of the first transmission queue and the fourth transmission queue are specifically:
  • the queue manager 82 is configured to transmit the second transmission stream through the first transmission queue when the transmission packet of the first transmission stream does not exist in the first transmission queue, and pass the fourth transmission stream.
  • the transmission queue transmits the first transmission stream.
  • the processor 83 is further configured to save a mapping relationship between the first transmission queue and the second logical port, and a mapping relationship between the fourth transmission queue and the first logical port.
  • the switching system is any one of the following: a switching network system and a traffic management system.
  • the queue control device provided in this embodiment may be configured to execute the technical solutions of the method embodiments shown in FIG. 4 to FIG. 6.
  • the specific implementation manner and technical effect are similar, and details are not described herein again.
  • FIG. 9 is a schematic structural diagram of a second embodiment of a queue control apparatus according to an embodiment of the present application.
  • the device can be integrated in a switching system.
  • the queue control apparatus provided in this example may include a receiving module 91 and a processing module 92.
  • the receiving module 91 is configured to receive a first transport stream corresponding to a first logical port and a second transport stream corresponding to a second logical port.
  • the processing module 92 is configured to: when the number of idle queues in the switching system is less than a first threshold, the first transmission stream originally transmitted through the first transmission queue and the first transmission stream originally transmitted through the second transmission queue The second transmission stream is transmitted through the first transmission queue, and the mapping table is updated. In the updated mapping table, the first transmission queue and the first logical port and the second logical port have In a mapping relationship, the first threshold is less than the number of transmission queues set in the switching system.
  • the receiving module 91 is further configured to receive a third transmission stream corresponding to a third logical port, where the third logical port and the at least two transmissions No mapping exists in any of the queues.
  • the processing module 92 is further configured to transmit the third transmission stream by using a third transmission queue, where the third transmission queue is any one of transmission queues in an idle state in the switching system, and the third transmission queue is The mapping relationship between the transmission queue and the third transmission port is stored in the mapping table.
  • the first logical port and the second logical port are located on a same port module.
  • the number of transmission streams in the first transmission queue and the second transmission queue are both less than a preset value.
  • the processing module 92 is further configured to pass the first transmission when the number of idle state queues in the switching system is greater than a second threshold.
  • the first transmission stream and the second transmission stream transmitted in a queue are transmitted through the first transmission queue and the fourth transmission queue.
  • the second threshold is greater than the first threshold and less than the number of transmission queues set in the switching system, and the fourth transmission queue is any one of the transmission queues in the idle state in the switching system. .
  • the processing module 92 is configured to pass the first transmission stream and the second transmission stream transmitted through the first transmission queue through the first transmission queue and the second transmission stream.
  • the fourth transmission queue transmission is described as follows:
  • the processing module 92 is configured to transmit the first transmission stream through the first transmission queue when the transmission packet of the second transmission stream does not exist in the first transmission queue, and pass the fourth transmission queue.
  • the transmission queue transmits the second transmission stream, and stores a mapping relationship between the first transmission queue and the first logical port, and a mapping relationship between the fourth transmission queue and the second logical port.
  • the processing module 92 is configured to pass the first transmission stream and the second transmission stream transmitted through the first transmission queue through the first transmission queue and
  • the fourth transmission queue transmission is specifically:
  • the processing module 92 is configured to transmit the second transmission stream through the first transmission queue when the transmission packet of the first transmission stream does not exist in the first transmission queue, and pass the fourth transmission queue.
  • the transmission queue transmits the first transmission stream, and stores a mapping relationship between the first transmission queue and the second logical port, and a mapping relationship between the fourth transmission queue and the first logical port.
  • the switching system is any one of the following: a switching network system and a traffic management system.
  • the receiving module 91 may correspond to the interface device 81 in FIG. 8 described above, and the processing module 92 may correspond to the queue manager 82 and processor 83 in FIG. 8 described above.
  • An embodiment of the present application provides a storage medium.
  • the storage medium stores instructions.
  • the storage medium runs instructions on a computer, the computer executes the technical solutions in the embodiments shown in FIG. 4 to FIG. 6.
  • an embodiment of the present application provides a chip for running instructions, and the chip is configured to execute the technical solutions of the method embodiments shown in FIG. 4 to FIG. 6.
  • each module of the above device is only a division of logical functions. In actual implementation, it may be fully or partially integrated into a physical entity, or it may be physically separated. And these modules can all be implemented in the form of software through processing element calls; they can also be implemented in hardware; all modules can be implemented in the form of software called by processing elements, and some modules can be implemented in hardware.
  • the determination module may be a separately established processing element, or may be integrated and implemented in a chip of the above-mentioned device. In addition, it may also be stored in the memory of the above-mentioned device in the form of a program code, and may be processed by a certain processing element of the above-mentioned device.
  • each step of the above method or each of the above modules may be completed by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
  • the above modules may be one or more integrated circuits configured to implement the above method, for example, one or more application specific integrated circuits (ASICs), or one or more microprocessors (digital singnal processor (DSP), or one or more field programmable gate array (FPGA).
  • ASICs application specific integrated circuits
  • DSP digital singnal processor
  • FPGA field programmable gate array
  • the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code.
  • CPU central processing unit
  • these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • SOC system-on-a-chip
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium.
  • the computer instructions may be transmitted from a website site, computer, server, or data center through a wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center.
  • the readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, and the like that includes one or more available medium integration.
  • the available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
  • the term "plurality” herein refers to two or more.
  • the term “and / or” in this document is only a kind of association relationship describing related objects, which means that there can be three kinds of relationships, for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and exists alone B these three cases.
  • the character "/" in this article generally indicates that the related objects are an "or” relationship; in the formula, the character "/" indicates that the related objects are a "divide” relationship.
  • the size of the serial numbers of the above processes does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic.
  • the implementation process of the example constitutes any limitation.

Abstract

Provided is a queue control method, device and storage medium, which is applied in a switching system, the switching system is provided with at least two logical ports, at least two transmit queues and a mapping table, the mapping table stores at least one mapping relationship between a transmit queue and at least one logical port, each logical port corresponds to one transport stream, and the number of transmit queues is less than the number of logical ports, the method comprises: receiving a first transport stream corresponding to the first logical port and a second transport stream (41) corresponding to the second logical port, when the number of idle state queues in the switching system is less than the first threshold (42), the first transport stream originally transmitted through the first transmit queue and the second transport stream originally transmitted through the second transmit queue are transmitted through the first transmit queue (43), updating the above mapping table, and the first transmit queue in the updated mapping table has a mapping relationship (44) with the first logical port and the second logical port.

Description

队列控制方法、装置及存储介质Queue control method, device and storage medium 技术领域Technical field
本申请涉及通信技术领域,尤其涉及一种队列控制方法、装置及存储介质。The present application relates to the field of communications technologies, and in particular, to a queue control method, device, and storage medium.
背景技术Background technique
通常情况下,交换网(switch fabric,SF)系统由上行交换网接口芯片(ingress fabric interface chip,iFIC)和下行交换网接口芯片(egress fabric interface chip,eFIC)以及多个中间级的交换单元(switch element,SE)组成。SF系统用于将iFIC接收到的数据流交换到eFIC。为了保证SF系统的服务质量,可以在iFIC内设置多个虚拟输出队列(virtual output queue,VOQ)用以缓存去往不同目的eFIC或者每个eFIC所包含的多个出端口的数据流,以防止去往不同端口的数据流被阻塞的问题。In general, a switching network (SF) system consists of an upstream switching network interface chip (iFIC), a downstream switching network interface chip (eFIC), and multiple intermediate-level switching units (eFIC). switch element (SE). The SF system is used to exchange the data stream received by the iFIC to the eFIC. In order to ensure the service quality of the SF system, multiple virtual output queues (VOQ) can be set up in the iFIC to buffer data flows to different destination eFICs or multiple egress ports included in each eFIC to prevent The problem that the data flow to different ports is blocked.
现阶段,对于NxN的SF系统,N为正整数,iFIC中可以设置至少N个VOQ用于对应N个eFIC,若每个eFIC的输出端口再细分为更多的粒度(比如,优先级(class of service,Cos),此时,iFIC中可能需要设置更多的VOQ用于将接收到的数据流根据目的输出端口或目的端口优先级传输到SE,进而传输到目的输出端口。但是,当SF系统的规模较大时,iFIC中需要设置的VOQ的数量会很多。例如,假设SF系统有2K个eFIC,每个eFIC具有48个端口,每个端口又细分为8个优先级,此时,iFIC中需要设置的VOQ的数量为:768K,即根据2K乘以48乘以8得到,这么大数量的VOQ需要花费很大的代价才能实现。At this stage, for NxN SF systems, N is a positive integer. At least N VOQs can be set in the iFIC to correspond to N eFICs. If each eFIC output port is further subdivided into more granularity (for example, priority ( class, service, Cos), at this time, iFIC may need to set more VOQs to transmit the received data stream to the SE according to the destination output port or destination port priority, and then to the destination output port. However, when When the size of the SF system is large, the number of VOQs that need to be set in the iFIC will be large. For example, suppose that the SF system has 2K eFICs, each eFIC has 48 ports, and each port is subdivided into 8 priorities. At this time, the number of VOQs that need to be set in iFIC is: 768K, which is obtained according to 2K times 48 times 8; such a large number of VOQs need to be costly to achieve.
现有技术中,为了降低SF系统的复杂度,减少VOQ耗费的资源,可以仅设置部分VOQ,该部分VOQ的数量小于SF系统中需要设置的最大VOQ数量,该最大VOQ数量是指根据SF系统中eFIC的输出端口数量以及端口优先级数量确定的SF系统所需的理论VOQ数量。例如,当SF系统最多需要的理论VOQ数量为N1个时,可以仅设置N1/2个VOQ,且要求SF系统中同时传输的数据流数量不超过N1/2,其中,N1为正整数。In the prior art, in order to reduce the complexity of the SF system and reduce the resources consumed by VOQ, only a part of VOQs can be set. The number of VOQs in this part is less than the maximum number of VOQs required in the SF system. The number of eFIC's output ports and the number of theoretical VOQs required by the SF system determined by the number of port priorities. For example, when the maximum number of theoretical VOQs required by the SF system is N1, only N1 / 2 VOQs can be set, and the number of data streams transmitted simultaneously in the SF system cannot exceed N1 / 2, where N1 is a positive integer.
然而,虽然上述现有技术能够在一定程度上减低SF系统等交换系统的复杂度,减少队列耗费的资源,但是这种方案的灵活性低,当交换系统中传输的数据流数量大于设置的队列数量时,可能会因为设置的队列资源耗尽而产生数据流丢失的问题。However, although the above-mentioned prior art can reduce the complexity of switching systems such as the SF system and the resources consumed by the queue to a certain extent, this solution has low flexibility. When the number of data streams transmitted in the switching system is greater than the set queue When the number is set, the data stream may be lost due to the exhaustion of the set queue resources.
发明内容Summary of the Invention
本申请实施例提供一种队列控制方法、装置及存储介质,以解决现有技术中由于设置的队列资源耗尽而产生的数据流丢失问题。Embodiments of the present application provide a queue control method, device, and storage medium to solve the problem of data flow loss caused by exhaustion of a set queue resource in the prior art.
本申请第一方面提供一种队列控制方法,所述方法应用于交换系统,所述交换系统中设置有至少两个逻辑端口、至少两个传输队列和映射表,所述映射表中至少存储有一个传输队列与至少一个逻辑端口的映射关系,每个逻辑端口对应一个传输流,所述传输队列的数量小于所述逻辑端口的数量,所述方法包括:A first aspect of the present application provides a queue control method. The method is applied to a switching system. The switching system is provided with at least two logical ports, at least two transmission queues, and a mapping table. The mapping table stores at least A mapping relationship between a transmission queue and at least one logical port, each logical port corresponds to a transmission stream, and the number of the transmission queues is less than the number of the logical ports. The method includes:
接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流;Receiving a first transport stream corresponding to a first logical port and a second transport stream corresponding to a second logical port;
在所述交换系统中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的所述第一传输流、原本通过第二传输队列传输的所述第二传输流均通过所述第一传输队列传输,所述第一阈值小于所述交换系统中设置的传输队列的数量;When the number of idle state queues in the switching system is less than the first threshold, the first transmission stream originally transmitted through the first transmission queue and the second transmission stream originally transmitted through the second transmission queue are all passed through The first transmission queue transmission, the first threshold value is less than the number of transmission queues set in the switching system;
更新所述映射表,更新后的所述映射表中所述第一传输队列与所述第一逻辑端口和所述第二逻辑端口具有映射关系。Update the mapping table, and in the updated mapping table, the first transmission queue has a mapping relationship with the first logical port and the second logical port.
在本申请实施例中,交换系统中传输队列的数量小于逻辑端口的数量,且在交换系统中空闲状态队列的数量少于第一阈值时,将至少两个传输流通过一个传输队列传输,能够保证交换系统中有足够的传输队列供接收到的传输流使用,避免了现有技术中由于设置的传输队列资源耗尽而致使数据流丢失或对上游系统产生的反压问题,灵活度高。In the embodiment of the present application, when the number of transmission queues in the switching system is less than the number of logical ports, and when the number of idle state queues in the switching system is less than the first threshold, transmitting at least two transmission streams through one transmission queue can Ensuring that there are enough transmission queues in the switching system for the use of the received transmission stream, avoiding the problem of data stream loss or backpressure on the upstream system caused by exhaustion of the set transmission queue resources in the prior art, and high flexibility.
可选的,在第一方面的一种可能实现方式中,所述方法还包括:Optionally, in a possible implementation manner of the first aspect, the method further includes:
接收第三逻辑端口对应的第三传输流,所述第三逻辑端口与所述至少两个传输队列中的任意一个均不存在映射关系;Receiving a third transmission stream corresponding to a third logical port, and there is no mapping relationship between the third logical port and any one of the at least two transmission queues;
利用第三传输队列传输所述第三传输流,所述第三传输队列为所述交换系统中处于空闲状态的传输队列中的任意一个;Transmitting the third transmission stream by using a third transmission queue, where the third transmission queue is any one of transmission queues in an idle state in the switching system;
将所述第三传输队列与所述第三传输端口之间的映射关系保存到所述映射表中。The mapping relationship between the third transmission queue and the third transmission port is stored in the mapping table.
在本实施例中,当交换系统接收到新的传输流时,能够保证在该传输流有空闲状态队列可用,避免了由于传输队列的资源耗尽造成的传输流丢失或对上游系统产生的反压问题,灵活度高,保证了交换系统上行接口接收到的传输流能够顺利交换到下行接口输出。In this embodiment, when the switching system receives a new transmission stream, it can ensure that an idle state queue is available in the transmission stream, which avoids the loss of the transmission stream due to the exhaustion of the resources of the transmission queue or the reaction to the upstream system. Pressure, high flexibility, which ensures that the transport stream received by the uplink interface of the switching system can be smoothly switched to the downlink interface output.
可选的,作为一种示例,所述第一逻辑端口和所述第二逻辑端口位于同一个端口模块上。Optionally, as an example, the first logical port and the second logical port are located on a same port module.
通过限定第一逻辑端口和第二逻辑端口位于同一个输出端口模块上,可以简化交换系统的复杂度,便于在后续在交换系统中的空闲状态队列的数量较多时,将原本合并的队列再拆分开。By limiting the first logical port and the second logical port to be on the same output port module, the complexity of the switching system can be simplified, and it is convenient to disassemble the originally merged queue when the number of subsequent idle state queues in the switching system is large. separate.
可选的,作为另一种示例,所述第一传输队列和所述第二传输队列中的传输流数量均小于预设数值。Optionally, as another example, the number of transmission streams in the first transmission queue and the second transmission queue are both less than a preset value.
通过限定在第一传输队列和第二传输队列中的传输流数量均小于预设数值时,可以将第一传输队列传输的传输流和第二传输队列传输的传输流归到一个传输队列传输,简化了交换系统的复杂度,交换系统的灵活度高。By limiting the number of transmission streams in the first transmission queue and the second transmission queue to less than a preset value, the transmission streams transmitted in the first transmission queue and the transmission streams transmitted in the second transmission queue can be classified into one transmission queue for transmission. The complexity of the switching system is simplified, and the flexibility of the switching system is high.
可选的,在第一方面的另一种可能实现方式中,所述方法还包括:Optionally, in another possible implementation manner of the first aspect, the method further includes:
在所述交换系统中空闲状态队列的数量大于第二阈值时,将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,所述第二阈值大于所述第一阈值,且小于所述交换系统中设置的传输队列的数量,所述第四传输队列为所述交换系统中处于空闲状态的传输队列中的任意一个。When the number of idle state queues in the switching system is greater than a second threshold, the first transmission stream and the second transmission stream to be transmitted through the first transmission queue are transmitted through the first transmission queue and the In the fourth transmission queue transmission, the second threshold value is greater than the first threshold value and less than the number of transmission queues set in the switching system, and the fourth transmission queue is a transmission in an idle state in the switching system. Any one in the queue.
在本实施例中,在交换系统中空闲状态队列的数量足够多时,将原本合并传输的传输流再分配到多个传输队列进行传输,实现了传输队列的解压缩处理,提高了交换系统的性能。In this embodiment, when the number of idle state queues in the switching system is sufficient, the transmission streams that were originally merged and transmitted are redistributed to multiple transmission queues for transmission, thereby decompressing the transmission queues and improving the performance of the switching system. .
可选的,作为一种示例,所述将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,包括:Optionally, as an example, the first transmission stream and the second transmission stream to be transmitted through the first transmission queue are transmitted through the first transmission queue and the fourth transmission queue. ,include:
在所述第一传输队列中不存在所述第二传输流的传输包时,通过所述第一传输队列传 输所述第一传输流,且通过所述第四传输队列传输所述第二传输流;When a transmission packet of the second transmission stream does not exist in the first transmission queue, the first transmission stream is transmitted through the first transmission queue, and the second transmission is transmitted through the fourth transmission queue. flow;
所述方法,还包括:The method further includes:
保存所述第一传输队列与所述第一逻辑端口的映射关系,以及,所述第四传输队列与所述第二逻辑端口的映射关系。A mapping relationship between the first transmission queue and the first logical port, and a mapping relationship between the fourth transmission queue and the second logical port are stored.
可选的,作为另一种示例,所述将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,包括:Optionally, as another example, the first transmission stream and the second transmission stream to be transmitted through the first transmission queue are transmitted through the first transmission queue and the fourth transmission queue. Transmission, including:
在所述第一传输队列中不存在所述第一传输流的传输包时,通过所述第一传输队列传输所述第二传输流,且通过所述第四传输队列传输所述第一传输流;When a transmission packet of the first transmission stream does not exist in the first transmission queue, the second transmission stream is transmitted through the first transmission queue, and the first transmission is transmitted through the fourth transmission queue. flow;
所述方法,还包括:The method further includes:
保存所述第一传输队列与所述第二逻辑端口的映射关系,以及,所述第四传输队列与所述第一逻辑端口的映射关系。The mapping relationship between the first transmission queue and the second logical port, and the mapping relationship between the fourth transmission queue and the first logical port are saved.
在该实施例中,通过在在第一传输队列中不存在第二传输流的传输包或者不存在第一传输流的传输包时,再为其新分配一个传输队列,即只在第一传输队列中的某一传输流的传输包排空之后才允许调度新分配,能够保证对应逻辑端口收到完整的传输流。In this embodiment, when a transmission packet of the second transmission stream does not exist in the first transmission queue or a transmission packet of the first transmission stream does not exist, a new transmission queue is allocated for it, that is, only in the first transmission queue. A new allocation is allowed to be scheduled after the transport packets of a certain transport stream in the queue are emptied, which can ensure that the corresponding logical port receives the complete transport stream.
可选的,所述交换系统为如下任意一种:交换网系统、流量管理系统。Optionally, the switching system is any one of the following: a switching network system and a traffic management system.
本申请第二方面提供一种队列控制装置,所述装置集成于交换系统中,所述交换系统中设置有至少两个逻辑端口、至少两个传输队列和映射表,所述映射表中至少存储有一个传输队列与至少一个逻辑端口的映射关系,每个逻辑端口对应一个传输流,所述传输队列的数量小于所述逻辑端口的数量,所述装置包括:接口设备、队列管理器和处理器;The second aspect of the present application provides a queue control device. The device is integrated in a switching system. The switching system is provided with at least two logical ports, at least two transmission queues, and a mapping table. The mapping table stores at least There is a mapping relationship between a transmission queue and at least one logical port, and each logical port corresponds to one transmission stream. The number of the transmission queues is less than the number of the logical ports. The device includes: an interface device, a queue manager, and a processor. ;
所述接口设备,用于接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流;The interface device is configured to receive a first transport stream corresponding to a first logical port and a second transport stream corresponding to a second logical port;
所述队列管理器,用于在所述交换系统中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的所述第一传输流、原本通过第二传输队列传输的所述第二传输流均通过所述第一传输队列传输,所述第一阈值小于所述交换系统中设置的传输队列的数量;The queue manager is configured to: when the number of idle state queues in the switching system is less than a first threshold, the first transmission stream that was originally transmitted through the first transmission queue and all the addresses that were originally transmitted through the second transmission queue. The second transmission streams are all transmitted through the first transmission queue, and the first threshold is less than the number of transmission queues set in the switching system;
所述处理器,用于更新所述映射表,更新后的所述映射表中所述第一传输队列与所述第一逻辑端口和所述第二逻辑端口具有映射关系。The processor is configured to update the mapping table, and in the updated mapping table, the first transmission queue has a mapping relationship with the first logical port and the second logical port.
可选的,在第二方面的一种可能实现方式中,所述接口设备,还用于接收第三逻辑端口对应的第三传输流,所述第三逻辑端口与所述至少两个传输队列中的任意一个均不存在映射关系;Optionally, in a possible implementation manner of the second aspect, the interface device is further configured to receive a third transmission stream corresponding to a third logical port, and the third logical port and the at least two transmission queues No mapping relationship exists in any of them;
所述队列管理器,还用于利用第三传输队列传输所述第三传输流,所述第三传输队列为所述交换系统中处于空闲状态的传输队列中的任意一个;The queue manager is further configured to use a third transmission queue to transmit the third transmission stream, where the third transmission queue is any one of the transmission queues in an idle state in the switching system;
所述处理器,还用于将所述第三传输队列与所述第三传输端口之间的映射关系保存到所述映射表中。The processor is further configured to save a mapping relationship between the third transmission queue and the third transmission port in the mapping table.
可选的,作为一种示例,所述第一逻辑端口和所述第二逻辑端口位于同一个端口模块上。Optionally, as an example, the first logical port and the second logical port are located on a same port module.
可选的,作为另一种示例,所述第一传输队列和所述第二传输队列中的传输流数量均小于预设数值。Optionally, as another example, the number of transmission streams in the first transmission queue and the second transmission queue are both less than a preset value.
可选的,在第二方面的另一种可能实现方式中,所述队列管理器,还用于在所述交换 系统中空闲状态队列的数量大于第二阈值时,将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,所述第二阈值大于所述第一阈值,且小于所述交换系统中设置的传输队列的数量,所述第四传输队列为所述交换系统中处于空闲状态的传输队列中的任意一个。Optionally, in another possible implementation manner of the second aspect, the queue manager is further configured to: when the number of idle state queues in the switching system is greater than a second threshold, the queue manager will pass the first transmission The first transmission stream and the second transmission stream transmitted in a queue are transmitted through the first transmission queue and the fourth transmission queue, and the second threshold value is larger than the first threshold value and smaller than the exchange. The number of transmission queues set in the system, and the fourth transmission queue is any one of the transmission queues in an idle state in the switching system.
可选的,作为一种示例,所述队列管理器,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:Optionally, as an example, the queue manager is configured to transfer the first transmission stream and the second transmission stream transmitted through the first transmission queue through the first transmission queue and the second transmission stream. The fourth transmission queue transmission is described as follows:
所述队列管理器,用于在所述第一传输队列中不存在所述第二传输流的传输包时,通过所述第一传输队列传输所述第一传输流,且通过所述第四传输队列传输所述第二传输流;The queue manager is configured to transmit the first transmission stream through the first transmission queue when the transmission packet of the second transmission stream does not exist in the first transmission queue, and pass the fourth transmission queue. The transmission queue transmits the second transmission stream;
所述处理器,还用于保存所述第一传输队列与所述第一逻辑端口的映射关系,以及,所述第四传输队列与所述第二逻辑端口的映射关系。The processor is further configured to save a mapping relationship between the first transmission queue and the first logical port, and a mapping relationship between the fourth transmission queue and the second logical port.
可选的,作为另一种示例,所述队列管理器,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:Optionally, as another example, the queue manager is configured to send the first transmission stream and the second transmission stream transmitted through the first transmission queue through the first transmission queue and The fourth transmission queue transmission is specifically:
所述队列管理器,用于在所述第一传输队列中不存在所述第一传输流的传输包时,通过所述第一传输队列传输所述第二传输流,且通过所述第四传输队列传输所述第一传输流;The queue manager is configured to transmit the second transmission stream through the first transmission queue when the transmission packet of the first transmission stream does not exist in the first transmission queue, and pass the fourth transmission queue. The transmission queue transmits the first transmission stream;
所述处理器,还用于保存所述第一传输队列与所述第二逻辑端口的映射关系,以及,所述第四传输队列与所述第一逻辑端口的映射关系。The processor is further configured to save a mapping relationship between the first transmission queue and the second logical port, and a mapping relationship between the fourth transmission queue and the first logical port.
可选的,所述交换系统为如下任意一种:交换网系统、流量管理系统。Optionally, the switching system is any one of the following: a switching network system and a traffic management system.
本申请实施例第三方面提供一种队列控制装置,所述队列控制装置包括接收模块和处理模块,所述接收模块和所述处理模块,用于执行本申请第一方面提供的方法。A third aspect of the embodiments of the present application provides a queue control apparatus. The queue control apparatus includes a receiving module and a processing module, and the receiving module and the processing module are configured to execute the method provided in the first aspect of the present application.
本申请实施例第四方面提供一种队列控制装置,包括用于执行以上第一方面各实施例的至少一个处理元件(或芯片)。A fourth aspect of the embodiments of the present application provides a queue control apparatus including at least one processing element (or chip) for executing the embodiments of the first aspect above.
本申请实施例第五方面提供一种存储介质,所述存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面提供的方法。A fifth aspect of the embodiments of the present application provides a storage medium. The storage medium stores instructions that, when run on a computer, cause the computer to execute the method provided by the first aspect.
本申请实施例第六方面提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面提供的方法。A sixth aspect of the embodiments of the present application provides a computer program product containing instructions, which when executed on a computer, causes the computer to execute the method provided by the first aspect.
在以上各个方面中,通过接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流,在交换系统中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的第一传输流、原本通过第二传输队列传输的第二传输流均通过第一传输队列传输,更新映射表,更新后的映射表中第一传输队列与第一逻辑端口和第二逻辑端口具有映射关系,这样能够保证交换系统中有足够的传输队列供接收到的传输流使用,避免了现有技术中由于设置的传输队列资源耗尽而致使数据流丢失或对上游系统产生的反压问题,灵活度高。In each of the above aspects, by receiving the first transport stream corresponding to the first logical port and the second transport stream corresponding to the second logical port, when the number of idle state queues in the switching system is less than the first threshold, the original traffic will be passed through the first The first transmission stream transmitted by the transmission queue and the second transmission stream originally transmitted through the second transmission queue are transmitted through the first transmission queue. The mapping table is updated. In the updated mapping table, the first transmission queue, the first logical port, and the first The two logical ports have a mapping relationship, which can ensure that there are enough transmission queues in the switching system for the received transmission stream, and avoids the loss of data flow or the occurrence of upstream systems due to the exhaustion of the set transmission queue resources in the prior art. The back pressure problem is highly flexible.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例提供的一种交换系统的结构示意图;FIG. 1 is a schematic structural diagram of a switching system according to an embodiment of the present application;
图2为本申请实施例提供的交换网系统的结构示意图;2 is a schematic structural diagram of a switching network system according to an embodiment of the present application;
图3为本申请实施例中交换网系统中iFIC的结构示意图;3 is a schematic structural diagram of an iFIC in a switching network system according to an embodiment of the present application;
图4为本申请实施例提供的队列控制方法实施例一的流程示意图;4 is a schematic flowchart of a first embodiment of a queue control method according to an embodiment of the present application;
图5为本申请实施例提供的队列控制方法实施例二的流程示意图;5 is a schematic flowchart of a second embodiment of a queue control method according to an embodiment of the present application;
图6为本申请实施例提供的队列控制方法实施例三的流程示意图;6 is a schematic flowchart of a third embodiment of a queue control method according to an embodiment of the present application;
图7为本申请实施例适用的流量管理系统的结构示意图;7 is a schematic structural diagram of a traffic management system applicable to an embodiment of the present application;
图8为本申请实施例提供的队列控制装置实施例一的结构示意图;8 is a schematic structural diagram of a first embodiment of a queue control apparatus according to an embodiment of the present application;
图9为本申请实施例提供的队列控制装置实施例二的结构示意图。FIG. 9 is a schematic structural diagram of a second embodiment of a queue control apparatus according to an embodiment of the present application.
具体实施方式Detailed ways
本申请下述各实施例提供的队列控制方法,可适用于交换系统中。图1为本申请实施例提供的一种交换系统的结构示意图。如图1所示,该交换系统可以包括至少一个上行接口11和至少一个下行接口12。可选的,上行接口11的数量和下行接口12的数量可以相同,也可以不同。图1示例性地示出了n个上行接口11、以及n个下行接口12。在图1所示实施例的交换系统中上行接口11可以通过输入端口从交换系统外部接收传输流,并交换到下行接口12的输出端口输出。The queue control methods provided in the following embodiments of the present application can be applied to a switching system. FIG. 1 is a schematic structural diagram of a switching system according to an embodiment of the present application. As shown in FIG. 1, the switching system may include at least one uplink interface 11 and at least one downlink interface 12. Optionally, the number of uplink interfaces 11 and the number of downlink interfaces 12 may be the same or different. FIG. 1 exemplarily shows n uplink interfaces 11 and n downlink interfaces 12. In the switching system of the embodiment shown in FIG. 1, the uplink interface 11 may receive a transmission stream from the outside of the switching system through an input port, and switch to the output port of the downlink interface 12 for output.
可选的,该交换系统还可以包括交换单元,若干个交换单元按照一定的拓扑结构和控制方式构成交换网络,进而实现无阻塞交换。本申请实施例并不对交换单元的层级和具体数量进行限定,其可根据实际情况确定。Optionally, the switching system may further include a switching unit, and a plurality of switching units constitute a switching network according to a certain topology structure and a control method, thereby realizing non-blocking switching. The embodiments of the present application do not limit the level and specific number of the switching units, which may be determined according to actual conditions.
可选的,本申请实施例中的交换系统可以是交换网(switch fabric,SF)系统,也可以是流量管理(traffic manager,TM)系统,还可以是节点交换系统。本申请实施例描述的系统架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着通信技术的发展和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。Optionally, the switching system in the embodiment of the present application may be a switching network (SF) system, a traffic management (TM) system, or a node switching system. The system architecture and business scenarios described in the embodiments of the present application are to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those of ordinary skill in the art may know that with the communication With the development of technology and the emergence of new service scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
下面首先针对本申请实施例所适用的交换网系统进行简要说明。The following briefly describes the switching network system applicable to the embodiments of the present application.
图2为本申请实施例提供的交换网系统的结构示意图,如图2所示,SF系统由上行交换网接口芯片(ingress fabric interface chip,iFIC)和下行交换网接口芯片(egress fabric interface chip,eFIC)以及多个中间级的交换单元(switch element,SE)组成。图2示例性的示出了一个NxN的SF系统包括N个iFIC和N个eFIC,以及m个SE。其中,N和m均为正整数。FIG. 2 is a schematic structural diagram of a switching network system according to an embodiment of the present application. As shown in FIG. 2, the SF system includes an uplink switching network interface chip (iFIC) and a downlink switching network interface chip (egress interface interface chip). eFIC) and multiple intermediate-level switching elements (SE). FIG. 2 exemplarily shows that an NxN SF system includes N iFICs and N eFICs, and m SEs. Where N and m are both positive integers.
值得说明的是,本申请实施例中的上行交换网接口芯片iFIC也可以解释成上行交换网接口设备或上行交换网接口装置,下行交换网接口芯片eFIC也可以解释成下行交换网接口设备或下行交换网接口装置,本申请实施例并不对其进行限定。It is worth noting that the uplink switching network interface chip iFIC in the embodiments of the present application can also be interpreted as an uplink switching network interface device or an uplink switching network interface device, and the downlink switching network interface chip eFIC can also be interpreted as a downlink switching network interface device or a downlink The switching network interface device is not limited in the embodiment of the present application.
可选的,参照图2所示,SF系统将iFIC通过输入端口接收到的数据流交换到eFIC的输出端口输出。可选的,数据流通过SF系统中的SE时,可以保持数据流的长度不变(即数据流保持原本的变长包(variable-length packet)格式),也可以被iFIC切成信元(Cell)发送,待eFIC收齐每个数据流的所有Cell之后,再重组成完整的数据流。如何对数据流进行分切和重组是本领域技术人员的公知常识,此处不再赘述。Optionally, referring to FIG. 2, the SF system switches the data stream received by the iFIC through the input port to the eFIC output port for output. Optionally, when the data stream passes the SE in the SF system, the length of the data stream can be maintained unchanged (that is, the data stream maintains the original variable-length packet format), or it can be cut into cells by iFIC ( Cell), after the eFIC has collected all the cells of each data stream, it is reassembled into a complete data stream. How to split and reorganize the data stream is common knowledge of those skilled in the art, and is not repeated here.
可选的,SF系统可以包含一级或多级SE,上述图2所示的交换网系统包含一级SE,以及N个iFIC和N个eFIC。实际上iFIC和SE、eFIC和SE之间的连接关系不限于图2所示的结构。在一实施例中,iFIC和eFIC之间可以无需SE而直接互连,例如,iFIC和eFIC之间通过无线网格(Mesh)互连。Optionally, the SF system may include one or more levels of SEs, and the switching network system shown in FIG. 2 includes one level of SEs, and N iFICs and N eFICs. In fact, the connection relationship between iFIC and SE, and eFIC and SE is not limited to the structure shown in FIG. 2. In an embodiment, the iFIC and the eFIC may be directly interconnected without a SE, for example, the iFIC and the eFIC are interconnected through a wireless mesh (Mesh).
值得说明的是,图2所示的iFIC和eFIC分布在SE的两边,实际上,一块物理的FIC芯片可以同时包含iFIC和eFIC两部分。在SF系统中,iFIC通常需将数据流尽量均匀地分发到各个SE,由于iFIC发出的数据流中通常携带目的eFIC的信息,因而,SE可以据此向对应的eFIC转发数据流。It is worth noting that the iFIC and eFIC shown in Figure 2 are distributed on both sides of the SE. In fact, a physical FIC chip can contain both iFIC and eFIC. In the SF system, the iFIC usually needs to distribute the data stream to each SE as evenly as possible. Since the data stream sent by the iFIC usually carries the information of the destination eFIC, the SE can forward the data stream to the corresponding eFIC accordingly.
图3为本申请实施例中交换网系统中iFIC的结构示意图。如图3所示,在本申请实施例的SF系统中,iFIC通过输入端口(input port,IP)从SF系统外部接收数据流,通常情况下,iFIC内可以设置有多个虚拟输出队列(virtual output queue,VOQ)用以缓存去往不同目的eFIC或者eFIC所包含的多个输出端口(output port,OP)对应的数据流。VOQ是业界常用的保障服务质量(quality of service,QoS),防止头(head-of-line,HOL)阻塞的手段。FIG. 3 is a schematic structural diagram of an iFIC in a switching network system according to an embodiment of the present application. As shown in FIG. 3, in the SF system of the embodiment of the present application, the iFIC receives a data stream from the outside of the SF system through an input port (IP). In general, multiple virtual output queues (virtual output queue (VOQ) is used to buffer data streams corresponding to multiple destination eFICs or multiple output ports (OPs) included in the eFIC. VOQ is a commonly used method in the industry to ensure quality of service (QoS) and prevent head-of-line (HOL) blocking.
可选的,参照图3所示,iFIC中设置有队列管理器(queue manager,QM)和调度器(ingress scheduler,ISC),其中,QM设置在输入端口和交换网接口之间,用于管理iFIC中设置的VOQ,ISC与QM、交换网接口连接,通过交换网接口获取其他iFIC和eFIC的拥塞信息,负责调度QM中的VOQ,可以使调度输出的数据流通过交换网接口后发送给iFIC和eFIC之间的SE。Optionally, as shown in FIG. 3, the iFIC is provided with a queue manager (QM) and a scheduler (ISC). The QM is set between the input port and the switching network interface for management. The VOQ set in the iFIC is connected to the QM and the switching network interface. The switching network interface is used to obtain the congestion information of other iFICs and eFICs. It is responsible for scheduling the VOQ in the QM. The scheduled data flow can be sent to the iFIC through the switching network interface And eFIC.
对于交换网系统而言,在某些情况下,还需要根据系统要求或eFIC的端口细分出更多的逻辑端口,比如,按照数据流的优先级(class of service,Cos)进行细分,此时,若每个逻辑端口需要对应一个VOQ,则需要更多的VOQ。For the switching network system, in some cases, it is necessary to subdivide more logical ports according to system requirements or eFIC ports. For example, subdivide according to the priority of the data stream (class of service, Cos). At this time, if each logical port needs a corresponding VOQ, more VOQs are needed.
可选的,当交换网系统的规模很大,iFIC中需要设置的VOQ的数量会很多。例如,假设SF系统有2K个eFIC,每个eFIC具有48个端口,每个端口又细分为8个优先级,此时,iFIC中需要设置的VOQ的数量为:768K,即根据2K乘以48乘以8得到,这么大数量的VOQ需要花费很大的代价才能实现。Optionally, when the size of the switching network system is large, the number of VOQs that need to be set in the iFIC will be large. For example, assume that the SF system has 2K eFICs, each eFIC has 48 ports, and each port is subdivided into 8 priorities. At this time, the number of VOQs that need to be set in the iFIC is: 768K, which is based on 2K multiplied by Multiply 48 by 8 to get such a large number of VOQs at a great cost.
针对上述问题,在交换网系统中,假设根据eFIC的端口数量以及端口优先级数量确定出交换网系所需的理论VOQ数量,可以仅设置部分VOQ,即设置的VOQ数量小于理论VOQ数量。例如,当SF系统最多需要N1个VOQ时,此时,可以仅设置N1/2个VOQ,且要求SF系统中,同时要求SF系统中同时传输的数据流数量不超过N1/2,其中,N1为正整数。In view of the above problems, in the switching network system, it is assumed that the theoretical VOQ number required by the switching network system is determined according to the number of ports of the eFIC and the number of port priorities, and only a part of the VOQ can be set, that is, the set VOQ number is less than the theoretical VOQ number. For example, when the SF system requires a maximum of N1 VOQ, at this time, only N1 / 2 VOQs can be set, and the SF system is required, and the number of data streams transmitted simultaneously in the SF system is not more than N1 / 2, of which N1 Is a positive integer.
虽然上述现有技术能够在一定程度上减低SF的复杂度,减少VOQ耗费的资源,但是这种方案的灵活性低,当SF系统中传输的数据流数量大于设置的VOQ数量时,可能会因为设置的VOQ资源耗尽而产生数据流丢失的问题。Although the above-mentioned existing technologies can reduce the complexity of SF and the resources consumed by VOQ to a certain extent, this solution has low flexibility. When the number of data streams transmitted in the SF system is greater than the set number of VOQs, it may be caused by The set VOQ resource is exhausted and the data stream is lost.
可选的,针对现有技术中的上述问题,本申请实施例提供了一种队列控制方法、装置及存储介质,用以解决现有技术中由于设置的VOQ资源耗尽而产生数据流丢失的问题。Optionally, in view of the foregoing problems in the prior art, embodiments of the present application provide a queue control method, device, and storage medium, which are used to solve the problem of data flow loss in the prior art due to exhaustion of the set VOQ resources. problem.
图4为本申请实施例提供的队列控制方法实施例一的流程示意图。该队列控制方法可以应用于交换系统,该交换系统中设置有至少两个逻辑端口、至少两个传输队列和映射表,该映射表中至少存储有一个传输队列与至少一个逻辑端口的映射关系,每个逻辑端口对应一个传输流,在该交换系统中,传输队列的数量小于逻辑端口的数量。FIG. 4 is a schematic flowchart of a first embodiment of a queue control method according to an embodiment of the present application. The queue control method can be applied to a switching system. The switching system is provided with at least two logical ports, at least two transmission queues, and a mapping table. The mapping table stores at least one mapping relationship between a transmission queue and at least one logical port. Each logical port corresponds to a transport stream. In this switching system, the number of transmission queues is less than the number of logical ports.
可选的,本申请实施例中的逻辑端口包括具体的物理端口、以及每个物理端口根据优先级或用户要求细分后的端口等。Optionally, the logical ports in the embodiments of the present application include specific physical ports, and each physical port is subdivided according to priorities or user requirements.
可选的,本申请的实施例以交换系统为NxN的交换网系统进行说明,传输队列为虚拟 输出队列VOQ进行说明。作为一种示例,该交换网系统可以包含N个iFIC和N个eFIC,每个eFIC包含K个端口,每个端口细分为L个优先级。为简化描述,本申请实施例中,假设每个eFIC的端口数都相同,实际上系统允许eFIC有不同的端口数;各端口的优先级数量也可以不同。可选的,在实际应用中,每个端口可以进一步划分为多个逻辑端口,这需要更多的VOQ与之对应。其中,N、K、L均为正整数。Optionally, in the embodiment of the present application, the switching network system is a NxN switching network system, and the transmission queue is a virtual output queue VOQ. As an example, the switching network system may include N iFICs and N eFICs, each eFIC includes K ports, and each port is subdivided into L priorities. To simplify the description, in the embodiments of the present application, it is assumed that the number of ports of each eFIC is the same. In fact, the system allows eFICs to have different numbers of ports; the number of priorities of each port may also be different. Optionally, in practical applications, each port can be further divided into multiple logical ports, which requires more VOQ to correspond to it. Among them, N, K, L are all positive integers.
值得说明的是,本申请实施例的交换系统同样可以应用于上述或其它更多方式的队列(交换网系统中的VOQ)设计中。It is worth noting that the switching system in the embodiment of the present application can also be applied to the queue design (VOQ in the switching network system) described above or in more ways.
根据上述分析可知,当交换网系统包含N个eFIC,每个eFIC包含K个端口,每个端口细分为L个优先级时,交换网系统中最大规格的逻辑端口数量为“N×K×L”。但是,通常情况下,每个iFIC不会同时和所有的N×K×L个逻辑端口通信,也就是说,在理论的VOQ数量很大时,iFIC很少同时会收到去往所有端口的传输流。因此,可以在iFIC内仅设置M个VOQ以减小实现代价,其中,M为小于N×K×L的正整数。这M个VOQ可以动态分给传输中的流(也即,活跃中的流)。通常情况下,将从同一源端口(iFIC)收到,去往同一目的逻辑端口的传输包定义为同一条“流”。可选的,当传输流为数据流时,此处的传输包可以解释为数据包。According to the above analysis, when the switching network system includes N eFICs, each eFIC includes K ports, and each port is subdivided into L priorities, the maximum number of logical ports in the switching network system is “N × K × L ". However, under normal circumstances, each iFIC does not communicate with all N × K × L logical ports at the same time, that is, when the theoretical VOQ number is large, iFIC rarely receives Transport stream. Therefore, only M VOQs can be set in the iFIC to reduce the implementation cost, where M is a positive integer less than N × K × L. These M VOQs can be dynamically allocated to the streams in transmission (ie, active streams). Generally, the transmission packets received from the same source port (iFIC) and destined for the same destination logical port are defined as the same "flow". Optionally, when the transport stream is a data stream, the transport packet here may be interpreted as a data packet.
可选的,在本申请实施例中,交换网系统中可以设置一个深度为N×K×L的映射表,该映射表的宽度不小于log 2M,该log 2M表示设置的传输队列数所需的资源。当接收到一个传输流时,确定出该传输流对应的逻辑端口后,查询上述映射表,确定出该传输流对应的VOQ,并利用该VOQ传输。 Optionally, in the embodiment of the present application, a mapping table with a depth of N × K × L may be set in the switching network system, and the width of the mapping table is not less than log 2 M, where log 2 M represents the number of transmission queues that are set. Required resources. When a transport stream is received, after determining the logical port corresponding to the transport stream, the above mapping table is queried to determine the VOQ corresponding to the transport stream, and the VOQ is used for transmission.
可选的,该映射表可以通过哈希表、索引表的形式实现,其可以根据实际确定,本申请实施例并不对映射表的形式进行限定。Optionally, the mapping table may be implemented in the form of a hash table and an index table, which may be determined according to actual conditions. The embodiment of the present application does not limit the form of the mapping table.
可选的,在本实施例中,如图4所示,该队列控制方法可以包括如下步骤:Optionally, in this embodiment, as shown in FIG. 4, the queue control method may include the following steps:
步骤41:接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流。Step 41: Receive a first transport stream corresponding to the first logical port and a second transport stream corresponding to the second logical port.
在本实施例中,当该交换系统接收到第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流时,可选的,通过查询上述映射表可以获知交换系统中存在第一逻辑端口对应的第一传输队列,以及第二逻辑端口对应的第二传输队列,因而,在通常情况下,第一传输流应该通过第一传输队列传输到第一逻辑端口,第二传输流应该通过第二传输队列传输到第二逻辑端口。In this embodiment, when the switching system receives the first transport stream corresponding to the first logical port and the second transport stream corresponding to the second logical port, optionally, by querying the above mapping table, it can be known that the switching system exists The first transmission queue corresponding to the first logical port and the second transmission queue corresponding to the second logical port. Therefore, under normal circumstances, the first transmission stream should be transmitted to the first logical port through the first transmission queue, and the second transmission The stream should be transmitted to the second logical port through the second transmission queue.
值得说明的是,本申请实施例中的“第一”和“第二”并不表示顺序关系,只是用来表示两者不同。例如,第一逻辑端口和第二逻辑端口用来表示两个不同的逻辑端口,第一传输流和第二传输流用来表示两个不同的传输流,第一传输队列和第二传输队列用来表示两个不同的传输队列等。It is worth noting that “first” and “second” in the embodiments of the present application do not indicate a sequential relationship, but are used to indicate that the two are different. For example, the first logical port and the second logical port are used to represent two different logical ports, the first transport stream and the second transport stream are used to represent two different transport streams, and the first transmission queue and the second transmission queue are used to Represents two different transmission queues, etc.
步骤42:判断交换系统中空闲状态队列的数量是否小于第一阈值;若是,执行步骤43,若否,执行步骤45。Step 42: Determine whether the number of idle queues in the switching system is less than the first threshold; if yes, go to step 43, if no, go to step 45.
其中,该第一阈值小于交换系统中设置的传输队列的数量。The first threshold is less than the number of transmission queues set in the switching system.
在本申请实施例中,当交换系统接收到第一传输流和第二传输流之后,首先判断交换系统中空闲状态队列的数量是否充足,并根据空闲状态队列的数量确定如何将接收到的第一传输流和第二传输流传输到对应的逻辑端口。可选的,可以设置一个第一阈值,该第一阈值小于交换系统中设置的传输队列的数量,且交换系统可以根据空闲状态队列的数量与 第一阈值之间的大小关系,对接收到的传输流进行处理。In the embodiment of the present application, after receiving the first transport stream and the second transport stream, the switching system first determines whether the number of idle state queues in the switching system is sufficient, and determines how to receive the first A transport stream and a second transport stream are transmitted to corresponding logical ports. Optionally, a first threshold value may be set, and the first threshold value is smaller than the number of transmission queues set in the switching system, and the switching system may, according to the size relationship between the number of idle queues and the first threshold, Transport stream for processing.
可选的,在一个实施例中,交换系统中也可以设置多个阈值,在空闲状态队列的数量小于一个阈值时,执行相应的动作。比如,当交换系统中设置有两个阈值,在空闲状态队列少于设定的第一个阈值时,可以发出警告等通知,当空闲状态队列少于设定的第二个阈值时,可以根据工作队列的性质或工作状态队列待传输的传输流的目的端口,将某几个接收到的传输流利用一个传输队列进行传输。Optionally, in one embodiment, multiple thresholds may be set in the switching system, and when the number of idle queues is less than one threshold, a corresponding action is performed. For example, when two thresholds are set in the switching system, when the idle queue is less than the first threshold, a notification such as a warning can be issued. When the idle queue is less than the second threshold, you can The nature of the work queue or the destination port of the work status queue for the transport stream to be transmitted. Several received transport streams are transmitted using a transmission queue.
本申请实施例并不对交换系统中设置的阈值的数量进行限定,其可以根据实际情况进行选择。This embodiment of the present application does not limit the number of thresholds set in the switching system, and may be selected according to actual conditions.
步骤43:将原本通过第一传输队列传输的第一传输流、原本通过第二传输队列传输的第二传输流均通过第一传输队列传输。Step 43: Both the first transmission stream originally transmitted through the first transmission queue and the second transmission stream originally transmitted through the second transmission queue are transmitted through the first transmission queue.
在本申请实施例中,当交换系统中空闲状态队列的数量小于第一阈值,即交换系统中处于空闲状态的传输队列数量在某个时刻可能会小于将要接收的传输流的数量,为了避免由于空闲状态队列的资源耗尽致使接收的传输流丢弃的问题,本实施例中,可以将原本通过第一传输队列传输的第一传输流、原本通过第二传输队列传输的第二传输流均通过第一传输队列传输,这样第二传输队列则变成空闲状态的传输队列,从而可利用其传输新接收到的传输流。In the embodiment of the present application, when the number of idle queues in the switching system is less than the first threshold, that is, the number of transmission queues in the idle state in the switching system may be less than the number of transmission streams to be received at a certain time. The exhaustion of resources in the idle queue causes the received transport stream to be discarded. In this embodiment, the first transport stream originally transmitted through the first transmission queue and the second transport stream originally transmitted through the second transmission queue can be passed. The first transmission queue transmits, so that the second transmission queue becomes an idle transmission queue, so that it can use it to transmit the newly received transmission stream.
通过利用原本只传输第一传输流的第一传输队列来传输第一传输流和第二传输流,这样可以增加交换系统中空闲状态队列的数量,从而保证新接收到的传输流有可进入的传输队列,避免了传输流被丢弃的问题外,还能够避免交换系统对上游输送传输流的系统造成反压。By using the first transmission queue that originally transmitted only the first transmission stream to transmit the first transmission stream and the second transmission stream, this can increase the number of idle state queues in the switching system, thereby ensuring that newly received transmission streams are accessible. The transmission queue avoids the problem that the transmission stream is discarded, and can also prevent the switching system from causing back pressure on the system that transports the transmission stream upstream.
可选的,在本申请的另一实施例中,该步骤还可以通过如下步骤实现,即将原本通过第一传输队列传输的第一传输流、原本通过第二传输队列传输的第二传输流均通过第二传输队列传输,本申请实施例并不限定第一传输流和第二传输流的可承载传输队列,其可根据实际情况确定。本申请实施例中,可以将上述原本通过两个传输队列传输的传输流只通过其中的一个传输队列传输的方案称为“队列合并”或“队列压缩”。Optionally, in another embodiment of the present application, this step may also be implemented by the following steps, that is, the first transmission stream originally transmitted through the first transmission queue and the second transmission stream originally transmitted through the second transmission queue are both Through the second transmission queue transmission, the embodiments of the present application do not limit the bearable transmission queues of the first transmission stream and the second transmission stream, which can be determined according to actual conditions. In the embodiment of the present application, the above-mentioned solution that the transmission streams originally transmitted through the two transmission queues are transmitted through only one of the transmission queues may be referred to as "queue merging" or "queue compression".
可选的,作为一种示例,在本申请实施例中,第一传输流对应的第一逻辑端口和第二传输流对应的第二逻辑端口需要满足如下规则,即第一逻辑端口和第二逻辑端口位于同一个输出端口模块上。Optionally, as an example, in the embodiment of the present application, the first logical port corresponding to the first transport stream and the second logical port corresponding to the second transport stream need to satisfy the following rules, that is, the first logical port and the second logical port The logical ports are located on the same output port module.
例如,对于交换网系统而言,可以将逻辑端口位于同一个eFIC上,但不同逻辑端口对应的至少两个传输流只利用其中一个传输流对应的传输队列进行传输。具体的,假设第一传输流对应的第一逻辑端口位于第一eFIC上,第二传输流对应的第二逻辑端口也位于第一eFIC上,但第三传输队列对应的第三逻辑端口位于第二eFIC上,且第一传输流通过第一传输队列传输,第二传输流通过第二传输队列传输,第三传输流通过第三传输队列传输,因而,在交换网系统中空闲状态队列的数量小于设定的第一阈值时,可以将原本通过第一传输队列传输的第一传输流和原本通过第二传输队列传输的第二传输流利用第一传输队列或者第二传输队列传输,而不改变第三传输流与第三传输队列的关系。For example, for a switching network system, logical ports may be located on the same eFIC, but at least two transport streams corresponding to different logical ports are transmitted using only a transmission queue corresponding to one of the transport streams. Specifically, it is assumed that the first logical port corresponding to the first transmission stream is located on the first eFIC, and the second logical port corresponding to the second transmission stream is also located on the first eFIC, but the third logical port corresponding to the third transmission queue is located on the first eFIC. On two eFICs, the first transmission stream is transmitted through the first transmission queue, the second transmission stream is transmitted through the second transmission queue, and the third transmission stream is transmitted through the third transmission queue. Therefore, the number of idle state queues in the switching network system When it is less than the set first threshold, the first transmission stream originally transmitted through the first transmission queue and the second transmission stream originally transmitted through the second transmission queue may be transmitted using the first transmission queue or the second transmission queue without Change the relationship between the third transmission stream and the third transmission queue.
通过限定第一逻辑端口和第二逻辑端口位于同一个输出端口模块上,可以简化交换系统的复杂度,便于在后续在交换系统中的空闲状态队列的数量较多时,将原本合并的队列再拆分开,具体的方案参见下述实施例中的记载,此处不再赘述。By limiting the first logical port and the second logical port to be on the same output port module, the complexity of the switching system can be simplified, and it is convenient to disassemble the originally merged queue when the number of subsequent idle state queues in the switching system is large. Separately, refer to the description in the following embodiments for specific solutions, which will not be repeated here.
可选的,作为另一种示例,在本申请实施例中,第一传输队列和第二传输队列需要满足如下规则,即第一传输队列和第二传输队列中的传输流数量均小于预设数值。Optionally, as another example, in the embodiment of the present application, the first transmission queue and the second transmission queue need to satisfy a rule that the number of transmission streams in the first transmission queue and the second transmission queue is less than a preset Value.
可选的,假设第一传输流对应的第一逻辑端口和第二传输流对应的第二逻辑端口不在同一个输出端口模块上,但交换系统中空闲状态队列的又小于第一阈值时,此时,可以查看第一逻辑端口对应的第一传输队列和第二逻辑端口对应的第二传输队列中的传输流数量,并且当第一传输队列和第二传输队列中的传输流数量均小于预设数值时,将利用第一传输队列和第二传输队列传输的传输流利用其中的一个传输队列传输。Optionally, assuming that the first logical port corresponding to the first transport stream and the second logical port corresponding to the second transport stream are not on the same output port module, but when the idle state queue in the switching system is less than the first threshold, this At this time, the number of transmission streams in the first transmission queue corresponding to the first logical port and the second transmission queue corresponding to the second logical port can be viewed. When the value is set, the transport stream transmitted using the first transmission queue and the second transmission queue is transmitted using one of the transmission queues.
可选的,本申请实施例并不限定上述两个规则,其可在某些情况下,根据其中的一个规则进行队列控制,也可在某些情况下,综合上述两个规则进行队列控制,其可根据实际情况进行确定,此处不再赘述。Optionally, the embodiments of the present application are not limited to the above two rules. In some cases, queue control may be performed according to one of the rules, or in some cases, the above two rules may be combined to perform queue control. It can be determined according to the actual situation and will not be repeated here.
步骤44:更新上述映射表,更新后的映射表中第一传输队列与第一逻辑端口和第二逻辑端口具有映射关系。Step 44: Update the above mapping table. In the updated mapping table, the first transmission queue has a mapping relationship with the first logical port and the second logical port.
可选的,在本申请实施例中,当原本通过第一传输队列传输的第一传输流、原本通过第二传输队列传输的第二传输流均通过第一传输队列传输后,需要按照更改之后的逻辑端口与传输队列之间的映射关系进行调度。因而,需要更新上述映射表,更新后的映射表中第一传输队列与第一逻辑端口和第二逻辑端口具有映射关系,以使交换系统再次接收到第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流时,按照更新后映射表中的映射关系,利用第一传输队列传输该第一传输流和第二传输流。Optionally, in the embodiment of the present application, after the first transmission stream originally transmitted through the first transmission queue and the second transmission stream originally transmitted through the second transmission queue are transmitted through the first transmission queue, The mapping relationship between the logical port and the transmission queue is scheduled. Therefore, the above mapping table needs to be updated. In the updated mapping table, the first transmission queue has a mapping relationship with the first logical port and the second logical port, so that the switching system receives the first transmission stream and the first logical port corresponding to the first logical port again. When the second transport stream corresponding to the second logical port is used, according to the mapping relationship in the updated mapping table, the first transport stream and the second transport stream are transmitted by using the first transmission queue.
步骤45:利用第一逻辑端口对应的第一传输队列传输第一传输流,利用第二逻辑端口对应的第二传输队列传输第二传输流。Step 45: Use the first transmission queue corresponding to the first logical port to transmit the first transmission stream, and use the second transmission queue corresponding to the second logical port to transmit the second transmission stream.
可选的,在本申请实施例中,当交换系统中空闲状态队列的数量大于或等于第一阈值时,表明交换系统中有足够的空闲状态队列供其他的传输流使用,此时,在接收到第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流时,可以按照映射表中设定好的逻辑端口与传输队列的映射关系,确定出第一逻辑端口对应的第一传输队列、第二逻辑端口对应的第二传输队列,进而利用第一传输队列传输第一传输流,利用第二传输队列传输第二传输流。Optionally, in the embodiment of the present application, when the number of idle state queues in the switching system is greater than or equal to the first threshold, it indicates that there are enough idle state queues in the switching system for use by other transport streams. When reaching the first transport stream corresponding to the first logical port and the second transport stream corresponding to the second logical port, the mapping relationship between the logical port and the transmission queue set in the mapping table may be used to determine the The first transmission queue and the second transmission queue corresponding to the second logical port further use the first transmission queue to transmit the first transmission stream, and use the second transmission queue to transmit the second transmission stream.
值得说明的是,本申请实施例中,将至少两个传输流利用一个传输队列传输的方式可以很灵活,即队列压缩的程度可以根据需求确定,即在队列压缩后,交换系统中始终有空闲状态队列供新接收到的传输流使用。It is worth noting that in the embodiment of the present application, the manner in which at least two transport streams are transmitted using one transmission queue can be very flexible, that is, the degree of queue compression can be determined according to requirements, that is, after the queue is compressed, there is always idle in the switching system. The status queue is used by newly received transport streams.
本申请实施例提供的队列控制方法,通过接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流,在交换系统中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的第一传输流、原本通过第二传输队列传输的第二传输流均通过第一传输队列传输,更新映射表,更新后的映射表中第一传输队列与第一逻辑端口和第二逻辑端口具有映射关系。该技术方案,交换系统中传输队列的数量小于逻辑端口的数量,且在交换系统中空闲状态队列的数量少于第一阈值时,将至少两个传输流通过一个传输队列传输,能够保证交换系统中有足够的传输队列供接收到的传输流使用,避免了现有技术中由于设置的传输队列资源耗尽而致使数据流丢失或对上游系统产生的反压问题,灵活度高。According to the queue control method provided in the embodiment of the present application, by receiving a first transport stream corresponding to a first logical port and a second transport stream corresponding to a second logical port, when the number of idle state queues in the switching system is less than a first threshold, The first transmission stream originally transmitted through the first transmission queue and the second transmission stream originally transmitted through the second transmission queue are transmitted through the first transmission queue. The mapping table is updated. In the updated mapping table, the first transmission queue and the first transmission queue are updated. The logical port and the second logical port have a mapping relationship. In this technical solution, when the number of transmission queues in the switching system is less than the number of logical ports, and when the number of idle state queues in the switching system is less than the first threshold, transmitting at least two transmission streams through one transmission queue can ensure the switching system. There are enough transmission queues for the use of the received transmission stream, which avoids the problem of data stream loss or back pressure on the upstream system caused by exhaustion of the set transmission queue resources in the prior art, and has high flexibility.
可选的,在上述实施例的基础上,图5为本申请实施例提供的队列控制方法实施例二的流程示意图。如图5所示,本申请实施例提供的队列控制方法,还可以包括如下步骤:Optionally, based on the foregoing embodiment, FIG. 5 is a schematic flowchart of Embodiment 2 of a queue control method according to an embodiment of the present application. As shown in FIG. 5, the queue control method provided in the embodiment of the present application may further include the following steps:
步骤51:接收第三逻辑端口对应的第三传输流,该第三逻辑端口与交换系统中设置的上述至少两个传输队列中的任意一个均不存在映射关系。Step 51: Receive a third transmission stream corresponding to the third logical port, and there is no mapping relationship between the third logical port and any one of the at least two transmission queues set in the switching system.
可选的,在本申请实施例中,当交换系统接收到第三逻辑端口对应的第三传输流,但是通过查询交换系统的映射表得知,映射表中没有存储第三逻辑端口与交换系统中设置的至少两个传输队列中的任意一个的映射关系,即交换系统中没有设定用于传输第三传输流的传输队列。Optionally, in the embodiment of the present application, when the switching system receives the third transport stream corresponding to the third logical port, it is learned by querying the mapping table of the switching system that the third logical port and the switching system are not stored in the mapping table. Any one of the at least two transmission queues set in the mapping relationship, that is, there is no transmission queue set in the switching system for transmitting the third transmission stream.
步骤52:利用第三传输队列传输第三传输流,该第三传输队列为交换系统中处于空闲状态的传输队列中的任意一个。Step 52: Use a third transmission queue to transmit the third transmission stream, and the third transmission queue is any one of the transmission queues in an idle state in the switching system.
可选的,由上述分析可知,交换系统中存在足量的空闲状态队列,因而,当接收到第三传输流时,可以从空闲状态队列中分配一个传输队列给第三传输流使用,此处,可以将给第三传输流分配的传输队列命名为第三传输队列,进而利用该第三传输队列传输第三传输流。可选的,该第三传输队列可以是交换系统中处于空闲状态的传输队列中的任意一个。Optionally, it can be known from the above analysis that there is a sufficient amount of idle state queues in the switching system. Therefore, when a third transmission stream is received, a transmission queue can be allocated from the idle state queue to the third transmission stream. Here, The transmission queue allocated to the third transmission stream may be named a third transmission queue, and then the third transmission queue is used to transmit the third transmission stream. Optionally, the third transmission queue may be any one of the transmission queues in an idle state in the switching system.
步骤53:将第三传输队列与第三传输端口之间的映射关系保存到映射表中。Step 53: Save the mapping relationship between the third transmission queue and the third transmission port to a mapping table.
可选的,当确定利用第三传输队列传输第三传输流时,即确定了第三传输队列与第三传输流对应的第三逻辑端口应该具备映射关系,因而,可以将第三传输队列和第三传输端口之间的映射关系保存到映射表中,比如,将第三传输队列的编号或者地址写入映射表,以使交换系统在后续再收到第三逻辑端口对应的第三传输流时,可以直接利用该第三传输队列进行传输。Optionally, when it is determined to use the third transmission queue to transmit the third transmission stream, it is determined that the third logical port corresponding to the third transmission queue and the third transmission stream should have a mapping relationship. Therefore, the third transmission queue and the The mapping relationship between the third transmission ports is stored in the mapping table. For example, the number or address of the third transmission queue is written into the mapping table, so that the switching system will subsequently receive the third transmission stream corresponding to the third logical port. At this time, the third transmission queue may be directly used for transmission.
本申请实施例提供的队列控制方法,在接收第三逻辑端口对应的第三传输流,且该第三逻辑端口与交换系统中设置的上述至少两个传输队列中的任意一个均不存在映射关系,此时,可以从交换系统中处于空闲状态的传输队列中选择一个作为第三传输队列,并利用第三传输队列传输所述第三传输流,随后将第三传输队列与第三传输端口之间的映射关系保存到映射表中。该技术方案能够保证在接收到新的传输流时交换系统中有空闲状态队列可用,避免了由于传输队列的资源耗尽造成的传输流丢失或对上游系统产生的反压问题,灵活度高,保证了交换系统上行接口接收到的传输流能够顺利交换到下行接口输出。The queue control method provided in the embodiment of the present application receives a third transmission stream corresponding to a third logical port, and there is no mapping relationship between the third logical port and any one of the at least two transmission queues set in the switching system. At this time, one of the idle transmission queues in the switching system can be selected as the third transmission queue, and the third transmission queue is used to transmit the third transmission stream, and then the third transmission queue and the third transmission port are The mapping relationship between them is saved in the mapping table. The technical solution can ensure that an idle state queue is available in the switching system when a new transmission stream is received, avoiding the loss of the transmission stream due to the exhaustion of the resources of the transmission queue or the problem of back pressure on the upstream system, and has high flexibility. It ensures that the transport stream received by the uplink interface of the switching system can be smoothly switched to the output of the downlink interface.
可选的,作为另一种示例,图6为本申请实施例提供的队列控制方法实施例三的流程示意图。如图6所示,本申请实施例提供的队列控制方法,还可以包括如下步骤:Optionally, as another example, FIG. 6 is a schematic flowchart of Embodiment 3 of a queue control method according to an embodiment of the present application. As shown in FIG. 6, the queue control method provided in the embodiment of the present application may further include the following steps:
步骤61:判断交换系统中空闲状态队列的数量是否大于第二阈值;若是,执行步骤62,若否,执行步骤63。Step 61: Determine whether the number of idle queues in the switching system is greater than the second threshold; if yes, go to step 62; if no, go to step 63.
其中,第二阈值大于第一阈值,且小于交换系统中设置的传输队列的数量。The second threshold is larger than the first threshold and smaller than the number of transmission queues set in the switching system.
可选的,在本申请的实施例中,实时或周期性扫描交换系统中处于活跃状态或者空闲状态的传输队列,获取交换系统中处于空闲状态的队列数量,因而,可以判断交换系统中该空闲状态队列的数量与设定的第二阈值的大小关系,并根据空闲状态队列的数量确定用于传输接收到的传输流的传输队列。Optionally, in the embodiments of the present application, the active or idle transmission queues in the switching system are scanned in real time or periodically to obtain the number of idle queues in the switching system. Therefore, the idle status in the switching system can be determined. The number of state queues is related to the size of the set second threshold, and a transmission queue for transmitting the received transmission stream is determined according to the number of idle state queues.
值得说明的是,在本申请实施例中,第二阈值需要是大于第一阈值的数,但第二阈值最大也不能高于交换系统中设置的传输队列的数量,即交换系统中空闲状态队列的数量小于交换系统中设置的传输队列的数量。It is worth noting that in the embodiment of the present application, the second threshold value needs to be a number greater than the first threshold value, but the maximum value of the second threshold value cannot be higher than the number of transmission queues set in the switching system, that is, the idle state queue in the switching system. The number is less than the number of transmission queues set in the switching system.
本实施例中的第二阈值和第一阈值只是交换系统中设置的两个判断门限值,其可根据实际情况进行确定,本申请实施例并不对其进行限定。The second threshold and the first threshold in this embodiment are only two judgment thresholds set in the switching system, which can be determined according to actual conditions, which are not limited in the embodiments of the present application.
步骤62:将通过第一传输队列传输的第一传输流和第二传输流,通过第一传输队列和第四传输队列传输。Step 62: The first transmission stream and the second transmission stream transmitted through the first transmission queue are transmitted through the first transmission queue and the fourth transmission queue.
其中,该第四传输队列为交换系统中处于空闲状态的传输队列中的任意一个。The fourth transmission queue is any one of the transmission queues in an idle state in the switching system.
可选的,作为一种示例,当交换系统中空闲状态队列的数量很多,但仍然有被合并的队列时,即交换系统中空闲状态队列的数量大于第二阈值时,可以将利用一个传输队列传输的两个传输流再分散到两个传输队列传输,即可以解释成“队列解压缩”。Optionally, as an example, when the number of idle state queues in the switching system is large, but there are still merged queues, that is, when the number of idle state queues in the switching system is greater than the second threshold, a transmission queue may be utilized The two transmission streams transmitted are then dispersed into two transmission queues for transmission, which can be interpreted as "queue decompression".
具体的,在交换系统的上行接口接收到上述压缩到第一传输队列传输的第一传输流和第二传输流时,且确定出交换系统中空闲状态队列的数量大于上述设定的第二阈值时,此时,可以从空闲状态队列中选择一个传输队列,将其与上述第一传输队列一同传输第一传输流和第二传输流。Specifically, when the uplink interface of the switching system receives the first transport stream and the second transport stream compressed and transmitted to the first transmission queue, it is determined that the number of idle queues in the switching system is greater than the second threshold set above. At this time, a transmission queue may be selected from the idle state queue, and the first transmission queue and the second transmission stream may be transmitted together with the first transmission queue.
例如,假设从交换系统中处于空闲状态的传输队列中选定的传输队列为第四传输队列时,便可以通过第一传输队列和第四传输队列传输原本通过第一传输队列传输的第一传输流和第二传输流。For example, if the transmission queue selected from the idle transmission queue in the switching system is the fourth transmission queue, the first transmission that was originally transmitted through the first transmission queue can be transmitted through the first transmission queue and the fourth transmission queue. Stream and second transport stream.
对于第一传输队列和第四传输队列与第一传输流和第二传输流的对应关系,其可根据实际情况确定,此处不对其进行限定。The correspondence between the first transmission queue and the fourth transmission queue and the first transmission stream and the second transmission stream may be determined according to actual conditions, and are not limited herein.
可选的,在本申请实施例中,该步骤,即将通过第一传输队列传输的第一传输流和第二传输流,通过第一传输队列和第四传输队列传输可以通过如下步骤实现:Optionally, in this embodiment of the present application, this step, that is, the first transmission stream and the second transmission stream to be transmitted through the first transmission queue, and the transmission through the first transmission queue and the fourth transmission queue may be implemented by the following steps:
首先,判断第一传输队列中是否存在第一传输流的传输包和第二传输流的传输包。First, it is determined whether there are transmission packets of the first transmission stream and transmission packets of the second transmission stream in the first transmission queue.
可选的,在一个实施例中,在第一传输队列中不存在第二传输流的传输包时,通过第一传输队列传输第一传输流,且通过第四传输队列传输第二传输流;相应的,保存第一传输队列与第一逻辑端口的映射关系,以及,第四传输队列与第二逻辑端口的映射关系。Optionally, in an embodiment, when there is no transmission packet of the second transmission stream in the first transmission queue, the first transmission stream is transmitted through the first transmission queue, and the second transmission stream is transmitted through the fourth transmission queue; Correspondingly, the mapping relationship between the first transmission queue and the first logical port and the mapping relationship between the fourth transmission queue and the second logical port are saved.
或者,在另一个实施例中,在第一传输队列中不存在第一传输流的传输包时,通过第一传输队列传输第二传输流,且通过第四传输队列传输第一传输流;相应的,保存第一传输队列与第二逻辑端口的映射关系,以及,第四传输队列与第一逻辑端口的映射关系。Or, in another embodiment, when there is no transmission packet of the first transmission stream in the first transmission queue, the second transmission stream is transmitted through the first transmission queue, and the first transmission stream is transmitted through the fourth transmission queue; accordingly The mapping relationship between the first transmission queue and the second logical port and the mapping relationship between the fourth transmission queue and the first logical port are stored.
具体的,当为新收到的属于合并队列的传输流(本实施例中,该合并队列为第一传输队列,传输流为第一传输流或第二传输流)新分配一个传输队列时,但只能在合并队列将该传输流的传输包排空之后才允许调度新分配,否则,可能致使逻辑端口收到的传输流不完整。Specifically, when a new transmission queue is allocated for a newly received transport stream that belongs to a merge queue (in this embodiment, the merge queue is the first transmission queue and the transmission stream is the first transmission stream or the second transmission stream), However, new allocations can only be scheduled after the merge queue has emptied the transport packets of the transport stream; otherwise, the transport stream received by the logical port may be incomplete.
因而,在本申请的一实施例中,可以控制第一传输队列中的传输包只出不进,当第一传输队列中的传输包排空时,将后续收到的传输流分别进入各自的传输队列。Therefore, in an embodiment of the present application, it is possible to control the transmission packets in the first transmission queue to only be sent out. When the transmission packets in the first transmission queue are emptied, the subsequent received transmission streams are respectively entered into their respective Transmission queue.
可选的,在本申请的另一实施例中,可以在第一传输队列中为第一传输流和第二传输流分别设置一个计数器,用于统计第一传输队列中每个传输流的传输包数量,当收到原本利用该第一传输队列传输的第一传输流和第二传输流时,仅当第一传输队列中第一传输流或第二传输流的计数器为0时,才为其分配新的传输队列。通过这种方式为第一传输流或第二传输流新分配的传输队列允许立即被调度。Optionally, in another embodiment of the present application, a counter may be set in the first transmission queue for the first transmission stream and the second transmission stream, respectively, for counting the transmission of each transmission stream in the first transmission queue. Number of packets. When the first transport stream and the second transport stream that were originally transmitted using the first transmission queue are received, it is only when the counter of the first transport stream or the second transport stream in the first transmission queue is 0. It allocates a new transmission queue. A newly allocated transmission queue for the first transport stream or the second transport stream in this way allows immediate scheduling.
可选的,当利用第一传输队列传输的第一传输流或者第二传输流分别由第一传输队列或第四传输队列传输时,及时保存传输流对应的传输队列与逻辑端口之间的映射关系。比如,当原本通过第一传输队列传输第一传输流和第二传输流,经过第一传输队列解压缩后,通过第一传输队列传输第一传输流,且第四传输队列传输第二传输流时,此时,保存第一 传输队列与第一逻辑端口的映射关系,以及,第四传输队列与第二逻辑端口的映射关系,以使交换系统再次接收到第一传输流和第二传输流时可以自动进入各自的传输队列。Optionally, when the first transmission stream or the second transmission stream transmitted by using the first transmission queue is transmitted by the first transmission queue or the fourth transmission queue, respectively, the mapping between the transmission queue corresponding to the transmission stream and the logical port is saved in time. relationship. For example, when the first transmission stream and the second transmission stream are originally transmitted through the first transmission queue, after the first transmission queue is decompressed, the first transmission stream is transmitted through the first transmission queue, and the second transmission stream is transmitted through the fourth transmission queue. At this time, the mapping relationship between the first transmission queue and the first logical port and the mapping relationship between the fourth transmission queue and the second logical port are saved, so that the switching system receives the first transmission stream and the second transmission stream again. Can automatically enter their respective transmission queues.
步骤63:利用第一传输队列传输第一传输流和第二传输流。Step 63: Use the first transmission queue to transmit the first transport stream and the second transport stream.
可选的,在本申请实施例中,当交换系统中空闲状态队列的数量不大于第二阈值时,表明交换系统中处于空闲状态的传输队列不是很多,此时,可以不对第一传输队列传输的传输流进行任何处理,即仍然利用该第一传输队列传输第一传输流和第二传输流。Optionally, in the embodiment of the present application, when the number of idle queues in the switching system is not greater than the second threshold, it indicates that there are not many idle transmission queues in the switching system. At this time, the first transmission queue may not be transmitted. To perform any processing, that is, still use the first transmission queue to transmit the first transport stream and the second transport stream.
本申请实施例提供的队列控制方法,在交换系统中空闲状态队列的数量大于第二阈值时,将通过第一传输队列传输的第一传输流和第二传输流,通过第一传输队列和第四传输队列传输,该第四传输队列为所述交换系统中处于空闲状态的传输队列中的任意一个。该技术方案在交换系统中空闲状态队列的数量足够多时,将原本合并传输的传输流再分配到多个传输队列进行传输,实现了传输队列的解压缩处理,提高了交换系统的性能。In the queue control method provided in the embodiment of the present application, when the number of idle state queues in the switching system is greater than a second threshold, the first transmission stream and the second transmission stream transmitted through the first transmission queue are transmitted through the first transmission queue and the third transmission queue. Four transmission queue transmissions. The fourth transmission queue is any one of transmission queues in an idle state in the switching system. In the technical solution, when the number of idle state queues in the switching system is sufficient, the transmission streams that were originally merged and transmitted are redistributed to multiple transmission queues for transmission, thereby decompressing the transmission queues and improving the performance of the switching system.
值得说明的是,本申请实施例通过对传输队列进行压缩和解压缩处理(例如,交换系统具有100个逻辑端口,理论上,需要的传输队列的数量应该为100个,但是,本申请实施例可以仅设置50个传输队列,当交换系统中空闲状态队列的数量小于10个时,通过将多个传输流合并到一个传输队列进行传输,以释放出空闲状态队列,而且当交换系统中空闲状态队列的数量大于30时,将原本合并传输的多个传输流再分配到多个传输队列进行传输),使得交换系统可以用较少的传输队列数量支撑所有逻辑端口的要求,而且也不会出现因为队列资源耗尽而产生的传输流丢失或反压的情况,交换系统的性能高。It is worth noting that the embodiments of the present application perform compression and decompression processing on transmission queues (for example, the switching system has 100 logical ports. In theory, the number of transmission queues required should be 100. However, the embodiments of the present application can Only 50 transmission queues are set. When the number of idle status queues in the switching system is less than 10, multiple transmission streams are combined into one transmission queue for transmission to release the idle status queues, and when the idle status queues in the switching system are released When the number is greater than 30, multiple transmission streams that were originally combined and transmitted are redistributed to multiple transmission queues for transmission), so that the switching system can support the requirements of all logical ports with a smaller number of transmission queues, and it will not occur because When the queue resources are exhausted and the transmission stream is lost or back-pressured, the performance of the switching system is high.
可选的,在本申请的一实施例中,上述交换系统不限于交换网系统,其还可以是流量管理系统等。下面对本申请实施例适用的流量管理系统进行简要说明。Optionally, in an embodiment of the present application, the foregoing switching system is not limited to a switching network system, and may also be a traffic management system or the like. The following briefly describes the traffic management system applicable to the embodiments of the present application.
图7为本申请实施例适用的流量管理系统的结构示意图。该实施例以一个具有3层调度器的流量管理系统进行说明。如图7所示,假设该流量管理系统具有K个父端口,每个父端口包括L个子端口,每个子端口内又可以划分为P个粒度(比如,优先级),这样流量管理系统具有“K乘以L乘以P”个端口粒子,相应的,流量管理系统所需要的最大流队列数为“K乘以L乘以P”。FIG. 7 is a schematic structural diagram of a traffic management system applicable to an embodiment of the present application. This embodiment is described with a traffic management system having a 3-layer scheduler. As shown in FIG. 7, it is assumed that the traffic management system has K parent ports, and each parent port includes L child ports, and each child port can be divided into P granularities (for example, priorities), so that the traffic management system has " K times L times P "port particles. Correspondingly, the maximum number of flow queues required by the traffic management system is" K times L times P ".
可选的,本实施例中,流量管理系统中也可以设置一个映射表、至少两个流队列,该映射表中存储有至少一个流队列和至少一个端口粒子的映射关系,每个端口粒子对应一个传输流,流队列的数量小于端口粒子的数量。可选的,该映射表的深度为“K乘以L乘以P”,该映射表用于灵活的分配和回收流队列的资源。Optionally, in this embodiment, a mapping table and at least two flow queues may be set in the traffic management system. The mapping table stores a mapping relationship between at least one flow queue and at least one port particle, and each port particle corresponds to For a transport stream, the number of stream queues is less than the number of port particles. Optionally, the depth of the mapping table is "K times L times P", and the mapping table is used to flexibly allocate and recycle resources of the flow queue.
可选的,在本申请的实施例中,当该流量管理系统中空闲状态流队列的数量小于第一阈值时,可以将原本分别利用流队列传输的传输流利用一个流队列传输,而当该流量管理系统中空闲状态流队列的数量大于第二阈值时,将原本合并传输的传输流分别分配流队列进行传输。比如,在空闲状态流队列的数量小于第一阈值时,将原本通过第一流队列传输的第一传输流、原本通过第二流队列传输的第二传输流均通过第一流队列或第二流队列传输,以释放出空闲状态流队列。而在空闲状态流队列的数量大于第二阈值时,将通过第一流队列传输的第一传输流和第二传输流,通过第一流队列和空闲状态流队列中的一个流队列进行传输。Optionally, in the embodiment of the present application, when the number of idle state stream queues in the traffic management system is less than the first threshold, the transport streams originally transmitted by using the stream queues may be transmitted by using one stream queue, and when the When the number of idle state flow queues in the traffic management system is greater than the second threshold, the original merged and transmitted transmission streams are respectively allocated to the flow queues for transmission. For example, when the number of idle state stream queues is less than the first threshold, the first transport stream originally transmitted through the first stream queue and the second transport stream originally transmitted through the second stream queue are all passed through the first stream queue or the second stream queue. Transmission to release the idle state flow queue. When the number of idle state stream queues is greater than the second threshold, the first transport stream and the second transport stream that are transmitted through the first stream queue are transmitted through one stream queue in the first stream queue and the idle state stream queue.
可选的,在本实施例中,上述第一传输流对应的第一端口粒子和第二传输流对应的第二端口粒子属于同一子端口,或者,上述第一流队列和第二流队列中的传输流数量小于预 设数值。Optionally, in this embodiment, the first port particles corresponding to the first transport stream and the second port particles corresponding to the second transport stream belong to the same subport, or The number of transport streams is less than a preset value.
因而,本申请实施例中的队列控制方法也适用于解决流量管理系统中由于需要设置流队列的数量较多,致使流量管理系统的耗费代价高的问题,或者由于设置的流队列数量过少致使流队列资源耗尽产生的传输包丢失或反压的问题。Therefore, the queue control method in the embodiment of the present application is also suitable for solving the problem that the flow management system needs a large number of flow queues, which results in a high cost of the flow management system, or because the number of flow queues is too small. The problem of lost or back-pressured transmission packets due to exhaustion of stream queue resources.
图8为本申请实施例提供的队列控制装置实施例一的结构示意图。该队列控制装置可集成于交换系统中,该交换系统中设置有至少两个逻辑端口、至少两个传输队列和映射表,该映射表中至少存储有一个传输队列与至少一个逻辑端口的映射关系,每个逻辑端口对应一个传输流,且交换系统中设置的传输队列的数量小于上述逻辑端口的数量。FIG. 8 is a schematic structural diagram of a first embodiment of a queue control apparatus according to an embodiment of the present application. The queue control device may be integrated in a switching system. The switching system is provided with at least two logical ports, at least two transmission queues, and a mapping table. The mapping table stores at least one mapping relationship between a transmission queue and at least one logical port. , Each logical port corresponds to a transport stream, and the number of transmission queues set in the switching system is less than the number of the aforementioned logical ports.
可选的,如图8所示,本实施例提供的队列控制装置可以包括:接口设备81、队列管理器82和处理器83。Optionally, as shown in FIG. 8, the queue control apparatus provided in this embodiment may include: an interface device 81, a queue manager 82, and a processor 83.
其中,该接口设备81,用于接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流。The interface device 81 is configured to receive a first transport stream corresponding to a first logical port and a second transport stream corresponding to a second logical port.
该队列管理器82,用于在所述交换系统中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的所述第一传输流、原本通过第二传输队列传输的所述第二传输流均通过所述第一传输队列传输。The queue manager 82 is configured to: when the number of idle queues in the switching system is less than a first threshold, the first transmission stream that was originally transmitted through the first transmission queue and all the addresses that were originally transmitted through the second transmission queue are transmitted. The second transmission stream is transmitted through the first transmission queue.
其中,所述第一阈值小于所述交换系统中设置的传输队列的数量;The first threshold is less than the number of transmission queues set in the switching system;
该处理器83,用于更新所述映射表,更新后的所述映射表中所述第一传输队列与所述第一逻辑端口和所述第二逻辑端口具有映射关系。The processor 83 is configured to update the mapping table. In the updated mapping table, the first transmission queue has a mapping relationship with the first logical port and the second logical port.
可选的,该队列控制装置还可以包括存储器,该存储器用于存储队列管理器82和处理器83的执行指令。可选的,在本申请实施例中,存储器可以用于存储上述映射表,保存传输队列与逻辑端口之间的映射关系。Optionally, the queue control apparatus may further include a memory, and the memory is configured to store execution instructions of the queue manager 82 and the processor 83. Optionally, in the embodiment of the present application, the memory may be used to store the above mapping table and save the mapping relationship between the transmission queue and the logical port.
可选的,在本申请实施例的一种可能实现方式中,上述接口设备81,还用于接收第三逻辑端口对应的第三传输流。Optionally, in a possible implementation manner of the embodiment of the present application, the foregoing interface device 81 is further configured to receive a third transport stream corresponding to the third logical port.
其中,该第三逻辑端口与所述至少两个传输队列中的任意一个均不存在映射关系。There is no mapping relationship between the third logical port and any one of the at least two transmission queues.
相应的,上述队列管理器82,还用于利用第三传输队列传输所述第三传输流,该第三传输队列为所述交换系统中处于空闲状态的传输队列中的任意一个。Correspondingly, the queue manager 82 is further configured to use a third transmission queue to transmit the third transmission stream, and the third transmission queue is any one of the transmission queues in an idle state in the switching system.
上述处理器83,还用于将所述第三传输队列与所述第三传输端口之间的映射关系保存到所述映射表中。The processor 83 is further configured to save a mapping relationship between the third transmission queue and the third transmission port in the mapping table.
可选的,作为一种示例,所述第一逻辑端口和所述第二逻辑端口位于同一个端口模块上。Optionally, as an example, the first logical port and the second logical port are located on a same port module.
作为另一种示例,所述第一传输队列和所述第二传输队列中的传输流数量均小于预设数值。As another example, the number of transmission streams in the first transmission queue and the second transmission queue is less than a preset value.
可选的,在本申请实施例的另一种可能实现方式中,上述队列管理器82,还用于在所述交换系统中空闲状态队列的数量大于第二阈值时,将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输。Optionally, in another possible implementation manner of the embodiment of the present application, the queue manager 82 is further configured to pass the first queue when the number of idle state queues in the switching system is greater than a second threshold. The first transmission stream and the second transmission stream transmitted by the transmission queue are transmitted through the first transmission queue and the fourth transmission queue.
其中,所述第二阈值大于所述第一阈值,且小于所述交换系统中设置的传输队列的数量,所述第四传输队列为所述交换系统中处于空闲状态的传输队列中的任意一个。The second threshold is greater than the first threshold and less than the number of transmission queues set in the switching system, and the fourth transmission queue is any one of the transmission queues in the idle state in the switching system. .
可选的,在本申请实施例中,作为一种示例,上述队列管理器82,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四 传输队列传输,具体为:Optionally, in the embodiment of the present application, as an example, the above-mentioned queue manager 82 is configured to pass the first transmission stream and the second transmission stream transmitted through the first transmission queue through The transmission of the first transmission queue and the fourth transmission queue are specifically:
上述队列管理器82,用于在所述第一传输队列中不存在所述第二传输流的传输包时,通过所述第一传输队列传输所述第一传输流,且通过所述第四传输队列传输所述第二传输流。The queue manager 82 is configured to transmit the first transmission stream through the first transmission queue when the transmission packet of the second transmission stream does not exist in the first transmission queue, and pass the fourth transmission queue. The transmission queue transmits the second transmission stream.
相应的,上述处理器83,还用于保存所述第一传输队列与所述第一逻辑端口的映射关系,以及,所述第四传输队列与所述第二逻辑端口的映射关系。Accordingly, the processor 83 is further configured to save a mapping relationship between the first transmission queue and the first logical port, and a mapping relationship between the fourth transmission queue and the second logical port.
可选的,在本申请实施例中,作为另一种示例,上述队列管理器82,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:Optionally, in another embodiment of the present application, as another example, the queue manager 82 is configured to transfer the first transport stream and the second transport stream transmitted through the first transmission queue through The transmission of the first transmission queue and the fourth transmission queue are specifically:
上述队列管理器82,用于在所述第一传输队列中不存在所述第一传输流的传输包时,通过所述第一传输队列传输所述第二传输流,且通过所述第四传输队列传输所述第一传输流。The queue manager 82 is configured to transmit the second transmission stream through the first transmission queue when the transmission packet of the first transmission stream does not exist in the first transmission queue, and pass the fourth transmission stream. The transmission queue transmits the first transmission stream.
相应的,上述处理器83,还用于保存所述第一传输队列与所述第二逻辑端口的映射关系,以及,所述第四传输队列与所述第一逻辑端口的映射关系。Correspondingly, the processor 83 is further configured to save a mapping relationship between the first transmission queue and the second logical port, and a mapping relationship between the fourth transmission queue and the first logical port.
可选的,在本申请实施例的上述任一种可能实现方式中,所述交换系统为如下任意一种:交换网系统、流量管理系统。Optionally, in any one of the foregoing possible implementation manners of the embodiments of the present application, the switching system is any one of the following: a switching network system and a traffic management system.
本实施例提供的队列控制装置可用于执行图4至图6所示方法实施例的技术方案,具体实现方式和技术效果类似,这里不再赘述。The queue control device provided in this embodiment may be configured to execute the technical solutions of the method embodiments shown in FIG. 4 to FIG. 6. The specific implementation manner and technical effect are similar, and details are not described herein again.
图9为本申请实施例提供的队列控制装置实施例二的结构示意图。该装置可以集成于交换系统中。如图9所示,本实例提供的队列控制装置,可以包括:接收模块91和处理模块92。FIG. 9 is a schematic structural diagram of a second embodiment of a queue control apparatus according to an embodiment of the present application. The device can be integrated in a switching system. As shown in FIG. 9, the queue control apparatus provided in this example may include a receiving module 91 and a processing module 92.
其中,该接收模块91,用于接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流。The receiving module 91 is configured to receive a first transport stream corresponding to a first logical port and a second transport stream corresponding to a second logical port.
该处理模块92,用于在所述交换系统中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的所述第一传输流、原本通过第二传输队列传输的所述第二传输流均通过所述第一传输队列传输,以及更新所述映射表,更新后的所述映射表中所述第一传输队列与所述第一逻辑端口和所述第二逻辑端口具有映射关系,所述第一阈值小于所述交换系统中设置的传输队列的数量。The processing module 92 is configured to: when the number of idle queues in the switching system is less than a first threshold, the first transmission stream originally transmitted through the first transmission queue and the first transmission stream originally transmitted through the second transmission queue The second transmission stream is transmitted through the first transmission queue, and the mapping table is updated. In the updated mapping table, the first transmission queue and the first logical port and the second logical port have In a mapping relationship, the first threshold is less than the number of transmission queues set in the switching system.
可选的,在本申请实施例的一种可能实现方式中,上述接收模块91,还用于接收第三逻辑端口对应的第三传输流,所述第三逻辑端口与所述至少两个传输队列中的任意一个均不存在映射关系。Optionally, in a possible implementation manner of the embodiment of the present application, the receiving module 91 is further configured to receive a third transmission stream corresponding to a third logical port, where the third logical port and the at least two transmissions No mapping exists in any of the queues.
上述处理模块92,还用于利用第三传输队列传输所述第三传输流,所述第三传输队列为所述交换系统中处于空闲状态的传输队列中的任意一个,以及将所述第三传输队列与所述第三传输端口之间的映射关系保存到所述映射表中。The processing module 92 is further configured to transmit the third transmission stream by using a third transmission queue, where the third transmission queue is any one of transmission queues in an idle state in the switching system, and the third transmission queue is The mapping relationship between the transmission queue and the third transmission port is stored in the mapping table.
可选的,作为一种示例,所述第一逻辑端口和所述第二逻辑端口位于同一个端口模块上。Optionally, as an example, the first logical port and the second logical port are located on a same port module.
可选的,作为另一种示例,所述第一传输队列和所述第二传输队列中的传输流数量均小于预设数值。Optionally, as another example, the number of transmission streams in the first transmission queue and the second transmission queue are both less than a preset value.
可选的,在本申请实施例的另一种可能实现方式中,上述处理模块92,还用于在所述 交换系统中空闲状态队列的数量大于第二阈值时,将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输。Optionally, in another possible implementation manner of the embodiment of the present application, the processing module 92 is further configured to pass the first transmission when the number of idle state queues in the switching system is greater than a second threshold. The first transmission stream and the second transmission stream transmitted in a queue are transmitted through the first transmission queue and the fourth transmission queue.
其中,所述第二阈值大于所述第一阈值,且小于所述交换系统中设置的传输队列的数量,所述第四传输队列为所述交换系统中处于空闲状态的传输队列中的任意一个。The second threshold is greater than the first threshold and less than the number of transmission queues set in the switching system, and the fourth transmission queue is any one of the transmission queues in the idle state in the switching system. .
可选的,作为一种示例,所述处理模块92,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:Optionally, as an example, the processing module 92 is configured to pass the first transmission stream and the second transmission stream transmitted through the first transmission queue through the first transmission queue and the second transmission stream. The fourth transmission queue transmission is described as follows:
所述处理模块92,用于在所述第一传输队列中不存在所述第二传输流的传输包时,通过所述第一传输队列传输所述第一传输流,且通过所述第四传输队列传输所述第二传输流,以及保存所述第一传输队列与所述第一逻辑端口的映射关系,以及,所述第四传输队列与所述第二逻辑端口的映射关系。The processing module 92 is configured to transmit the first transmission stream through the first transmission queue when the transmission packet of the second transmission stream does not exist in the first transmission queue, and pass the fourth transmission queue. The transmission queue transmits the second transmission stream, and stores a mapping relationship between the first transmission queue and the first logical port, and a mapping relationship between the fourth transmission queue and the second logical port.
可选的,作为另一种示例,所述处理模块92,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:Optionally, as another example, the processing module 92 is configured to pass the first transmission stream and the second transmission stream transmitted through the first transmission queue through the first transmission queue and The fourth transmission queue transmission is specifically:
所述处理模块92,用于在所述第一传输队列中不存在所述第一传输流的传输包时,通过所述第一传输队列传输所述第二传输流,且通过所述第四传输队列传输所述第一传输流,以及保存所述第一传输队列与所述第二逻辑端口的映射关系,以及,所述第四传输队列与所述第一逻辑端口的映射关系。The processing module 92 is configured to transmit the second transmission stream through the first transmission queue when the transmission packet of the first transmission stream does not exist in the first transmission queue, and pass the fourth transmission queue. The transmission queue transmits the first transmission stream, and stores a mapping relationship between the first transmission queue and the second logical port, and a mapping relationship between the fourth transmission queue and the first logical port.
可选的,在本申请实施例中,所述交换系统为如下任意一种:交换网系统、流量管理系统。Optionally, in the embodiment of the present application, the switching system is any one of the following: a switching network system and a traffic management system.
可选的,本实施例中该接收模块91可以对应上述图8中的接口设备81,该处理模块92可以对应上述图8中的队列管理器82和处理器83。Optionally, in this embodiment, the receiving module 91 may correspond to the interface device 81 in FIG. 8 described above, and the processing module 92 may correspond to the queue manager 82 and processor 83 in FIG. 8 described above.
本申请实施例提供一种存储介质,所述存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如上述图4至图6所示实施例的技术方案。An embodiment of the present application provides a storage medium. The storage medium stores instructions. When the storage medium runs instructions on a computer, the computer executes the technical solutions in the embodiments shown in FIG. 4 to FIG. 6.
可选的,本申请实施例提供一种运行指令的芯片,所述芯片用于执行图4至图6所示方法实施例的技术方案。Optionally, an embodiment of the present application provides a chip for running instructions, and the chip is configured to execute the technical solutions of the method embodiments shown in FIG. 4 to FIG. 6.
需要说明的是,应理解以上装置的各个模块的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块通过处理元件调用软件的形式实现,部分模块通过硬件的形式实现。例如,确定模块可以为单独设立的处理元件,也可以集成在上述装置的某一个芯片中实现,此外,也可以以程序代码的形式存储于上述装置的存储器中,由上述装置的某一个处理元件调用并执行以上确定模块的功能。其它模块的实现与之类似。此外这些模块全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件可以是一种集成电路,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。It should be noted that it should be understood that the division of each module of the above device is only a division of logical functions. In actual implementation, it may be fully or partially integrated into a physical entity, or it may be physically separated. And these modules can all be implemented in the form of software through processing element calls; they can also be implemented in hardware; all modules can be implemented in the form of software called by processing elements, and some modules can be implemented in hardware. For example, the determination module may be a separately established processing element, or may be integrated and implemented in a chip of the above-mentioned device. In addition, it may also be stored in the memory of the above-mentioned device in the form of a program code, and may be processed by a certain processing element of the above-mentioned device. Invoke and execute the functions of the above identified modules. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described herein may be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules may be completed by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital singnal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)等。再如,当以上某个模块通过处理元件调度程序代码 的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序代码的处理器。再如,这些模块可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。For example, the above modules may be one or more integrated circuits configured to implement the above method, for example, one or more application specific integrated circuits (ASICs), or one or more microprocessors (digital singnal processor (DSP), or one or more field programmable gate array (FPGA). As another example, when one of the above modules is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code. As another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在可读存储介质中,或者从一个可读存储介质向另一个可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘solid state disk(SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are wholly or partially generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server, or data center through a wired ( For example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center. The readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, and the like that includes one or more available medium integration. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
本文中的术语“多个”是指两个或两个以上。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系;在公式中,字符“/”,表示前后关联对象是一种“相除”的关系。The term "plurality" herein refers to two or more. The term "and / or" in this document is only a kind of association relationship describing related objects, which means that there can be three kinds of relationships, for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and exists alone B these three cases. In addition, the character "/" in this article generally indicates that the related objects are an "or" relationship; in the formula, the character "/" indicates that the related objects are a "divide" relationship.
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。It can be understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application.
可以理解的是,在本申请的实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。It can be understood that, in the embodiment of the present application, the size of the serial numbers of the above processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic. The implementation process of the example constitutes any limitation.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the scope of protection of the present invention is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present invention. It should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (17)

  1. 一种队列控制方法,其特征在于,所述方法应用于交换系统,所述交换系统中设置有至少两个逻辑端口、至少两个传输队列和映射表,所述映射表中至少存储有一个传输队列与至少一个逻辑端口的映射关系,每个逻辑端口对应一个传输流,所述传输队列的数量小于所述逻辑端口的数量,所述方法包括:A queue control method, characterized in that the method is applied to a switching system, which is provided with at least two logical ports, at least two transmission queues, and a mapping table, and at least one transmission is stored in the mapping table. The mapping relationship between queues and at least one logical port, each logical port corresponds to one transmission stream, and the number of transmission queues is less than the number of logical ports, and the method includes:
    接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流;Receiving a first transport stream corresponding to a first logical port and a second transport stream corresponding to a second logical port;
    在所述交换系统中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的所述第一传输流、原本通过第二传输队列传输的所述第二传输流均通过所述第一传输队列传输,所述第一阈值小于所述交换系统中设置的传输队列的数量;When the number of idle state queues in the switching system is less than the first threshold, the first transmission stream originally transmitted through the first transmission queue and the second transmission stream originally transmitted through the second transmission queue are all passed through The first transmission queue transmission, the first threshold value is less than the number of transmission queues set in the switching system;
    更新所述映射表,更新后的所述映射表中所述第一传输队列与所述第一逻辑端口和所述第二逻辑端口具有映射关系。Update the mapping table, and in the updated mapping table, the first transmission queue has a mapping relationship with the first logical port and the second logical port.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    接收第三逻辑端口对应的第三传输流,所述第三逻辑端口与所述至少两个传输队列中的任意一个均不存在映射关系;Receiving a third transmission stream corresponding to a third logical port, and there is no mapping relationship between the third logical port and any one of the at least two transmission queues;
    利用第三传输队列传输所述第三传输流,所述第三传输队列为所述交换系统中处于空闲状态的传输队列中的任意一个;Transmitting the third transmission stream by using a third transmission queue, where the third transmission queue is any one of transmission queues in an idle state in the switching system;
    将所述第三传输队列与所述第三传输端口之间的映射关系保存到所述映射表中。The mapping relationship between the third transmission queue and the third transmission port is stored in the mapping table.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一逻辑端口和所述第二逻辑端口位于同一个端口模块上。The method according to claim 1 or 2, wherein the first logical port and the second logical port are located on a same port module.
  4. 根据权利要求1或2所述的方法,其特征在于,所述第一传输队列和所述第二传输队列中的传输流数量均小于预设数值。The method according to claim 1 or 2, wherein the number of transmission streams in the first transmission queue and the second transmission queue is less than a preset value.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-4, further comprising:
    在所述交换系统中空闲状态队列的数量大于第二阈值时,将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,所述第二阈值大于所述第一阈值,且小于所述交换系统中设置的传输队列的数量,所述第四传输队列为所述交换系统中处于空闲状态的传输队列中的任意一个。When the number of idle state queues in the switching system is greater than a second threshold, the first transmission stream and the second transmission stream to be transmitted through the first transmission queue are transmitted through the first transmission queue and the In the fourth transmission queue transmission, the second threshold value is greater than the first threshold value and less than the number of transmission queues set in the switching system, and the fourth transmission queue is a transmission in an idle state in the switching system. Any one in the queue.
  6. 根据权利要求5所述的方法,其特征在于,所述将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,包括:The method according to claim 5, wherein the first transmission stream and the second transmission stream to be transmitted through the first transmission queue pass through the first transmission queue and the first transmission stream. Four transmission queue transmissions, including:
    在所述第一传输队列中不存在所述第二传输流的传输包时,通过所述第一传输队列传输所述第一传输流,且通过所述第四传输队列传输所述第二传输流;When a transmission packet of the second transmission stream does not exist in the first transmission queue, the first transmission stream is transmitted through the first transmission queue, and the second transmission is transmitted through the fourth transmission queue. flow;
    所述方法,还包括:The method further includes:
    保存所述第一传输队列与所述第一逻辑端口的映射关系,以及,所述第四传输队列与所述第二逻辑端口的映射关系。A mapping relationship between the first transmission queue and the first logical port, and a mapping relationship between the fourth transmission queue and the second logical port are stored.
  7. 根据权利要求5所述的方法,其特征在于,所述将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,包括:The method according to claim 5, wherein the first transmission stream and the second transmission stream to be transmitted through the first transmission queue pass through the first transmission queue and the first transmission stream. Four transmission queue transmissions, including:
    在所述第一传输队列中不存在所述第一传输流的传输包时,通过所述第一传输队列传输所述第二传输流,且通过所述第四传输队列传输所述第一传输流;When a transmission packet of the first transmission stream does not exist in the first transmission queue, the second transmission stream is transmitted through the first transmission queue, and the first transmission is transmitted through the fourth transmission queue. flow;
    所述方法,还包括:The method further includes:
    保存所述第一传输队列与所述第二逻辑端口的映射关系,以及,所述第四传输队列与所述第一逻辑端口的映射关系。The mapping relationship between the first transmission queue and the second logical port, and the mapping relationship between the fourth transmission queue and the first logical port are saved.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述交换系统为如下任意一种:交换网系统、流量管理系统。The method according to any one of claims 1 to 7, wherein the switching system is any one of the following: a switching network system and a traffic management system.
  9. 一种队列控制装置,其特征在于,所述装置集成于交换系统中,所述交换系统中设置有至少两个逻辑端口、至少两个传输队列和映射表,所述映射表中至少存储有一个传输队列与至少一个逻辑端口的映射关系,每个逻辑端口对应一个传输流,所述传输队列的数量小于所述逻辑端口的数量,所述装置包括:接口设备、队列管理器和处理器;A queue control device, characterized in that the device is integrated in a switching system. The switching system is provided with at least two logical ports, at least two transmission queues, and a mapping table. At least one mapping table is stored in the mapping table. Mapping relationship between transmission queues and at least one logical port, each logical port corresponds to one transmission stream, the number of transmission queues is less than the number of logical ports, and the device includes: an interface device, a queue manager, and a processor;
    所述接口设备,用于接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流;The interface device is configured to receive a first transport stream corresponding to a first logical port and a second transport stream corresponding to a second logical port;
    所述队列管理器,用于在所述交换系统中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的所述第一传输流、原本通过第二传输队列传输的所述第二传输流均通过所述第一传输队列传输,所述第一阈值小于所述交换系统中设置的传输队列的数量;The queue manager is configured to: when the number of idle state queues in the switching system is less than a first threshold, the first transmission stream that was originally transmitted through the first transmission queue and all the addresses that were originally transmitted through the second transmission queue. The second transmission streams are all transmitted through the first transmission queue, and the first threshold is less than the number of transmission queues set in the switching system;
    所述处理器,用于更新所述映射表,更新后的所述映射表中所述第一传输队列与所述第一逻辑端口和所述第二逻辑端口具有映射关系。The processor is configured to update the mapping table, and in the updated mapping table, the first transmission queue has a mapping relationship with the first logical port and the second logical port.
  10. 根据权利要求9所述的装置,其特征在于,The device according to claim 9, characterized in that:
    所述接口设备,还用于接收第三逻辑端口对应的第三传输流,所述第三逻辑端口与所述至少两个传输队列中的任意一个均不存在映射关系;The interface device is further configured to receive a third transmission stream corresponding to a third logical port, and there is no mapping relationship between the third logical port and any one of the at least two transmission queues;
    所述队列管理器,还用于利用第三传输队列传输所述第三传输流,所述第三传输队列为所述交换系统中处于空闲状态的传输队列中的任意一个;The queue manager is further configured to use a third transmission queue to transmit the third transmission stream, where the third transmission queue is any one of the transmission queues in an idle state in the switching system;
    所述处理器,还用于将所述第三传输队列与所述第三传输端口之间的映射关系保存到所述映射表中。The processor is further configured to save a mapping relationship between the third transmission queue and the third transmission port in the mapping table.
  11. 根据权利要求9或10所述的装置,其特征在于,所述第一逻辑端口和所述第二逻辑端口位于同一个端口模块上。The device according to claim 9 or 10, wherein the first logical port and the second logical port are located on a same port module.
  12. 根据权利要求9或10所述的装置,其特征在于,所述第一传输队列和所述第二传输队列中的传输流数量均小于预设数值。The apparatus according to claim 9 or 10, wherein the number of transmission streams in the first transmission queue and the second transmission queue is less than a preset value.
  13. 根据权利要求9-12任一项所述的装置,其特征在于,The device according to any one of claims 9-12, wherein:
    所述队列管理器,还用于在所述交换系统中空闲状态队列的数量大于第二阈值时,将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,所述第二阈值大于所述第一阈值,且小于所述交换系统中设置的传输队列的数量,所述第四传输队列为所述交换系统中处于空闲状态的传输队列中的任意一个。The queue manager is further configured to: when the number of idle queues in the switching system is greater than a second threshold, the first transport stream and the second transport stream to be transmitted through the first transmission queue, Transmitting through the first transmission queue and the fourth transmission queue, the second threshold value is greater than the first threshold value and less than the number of transmission queues set in the switching system, and the fourth transmission queue is Any one of the transmission queues in an idle state in the switching system.
  14. 根据权利要求13所述的装置,其特征在于,所述队列管理器,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:The apparatus according to claim 13, wherein the queue manager is configured to pass the first transmission stream and the second transmission stream transmitted through the first transmission queue through the first transmission stream The transmission of the transmission queue and the fourth transmission queue is specifically:
    所述队列管理器,用于在所述第一传输队列中不存在所述第二传输流的传输包时,通过所述第一传输队列传输所述第一传输流,且通过所述第四传输队列传输所述第二传输流;The queue manager is configured to transmit the first transmission stream through the first transmission queue when the transmission packet of the second transmission stream does not exist in the first transmission queue, and pass the fourth transmission queue. The transmission queue transmits the second transmission stream;
    所述处理器,还用于保存所述第一传输队列与所述第一逻辑端口的映射关系,以及,所述第四传输队列与所述第二逻辑端口的映射关系。The processor is further configured to save a mapping relationship between the first transmission queue and the first logical port, and a mapping relationship between the fourth transmission queue and the second logical port.
  15. 根据权利要求13所述的方法,其特征在于,所述队列管理器,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:The method according to claim 13, wherein the queue manager is configured to pass the first transmission stream and the second transmission stream transmitted through the first transmission queue through the first transmission stream The transmission of the transmission queue and the fourth transmission queue is specifically:
    所述队列管理器,用于在所述第一传输队列中不存在所述第一传输流的传输包时,通过所述第一传输队列传输所述第二传输流,且通过所述第四传输队列传输所述第一传输流;The queue manager is configured to transmit the second transmission stream through the first transmission queue when the transmission packet of the first transmission stream does not exist in the first transmission queue, and pass the fourth transmission queue. The transmission queue transmits the first transmission stream;
    所述处理器,还用于保存所述第一传输队列与所述第二逻辑端口的映射关系,以及,所述第四传输队列与所述第一逻辑端口的映射关系。The processor is further configured to save a mapping relationship between the first transmission queue and the second logical port, and a mapping relationship between the fourth transmission queue and the first logical port.
  16. 根据权利要求9-15任一项所述的装置,其特征在于,所述交换系统为如下任意一种:交换网系统、流量管理系统。The device according to any one of claims 9 to 15, wherein the switching system is any one of the following: a switching network system and a traffic management system.
  17. 一种存储介质,其特征在于,所述存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求1-8任一项所述的方法。A storage medium, characterized in that the storage medium has instructions stored therein, which when run on a computer, cause the computer to execute the method according to any one of claims 1-8.
PCT/CN2018/089935 2018-06-05 2018-06-05 Queue control method, device and storage medium WO2019232694A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880094199.5A CN112272933B (en) 2018-06-05 2018-06-05 Queue control method, device and storage medium
PCT/CN2018/089935 WO2019232694A1 (en) 2018-06-05 2018-06-05 Queue control method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/089935 WO2019232694A1 (en) 2018-06-05 2018-06-05 Queue control method, device and storage medium

Publications (1)

Publication Number Publication Date
WO2019232694A1 true WO2019232694A1 (en) 2019-12-12

Family

ID=68769707

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/089935 WO2019232694A1 (en) 2018-06-05 2018-06-05 Queue control method, device and storage medium

Country Status (2)

Country Link
CN (1) CN112272933B (en)
WO (1) WO2019232694A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415969A (en) * 2022-02-09 2022-04-29 杭州云合智网技术有限公司 Dynamic storage method for message of switching chip

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115955447B (en) * 2023-03-13 2023-06-27 微网优联科技(成都)有限公司 Data transmission method, switch and switch system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020136230A1 (en) * 2000-12-15 2002-09-26 Dell Martin S. Scheduler for a packet routing and switching system
CN102223311A (en) * 2011-07-13 2011-10-19 华为数字技术有限公司 Queue scheduling method and device
CN106886498A (en) * 2017-02-28 2017-06-23 华为技术有限公司 Data processing equipment and terminal
CN107770085A (en) * 2016-08-23 2018-03-06 华为技术有限公司 A kind of network load balancing method, equipment and system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1159805B1 (en) * 1999-03-17 2007-04-11 Broadcom Corporation Method for avoiding out-of-ordering of frames in a network switch
US7317683B2 (en) * 2001-11-01 2008-01-08 International Business Machines Corporation Weighted fair queue serving plural output ports
US7522622B2 (en) * 2005-02-18 2009-04-21 Broadcom Corporation Dynamic color threshold in a queue
US7936770B1 (en) * 2005-03-08 2011-05-03 Enterasys Networks, Inc. Method and apparatus of virtual class of service and logical queue representation through network traffic distribution over multiple port interfaces
CN101193051A (en) * 2006-11-20 2008-06-04 中兴通讯股份有限公司 Router for improving forward speed and efficiency based on virtual monitoring group
US20170048144A1 (en) * 2015-08-13 2017-02-16 Futurewei Technologies, Inc. Congestion Avoidance Traffic Steering (CATS) in Datacenter Networks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020136230A1 (en) * 2000-12-15 2002-09-26 Dell Martin S. Scheduler for a packet routing and switching system
CN102223311A (en) * 2011-07-13 2011-10-19 华为数字技术有限公司 Queue scheduling method and device
CN107770085A (en) * 2016-08-23 2018-03-06 华为技术有限公司 A kind of network load balancing method, equipment and system
CN106886498A (en) * 2017-02-28 2017-06-23 华为技术有限公司 Data processing equipment and terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415969A (en) * 2022-02-09 2022-04-29 杭州云合智网技术有限公司 Dynamic storage method for message of switching chip
CN114415969B (en) * 2022-02-09 2023-09-29 杭州云合智网技术有限公司 Method for dynamically storing messages of exchange chip

Also Published As

Publication number Publication date
CN112272933A (en) 2021-01-26
CN112272933B (en) 2022-08-09

Similar Documents

Publication Publication Date Title
CN114731337B (en) System and method for supporting target groups for congestion control in a private fabric in a high performance computing environment
US11477255B2 (en) Hybrid network system, communication method and network node
US11099906B2 (en) Handling tenant requests in a system that uses hardware acceleration components
US10673770B1 (en) Intelligent packet queues with delay-based actions
US9158570B2 (en) Method and system for facilitating quality of service in edge devices in a fibre channel network
US9792154B2 (en) Data processing system having a hardware acceleration plane and a software plane
US11665104B1 (en) Delay-based tagging in a network switch
US10313255B1 (en) Intelligent packet queues with enqueue drop visibility and forensics
WO2018072687A1 (en) Resource scheduling method and apparatus, and filtered scheduler
US8989037B2 (en) System for performing data cut-through
US20160308649A1 (en) Providing Services in a System having a Hardware Acceleration Plane and a Software Plane
CN112084027B (en) Network-on-chip data transmission method, device, network-on-chip, equipment and medium
EP3605975A1 (en) Client service transmission method and device
Hua et al. Scheduling heterogeneous flows with delay-aware deduplication for avionics applications
WO2019232694A1 (en) Queue control method, device and storage medium
WO2018153355A1 (en) Control information transmission method, server, and system
US9264383B1 (en) Systems and methods for quality of service for link aggregation groups
CN115622952A (en) Resource scheduling method, device, equipment and computer readable storage medium
Zhang et al. Reco: Efficient regularization-based coflow scheduling in optical circuit switches
CA3115412C (en) Methods for managing bandwidth allocation in a cloud-based system and related bandwidth managers and computer program products
US9154569B1 (en) Method and system for buffer management
CN112804166A (en) Message transmitting and receiving method, device and storage medium
WO2022147762A1 (en) Data packet sequencing method and apparatus
US11968129B1 (en) Delay-based tagging in a network switch
CN114731336B (en) System and method for providing bandwidth congestion control in a private fabric in a high performance computing environment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18921803

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18921803

Country of ref document: EP

Kind code of ref document: A1