WO2019232694A1 - 队列控制方法、装置及存储介质 - Google Patents

队列控制方法、装置及存储介质 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
English (en)
French (fr)
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 PCT/CN2018/089935 priority Critical patent/WO2019232694A1/zh
Priority to CN201880094199.5A priority patent/CN112272933B/zh
Publication of WO2019232694A1 publication Critical patent/WO2019232694A1/zh

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.

Landscapes

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

Abstract

一种队列控制方法、装置及存储介质,其应用于交换***中,该交换***中设置有至少两个逻辑端口、至少两个传输队列和映射表,该映射表中至少存储有一个传输队列与至少一个逻辑端口的映射关系,每个逻辑端口对应一个传输流,且传输队列的数量小于逻辑端口的数量,该方法包括:接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流(41),在该交换***中空闲状态队列的数量小于第一阈值时(42),将原本通过第一传输队列传输的所述第一传输流、原本通过第二传输队列传输的所述第二传输流均通过所述第一传输队列传输(43),更新上述映射表,更新后的映射表中第一传输队列与第一逻辑端口和第二逻辑端口具有映射关系(44)。

Description

队列控制方法、装置及存储介质 技术领域
本申请涉及通信技术领域,尤其涉及一种队列控制方法、装置及存储介质。
背景技术
通常情况下,交换网(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所包含的多个出端口的数据流,以防止去往不同端口的数据流被阻塞的问题。
现阶段,对于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需要花费很大的代价才能实现。
现有技术中,为了降低SF***的复杂度,减少VOQ耗费的资源,可以仅设置部分VOQ,该部分VOQ的数量小于SF***中需要设置的最大VOQ数量,该最大VOQ数量是指根据SF***中eFIC的输出端口数量以及端口优先级数量确定的SF***所需的理论VOQ数量。例如,当SF***最多需要的理论VOQ数量为N1个时,可以仅设置N1/2个VOQ,且要求SF***中同时传输的数据流数量不超过N1/2,其中,N1为正整数。
然而,虽然上述现有技术能够在一定程度上减低SF***等交换***的复杂度,减少队列耗费的资源,但是这种方案的灵活性低,当交换***中传输的数据流数量大于设置的队列数量时,可能会因为设置的队列资源耗尽而产生数据流丢失的问题。
发明内容
本申请实施例提供一种队列控制方法、装置及存储介质,以解决现有技术中由于设置的队列资源耗尽而产生的数据流丢失问题。
本申请第一方面提供一种队列控制方法,所述方法应用于交换***,所述交换***中设置有至少两个逻辑端口、至少两个传输队列和映射表,所述映射表中至少存储有一个传输队列与至少一个逻辑端口的映射关系,每个逻辑端口对应一个传输流,所述传输队列的数量小于所述逻辑端口的数量,所述方法包括:
接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流;
在所述交换***中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的所述第一传输流、原本通过第二传输队列传输的所述第二传输流均通过所述第一传输队列传输,所述第一阈值小于所述交换***中设置的传输队列的数量;
更新所述映射表,更新后的所述映射表中所述第一传输队列与所述第一逻辑端口和所述第二逻辑端口具有映射关系。
在本申请实施例中,交换***中传输队列的数量小于逻辑端口的数量,且在交换***中空闲状态队列的数量少于第一阈值时,将至少两个传输流通过一个传输队列传输,能够保证交换***中有足够的传输队列供接收到的传输流使用,避免了现有技术中由于设置的传输队列资源耗尽而致使数据流丢失或对上游***产生的反压问题,灵活度高。
可选的,在第一方面的一种可能实现方式中,所述方法还包括:
接收第三逻辑端口对应的第三传输流,所述第三逻辑端口与所述至少两个传输队列中的任意一个均不存在映射关系;
利用第三传输队列传输所述第三传输流,所述第三传输队列为所述交换***中处于空闲状态的传输队列中的任意一个;
将所述第三传输队列与所述第三传输端口之间的映射关系保存到所述映射表中。
在本实施例中,当交换***接收到新的传输流时,能够保证在该传输流有空闲状态队列可用,避免了由于传输队列的资源耗尽造成的传输流丢失或对上游***产生的反压问题,灵活度高,保证了交换***上行接口接收到的传输流能够顺利交换到下行接口输出。
可选的,作为一种示例,所述第一逻辑端口和所述第二逻辑端口位于同一个端口模块上。
通过限定第一逻辑端口和第二逻辑端口位于同一个输出端口模块上,可以简化交换***的复杂度,便于在后续在交换***中的空闲状态队列的数量较多时,将原本合并的队列再拆分开。
可选的,作为另一种示例,所述第一传输队列和所述第二传输队列中的传输流数量均小于预设数值。
通过限定在第一传输队列和第二传输队列中的传输流数量均小于预设数值时,可以将第一传输队列传输的传输流和第二传输队列传输的传输流归到一个传输队列传输,简化了交换***的复杂度,交换***的灵活度高。
可选的,在第一方面的另一种可能实现方式中,所述方法还包括:
在所述交换***中空闲状态队列的数量大于第二阈值时,将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,所述第二阈值大于所述第一阈值,且小于所述交换***中设置的传输队列的数量,所述第四传输队列为所述交换***中处于空闲状态的传输队列中的任意一个。
在本实施例中,在交换***中空闲状态队列的数量足够多时,将原本合并传输的传输流再分配到多个传输队列进行传输,实现了传输队列的解压缩处理,提高了交换***的性能。
可选的,作为一种示例,所述将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,包括:
在所述第一传输队列中不存在所述第二传输流的传输包时,通过所述第一传输队列传 输所述第一传输流,且通过所述第四传输队列传输所述第二传输流;
所述方法,还包括:
保存所述第一传输队列与所述第一逻辑端口的映射关系,以及,所述第四传输队列与所述第二逻辑端口的映射关系。
可选的,作为另一种示例,所述将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,包括:
在所述第一传输队列中不存在所述第一传输流的传输包时,通过所述第一传输队列传输所述第二传输流,且通过所述第四传输队列传输所述第一传输流;
所述方法,还包括:
保存所述第一传输队列与所述第二逻辑端口的映射关系,以及,所述第四传输队列与所述第一逻辑端口的映射关系。
在该实施例中,通过在在第一传输队列中不存在第二传输流的传输包或者不存在第一传输流的传输包时,再为其新分配一个传输队列,即只在第一传输队列中的某一传输流的传输包排空之后才允许调度新分配,能够保证对应逻辑端口收到完整的传输流。
可选的,所述交换***为如下任意一种:交换网***、流量管理***。
本申请第二方面提供一种队列控制装置,所述装置集成于交换***中,所述交换***中设置有至少两个逻辑端口、至少两个传输队列和映射表,所述映射表中至少存储有一个传输队列与至少一个逻辑端口的映射关系,每个逻辑端口对应一个传输流,所述传输队列的数量小于所述逻辑端口的数量,所述装置包括:接口设备、队列管理器和处理器;
所述接口设备,用于接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流;
所述队列管理器,用于在所述交换***中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的所述第一传输流、原本通过第二传输队列传输的所述第二传输流均通过所述第一传输队列传输,所述第一阈值小于所述交换***中设置的传输队列的数量;
所述处理器,用于更新所述映射表,更新后的所述映射表中所述第一传输队列与所述第一逻辑端口和所述第二逻辑端口具有映射关系。
可选的,在第二方面的一种可能实现方式中,所述接口设备,还用于接收第三逻辑端口对应的第三传输流,所述第三逻辑端口与所述至少两个传输队列中的任意一个均不存在映射关系;
所述队列管理器,还用于利用第三传输队列传输所述第三传输流,所述第三传输队列为所述交换***中处于空闲状态的传输队列中的任意一个;
所述处理器,还用于将所述第三传输队列与所述第三传输端口之间的映射关系保存到所述映射表中。
可选的,作为一种示例,所述第一逻辑端口和所述第二逻辑端口位于同一个端口模块上。
可选的,作为另一种示例,所述第一传输队列和所述第二传输队列中的传输流数量均小于预设数值。
可选的,在第二方面的另一种可能实现方式中,所述队列管理器,还用于在所述交换 ***中空闲状态队列的数量大于第二阈值时,将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,所述第二阈值大于所述第一阈值,且小于所述交换***中设置的传输队列的数量,所述第四传输队列为所述交换***中处于空闲状态的传输队列中的任意一个。
可选的,作为一种示例,所述队列管理器,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:
所述队列管理器,用于在所述第一传输队列中不存在所述第二传输流的传输包时,通过所述第一传输队列传输所述第一传输流,且通过所述第四传输队列传输所述第二传输流;
所述处理器,还用于保存所述第一传输队列与所述第一逻辑端口的映射关系,以及,所述第四传输队列与所述第二逻辑端口的映射关系。
可选的,作为另一种示例,所述队列管理器,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:
所述队列管理器,用于在所述第一传输队列中不存在所述第一传输流的传输包时,通过所述第一传输队列传输所述第二传输流,且通过所述第四传输队列传输所述第一传输流;
所述处理器,还用于保存所述第一传输队列与所述第二逻辑端口的映射关系,以及,所述第四传输队列与所述第一逻辑端口的映射关系。
可选的,所述交换***为如下任意一种:交换网***、流量管理***。
本申请实施例第三方面提供一种队列控制装置,所述队列控制装置包括接收模块和处理模块,所述接收模块和所述处理模块,用于执行本申请第一方面提供的方法。
本申请实施例第四方面提供一种队列控制装置,包括用于执行以上第一方面各实施例的至少一个处理元件(或芯片)。
本申请实施例第五方面提供一种存储介质,所述存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面提供的方法。
本申请实施例第六方面提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面提供的方法。
在以上各个方面中,通过接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流,在交换***中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的第一传输流、原本通过第二传输队列传输的第二传输流均通过第一传输队列传输,更新映射表,更新后的映射表中第一传输队列与第一逻辑端口和第二逻辑端口具有映射关系,这样能够保证交换***中有足够的传输队列供接收到的传输流使用,避免了现有技术中由于设置的传输队列资源耗尽而致使数据流丢失或对上游***产生的反压问题,灵活度高。
附图说明
图1为本申请实施例提供的一种交换***的结构示意图;
图2为本申请实施例提供的交换网***的结构示意图;
图3为本申请实施例中交换网***中iFIC的结构示意图;
图4为本申请实施例提供的队列控制方法实施例一的流程示意图;
图5为本申请实施例提供的队列控制方法实施例二的流程示意图;
图6为本申请实施例提供的队列控制方法实施例三的流程示意图;
图7为本申请实施例适用的流量管理***的结构示意图;
图8为本申请实施例提供的队列控制装置实施例一的结构示意图;
图9为本申请实施例提供的队列控制装置实施例二的结构示意图。
具体实施方式
本申请下述各实施例提供的队列控制方法,可适用于交换***中。图1为本申请实施例提供的一种交换***的结构示意图。如图1所示,该交换***可以包括至少一个上行接口11和至少一个下行接口12。可选的,上行接口11的数量和下行接口12的数量可以相同,也可以不同。图1示例性地示出了n个上行接口11、以及n个下行接口12。在图1所示实施例的交换***中上行接口11可以通过输入端口从交换***外部接收传输流,并交换到下行接口12的输出端口输出。
可选的,该交换***还可以包括交换单元,若干个交换单元按照一定的拓扑结构和控制方式构成交换网络,进而实现无阻塞交换。本申请实施例并不对交换单元的层级和具体数量进行限定,其可根据实际情况确定。
可选的,本申请实施例中的交换***可以是交换网(switch fabric,SF)***,也可以是流量管理(traffic manager,TM)***,还可以是节点交换***。本申请实施例描述的***架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着通信技术的发展和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
下面首先针对本申请实施例所适用的交换网***进行简要说明。
图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均为正整数。
值得说明的是,本申请实施例中的上行交换网接口芯片iFIC也可以解释成上行交换网接口设备或上行交换网接口装置,下行交换网接口芯片eFIC也可以解释成下行交换网接口设备或下行交换网接口装置,本申请实施例并不对其进行限定。
可选的,参照图2所示,SF***将iFIC通过输入端口接收到的数据流交换到eFIC的输出端口输出。可选的,数据流通过SF***中的SE时,可以保持数据流的长度不变(即数据流保持原本的变长包(variable-length packet)格式),也可以被iFIC切成信元(Cell)发送,待eFIC收齐每个数据流的所有Cell之后,再重组成完整的数据流。如何对数据流进行分切和重组是本领域技术人员的公知常识,此处不再赘述。
可选的,SF***可以包含一级或多级SE,上述图2所示的交换网***包含一级SE,以及N个iFIC和N个eFIC。实际上iFIC和SE、eFIC和SE之间的连接关系不限于图2所示的结构。在一实施例中,iFIC和eFIC之间可以无需SE而直接互连,例如,iFIC和eFIC之间通过无线网格(Mesh)互连。
值得说明的是,图2所示的iFIC和eFIC分布在SE的两边,实际上,一块物理的FIC芯片可以同时包含iFIC和eFIC两部分。在SF***中,iFIC通常需将数据流尽量均匀地分发到各个SE,由于iFIC发出的数据流中通常携带目的eFIC的信息,因而,SE可以据此向对应的eFIC转发数据流。
图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)阻塞的手段。
可选的,参照图3所示,iFIC中设置有队列管理器(queue manager,QM)和调度器(ingress scheduler,ISC),其中,QM设置在输入端口和交换网接口之间,用于管理iFIC中设置的VOQ,ISC与QM、交换网接口连接,通过交换网接口获取其他iFIC和eFIC的拥塞信息,负责调度QM中的VOQ,可以使调度输出的数据流通过交换网接口后发送给iFIC和eFIC之间的SE。
对于交换网***而言,在某些情况下,还需要根据***要求或eFIC的端口细分出更多的逻辑端口,比如,按照数据流的优先级(class of service,Cos)进行细分,此时,若每个逻辑端口需要对应一个VOQ,则需要更多的VOQ。
可选的,当交换网***的规模很大,iFIC中需要设置的VOQ的数量会很多。例如,假设SF***有2K个eFIC,每个eFIC具有48个端口,每个端口又细分为8个优先级,此时,iFIC中需要设置的VOQ的数量为:768K,即根据2K乘以48乘以8得到,这么大数量的VOQ需要花费很大的代价才能实现。
针对上述问题,在交换网***中,假设根据eFIC的端口数量以及端口优先级数量确定出交换网系所需的理论VOQ数量,可以仅设置部分VOQ,即设置的VOQ数量小于理论VOQ数量。例如,当SF***最多需要N1个VOQ时,此时,可以仅设置N1/2个VOQ,且要求SF***中,同时要求SF***中同时传输的数据流数量不超过N1/2,其中,N1为正整数。
虽然上述现有技术能够在一定程度上减低SF的复杂度,减少VOQ耗费的资源,但是这种方案的灵活性低,当SF***中传输的数据流数量大于设置的VOQ数量时,可能会因为设置的VOQ资源耗尽而产生数据流丢失的问题。
可选的,针对现有技术中的上述问题,本申请实施例提供了一种队列控制方法、装置及存储介质,用以解决现有技术中由于设置的VOQ资源耗尽而产生数据流丢失的问题。
图4为本申请实施例提供的队列控制方法实施例一的流程示意图。该队列控制方法可以应用于交换***,该交换***中设置有至少两个逻辑端口、至少两个传输队列和映射表,该映射表中至少存储有一个传输队列与至少一个逻辑端口的映射关系,每个逻辑端口对应一个传输流,在该交换***中,传输队列的数量小于逻辑端口的数量。
可选的,本申请实施例中的逻辑端口包括具体的物理端口、以及每个物理端口根据优先级或用户要求细分后的端口等。
可选的,本申请的实施例以交换***为NxN的交换网***进行说明,传输队列为虚拟 输出队列VOQ进行说明。作为一种示例,该交换网***可以包含N个iFIC和N个eFIC,每个eFIC包含K个端口,每个端口细分为L个优先级。为简化描述,本申请实施例中,假设每个eFIC的端口数都相同,实际上***允许eFIC有不同的端口数;各端口的优先级数量也可以不同。可选的,在实际应用中,每个端口可以进一步划分为多个逻辑端口,这需要更多的VOQ与之对应。其中,N、K、L均为正整数。
值得说明的是,本申请实施例的交换***同样可以应用于上述或其它更多方式的队列(交换网***中的VOQ)设计中。
根据上述分析可知,当交换网***包含N个eFIC,每个eFIC包含K个端口,每个端口细分为L个优先级时,交换网***中最大规格的逻辑端口数量为“N×K×L”。但是,通常情况下,每个iFIC不会同时和所有的N×K×L个逻辑端口通信,也就是说,在理论的VOQ数量很大时,iFIC很少同时会收到去往所有端口的传输流。因此,可以在iFIC内仅设置M个VOQ以减小实现代价,其中,M为小于N×K×L的正整数。这M个VOQ可以动态分给传输中的流(也即,活跃中的流)。通常情况下,将从同一源端口(iFIC)收到,去往同一目的逻辑端口的传输包定义为同一条“流”。可选的,当传输流为数据流时,此处的传输包可以解释为数据包。
可选的,在本申请实施例中,交换网***中可以设置一个深度为N×K×L的映射表,该映射表的宽度不小于log 2M,该log 2M表示设置的传输队列数所需的资源。当接收到一个传输流时,确定出该传输流对应的逻辑端口后,查询上述映射表,确定出该传输流对应的VOQ,并利用该VOQ传输。
可选的,该映射表可以通过哈希表、索引表的形式实现,其可以根据实际确定,本申请实施例并不对映射表的形式进行限定。
可选的,在本实施例中,如图4所示,该队列控制方法可以包括如下步骤:
步骤41:接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流。
在本实施例中,当该交换***接收到第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流时,可选的,通过查询上述映射表可以获知交换***中存在第一逻辑端口对应的第一传输队列,以及第二逻辑端口对应的第二传输队列,因而,在通常情况下,第一传输流应该通过第一传输队列传输到第一逻辑端口,第二传输流应该通过第二传输队列传输到第二逻辑端口。
值得说明的是,本申请实施例中的“第一”和“第二”并不表示顺序关系,只是用来表示两者不同。例如,第一逻辑端口和第二逻辑端口用来表示两个不同的逻辑端口,第一传输流和第二传输流用来表示两个不同的传输流,第一传输队列和第二传输队列用来表示两个不同的传输队列等。
步骤42:判断交换***中空闲状态队列的数量是否小于第一阈值;若是,执行步骤43,若否,执行步骤45。
其中,该第一阈值小于交换***中设置的传输队列的数量。
在本申请实施例中,当交换***接收到第一传输流和第二传输流之后,首先判断交换***中空闲状态队列的数量是否充足,并根据空闲状态队列的数量确定如何将接收到的第一传输流和第二传输流传输到对应的逻辑端口。可选的,可以设置一个第一阈值,该第一阈值小于交换***中设置的传输队列的数量,且交换***可以根据空闲状态队列的数量与 第一阈值之间的大小关系,对接收到的传输流进行处理。
可选的,在一个实施例中,交换***中也可以设置多个阈值,在空闲状态队列的数量小于一个阈值时,执行相应的动作。比如,当交换***中设置有两个阈值,在空闲状态队列少于设定的第一个阈值时,可以发出警告等通知,当空闲状态队列少于设定的第二个阈值时,可以根据工作队列的性质或工作状态队列待传输的传输流的目的端口,将某几个接收到的传输流利用一个传输队列进行传输。
本申请实施例并不对交换***中设置的阈值的数量进行限定,其可以根据实际情况进行选择。
步骤43:将原本通过第一传输队列传输的第一传输流、原本通过第二传输队列传输的第二传输流均通过第一传输队列传输。
在本申请实施例中,当交换***中空闲状态队列的数量小于第一阈值,即交换***中处于空闲状态的传输队列数量在某个时刻可能会小于将要接收的传输流的数量,为了避免由于空闲状态队列的资源耗尽致使接收的传输流丢弃的问题,本实施例中,可以将原本通过第一传输队列传输的第一传输流、原本通过第二传输队列传输的第二传输流均通过第一传输队列传输,这样第二传输队列则变成空闲状态的传输队列,从而可利用其传输新接收到的传输流。
通过利用原本只传输第一传输流的第一传输队列来传输第一传输流和第二传输流,这样可以增加交换***中空闲状态队列的数量,从而保证新接收到的传输流有可进入的传输队列,避免了传输流被丢弃的问题外,还能够避免交换***对上游输送传输流的***造成反压。
可选的,在本申请的另一实施例中,该步骤还可以通过如下步骤实现,即将原本通过第一传输队列传输的第一传输流、原本通过第二传输队列传输的第二传输流均通过第二传输队列传输,本申请实施例并不限定第一传输流和第二传输流的可承载传输队列,其可根据实际情况确定。本申请实施例中,可以将上述原本通过两个传输队列传输的传输流只通过其中的一个传输队列传输的方案称为“队列合并”或“队列压缩”。
可选的,作为一种示例,在本申请实施例中,第一传输流对应的第一逻辑端口和第二传输流对应的第二逻辑端口需要满足如下规则,即第一逻辑端口和第二逻辑端口位于同一个输出端口模块上。
例如,对于交换网***而言,可以将逻辑端口位于同一个eFIC上,但不同逻辑端口对应的至少两个传输流只利用其中一个传输流对应的传输队列进行传输。具体的,假设第一传输流对应的第一逻辑端口位于第一eFIC上,第二传输流对应的第二逻辑端口也位于第一eFIC上,但第三传输队列对应的第三逻辑端口位于第二eFIC上,且第一传输流通过第一传输队列传输,第二传输流通过第二传输队列传输,第三传输流通过第三传输队列传输,因而,在交换网***中空闲状态队列的数量小于设定的第一阈值时,可以将原本通过第一传输队列传输的第一传输流和原本通过第二传输队列传输的第二传输流利用第一传输队列或者第二传输队列传输,而不改变第三传输流与第三传输队列的关系。
通过限定第一逻辑端口和第二逻辑端口位于同一个输出端口模块上,可以简化交换***的复杂度,便于在后续在交换***中的空闲状态队列的数量较多时,将原本合并的队列再拆分开,具体的方案参见下述实施例中的记载,此处不再赘述。
可选的,作为另一种示例,在本申请实施例中,第一传输队列和第二传输队列需要满足如下规则,即第一传输队列和第二传输队列中的传输流数量均小于预设数值。
可选的,假设第一传输流对应的第一逻辑端口和第二传输流对应的第二逻辑端口不在同一个输出端口模块上,但交换***中空闲状态队列的又小于第一阈值时,此时,可以查看第一逻辑端口对应的第一传输队列和第二逻辑端口对应的第二传输队列中的传输流数量,并且当第一传输队列和第二传输队列中的传输流数量均小于预设数值时,将利用第一传输队列和第二传输队列传输的传输流利用其中的一个传输队列传输。
可选的,本申请实施例并不限定上述两个规则,其可在某些情况下,根据其中的一个规则进行队列控制,也可在某些情况下,综合上述两个规则进行队列控制,其可根据实际情况进行确定,此处不再赘述。
步骤44:更新上述映射表,更新后的映射表中第一传输队列与第一逻辑端口和第二逻辑端口具有映射关系。
可选的,在本申请实施例中,当原本通过第一传输队列传输的第一传输流、原本通过第二传输队列传输的第二传输流均通过第一传输队列传输后,需要按照更改之后的逻辑端口与传输队列之间的映射关系进行调度。因而,需要更新上述映射表,更新后的映射表中第一传输队列与第一逻辑端口和第二逻辑端口具有映射关系,以使交换***再次接收到第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流时,按照更新后映射表中的映射关系,利用第一传输队列传输该第一传输流和第二传输流。
步骤45:利用第一逻辑端口对应的第一传输队列传输第一传输流,利用第二逻辑端口对应的第二传输队列传输第二传输流。
可选的,在本申请实施例中,当交换***中空闲状态队列的数量大于或等于第一阈值时,表明交换***中有足够的空闲状态队列供其他的传输流使用,此时,在接收到第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流时,可以按照映射表中设定好的逻辑端口与传输队列的映射关系,确定出第一逻辑端口对应的第一传输队列、第二逻辑端口对应的第二传输队列,进而利用第一传输队列传输第一传输流,利用第二传输队列传输第二传输流。
值得说明的是,本申请实施例中,将至少两个传输流利用一个传输队列传输的方式可以很灵活,即队列压缩的程度可以根据需求确定,即在队列压缩后,交换***中始终有空闲状态队列供新接收到的传输流使用。
本申请实施例提供的队列控制方法,通过接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流,在交换***中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的第一传输流、原本通过第二传输队列传输的第二传输流均通过第一传输队列传输,更新映射表,更新后的映射表中第一传输队列与第一逻辑端口和第二逻辑端口具有映射关系。该技术方案,交换***中传输队列的数量小于逻辑端口的数量,且在交换***中空闲状态队列的数量少于第一阈值时,将至少两个传输流通过一个传输队列传输,能够保证交换***中有足够的传输队列供接收到的传输流使用,避免了现有技术中由于设置的传输队列资源耗尽而致使数据流丢失或对上游***产生的反压问题,灵活度高。
可选的,在上述实施例的基础上,图5为本申请实施例提供的队列控制方法实施例二的流程示意图。如图5所示,本申请实施例提供的队列控制方法,还可以包括如下步骤:
步骤51:接收第三逻辑端口对应的第三传输流,该第三逻辑端口与交换***中设置的上述至少两个传输队列中的任意一个均不存在映射关系。
可选的,在本申请实施例中,当交换***接收到第三逻辑端口对应的第三传输流,但是通过查询交换***的映射表得知,映射表中没有存储第三逻辑端口与交换***中设置的至少两个传输队列中的任意一个的映射关系,即交换***中没有设定用于传输第三传输流的传输队列。
步骤52:利用第三传输队列传输第三传输流,该第三传输队列为交换***中处于空闲状态的传输队列中的任意一个。
可选的,由上述分析可知,交换***中存在足量的空闲状态队列,因而,当接收到第三传输流时,可以从空闲状态队列中分配一个传输队列给第三传输流使用,此处,可以将给第三传输流分配的传输队列命名为第三传输队列,进而利用该第三传输队列传输第三传输流。可选的,该第三传输队列可以是交换***中处于空闲状态的传输队列中的任意一个。
步骤53:将第三传输队列与第三传输端口之间的映射关系保存到映射表中。
可选的,当确定利用第三传输队列传输第三传输流时,即确定了第三传输队列与第三传输流对应的第三逻辑端口应该具备映射关系,因而,可以将第三传输队列和第三传输端口之间的映射关系保存到映射表中,比如,将第三传输队列的编号或者地址写入映射表,以使交换***在后续再收到第三逻辑端口对应的第三传输流时,可以直接利用该第三传输队列进行传输。
本申请实施例提供的队列控制方法,在接收第三逻辑端口对应的第三传输流,且该第三逻辑端口与交换***中设置的上述至少两个传输队列中的任意一个均不存在映射关系,此时,可以从交换***中处于空闲状态的传输队列中选择一个作为第三传输队列,并利用第三传输队列传输所述第三传输流,随后将第三传输队列与第三传输端口之间的映射关系保存到映射表中。该技术方案能够保证在接收到新的传输流时交换***中有空闲状态队列可用,避免了由于传输队列的资源耗尽造成的传输流丢失或对上游***产生的反压问题,灵活度高,保证了交换***上行接口接收到的传输流能够顺利交换到下行接口输出。
可选的,作为另一种示例,图6为本申请实施例提供的队列控制方法实施例三的流程示意图。如图6所示,本申请实施例提供的队列控制方法,还可以包括如下步骤:
步骤61:判断交换***中空闲状态队列的数量是否大于第二阈值;若是,执行步骤62,若否,执行步骤63。
其中,第二阈值大于第一阈值,且小于交换***中设置的传输队列的数量。
可选的,在本申请的实施例中,实时或周期性扫描交换***中处于活跃状态或者空闲状态的传输队列,获取交换***中处于空闲状态的队列数量,因而,可以判断交换***中该空闲状态队列的数量与设定的第二阈值的大小关系,并根据空闲状态队列的数量确定用于传输接收到的传输流的传输队列。
值得说明的是,在本申请实施例中,第二阈值需要是大于第一阈值的数,但第二阈值最大也不能高于交换***中设置的传输队列的数量,即交换***中空闲状态队列的数量小于交换***中设置的传输队列的数量。
本实施例中的第二阈值和第一阈值只是交换***中设置的两个判断门限值,其可根据实际情况进行确定,本申请实施例并不对其进行限定。
步骤62:将通过第一传输队列传输的第一传输流和第二传输流,通过第一传输队列和第四传输队列传输。
其中,该第四传输队列为交换***中处于空闲状态的传输队列中的任意一个。
可选的,作为一种示例,当交换***中空闲状态队列的数量很多,但仍然有被合并的队列时,即交换***中空闲状态队列的数量大于第二阈值时,可以将利用一个传输队列传输的两个传输流再分散到两个传输队列传输,即可以解释成“队列解压缩”。
具体的,在交换***的上行接口接收到上述压缩到第一传输队列传输的第一传输流和第二传输流时,且确定出交换***中空闲状态队列的数量大于上述设定的第二阈值时,此时,可以从空闲状态队列中选择一个传输队列,将其与上述第一传输队列一同传输第一传输流和第二传输流。
例如,假设从交换***中处于空闲状态的传输队列中选定的传输队列为第四传输队列时,便可以通过第一传输队列和第四传输队列传输原本通过第一传输队列传输的第一传输流和第二传输流。
对于第一传输队列和第四传输队列与第一传输流和第二传输流的对应关系,其可根据实际情况确定,此处不对其进行限定。
可选的,在本申请实施例中,该步骤,即将通过第一传输队列传输的第一传输流和第二传输流,通过第一传输队列和第四传输队列传输可以通过如下步骤实现:
首先,判断第一传输队列中是否存在第一传输流的传输包和第二传输流的传输包。
可选的,在一个实施例中,在第一传输队列中不存在第二传输流的传输包时,通过第一传输队列传输第一传输流,且通过第四传输队列传输第二传输流;相应的,保存第一传输队列与第一逻辑端口的映射关系,以及,第四传输队列与第二逻辑端口的映射关系。
或者,在另一个实施例中,在第一传输队列中不存在第一传输流的传输包时,通过第一传输队列传输第二传输流,且通过第四传输队列传输第一传输流;相应的,保存第一传输队列与第二逻辑端口的映射关系,以及,第四传输队列与第一逻辑端口的映射关系。
具体的,当为新收到的属于合并队列的传输流(本实施例中,该合并队列为第一传输队列,传输流为第一传输流或第二传输流)新分配一个传输队列时,但只能在合并队列将该传输流的传输包排空之后才允许调度新分配,否则,可能致使逻辑端口收到的传输流不完整。
因而,在本申请的一实施例中,可以控制第一传输队列中的传输包只出不进,当第一传输队列中的传输包排空时,将后续收到的传输流分别进入各自的传输队列。
可选的,在本申请的另一实施例中,可以在第一传输队列中为第一传输流和第二传输流分别设置一个计数器,用于统计第一传输队列中每个传输流的传输包数量,当收到原本利用该第一传输队列传输的第一传输流和第二传输流时,仅当第一传输队列中第一传输流或第二传输流的计数器为0时,才为其分配新的传输队列。通过这种方式为第一传输流或第二传输流新分配的传输队列允许立即被调度。
可选的,当利用第一传输队列传输的第一传输流或者第二传输流分别由第一传输队列或第四传输队列传输时,及时保存传输流对应的传输队列与逻辑端口之间的映射关系。比如,当原本通过第一传输队列传输第一传输流和第二传输流,经过第一传输队列解压缩后,通过第一传输队列传输第一传输流,且第四传输队列传输第二传输流时,此时,保存第一 传输队列与第一逻辑端口的映射关系,以及,第四传输队列与第二逻辑端口的映射关系,以使交换***再次接收到第一传输流和第二传输流时可以自动进入各自的传输队列。
步骤63:利用第一传输队列传输第一传输流和第二传输流。
可选的,在本申请实施例中,当交换***中空闲状态队列的数量不大于第二阈值时,表明交换***中处于空闲状态的传输队列不是很多,此时,可以不对第一传输队列传输的传输流进行任何处理,即仍然利用该第一传输队列传输第一传输流和第二传输流。
本申请实施例提供的队列控制方法,在交换***中空闲状态队列的数量大于第二阈值时,将通过第一传输队列传输的第一传输流和第二传输流,通过第一传输队列和第四传输队列传输,该第四传输队列为所述交换***中处于空闲状态的传输队列中的任意一个。该技术方案在交换***中空闲状态队列的数量足够多时,将原本合并传输的传输流再分配到多个传输队列进行传输,实现了传输队列的解压缩处理,提高了交换***的性能。
值得说明的是,本申请实施例通过对传输队列进行压缩和解压缩处理(例如,交换***具有100个逻辑端口,理论上,需要的传输队列的数量应该为100个,但是,本申请实施例可以仅设置50个传输队列,当交换***中空闲状态队列的数量小于10个时,通过将多个传输流合并到一个传输队列进行传输,以释放出空闲状态队列,而且当交换***中空闲状态队列的数量大于30时,将原本合并传输的多个传输流再分配到多个传输队列进行传输),使得交换***可以用较少的传输队列数量支撑所有逻辑端口的要求,而且也不会出现因为队列资源耗尽而产生的传输流丢失或反压的情况,交换***的性能高。
可选的,在本申请的一实施例中,上述交换***不限于交换网***,其还可以是流量管理***等。下面对本申请实施例适用的流量管理***进行简要说明。
图7为本申请实施例适用的流量管理***的结构示意图。该实施例以一个具有3层调度器的流量管理***进行说明。如图7所示,假设该流量管理***具有K个父端口,每个父端口包括L个子端口,每个子端口内又可以划分为P个粒度(比如,优先级),这样流量管理***具有“K乘以L乘以P”个端口粒子,相应的,流量管理***所需要的最大流队列数为“K乘以L乘以P”。
可选的,本实施例中,流量管理***中也可以设置一个映射表、至少两个流队列,该映射表中存储有至少一个流队列和至少一个端口粒子的映射关系,每个端口粒子对应一个传输流,流队列的数量小于端口粒子的数量。可选的,该映射表的深度为“K乘以L乘以P”,该映射表用于灵活的分配和回收流队列的资源。
可选的,在本申请的实施例中,当该流量管理***中空闲状态流队列的数量小于第一阈值时,可以将原本分别利用流队列传输的传输流利用一个流队列传输,而当该流量管理***中空闲状态流队列的数量大于第二阈值时,将原本合并传输的传输流分别分配流队列进行传输。比如,在空闲状态流队列的数量小于第一阈值时,将原本通过第一流队列传输的第一传输流、原本通过第二流队列传输的第二传输流均通过第一流队列或第二流队列传输,以释放出空闲状态流队列。而在空闲状态流队列的数量大于第二阈值时,将通过第一流队列传输的第一传输流和第二传输流,通过第一流队列和空闲状态流队列中的一个流队列进行传输。
可选的,在本实施例中,上述第一传输流对应的第一端口粒子和第二传输流对应的第二端口粒子属于同一子端口,或者,上述第一流队列和第二流队列中的传输流数量小于预 设数值。
因而,本申请实施例中的队列控制方法也适用于解决流量管理***中由于需要设置流队列的数量较多,致使流量管理***的耗费代价高的问题,或者由于设置的流队列数量过少致使流队列资源耗尽产生的传输包丢失或反压的问题。
图8为本申请实施例提供的队列控制装置实施例一的结构示意图。该队列控制装置可集成于交换***中,该交换***中设置有至少两个逻辑端口、至少两个传输队列和映射表,该映射表中至少存储有一个传输队列与至少一个逻辑端口的映射关系,每个逻辑端口对应一个传输流,且交换***中设置的传输队列的数量小于上述逻辑端口的数量。
可选的,如图8所示,本实施例提供的队列控制装置可以包括:接口设备81、队列管理器82和处理器83。
其中,该接口设备81,用于接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流。
该队列管理器82,用于在所述交换***中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的所述第一传输流、原本通过第二传输队列传输的所述第二传输流均通过所述第一传输队列传输。
其中,所述第一阈值小于所述交换***中设置的传输队列的数量;
该处理器83,用于更新所述映射表,更新后的所述映射表中所述第一传输队列与所述第一逻辑端口和所述第二逻辑端口具有映射关系。
可选的,该队列控制装置还可以包括存储器,该存储器用于存储队列管理器82和处理器83的执行指令。可选的,在本申请实施例中,存储器可以用于存储上述映射表,保存传输队列与逻辑端口之间的映射关系。
可选的,在本申请实施例的一种可能实现方式中,上述接口设备81,还用于接收第三逻辑端口对应的第三传输流。
其中,该第三逻辑端口与所述至少两个传输队列中的任意一个均不存在映射关系。
相应的,上述队列管理器82,还用于利用第三传输队列传输所述第三传输流,该第三传输队列为所述交换***中处于空闲状态的传输队列中的任意一个。
上述处理器83,还用于将所述第三传输队列与所述第三传输端口之间的映射关系保存到所述映射表中。
可选的,作为一种示例,所述第一逻辑端口和所述第二逻辑端口位于同一个端口模块上。
作为另一种示例,所述第一传输队列和所述第二传输队列中的传输流数量均小于预设数值。
可选的,在本申请实施例的另一种可能实现方式中,上述队列管理器82,还用于在所述交换***中空闲状态队列的数量大于第二阈值时,将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输。
其中,所述第二阈值大于所述第一阈值,且小于所述交换***中设置的传输队列的数量,所述第四传输队列为所述交换***中处于空闲状态的传输队列中的任意一个。
可选的,在本申请实施例中,作为一种示例,上述队列管理器82,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四 传输队列传输,具体为:
上述队列管理器82,用于在所述第一传输队列中不存在所述第二传输流的传输包时,通过所述第一传输队列传输所述第一传输流,且通过所述第四传输队列传输所述第二传输流。
相应的,上述处理器83,还用于保存所述第一传输队列与所述第一逻辑端口的映射关系,以及,所述第四传输队列与所述第二逻辑端口的映射关系。
可选的,在本申请实施例中,作为另一种示例,上述队列管理器82,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:
上述队列管理器82,用于在所述第一传输队列中不存在所述第一传输流的传输包时,通过所述第一传输队列传输所述第二传输流,且通过所述第四传输队列传输所述第一传输流。
相应的,上述处理器83,还用于保存所述第一传输队列与所述第二逻辑端口的映射关系,以及,所述第四传输队列与所述第一逻辑端口的映射关系。
可选的,在本申请实施例的上述任一种可能实现方式中,所述交换***为如下任意一种:交换网***、流量管理***。
本实施例提供的队列控制装置可用于执行图4至图6所示方法实施例的技术方案,具体实现方式和技术效果类似,这里不再赘述。
图9为本申请实施例提供的队列控制装置实施例二的结构示意图。该装置可以集成于交换***中。如图9所示,本实例提供的队列控制装置,可以包括:接收模块91和处理模块92。
其中,该接收模块91,用于接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流。
该处理模块92,用于在所述交换***中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的所述第一传输流、原本通过第二传输队列传输的所述第二传输流均通过所述第一传输队列传输,以及更新所述映射表,更新后的所述映射表中所述第一传输队列与所述第一逻辑端口和所述第二逻辑端口具有映射关系,所述第一阈值小于所述交换***中设置的传输队列的数量。
可选的,在本申请实施例的一种可能实现方式中,上述接收模块91,还用于接收第三逻辑端口对应的第三传输流,所述第三逻辑端口与所述至少两个传输队列中的任意一个均不存在映射关系。
上述处理模块92,还用于利用第三传输队列传输所述第三传输流,所述第三传输队列为所述交换***中处于空闲状态的传输队列中的任意一个,以及将所述第三传输队列与所述第三传输端口之间的映射关系保存到所述映射表中。
可选的,作为一种示例,所述第一逻辑端口和所述第二逻辑端口位于同一个端口模块上。
可选的,作为另一种示例,所述第一传输队列和所述第二传输队列中的传输流数量均小于预设数值。
可选的,在本申请实施例的另一种可能实现方式中,上述处理模块92,还用于在所述 交换***中空闲状态队列的数量大于第二阈值时,将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输。
其中,所述第二阈值大于所述第一阈值,且小于所述交换***中设置的传输队列的数量,所述第四传输队列为所述交换***中处于空闲状态的传输队列中的任意一个。
可选的,作为一种示例,所述处理模块92,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:
所述处理模块92,用于在所述第一传输队列中不存在所述第二传输流的传输包时,通过所述第一传输队列传输所述第一传输流,且通过所述第四传输队列传输所述第二传输流,以及保存所述第一传输队列与所述第一逻辑端口的映射关系,以及,所述第四传输队列与所述第二逻辑端口的映射关系。
可选的,作为另一种示例,所述处理模块92,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:
所述处理模块92,用于在所述第一传输队列中不存在所述第一传输流的传输包时,通过所述第一传输队列传输所述第二传输流,且通过所述第四传输队列传输所述第一传输流,以及保存所述第一传输队列与所述第二逻辑端口的映射关系,以及,所述第四传输队列与所述第一逻辑端口的映射关系。
可选的,在本申请实施例中,所述交换***为如下任意一种:交换网***、流量管理***。
可选的,本实施例中该接收模块91可以对应上述图8中的接口设备81,该处理模块92可以对应上述图8中的队列管理器82和处理器83。
本申请实施例提供一种存储介质,所述存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如上述图4至图6所示实施例的技术方案。
可选的,本申请实施例提供一种运行指令的芯片,所述芯片用于执行图4至图6所示方法实施例的技术方案。
需要说明的是,应理解以上装置的各个模块的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块通过处理元件调用软件的形式实现,部分模块通过硬件的形式实现。例如,确定模块可以为单独设立的处理元件,也可以集成在上述装置的某一个芯片中实现,此外,也可以以程序代码的形式存储于上述装置的存储器中,由上述装置的某一个处理元件调用并执行以上确定模块的功能。其它模块的实现与之类似。此外这些模块全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件可以是一种集成电路,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。
例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital singnal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)等。再如,当以上某个模块通过处理元件调度程序代码 的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序代码的处理器。再如,这些模块可以集成在一起,以片上***(system-on-a-chip,SOC)的形式实现。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在可读存储介质中,或者从一个可读存储介质向另一个可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘solid state disk(SSD))等。
本文中的术语“多个”是指两个或两个以上。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系;在公式中,字符“/”,表示前后关联对象是一种“相除”的关系。
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。
可以理解的是,在本申请的实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。

Claims (17)

  1. 一种队列控制方法,其特征在于,所述方法应用于交换***,所述交换***中设置有至少两个逻辑端口、至少两个传输队列和映射表,所述映射表中至少存储有一个传输队列与至少一个逻辑端口的映射关系,每个逻辑端口对应一个传输流,所述传输队列的数量小于所述逻辑端口的数量,所述方法包括:
    接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流;
    在所述交换***中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的所述第一传输流、原本通过第二传输队列传输的所述第二传输流均通过所述第一传输队列传输,所述第一阈值小于所述交换***中设置的传输队列的数量;
    更新所述映射表,更新后的所述映射表中所述第一传输队列与所述第一逻辑端口和所述第二逻辑端口具有映射关系。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    接收第三逻辑端口对应的第三传输流,所述第三逻辑端口与所述至少两个传输队列中的任意一个均不存在映射关系;
    利用第三传输队列传输所述第三传输流,所述第三传输队列为所述交换***中处于空闲状态的传输队列中的任意一个;
    将所述第三传输队列与所述第三传输端口之间的映射关系保存到所述映射表中。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一逻辑端口和所述第二逻辑端口位于同一个端口模块上。
  4. 根据权利要求1或2所述的方法,其特征在于,所述第一传输队列和所述第二传输队列中的传输流数量均小于预设数值。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:
    在所述交换***中空闲状态队列的数量大于第二阈值时,将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,所述第二阈值大于所述第一阈值,且小于所述交换***中设置的传输队列的数量,所述第四传输队列为所述交换***中处于空闲状态的传输队列中的任意一个。
  6. 根据权利要求5所述的方法,其特征在于,所述将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,包括:
    在所述第一传输队列中不存在所述第二传输流的传输包时,通过所述第一传输队列传输所述第一传输流,且通过所述第四传输队列传输所述第二传输流;
    所述方法,还包括:
    保存所述第一传输队列与所述第一逻辑端口的映射关系,以及,所述第四传输队列与所述第二逻辑端口的映射关系。
  7. 根据权利要求5所述的方法,其特征在于,所述将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,包括:
    在所述第一传输队列中不存在所述第一传输流的传输包时,通过所述第一传输队列传输所述第二传输流,且通过所述第四传输队列传输所述第一传输流;
    所述方法,还包括:
    保存所述第一传输队列与所述第二逻辑端口的映射关系,以及,所述第四传输队列与所述第一逻辑端口的映射关系。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述交换***为如下任意一种:交换网***、流量管理***。
  9. 一种队列控制装置,其特征在于,所述装置集成于交换***中,所述交换***中设置有至少两个逻辑端口、至少两个传输队列和映射表,所述映射表中至少存储有一个传输队列与至少一个逻辑端口的映射关系,每个逻辑端口对应一个传输流,所述传输队列的数量小于所述逻辑端口的数量,所述装置包括:接口设备、队列管理器和处理器;
    所述接口设备,用于接收第一逻辑端口对应的第一传输流和第二逻辑端口对应的第二传输流;
    所述队列管理器,用于在所述交换***中空闲状态队列的数量小于第一阈值时,将原本通过第一传输队列传输的所述第一传输流、原本通过第二传输队列传输的所述第二传输流均通过所述第一传输队列传输,所述第一阈值小于所述交换***中设置的传输队列的数量;
    所述处理器,用于更新所述映射表,更新后的所述映射表中所述第一传输队列与所述第一逻辑端口和所述第二逻辑端口具有映射关系。
  10. 根据权利要求9所述的装置,其特征在于,
    所述接口设备,还用于接收第三逻辑端口对应的第三传输流,所述第三逻辑端口与所述至少两个传输队列中的任意一个均不存在映射关系;
    所述队列管理器,还用于利用第三传输队列传输所述第三传输流,所述第三传输队列为所述交换***中处于空闲状态的传输队列中的任意一个;
    所述处理器,还用于将所述第三传输队列与所述第三传输端口之间的映射关系保存到所述映射表中。
  11. 根据权利要求9或10所述的装置,其特征在于,所述第一逻辑端口和所述第二逻辑端口位于同一个端口模块上。
  12. 根据权利要求9或10所述的装置,其特征在于,所述第一传输队列和所述第二传输队列中的传输流数量均小于预设数值。
  13. 根据权利要求9-12任一项所述的装置,其特征在于,
    所述队列管理器,还用于在所述交换***中空闲状态队列的数量大于第二阈值时,将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,所述第二阈值大于所述第一阈值,且小于所述交换***中设置的传输队列的数量,所述第四传输队列为所述交换***中处于空闲状态的传输队列中的任意一个。
  14. 根据权利要求13所述的装置,其特征在于,所述队列管理器,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:
    所述队列管理器,用于在所述第一传输队列中不存在所述第二传输流的传输包时,通过所述第一传输队列传输所述第一传输流,且通过所述第四传输队列传输所述第二传输流;
    所述处理器,还用于保存所述第一传输队列与所述第一逻辑端口的映射关系,以及,所述第四传输队列与所述第二逻辑端口的映射关系。
  15. 根据权利要求13所述的方法,其特征在于,所述队列管理器,用于将通过所述第一传输队列传输的所述第一传输流和所述第二传输流,通过所述第一传输队列和所述第四传输队列传输,具体为:
    所述队列管理器,用于在所述第一传输队列中不存在所述第一传输流的传输包时,通过所述第一传输队列传输所述第二传输流,且通过所述第四传输队列传输所述第一传输流;
    所述处理器,还用于保存所述第一传输队列与所述第二逻辑端口的映射关系,以及,所述第四传输队列与所述第一逻辑端口的映射关系。
  16. 根据权利要求9-15任一项所述的装置,其特征在于,所述交换***为如下任意一种:交换网***、流量管理***。
  17. 一种存储介质,其特征在于,所述存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求1-8任一项所述的方法。
PCT/CN2018/089935 2018-06-05 2018-06-05 队列控制方法、装置及存储介质 WO2019232694A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/089935 WO2019232694A1 (zh) 2018-06-05 2018-06-05 队列控制方法、装置及存储介质
CN201880094199.5A CN112272933B (zh) 2018-06-05 2018-06-05 队列控制方法、装置及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/089935 WO2019232694A1 (zh) 2018-06-05 2018-06-05 队列控制方法、装置及存储介质

Publications (1)

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

Family

ID=68769707

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/089935 WO2019232694A1 (zh) 2018-06-05 2018-06-05 队列控制方法、装置及存储介质

Country Status (2)

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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415969A (zh) * 2022-02-09 2022-04-29 杭州云合智网技术有限公司 交换芯片报文动态存储方法
CN114666276A (zh) * 2022-04-01 2022-06-24 阿里巴巴(中国)有限公司 一种发送报文的方法和装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115955447B (zh) * 2023-03-13 2023-06-27 微网优联科技(成都)有限公司 一种数据传输方法、交换机及交换机***

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 (zh) * 2011-07-13 2011-10-19 华为数字技术有限公司 一种队列调度方法及装置
CN106886498A (zh) * 2017-02-28 2017-06-23 华为技术有限公司 数据处理装置和终端
CN107770085A (zh) * 2016-08-23 2018-03-06 华为技术有限公司 一种网络负载均衡方法、设备及***

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60034320T2 (de) * 1999-03-17 2007-12-20 Broadcom Corp., Irvine Verfahren zur vermeidung von nichtsequentiellen rahmen in einer netzwerkvermittlungsstelle
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 (zh) * 2006-11-20 2008-06-04 中兴通讯股份有限公司 采用虚拟监控组提高转发速度和效率的路由器
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 (zh) * 2011-07-13 2011-10-19 华为数字技术有限公司 一种队列调度方法及装置
CN107770085A (zh) * 2016-08-23 2018-03-06 华为技术有限公司 一种网络负载均衡方法、设备及***
CN106886498A (zh) * 2017-02-28 2017-06-23 华为技术有限公司 数据处理装置和终端

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415969A (zh) * 2022-02-09 2022-04-29 杭州云合智网技术有限公司 交换芯片报文动态存储方法
CN114415969B (zh) * 2022-02-09 2023-09-29 杭州云合智网技术有限公司 交换芯片报文动态存储方法
CN114666276A (zh) * 2022-04-01 2022-06-24 阿里巴巴(中国)有限公司 一种发送报文的方法和装置

Also Published As

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

Similar Documents

Publication Publication Date Title
CN114731336B (zh) 用于在高性能计算环境中的私有架构中提供带宽拥塞控制的***和方法
US20200358834A1 (en) Hybrid network system, communication method and network node
US10673770B1 (en) Intelligent packet queues with delay-based actions
US11099906B2 (en) Handling tenant requests in a system that uses hardware acceleration components
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
US11968129B1 (en) Delay-based tagging in a network switch
US10313255B1 (en) Intelligent packet queues with enqueue drop visibility and forensics
CN111522653A (zh) 基于容器的网络功能虚拟化平台
WO2018072687A1 (zh) 一种资源调度的方法、装置和过滤式调度器
WO2019232694A1 (zh) 队列控制方法、装置及存储介质
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 (zh) 片上网络数据传输方法、装置、片上网络、设备及介质
EP3605975A1 (en) Client service transmission method and device
US20110280124A1 (en) Systems and Methods for Load Balancing of Management Traffic Over a Link Aggregation Group
Hua et al. Scheduling heterogeneous flows with delay-aware deduplication for avionics applications
CN115622952A (zh) 资源调度方法、装置、设备及计算机可读存储介质
US9264383B1 (en) Systems and methods for quality of service for link aggregation groups
CN108471354B (zh) 多租户软件定义网络中虚拟网络流表弹性切割***及方法
CN112804166B (zh) 一种报文收发方法、装置及存储介质
US9154569B1 (en) Method and system for buffer management
WO2022147762A1 (zh) 一种数据包排序方法及装置
US11888751B2 (en) Enhanced virtual channel switching
WO2023193689A1 (zh) 报文传输方法、装置、设备及计算机可读存储介质

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