WO2020114133A1 - Pq expansion implementation method, device, equipment and storage medium - Google Patents

Pq expansion implementation method, device, equipment and storage medium Download PDF

Info

Publication number
WO2020114133A1
WO2020114133A1 PCT/CN2019/112746 CN2019112746W WO2020114133A1 WO 2020114133 A1 WO2020114133 A1 WO 2020114133A1 CN 2019112746 W CN2019112746 W CN 2019112746W WO 2020114133 A1 WO2020114133 A1 WO 2020114133A1
Authority
WO
WIPO (PCT)
Prior art keywords
queue
simulated
queue number
qos service
queues
Prior art date
Application number
PCT/CN2019/112746
Other languages
French (fr)
Chinese (zh)
Inventor
胡忠花
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2020114133A1 publication Critical patent/WO2020114133A1/en

Links

Images

Classifications

    • 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/6285Provisions for avoiding starvation of low priority queues
    • 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/6215Individual queue per QOS, rate or priority
    • 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/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority

Definitions

  • the present application relates to the field of communication but is not limited to the field of communication, in particular to a method, device, device and storage medium for implementing priority (Queueing, PQ) queue expansion.
  • priority Queueing, PQ
  • QoS Quality of Service
  • service quality includes transmission bandwidth, transmission delay, and data packet loss rate.
  • the quality of service can be improved by ensuring the transmission bandwidth, reducing the transmission delay, reducing the data packet loss rate and delay jitter.
  • Network resources are always limited, as long as there is a situation of snatching network resources, there will be requirements for service quality.
  • Service quality is relative to network services. While ensuring the service quality of a certain type of service, it may be damaging the service quality of other services. For example, when the total network bandwidth is fixed, the more bandwidth a certain type of service occupies, the less bandwidth other services can use, which may affect the use of other services. Therefore, network administrators need to plan and allocate network resources reasonably according to the characteristics of various services, so that network resources can be used efficiently.
  • QoS technologies include traffic classification, traffic policing, traffic shaping, interface speed limiting, congestion management, and congestion avoidance.
  • congestion management generally uses queue technology, a queue algorithm is used to classify the traffic, and then a certain priority algorithm is used to send the traffic out.
  • queue technology mainly includes: FIFO (first-in first-out queue), PQ (priority queue), WFQ (weighted fair queue), CBWFQ (class-based weighted fair queue) and so on.
  • PQ Priority Queueing, priority queue
  • Embodiments of the present application provide a method, device, equipment, and storage medium for implementing PQ queue expansion.
  • an embodiment of the present application provides a method for implementing capacity expansion of a PQ queue.
  • the method includes:
  • the selection of the PQ queue number includes:
  • the generating a PQ queue expansion request according to the configured QOS service includes:
  • the method further includes:
  • the generation of the simulated PQ queue number based on the discard threshold and the PQ queue number includes:
  • Multiple simulated PQ queue numbers are generated based on the PQ queue number and multiple different drop thresholds.
  • putting the QOS service message into the simulated PQ queue number includes:
  • the packets of different preference levels are put into the corresponding analog PQ queue numbers.
  • a device for implementing expansion of a PQ queue includes:
  • the configuration module is configured to generate a PQ queue expansion request according to the configured QOS service
  • a control module configured to select a PQ queue number based on the PQ queue expansion request
  • a determination module configured to generate an analog PQ queue number based on the discard threshold and the PQ queue number
  • the enqueue module is configured to put the QOS service message into the simulated PQ queue number.
  • a network device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, when the computer program is executed by the processor. The steps of the method according to any of the first aspect are implemented.
  • a computer-readable storage medium has stored thereon a computer program, which when executed by a processor implements the steps of the method according to any one of the first aspects.
  • the embodiment of the present application generates a simulated PQ queue number based on the number of queues configured by the QOS service, and the simulated PQ queue is expanded relative to the number of hardware PQ queues, thereby solving the existing problem
  • the problem of limiting the number of PQ queues that support QoS scheduling has achieved positive technical results.
  • FIG. 2 is a schematic diagram of sending PQ technical messages in an embodiment of the present application.
  • FIG. 3 is a schematic diagram of differential discarding in the RED algorithm in the embodiment of the present application.
  • FIG. 5 is a flowchart of a method for implementing capacity expansion of a PQ queue according to an embodiment of the present application
  • FIG. 6 is a flowchart of a method for implementing capacity expansion of a PQ queue according to an embodiment of the present application
  • FIG. 7 is a functional block diagram of a device for implementing expansion of a PQ queue according to an embodiment of the present application.
  • FIG. 8 is a schematic block diagram of resources of a traffic management chip in Embodiment 4 of this application.
  • FIG. 10 is a schematic diagram of queue priority scheduling after PQ queue expansion is used in Embodiment 4 of the present application;
  • FIG. 11 is a flowchart of a specific practical application described in Embodiment 4 of the present application.
  • traffic classification, traffic policing, traffic shaping, congestion management and congestion avoidance mainly complete the following functions:
  • a certain rule is used to identify packets that meet certain characteristics, and differentiate services for network services.
  • Traffic policing regulate the specific traffic entering or leaving the device. When the traffic exceeds the set value, restrictions or punishment measures can be taken to protect the network resources from damage. It can act on the inbound and outbound directions of the interface.
  • Traffic shaping Actively adjust the output rate of the flow to adapt the flow to downstream equipment and network resources that can be supplied to avoid unnecessary packet discarding. It is usually used in the outbound direction of the interface.
  • Congestion management When congestion occurs, a resource scheduling strategy is formulated to determine the processing order of packet forwarding, which usually acts on the outbound direction of the interface.
  • Congestion avoidance monitor the usage of network resources, take the initiative to discard packets when congestion is found to increase, and adjust the length of the queue to relieve network overload, usually in the outbound direction of the interface.
  • Congestion management generally uses queue technology, which uses a queue algorithm to classify traffic, and then uses a certain priority algorithm to send these traffic out.
  • queue technology mainly includes: FIFO (first-in first-out queue), PQ (priority queue), WFQ (weighted fair queue), CBWFQ (class-based weighted fair queue) and so on.
  • PQ Primary Queueing, priority queue
  • PQ is designed for critical business applications. An important feature of key services is that when congestion occurs, priority is required to obtain services to reduce the response delay.
  • PQ can flexibly specify priorities according to network protocols (such as IP, IPX), data inflow interface, packet length, source address/destination address, and so on.
  • the priority queue divides the packets into four categories, namely high priority queue (high), middle priority queue (middle), normal priority queue (normal) and low priority queue (low), and their priorities are sequentially lowered. By default, the data flow enters the normal queue. as shown in picture 2. In queue scheduling, PQ strictly sends the packets in the higher priority queue in strict order from high to low.
  • the higher priority queue When the higher priority queue is empty, it sends the packets in the lower priority queue. In this way, placing the packets of the critical business in the queue of higher priority and placing the packets of the non-critical business in the queue of lower priority can ensure that the packets of the critical business are transmitted preferentially, and the packets of the non-critical business are processing the critical business The idle gap of data is transmitted.
  • the congestion avoidance technology specifically adopts the following technologies:
  • the existing packet loss strategy adopts the Tail-Drop method. When the length of the queue reaches a certain maximum value, all new packets will be discarded.
  • This drop strategy will cause TCP global synchronization phenomenon-when the queue drops multiple TCP connection packets at the same time, it will cause TCP timeout, which will cause TCP slow start and congestion avoidance mechanism, so that TCP reduces the transmission of packets.
  • RED Random Early Detection, random early detection
  • WRED Weighted Random Early Detection, weighted random early detection
  • an upper limit and a lower limit are set for each queue, and the packets in the queue are processed as follows: when the length of the queue is less than the lower limit, packets are not discarded; when the length of the queue exceeds the upper limit, all are discarded Incoming packets; when the length of the queue is between the upper limit and the lower limit, random packets are started to be discarded.
  • WRED combines DSCP and RED in the IP header to provide a drop threshold for priority traffic (high priority) that differs from standard traffic (lower priority). In other words, WRED selectively discards data packets based on DSCP (Differentiated Services Code) in the IP header.
  • DSCP Differentiated Services Code
  • WRED monitors the average length of queues in network devices, so it can decide when to start dropping packets based on the queue length.
  • the average length of the queue is the result of the queue length being low-pass filtered. It not only reflects the changing trend of the queue, but also is insensitive to the sudden change of the queue length, avoiding unfair treatment for sudden data flows.
  • WRED When the average queue length exceeds the minimum drop threshold specified by the user, WRED begins to drop packets according to a certain drop probability. The longer the queue length, the higher the drop probability. If the average queue length exceeds the maximum drop threshold specified by the user, WRED switches to tail-of-line drop, that is, all subsequent packets will be dropped.
  • Drop Priority (Drop Priority, DP) is derived from the DSCP priority mapping in the IP packet header. The higher the precedence priority, the lower the drop probability.
  • An embodiment of the present application provides a method for implementing capacity expansion of a PQ queue. As shown in FIG. 5, the method may include the following steps:
  • Step S501 Generate a PQ queue expansion request according to the configured QOS service.
  • Configure the QOS service to divide IP packets into multiple queues and assign priorities to each queue, such as high priority queue, medium priority queue, normal priority queue and low priority queue, and then send PQ according to the number of queues and queue priority Queue expansion request.
  • Step S502 Select a PQ queue number based on the PQ queue expansion request.
  • Selecting the PQ queue number is to select the PQ queue number of the specific hardware.
  • the hardware required for expansion to 8 PQ queues is selected.
  • PQ queue such as selecting 4 hardware PQ queues.
  • the PQ queue in this article refers to the hardware PQ queue number.
  • the selection of the hardware PQ queue is selected in the resource pool. That is, all hardware PQ queues are placed in a resource pool. When you need to select a hardware PQ queue, go to the resource pool to query which hardware PQ queues are available, and then select the hardware PQ queues in the available state according to your needs, so as to get The PQ queue number of the selected hardware PQ queue. When the hardware PQ queue is not used, the corresponding hardware PQ queue should be released into the resource pool in time, so that other services can be called again, so as to set up the resource pool, and place all hardware PQ queues into the resource pool, which improves the hardware PQ queue. Use efficiency.
  • Step S503 Generate a simulated PQ queue number based on the discard threshold and the PQ queue number.
  • the discard threshold information is filled to generate multiple simulated PQ queue numbers.
  • the QOS service requires 8 queues, and on the basis of selecting 4 PQ queue numbers, 8 analog PQ queue numbers are generated by filling in the discard threshold information.
  • Step S504 Put the QOS service message into the simulated PQ queue number.
  • the 8 queues in the QOS service are placed into the corresponding 8 simulated PQ queue numbers according to the priority level. Then send them in order according to priority.
  • Step S501 Generate a PQ queue expansion request according to the configured QOS service, including:
  • Configure the QOS service to divide IP packets into multiple queues and assign priorities to each queue, such as high priority queue, medium priority queue, normal priority queue, and low priority queue.
  • the PQ queue expansion request is sent based on the number of queues and queue priority.
  • Step S503 The generating a simulated PQ queue number based on the discard threshold and the PQ queue number includes:
  • Multiple simulated PQ queue numbers are generated based on the PQ queue number and multiple different drop thresholds.
  • the table information is modified based on the selected hardware PQ queue number and the selected discard threshold, thereby generating multiple simulated PQ queue numbers.
  • Step 504 Put the QOS service message into the simulated PQ queue number, including:
  • the packets of different preference levels are put into the corresponding analog PQ queue numbers.
  • the message information is assigned to the simulated PQ queue number according to the priority, and then the message information in the simulated PQ queue number is sequentially sent according to the priority.
  • An embodiment of the present application provides a method for implementing capacity expansion of a PQ queue. As shown in FIG. 6, the method includes the following specific steps:
  • Step S601 Generate a PQ queue expansion request according to the configured QOS service.
  • Configure the QOS service to divide IP packets into multiple queues and assign priorities to each queue, such as high priority queue, medium priority queue, normal priority queue, and low priority queue, and then send PQ according to the number of queues and queue priority Queue expansion request.
  • Step S602 Select a PQ queue number based on the PQ queue expansion request.
  • Selecting the PQ queue number is to select the PQ queue number of the specific hardware.
  • the hardware required for expansion to 8 PQ queues is selected.
  • PQ queue such as selecting 4 hardware PQ queues.
  • the PQ queue in this article refers to the hardware PQ queue number.
  • the hardware PQ queue is selected in the resource pool. That is, all hardware PQ queues are placed in a resource pool.
  • you need to select a hardware PQ queue go to the resource pool to query which hardware PQ queues are available, and then select the hardware PQ queues in the available state as needed to obtain The PQ queue number of the selected hardware PQ queue.
  • the hardware PQ queue is not used, the corresponding hardware PQ queue should be released into the resource pool in time, so that other services can be called again, so as to set up the resource pool, and place all hardware PQ queues into the resource pool, which improves the hardware PQ queue. Use efficiency.
  • Step S603 Generate a simulated PQ queue number based on the discard threshold and the PQ queue number.
  • the discard threshold information is filled to generate multiple simulated PQ queue numbers.
  • the QOS service requires 8 queues, and on the basis of selecting 4 PQ queue numbers, 8 analog PQ queue numbers are generated by filling in the discard threshold information.
  • Step S604 Put the QOS service message into the simulated PQ queue number.
  • the 8 queues in the QOS service are placed into the corresponding 8 simulated PQ queue numbers according to the priority level. Then send them in order according to priority.
  • Step S605 Restore the simulated PQ queue number to the PQ queue number.
  • An embodiment of the present application provides a device for implementing expansion of a PQ queue, as shown in FIG. 7, including:
  • the configuration module 701 is configured to generate a PQ queue expansion request according to the configured QOS service.
  • Configure the QOS service to divide IP packets into multiple queues and assign priorities to each queue, such as high priority queue, medium priority queue, normal priority queue, and low priority queue, and then send PQ according to the number of queues and queue priority Queue expansion request.
  • the control module 702 is configured to select a PQ queue number based on the PQ queue expansion request.
  • Selecting the PQ queue number is to select the PQ queue number of the specific hardware.
  • the hardware required for expansion to 8 PQ queues is selected.
  • PQ queue such as selecting 4 hardware PQ queues.
  • the PQ queue in this article refers to the hardware PQ queue number.
  • the selection of the hardware PQ queue is selected in the resource pool. That is, all hardware PQ queues are placed in a resource pool.
  • you need to select a hardware PQ queue go to the resource pool to query which hardware PQ queues are available, and then select the hardware PQ queues in the available state as needed to obtain The PQ queue number of the selected hardware PQ queue.
  • the hardware PQ queue is not used, the corresponding hardware PQ queue should be released into the resource pool in time, so that other services can be called again, so as to set up the resource pool and place all hardware PQ queues in the resource pool, which improves the hardware PQ queue. Use efficiency.
  • the determination module 703 is configured to generate an analog PQ queue number based on the discard threshold and the PQ queue number;
  • the discard threshold information is filled to generate multiple simulated PQ queue numbers.
  • the QOS service requires 8 queues, and on the basis of selecting 4 PQ queue numbers, 8 analog PQ queue numbers are generated by filling in the discard threshold information.
  • the enqueue module 704 is configured to put the QOS service message into the simulated PQ queue number.
  • the determination module After accessing the QOS service, the determination module backfills the expanded simulated PQ queue number to the enqueue module, and the traffic is classified into each simulated PQ queue according to the backfilled simulated PQ queue number.
  • the 8 queues in the QOS service are placed into the corresponding 8 simulated PQ queue numbers according to the priority level. Then send them in order according to priority.
  • the configuration module 701 includes:
  • QOS service configuration module configured to configure the number of POS queues of the QOS service and the priority of the QOS service packets.
  • Request generation module configured to generate a PQ queue expansion request based on the configured number of PQ queues.
  • the device further includes a release module: configured to restore the simulated PQ queue number to a PQ queue number.
  • the determination module 703 includes: a threshold selection module: configured to select a plurality of different discard thresholds;
  • Simulated PQ queue number generation module configured to generate multiple simulated PQ queue numbers based on the PQ queue number and multiple different discarding thresholds.
  • the enqueue module 704 includes: a query module: configured to query the simulated PQ queue number information;
  • Message enqueue module configured to put messages of different preferred levels into the corresponding analog PQ queue number based on the query information.
  • the apparatus further includes: a table management module: configured to receive a PQ queue expansion request from the configuration module, and send the PQ queue expansion request to the control module.
  • a table management module configured to receive a PQ queue expansion request from the configuration module, and send the PQ queue expansion request to the control module.
  • This embodiment introduces an application example of the present application on the basis of the above embodiments and with reference to FIGS. 8-11.
  • a specific practical application of a method and a device for implementing capacity expansion of a PQ queue may include:
  • the number of resources of the traffic management chip is: L1, 2 (32 ⁇ 8), L3, 4 (4K ⁇ 4) mode, when L4 is attached to each L3, supports 4 priority level.
  • a total of 16K L4PQ queues are supported. If the existing design satisfies the PQ queue support of more than 16K, or when each L3 is linked to L4, it is impossible to support more than 4 priorities.
  • the allocation of PQ queues in the resource pool is as follows:
  • S1102 Application for QOS service and PQ queue expansion and stacking process.
  • the configuration module transparently transmits the strategy QOS service and PQ queue expansion mark containing 8 PQ queues to the table management module.
  • S1103 The table management module transparently transmits the PQ queue configuration and queue expansion flag to the traffic chip management module.
  • the traffic management chip module After receiving the information from the table management module, the traffic management chip module first allocates one port (L1), one subport (L2), one class (L3), and four queues (L4) from the resource pool as capacity expansion PQ simulation The basic scheduler and PQ queue of the queue.
  • FLOWID1 00000000000000000000000001
  • FLOWID2 0000000000000000000000000010
  • FLOWID3 00000000000000000000000011.
  • S1105 Two different queue depth thresholds (discard thresholds) are allocated at the same time. 1M and 2M match different precedence.
  • FLOWID0_EX1 00000000000000000000000000000000
  • FLOWID1_EX1 00000000000000000000000000000001
  • FLOWID2_EX1 0000 0000 0000 0000 0000
  • FLOWID3_EX1 0000 0000 0000 0000 0000 00001;
  • FLOWID0_EX2 01000000000000000000000000000000
  • FLOWID1_EX2 01000000000000000000000000000001
  • FLOWID2_EX2 01000000000000000000000000
  • FLOWID3_EX2 0100000000000000000000000011.
  • the enqueue module sends the messages of different precedence to different analog PQ queue numbers by looking up the flowid information in the table management module.
  • the actual enrollment is FLOWID0, FLOWID1, FLOWID2, FLOWID3. From the effect, it is 8 PQ services.
  • the QOS service of 8 PQ queues actually uses only 4 hardware queue resources, which greatly reduces the use of resources. Not only that, but under limited hardware resource limits, configuration examples that exceed hardware resource limits can be supported.
  • the configuration module transparently transmits the policy QOS service and the PQ queue expansion mark of the released 8 PQ queues to the table management module.
  • the table management module transparently transmits the released eight PQ queue configurations and queue expansion marks to the traffic chip management module. At the same time, the table management module restores the backfilled flowid to the default value.
  • the traffic management chip module collects the scheduler information used by QOS scheduling, the scheduler used by QOS, and the PQ queue. The QOS parameters are restored to the default value and sent to the SDK to be written into the chip.
  • the generated scheduling resources are shown in FIG. 10. Comparing FIG. 9 with FIG. 10 shows that the hardware difference between this embodiment and the existing QOS method for implementing PQ pairs includes: This embodiment focuses on saving the traffic management chip The hardware queue resources of the module.
  • the prior art shown in FIG. 9 uses a total of 8 hardware queues to implement scheduling of 8 PQ queues.
  • the embodiment shown in FIG. 10 uses a total of 4 hardware queues and implements scheduling of 8 PQ queues. It is necessary to support the same number of PQ queues, and the hardware resource requirements in this embodiment are less.
  • the configuration module, the table management module, and the traffic management chip management module all need to add a PQ queue expansion flag, and the flowid information interacted by the table management module and the flow management module adds two bytes of discard threshold information.
  • this embodiment has at least the following beneficial effects:
  • the traffic management chip module in the prior art includes N hardware scheduling queue resources, so the number of scheduling queues supporting QOS is at most N. There is a disadvantage of consuming resources.
  • the hardware scheduling queue resources are limited, the number of queues that can support QOS is limited, and the number of queues cannot be expanded.
  • a virtual PQ queue is simulated on the basis of actual hardware queue resources, which saves hardware scheduling queue resources and expands the number of queues that can support QOS services.
  • An embodiment of the present application provides a network device, which can be understood as a physical device, including a processor and a memory storing executable instructions of the processor.
  • the instructions When the instructions are executed by the processor, the following operations are performed: configuring QOS Business, and generate a PQ queue expansion request based on the configured QOS service; select a PQ queue number based on the PQ queue expansion request; generate a simulated PQ queue number based on the drop threshold and the PQ queue number; convert the QOS service message Put in the analog PQ queue number.
  • the processor can be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU), a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or a One or more integrated circuits configured to implement the embodiments of the present application.
  • the memory is configured to store executable instructions of the processor; the memory is configured to store program code and transmit the program code to the processor.
  • the memory may include volatile memory (Volatile Memory), such as random access memory (Random Access Memory, RAM); may also include non-volatile memory (Non-Volatile Memory), such as read-only memory (Read-Only Memory, ROM), flash memory (Flash), hard disk (HDD), or solid-state drive (SSD); it can also include a combination of the above types of memory.
  • volatile memory such as random access memory (Random Access Memory, RAM
  • Non-Volatile Memory such as read-only memory (Read-Only Memory, ROM), flash memory (Flash), hard disk (HDD), or solid-state drive (SSD); it can also include a combination of the above types of memory.
  • An embodiment of the present application provides a computer-readable storage medium that stores a computer program on the computer-readable storage medium.
  • a QOS service is configured, and the The QOS service generates a PQ queue expansion request; based on the PQ queue expansion request, a PQ queue number is selected; a simulated PQ queue number is generated based on the discard threshold and the PQ queue number; the QOS service packet is placed in the simulated PQ queue number .
  • the computer-readable storage medium includes, but is not limited to: ROM, RAM, magnetic disk or optical disk.
  • the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform, and of course, can also be implemented by hardware, but in many cases the former is better Implementation.
  • the technical solution of the present application can essentially be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk,
  • the CD-ROM includes several instructions to enable a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the embodiments of the present application.

Landscapes

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

Abstract

Disclosed in the present application are a priority queue (PQ) expansion implementation method, device, equipment and storage medium, the PQ expansion implementation method comprising: generating a PQ expansion request according to a configured QOS service; selecting a PQ queue number on the basis of the PQ expansion request; generating a simulation PQ queue number on the basis of a discarding threshold and the PQ queue number; and placing a QOS service message in the simulation PQ queue number.

Description

一种PQ队列扩容实现方法、装置、设备及存储介质Method, device, equipment and storage medium for realizing expansion of PQ queue
本申请要求在2018年12月04日提交中国专利局、申请号为201811473910.6的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application filed on December 04, 2018 in the China Patent Office with the application number 201811473910.6. The entire contents of this application are incorporated by reference in this application.
技术领域Technical field
本申请涉及通信领域但不限于通信领域,尤其涉及一种优先(Priority Queueing,PQ)队列扩容实现方法、装置、设备及存储介质。The present application relates to the field of communication but is not limited to the field of communication, in particular to a method, device, device and storage medium for implementing priority (Queueing, PQ) queue expansion.
背景技术Background technique
QoS(Quality of Service)即服务质量。对于网络业务,服务质量包括传输的带宽、传送的时延、数据的丢包率等。在网络中可以通过保证传输的带宽、降低传送的时延、降低数据的丢包率以及时延抖动等措施来提高服务质量。网络资源总是有限的,只要存在抢夺网络资源的情况,就会出现服务质量的要求。服务质量是相对网络业务而言的,在保证某类业务的服务质量的同时,可能就是在损害其它业务的服务质量。例如,在网络总带宽固定的情况下,如果某类业务占用带宽越多,那么其他业务能使用的带宽就越少,可能会影响其他业务的使用。因此,网络管理者需要根据各种业务的特点来对网络资源进行合理的规划和分配,从而使网络资源得到高效利用。QoS (Quality of Service) is the quality of service. For network services, service quality includes transmission bandwidth, transmission delay, and data packet loss rate. In the network, the quality of service can be improved by ensuring the transmission bandwidth, reducing the transmission delay, reducing the data packet loss rate and delay jitter. Network resources are always limited, as long as there is a situation of snatching network resources, there will be requirements for service quality. Service quality is relative to network services. While ensuring the service quality of a certain type of service, it may be damaging the service quality of other services. For example, when the total network bandwidth is fixed, the more bandwidth a certain type of service occupies, the less bandwidth other services can use, which may affect the use of other services. Therefore, network administrators need to plan and allocate network resources reasonably according to the characteristics of various services, so that network resources can be used efficiently.
QoS技术包括流分类、流量监管、流量整形、接口限速、拥塞管理和拥塞避免等。QoS technologies include traffic classification, traffic policing, traffic shaping, interface speed limiting, congestion management, and congestion avoidance.
其中,拥塞管理,一般采用队列技术,使用一个队列算法对流量进行分类,之后用某种优先级别算法将这些流量发送出去。目前广泛采用的队列技术主要包括:FIFO(先进先出队列)、PQ(优先队列)、WFQ(加权公平队列)、CBWFQ(基于类的加权公平队列)等。Among them, congestion management generally uses queue technology, a queue algorithm is used to classify the traffic, and then a certain priority algorithm is used to send the traffic out. Currently widely used queue technology mainly includes: FIFO (first-in first-out queue), PQ (priority queue), WFQ (weighted fair queue), CBWFQ (class-based weighted fair queue) and so on.
因PQ(Priority Queueing,优先队列)按照严格按照队列的优先级发送报文,如可支持QoS调度的硬件PQ队列个数不足时,低优先级队列中的报文将一直不能发送。PQ (Priority Queueing, priority queue) sends messages in strict accordance with the priority of the queue. If the number of hardware PQ queues that can support QoS scheduling is insufficient, the messages in the low priority queue will never be sent.
发明内容Summary of the invention
本申请实施例提供一种PQ队列扩容实现方法、装置、设备及存储介质。Embodiments of the present application provide a method, device, equipment, and storage medium for implementing PQ queue expansion.
第一方面,本申请实施例提供一种PQ队列扩容实现方法,所述方法包括:In a first aspect, an embodiment of the present application provides a method for implementing capacity expansion of a PQ queue. The method includes:
依据配置的QOS业务生成PQ队列扩容请求;Generate a PQ queue expansion request based on the configured QOS service;
基于所述PQ队列扩容请求,选择PQ队列号;Select the PQ queue number based on the PQ queue capacity expansion request;
基于丢弃阈值和所述PQ队列号生成模拟PQ队列号;Generate a simulated PQ queue number based on the discard threshold and the PQ queue number;
将所述QOS业务的报文放入模拟PQ队列号。Put the QOS service message into the simulated PQ queue number.
作为本申请实施例的一种具体实现方式,所述选择PQ队列号,包括:As a specific implementation manner of the embodiment of the present application, the selection of the PQ queue number includes:
在资源池里选择PQ队列号。Select the PQ queue number in the resource pool.
作为本申请实施例的一种具体实现方式,所述依据配置的QOS业务生成PQ队列扩容请求,包括:As a specific implementation manner of the embodiment of the present application, the generating a PQ queue expansion request according to the configured QOS service includes:
配置QOS业务的PQ队列数量以及所述QOS业务的报文的优先级;Configure the number of PQ queues of the QOS service and the priority of the QOS service packets;
基于配置的PQ队列数量生成PQ队列扩容请求。Generate a PQ queue expansion request based on the configured number of PQ queues.
作为本申请实施例的一种具体实现方式,所述将所述QOS业务的报文放入模拟PQ队列号的步骤之后,还包括,As a specific implementation manner of the embodiment of the present application, after the step of placing the QOS service message in the simulated PQ queue number, the method further includes:
将所述模拟PQ队列号还原为PQ队列号。Restore the simulated PQ queue number to the PQ queue number.
作为本申请实施例的一种具体实现方式,所述基于丢弃阈值和所述PQ队列号生成模拟PQ队列号,包括:As a specific implementation manner of the embodiment of the present application, the generation of the simulated PQ queue number based on the discard threshold and the PQ queue number includes:
选择多个不同的丢弃阈值;Select multiple different discard thresholds;
基于所述PQ队列号和多个不同的丢弃阈值生成多个模拟PQ队列号。Multiple simulated PQ queue numbers are generated based on the PQ queue number and multiple different drop thresholds.
作为本申请实施例的一种具体实现方式,将所述QOS业务的报文放入模拟的PQ队列号,包括:As a specific implementation manner of the embodiment of the present application, putting the QOS service message into the simulated PQ queue number includes:
查询所述模拟PQ队列号信息;Query the information of the simulated PQ queue number;
基于查询信息,将不同优选级别的报文放入相应的模拟PQ队列号。Based on the query information, the packets of different preference levels are put into the corresponding analog PQ queue numbers.
第二方面,一种PQ队列扩容实现装置,包括:In a second aspect, a device for implementing expansion of a PQ queue includes:
配置模块,配置为依据配置的QOS业务生成PQ队列扩容请求;The configuration module is configured to generate a PQ queue expansion request according to the configured QOS service;
控制模块,配置为基于所述PQ队列扩容请求,选择PQ队列号;A control module configured to select a PQ queue number based on the PQ queue expansion request;
确定模块,配置为基于丢弃阈值和所述PQ队列号生成模拟PQ队列号;A determination module configured to generate an analog PQ queue number based on the discard threshold and the PQ queue number;
入队模块,配置为将所述QOS业务的报文放入模拟PQ队列号。The enqueue module is configured to put the QOS service message into the simulated PQ queue number.
第三方面,一种网络设备,所述网络设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现第一方面中任一所述的方法的步骤。In a third aspect, a network device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, when the computer program is executed by the processor The steps of the method according to any of the first aspect are implemented.
第四方面,一种计算机可读存储介质,所述计算机可读存储介质上存储有 计算机程序,所述计算机程序被处理器执行时实现第一方面中任一所述的方法的步骤。According to a fourth aspect, a computer-readable storage medium has stored thereon a computer program, which when executed by a processor implements the steps of the method according to any one of the first aspects.
本申请实施例通过基于QOS业务配置的队列的个数,将具体的硬件PQ队列号生成模拟PQ队列号,模拟PQ队列相对于硬件PQ队列个数进行了扩容,由此解决了现有的可支持QoS调度的PQ队列个数受到限制的问题,取得了积极的技术效果。The embodiment of the present application generates a simulated PQ queue number based on the number of queues configured by the QOS service, and the simulated PQ queue is expanded relative to the number of hardware PQ queues, thereby solving the existing problem The problem of limiting the number of PQ queues that support QoS scheduling has achieved positive technical results.
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。The above description is only an overview of the technical solutions of this application. In order to understand the technical means of this application more clearly, it can be implemented according to the content of the specification, and to make the above and other purposes, features and advantages of this application more obvious The specific implementation of this application is listed below.
附图说明BRIEF DESCRIPTION
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments, and are not considered as limitations to the present application. Furthermore, the same reference numerals are used to denote the same parts throughout the drawings. In the drawings:
图1为本申请实施例中端到端QoS模型图;1 is a diagram of an end-to-end QoS model in an embodiment of this application;
图2为本申请实施例中PQ技术报文发送示意图;2 is a schematic diagram of sending PQ technical messages in an embodiment of the present application;
图3为本申请实施例中RED类算法中差别丢弃的示意图;3 is a schematic diagram of differential discarding in the RED algorithm in the embodiment of the present application;
图4为本申请实施例中WRED策略差别丢弃的示意图;4 is a schematic diagram of differential discarding of WRED policies in an embodiment of the present application;
图5为本申请实施例所述的PQ队列扩容实现方法的流程图;5 is a flowchart of a method for implementing capacity expansion of a PQ queue according to an embodiment of the present application;
图6为本申请实施例所述的PQ队列扩容实现方法的流程图;6 is a flowchart of a method for implementing capacity expansion of a PQ queue according to an embodiment of the present application;
图7为本申请实施例所述的PQ队列扩容实现装置的原理框图;7 is a functional block diagram of a device for implementing expansion of a PQ queue according to an embodiment of the present application;
图8为本申请实施例四中流量管理芯片的资源的原理框图;8 is a schematic block diagram of resources of a traffic management chip in Embodiment 4 of this application;
图9为现有技术中队列优先级调度示意图;9 is a schematic diagram of queue priority scheduling in the prior art;
图10为本申请实施例四中采用PQ队列扩容后的队列优先级调度示意图;10 is a schematic diagram of queue priority scheduling after PQ queue expansion is used in Embodiment 4 of the present application;
图11为本申请实施例四所述的具体实际应用的流程图。FIG. 11 is a flowchart of a specific practical application described in Embodiment 4 of the present application.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本 公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
如图1所示,流分类、流量监管、流量整形、拥塞管理和拥塞避免主要完成如下功能:As shown in Figure 1, traffic classification, traffic policing, traffic shaping, congestion management and congestion avoidance mainly complete the following functions:
流分类:采用一定的规则识别符合某类特征的报文,对网络业务进行区分服务。Flow classification: A certain rule is used to identify packets that meet certain characteristics, and differentiate services for network services.
流量监管:对进入或流出设备的特定流量进行监管。当流量超出设定值时,可以采取限制或惩罚措施,以保护网络资源不受损害。可以作用在接口入方向和出方向。Traffic policing: regulate the specific traffic entering or leaving the device. When the traffic exceeds the set value, restrictions or punishment measures can be taken to protect the network resources from damage. It can act on the inbound and outbound directions of the interface.
流量整形:主动调整流的输出速率,用来使流量适配下游设备,可供给的网络资源,避免不必要的报文丢弃,通常作用在接口出方向。Traffic shaping: Actively adjust the output rate of the flow to adapt the flow to downstream equipment and network resources that can be supplied to avoid unnecessary packet discarding. It is usually used in the outbound direction of the interface.
拥塞管理:当拥塞发生时制定一个资源的调度策略,以决定报文转发的处理次序,通常作用在接口出方向。Congestion management: When congestion occurs, a resource scheduling strategy is formulated to determine the processing order of packet forwarding, which usually acts on the outbound direction of the interface.
拥塞避免:监督网络资源的使用情况,当发现拥塞有加剧的趋势时采取主动丢弃报文的策略,通过调整队列长度来解除网络的过载,通常作用在接口出方向。Congestion avoidance: monitor the usage of network resources, take the initiative to discard packets when congestion is found to increase, and adjust the length of the queue to relieve network overload, usually in the outbound direction of the interface.
拥塞管理,一般采用队列技术,使用一个队列算法对流量进行分类,之后用某种优先级别算法将这些流量发送出去。目前广泛采用的队列技术主要包括:FIFO(先进先出队列)、PQ(优先队列)、WFQ(加权公平队列)、CBWFQ(基于类的加权公平队列)等。Congestion management generally uses queue technology, which uses a queue algorithm to classify traffic, and then uses a certain priority algorithm to send these traffic out. Currently widely used queue technology mainly includes: FIFO (first-in first-out queue), PQ (priority queue), WFQ (weighted fair queue), CBWFQ (class-based weighted fair queue) and so on.
PQ(Priority Queueing,优先队列),PQ是针对关键业务应用设计的。关键业务有一个重要的特点,即在拥塞发生时要求优先获得服务以减小响应的延迟。PQ可以根据网络协议(比如IP,IPX)、数据流入接口、报文长短、源地址/目的地址等灵活地指定优先次序。优先队列将报文分成4类,分别为高优先队列(high)、中优先队列(middle)、正常优先队列(normal)和低优先队列(low),它们的优先级依次降低。缺省情况下,数据流进入normal队列。如图2所示。在队列调度时,PQ严格按照优先级从高到低的次序,优先发送较高优先级队列中的分组,当较高优先级队列为空时,再发送较低优先级队列中的分组。这样,将关键业务的分组放入较高优先级的队列,将非关键业务的分组放入较低优先级的队列,可以保证关键业务的分组被优先传送,非关键业务的分组在处理关键业务数据的空闲间隙被传送。PQ (Priority Queueing, priority queue), PQ is designed for critical business applications. An important feature of key services is that when congestion occurs, priority is required to obtain services to reduce the response delay. PQ can flexibly specify priorities according to network protocols (such as IP, IPX), data inflow interface, packet length, source address/destination address, and so on. The priority queue divides the packets into four categories, namely high priority queue (high), middle priority queue (middle), normal priority queue (normal) and low priority queue (low), and their priorities are sequentially lowered. By default, the data flow enters the normal queue. as shown in picture 2. In queue scheduling, PQ strictly sends the packets in the higher priority queue in strict order from high to low. When the higher priority queue is empty, it sends the packets in the lower priority queue. In this way, placing the packets of the critical business in the queue of higher priority and placing the packets of the non-critical business in the queue of lower priority can ensure that the packets of the critical business are transmitted preferentially, and the packets of the non-critical business are processing the critical business The idle gap of data is transmitted.
PQ的缺点是如果较高优先级队列中长时间有分组存在,那么低优先级队列中的报文将一直得不到服务。The disadvantage of PQ is that if there are packets in the higher priority queue for a long time, the packets in the lower priority queue will never be served.
拥塞避免技术具体采用如下技术:The congestion avoidance technology specifically adopts the following technologies:
如现有的丢包策略:Such as the existing packet loss strategy:
现有的丢包策略采用尾部丢弃(Tail-Drop)的方法。当队列的长度达到某一最大值后,所有新到来的报文都将被丢弃。The existing packet loss strategy adopts the Tail-Drop method. When the length of the queue reaches a certain maximum value, all new packets will be discarded.
这种丢弃策略会引发TCP全局同步现象——当队列同时丢弃多个TCP连接的报文时,将造成TCP超时,从而引发TCP的慢启动和拥塞避免机制,使TCP减少报文的发送。This drop strategy will cause TCP global synchronization phenomenon-when the queue drops multiple TCP connection packets at the same time, it will cause TCP timeout, which will cause TCP slow start and congestion avoidance mechanism, so that TCP reduces the transmission of packets.
2、RED与WRED。2. RED and WRED.
为避免TCP全局同步现象,可使用RED(Random Early Detection,随机早期检测)或WRED(Weighted Random Early Detection,加权随机早期检测)。To avoid TCP global synchronization, RED (Random Early Detection, random early detection) or WRED (Weighted Random Early Detection, weighted random early detection) can be used.
在RED类算法中,为每个队列都设定上限和下限,对队列中的报文进行如下处理:当队列的长度小于下限时,不丢弃报文;当队列的长度超过上限时,丢弃所有到来的报文;当队列的长度在上限和下限之间时,开始随机丢弃到来的报文。队列越长,丢弃概率越高,但有一个最大丢弃概率。如图3所示。In the RED algorithm, an upper limit and a lower limit are set for each queue, and the packets in the queue are processed as follows: when the length of the queue is less than the lower limit, packets are not discarded; when the length of the queue exceeds the upper limit, all are discarded Incoming packets; when the length of the queue is between the upper limit and the lower limit, random packets are started to be discarded. The longer the queue, the higher the drop probability, but there is a maximum drop probability. As shown in Figure 3.
WRED将IP报头中的DSCP和RED结合起来,为优先通信流(高优先级)提供与标准通信流(优先级较低)有差别的丢弃阈值。换句话说,WRED根据IP报头中的DSCP(Differentiated Services Code Point,差分服务代码点)对数据包进行有选择的丢弃。WRED策略实现的差别丢弃阈值如图4所示。WRED combines DSCP and RED in the IP header to provide a drop threshold for priority traffic (high priority) that differs from standard traffic (lower priority). In other words, WRED selectively discards data packets based on DSCP (Differentiated Services Code) in the IP header. The difference discard threshold implemented by the WRED strategy is shown in Figure 4.
WRED监视网络设备中队列的平均长度,所以它可以根据队列长度决定何时开始丢弃数据包。队列的平均长度是队列长度被低通滤波后的结果。它既反映了队列的变化趋势,又对队列长度的突发变化不敏感,避免了对突发性的数据流造成不公正的待遇。WRED monitors the average length of queues in network devices, so it can decide when to start dropping packets based on the queue length. The average length of the queue is the result of the queue length being low-pass filtered. It not only reflects the changing trend of the queue, but also is insensitive to the sudden change of the queue length, avoiding unfair treatment for sudden data flows.
当平均队列长度超过用户规定的最小丢弃阈值时,WRED开始按照一定的丢弃概率丢弃数据包,队列的长度越长,丢弃的概率越高。如果平均队列长度超过用户规定的最大丢弃阈值,则WRED转为队尾丢弃,即所有后面到达的数据包都将被丢弃。When the average queue length exceeds the minimum drop threshold specified by the user, WRED begins to drop packets according to a certain drop probability. The longer the queue length, the higher the drop probability. If the average queue length exceeds the maximum drop threshold specified by the user, WRED switches to tail-of-line drop, that is, all subsequent packets will be dropped.
丢弃优先级(Drop Priority,DP)是从IP报文头中的DSCP优先级映射得到的,Precedence优先级越高,丢弃概率越低。Drop Priority (Drop Priority, DP) is derived from the DSCP priority mapping in the IP packet header. The higher the precedence priority, the lower the drop probability.
本申请实施例提供一种PQ队列扩容实现方法,如图5所示,可包括以下步骤:An embodiment of the present application provides a method for implementing capacity expansion of a PQ queue. As shown in FIG. 5, the method may include the following steps:
步骤S501:依据配置的QOS业务生成PQ队列扩容请求。Step S501: Generate a PQ queue expansion request according to the configured QOS service.
配置QOS业务即将IP报文分为多个队列,并分别各个队列的优先级,如高 优先队列、中优先队列、正常优先队列和低优先队列,然后依据队列的个数和队列优先级发送PQ队列扩容请求。Configure the QOS service to divide IP packets into multiple queues and assign priorities to each queue, such as high priority queue, medium priority queue, normal priority queue and low priority queue, and then send PQ according to the number of queues and queue priority Queue expansion request.
在一个具体的应用场景中,如将QOSIP报文分为8个队列,在生成PQ队列扩容请求中,需要包含8个队列的信息,使在扩容时知道需要扩容为几个PQ队列。In a specific application scenario, such as dividing QOSIP packets into 8 queues, when generating a PQ queue expansion request, it is necessary to include the information of the 8 queues, so that when expansion is known, it needs to be expanded to several PQ queues.
步骤S502:基于所述PQ队列扩容请求,选择PQ队列号。Step S502: Select a PQ queue number based on the PQ queue expansion request.
选择PQ队列号是在选择具体的硬件的PQ队列号,在一个具体的应用场景中,如接收到需要扩容为8个PQ队列的PQ队列扩容请求后,选择扩展为8个PQ队列需要的硬件PQ队列,如选择4个硬件PQ队列。文中的PQ队列好均指硬件的PQ队列号。Selecting the PQ queue number is to select the PQ queue number of the specific hardware. In a specific application scenario, if a PQ queue expansion request that needs to be expanded to 8 PQ queues is received, the hardware required for expansion to 8 PQ queues is selected. PQ queue, such as selecting 4 hardware PQ queues. The PQ queue in this article refers to the hardware PQ queue number.
在一些实施例中,选择硬件PQ队列是在资源池里选择的。即将所有的硬件PQ队列都是放置在一个资源池内的,需要选择硬件PQ队列时,去资源池内查询有哪些硬件PQ队列是处于可用状态,然后根据需要在可用状态的硬件PQ队列选中,从而得到选中的硬件PQ队列的PQ队列号。在硬件PQ队列不被使用时,要及时将相应的硬件PQ队列释放到资源池内,便于其他业务再次调用,从而设置资源池,并将所有硬件PQ队列放置到资源池内,提高了硬件PQ队列的使用效率。In some embodiments, the selection of the hardware PQ queue is selected in the resource pool. That is, all hardware PQ queues are placed in a resource pool. When you need to select a hardware PQ queue, go to the resource pool to query which hardware PQ queues are available, and then select the hardware PQ queues in the available state according to your needs, so as to get The PQ queue number of the selected hardware PQ queue. When the hardware PQ queue is not used, the corresponding hardware PQ queue should be released into the resource pool in time, so that other services can be called again, so as to set up the resource pool, and place all hardware PQ queues into the resource pool, which improves the hardware PQ queue. Use efficiency.
步骤S503:基于丢弃阈值和所述PQ队列号生成模拟PQ队列号。Step S503: Generate a simulated PQ queue number based on the discard threshold and the PQ queue number.
在选择了硬件PQ队列号后,在硬件PQ队列号信息基础上,填充丢弃阈值信息,生成多个模拟PQ队列号。After the hardware PQ queue number is selected, based on the hardware PQ queue number information, the discard threshold information is filled to generate multiple simulated PQ queue numbers.
在一个具体的应用场景中,QOS业务需要8个队列,并选择了4个PQ队列号的基础上,填充丢弃阈值信息生成8个模拟PQ队列号。In a specific application scenario, the QOS service requires 8 queues, and on the basis of selecting 4 PQ queue numbers, 8 analog PQ queue numbers are generated by filling in the discard threshold information.
步骤S504:将所述QOS业务的报文放入模拟PQ队列号。Step S504: Put the QOS service message into the simulated PQ queue number.
将QOS业务中IP报文的队列按照优先级放入到模拟PQ队列号中。Put the queue of IP packets in the QOS service into the analog PQ queue number according to priority.
在一个具体的应用场景中,在生成8个模拟PQ队列号后将QOS业务中的8个队列按照优先级别放入到相应的8个模拟PQ队列号中。然后按照优先级依次发送。In a specific application scenario, after 8 simulated PQ queue numbers are generated, the 8 queues in the QOS service are placed into the corresponding 8 simulated PQ queue numbers according to the priority level. Then send them in order according to priority.
在本申请的一个实施例中:步骤S501:依据配置的QOS业务生成PQ队列扩容请求,包括:In an embodiment of the present application: Step S501: Generate a PQ queue expansion request according to the configured QOS service, including:
配置QOS业务的PQ队列数量以及所述QOS业务的报文的优先级。Configure the number of PQ queues of the QOS service and the priority of the QOS service packets.
配置QOS业务即将IP报文分为多个队列,并分别各个队列的优先级,如高优先队列、中优先队列、正常优先队列和低优先队列。Configure the QOS service to divide IP packets into multiple queues and assign priorities to each queue, such as high priority queue, medium priority queue, normal priority queue, and low priority queue.
基于配置的PQ队列数量生成PQ队列扩容请求。Generate a PQ queue expansion request based on the configured number of PQ queues.
依据队列的个数和队列优先级发送PQ队列扩容请求。The PQ queue expansion request is sent based on the number of queues and queue priority.
在本申请的一个实施例中:步骤S503:所述基于丢弃阈值和所述PQ队列号生成模拟PQ队列号,包括:In an embodiment of the present application: Step S503: The generating a simulated PQ queue number based on the discard threshold and the PQ queue number includes:
选择多个不同的丢弃阈值。Select multiple different discard thresholds.
丢弃阈值可以选择多个,具体根据实际应用确定,在一个具体的应用场景中,选择两个丢弃阈值。You can select multiple discard thresholds, depending on the actual application. In a specific application scenario, select two discard thresholds.
基于所述PQ队列号和多个不同的丢弃阈值生成多个模拟PQ队列号。Multiple simulated PQ queue numbers are generated based on the PQ queue number and multiple different drop thresholds.
基于选择的硬件PQ队列号和选择的丢弃阈值对表信息进行修改,从而生成多个模拟PQ队列号。The table information is modified based on the selected hardware PQ queue number and the selected discard threshold, thereby generating multiple simulated PQ queue numbers.
在一个具体的应用场景中,在选择了4个对应的PQ队列号后,将两个丢弃阈值填充到4个PQ队列号后,生成8个模拟PQ队列号。In a specific application scenario, after selecting 4 corresponding PQ queue numbers, after filling two discarding thresholds into 4 PQ queue numbers, 8 simulated PQ queue numbers are generated.
在本申请的一个可选实施例中:步骤504:将所述QOS业务的报文放入模拟的PQ队列号,包括:In an optional embodiment of the present application: Step 504: Put the QOS service message into the simulated PQ queue number, including:
查询所述模拟PQ队列号信息。Query the information of the simulated PQ queue number.
基于查询信息,将不同优选级别的报文放入相应的模拟PQ队列号。Based on the query information, the packets of different preference levels are put into the corresponding analog PQ queue numbers.
生成模拟PQ队列号后,将报文信息按照优先级对应到放入到模拟PQ队列号中,然后按照优先级依次发送模拟PQ队列号内的报文信息。After the simulated PQ queue number is generated, the message information is assigned to the simulated PQ queue number according to the priority, and then the message information in the simulated PQ queue number is sequentially sent according to the priority.
本申请实施例提供一种PQ队列扩容实现方法,如图6所示,包括以下具体步骤:An embodiment of the present application provides a method for implementing capacity expansion of a PQ queue. As shown in FIG. 6, the method includes the following specific steps:
步骤S601:依据配置的QOS业务生成PQ队列扩容请求。Step S601: Generate a PQ queue expansion request according to the configured QOS service.
配置QOS业务即将IP报文分为多个队列,并分别各个队列的优先级,如高优先队列、中优先队列、正常优先队列和低优先队列,然后依据队列的个数和队列优先级发送PQ队列扩容请求。Configure the QOS service to divide IP packets into multiple queues and assign priorities to each queue, such as high priority queue, medium priority queue, normal priority queue, and low priority queue, and then send PQ according to the number of queues and queue priority Queue expansion request.
在一个具体的应用场景中,如将QOSIP报文分为8个队列,在生成PQ队列扩容请求中,需要包含8个队列的信息,使在扩容时知道需要扩容为几个PQ队列。In a specific application scenario, such as dividing QOSIP packets into 8 queues, when generating a PQ queue expansion request, it is necessary to include the information of the 8 queues, so that when expansion is known, it needs to be expanded to several PQ queues.
步骤S602:基于所述PQ队列扩容请求,选择PQ队列号。Step S602: Select a PQ queue number based on the PQ queue expansion request.
选择PQ队列号是在选择具体的硬件的PQ队列号,在一个具体的应用场景 中,如接收到需要扩容为8个PQ队列的PQ队列扩容请求后,选择扩展为8个PQ队列需要的硬件PQ队列,如选择4个硬件PQ队列。文中的PQ队列好均指硬件的PQ队列号。Selecting the PQ queue number is to select the PQ queue number of the specific hardware. In a specific application scenario, if a PQ queue expansion request that needs to be expanded to 8 PQ queues is received, the hardware required for expansion to 8 PQ queues is selected. PQ queue, such as selecting 4 hardware PQ queues. The PQ queue in this article refers to the hardware PQ queue number.
可选的,选择硬件PQ队列是在资源池里选择的。即将所有的硬件PQ队列都是放置在一个资源池内的,需要选择硬件PQ队列时,去资源池内查询有哪些硬件PQ队列是处于可用状态,然后根据需要在可用状态的硬件PQ队列选中,从而得到选中的硬件PQ队列的PQ队列号。在硬件PQ队列不被使用时,要及时将相应的硬件PQ队列释放到资源池内,便于其他业务再次调用,从而设置资源池,并将所有硬件PQ队列放置到资源池内,提高了硬件PQ队列的使用效率。Optionally, the hardware PQ queue is selected in the resource pool. That is, all hardware PQ queues are placed in a resource pool. When you need to select a hardware PQ queue, go to the resource pool to query which hardware PQ queues are available, and then select the hardware PQ queues in the available state as needed to obtain The PQ queue number of the selected hardware PQ queue. When the hardware PQ queue is not used, the corresponding hardware PQ queue should be released into the resource pool in time, so that other services can be called again, so as to set up the resource pool, and place all hardware PQ queues into the resource pool, which improves the hardware PQ queue. Use efficiency.
步骤S603:基于丢弃阈值和所述PQ队列号生成模拟PQ队列号。Step S603: Generate a simulated PQ queue number based on the discard threshold and the PQ queue number.
在选择了硬件PQ队列号后,在硬件PQ队列号信息基础上,填充丢弃阈值信息,生成多个模拟PQ队列号。After the hardware PQ queue number is selected, based on the hardware PQ queue number information, the discard threshold information is filled to generate multiple simulated PQ queue numbers.
在一个具体的应用场景中,QOS业务需要8个队列,并选择了4个PQ队列号的基础上,填充丢弃阈值信息生成8个模拟PQ队列号。In a specific application scenario, the QOS service requires 8 queues, and on the basis of selecting 4 PQ queue numbers, 8 analog PQ queue numbers are generated by filling in the discard threshold information.
步骤S604:将所述QOS业务的报文放入模拟PQ队列号。Step S604: Put the QOS service message into the simulated PQ queue number.
将QOS业务中IP报文的队列按照优先级放入到模拟PQ队列号中。Put the queue of IP packets in the QOS service into the analog PQ queue number according to priority.
在一个具体的应用场景中,在生成8个模拟PQ队列号后将QOS业务中的8个队列按照优先级别放入到相应的8个模拟PQ队列号中。然后按照优先级依次发送。In a specific application scenario, after 8 simulated PQ queue numbers are generated, the 8 queues in the QOS service are placed into the corresponding 8 simulated PQ queue numbers according to the priority level. Then send them in order according to priority.
步骤S605:将所述模拟PQ队列号还原为PQ队列号。Step S605: Restore the simulated PQ queue number to the PQ queue number.
在模拟PQ队列号内的报文发送完毕后,需要将模拟PQ队列号还原为原来的硬件的PQ队列号,将模拟PQ队列号解除,并将PQ队列放入到资源池内以便于被其他QOS业务调用。After the packets in the simulated PQ queue number are sent, you need to restore the simulated PQ queue number to the original hardware PQ queue number, release the simulated PQ queue number, and put the PQ queue into the resource pool to be used by other QOS Business call.
本申请实施例提供一种PQ队列扩容实现装置,如图7所示,包括:An embodiment of the present application provides a device for implementing expansion of a PQ queue, as shown in FIG. 7, including:
配置模块701,配置为依据配置的QOS业务生成PQ队列扩容请求。The configuration module 701 is configured to generate a PQ queue expansion request according to the configured QOS service.
配置QOS业务即将IP报文分为多个队列,并分别各个队列的优先级,如高优先队列、中优先队列、正常优先队列和低优先队列,然后依据队列的个数和队列优先级发送PQ队列扩容请求。Configure the QOS service to divide IP packets into multiple queues and assign priorities to each queue, such as high priority queue, medium priority queue, normal priority queue, and low priority queue, and then send PQ according to the number of queues and queue priority Queue expansion request.
在一个具体的应用场景中,如将QOSIP报文分为8个队列,在生成PQ队列扩容请求中,需要包含8个队列的信息,使在扩容时知道需要扩容为几个PQ队列。In a specific application scenario, such as dividing QOSIP packets into 8 queues, when generating a PQ queue expansion request, it is necessary to include the information of the 8 queues, so that when expansion is known, it needs to be expanded to several PQ queues.
控制模块702,配置为基于所述PQ队列扩容请求,选择PQ队列号。The control module 702 is configured to select a PQ queue number based on the PQ queue expansion request.
选择PQ队列号是在选择具体的硬件的PQ队列号,在一个具体的应用场景中,如接收到需要扩容为8个PQ队列的PQ队列扩容请求后,选择扩展为8个PQ队列需要的硬件PQ队列,如选择4个硬件PQ队列。文中的PQ队列好均指硬件的PQ队列号。Selecting the PQ queue number is to select the PQ queue number of the specific hardware. In a specific application scenario, if a PQ queue expansion request that needs to be expanded to 8 PQ queues is received, the hardware required for expansion to 8 PQ queues is selected. PQ queue, such as selecting 4 hardware PQ queues. The PQ queue in this article refers to the hardware PQ queue number.
在一些实施例中,选择硬件PQ队列是在资源池里选择的。即将所有的硬件PQ队列都是放置在一个资源池内的,需要选择硬件PQ队列时,去资源池内查询有哪些硬件PQ队列是处于可用状态,然后根据需要在可用状态的硬件PQ队列选中,从而得到选中的硬件PQ队列的PQ队列号。在硬件PQ队列不被使用时,要及时将相应的硬件PQ队列释放到资源池内,便于其他业务再次调用,从而设置资源池,并将所有硬件PQ队列放置到资源池内,提高了硬件PQ队列的使用效率。In some embodiments, the selection of the hardware PQ queue is selected in the resource pool. That is, all hardware PQ queues are placed in a resource pool. When you need to select a hardware PQ queue, go to the resource pool to query which hardware PQ queues are available, and then select the hardware PQ queues in the available state as needed to obtain The PQ queue number of the selected hardware PQ queue. When the hardware PQ queue is not used, the corresponding hardware PQ queue should be released into the resource pool in time, so that other services can be called again, so as to set up the resource pool and place all hardware PQ queues in the resource pool, which improves the hardware PQ queue. Use efficiency.
确定模块703,配置为基于丢弃阈值和所述PQ队列号生成模拟PQ队列号;The determination module 703 is configured to generate an analog PQ queue number based on the discard threshold and the PQ queue number;
在选择了硬件PQ队列号后,在硬件PQ队列号信息基础上,填充丢弃阈值信息,生成多个模拟PQ队列号。After the hardware PQ queue number is selected, based on the hardware PQ queue number information, the discard threshold information is filled to generate multiple simulated PQ queue numbers.
在一个具体的应用场景中,QOS业务需要8个队列,并选择了4个PQ队列号的基础上,填充丢弃阈值信息生成8个模拟PQ队列号。In a specific application scenario, the QOS service requires 8 queues, and on the basis of selecting 4 PQ queue numbers, 8 analog PQ queue numbers are generated by filling in the discard threshold information.
入队模块704,配置为将所述QOS业务的报文放入模拟PQ队列号。The enqueue module 704 is configured to put the QOS service message into the simulated PQ queue number.
将QOS业务中IP报文的队列按照优先级放入到模拟PQ队列号中。Put the queue of IP packets in the QOS service into the analog PQ queue number according to priority.
在接入QOS业务之后,确定模块将扩容的模拟PQ队列号回填给入队模块,流量根据回填的模拟PQ队列号进行分类到各模拟PQ队列。After accessing the QOS service, the determination module backfills the expanded simulated PQ queue number to the enqueue module, and the traffic is classified into each simulated PQ queue according to the backfilled simulated PQ queue number.
在一个具体的应用场景中,在生成8个模拟PQ队列号后将QOS业务中的8个队列按照优先级别放入到相应的8个模拟PQ队列号中。然后按照优先级依次发送。In a specific application scenario, after 8 simulated PQ queue numbers are generated, the 8 queues in the QOS service are placed into the corresponding 8 simulated PQ queue numbers according to the priority level. Then send them in order according to priority.
在本申请的一个实施例中:所述配置模块701,包括:In an embodiment of the present application: The configuration module 701 includes:
QOS业务配置模块:配置为配置QOS业务的PQ队列数量以及所述QOS业务的报文的优先级。QOS service configuration module: configured to configure the number of POS queues of the QOS service and the priority of the QOS service packets.
请求生成模块:配置为基于配置的PQ队列数量生成PQ队列扩容请求。Request generation module: configured to generate a PQ queue expansion request based on the configured number of PQ queues.
在本申请的一个实施例中:装置还包括,解除模块:配置为将所述模拟PQ队列号还原为PQ队列号。In an embodiment of the present application: the device further includes a release module: configured to restore the simulated PQ queue number to a PQ queue number.
在本申请的一个实施例中:所述确定模块703,包括:阈值选择模块:配置为选择多个不同的丢弃阈值;In an embodiment of the present application: the determination module 703 includes: a threshold selection module: configured to select a plurality of different discard thresholds;
模拟PQ队列号生成模块:配置为基于所述PQ队列号和多个不同的丢弃阈值生成多个模拟PQ队列号。Simulated PQ queue number generation module: configured to generate multiple simulated PQ queue numbers based on the PQ queue number and multiple different discarding thresholds.
在本申请的一个实施例中:所述入队模块704,包括:查询模块:配置为查询所述模拟PQ队列号信息;In an embodiment of the present application: the enqueue module 704 includes: a query module: configured to query the simulated PQ queue number information;
报文入队模块:配置为基于查询信息,将不同优选级别的报文放入相应的模拟PQ队列号。Message enqueue module: configured to put messages of different preferred levels into the corresponding analog PQ queue number based on the query information.
在本申请的一个实施例中:装置还包括:表管理模块:配置为接收来自配置模块的PQ队列扩容请求,并将所述PQ队列扩容请求发送至所述控制模块。In an embodiment of the present application: the apparatus further includes: a table management module: configured to receive a PQ queue expansion request from the configuration module, and send the PQ queue expansion request to the control module.
本实施例是在上述实施例的基础上,结合附图8~11介绍一个本申请的应用实例。This embodiment introduces an application example of the present application on the basis of the above embodiments and with reference to FIGS. 8-11.
一种PQ队列扩容实现方法和装置的具体实际应用,可包括:A specific practical application of a method and a device for implementing capacity expansion of a PQ queue may include:
如图8假设是一款流量管理芯片的资源分配图:图8中从PQ出来的队列按照树的设置流向上一级结点,根优选级无关。例如L3层0号实体的队列总是会流向L2层的0号实体。图中
Figure PCTCN2019112746-appb-000001
Figure PCTCN2019112746-appb-000002
表示四种优先级的队列,→表示四种优先级队列所有的情况,
Figure PCTCN2019112746-appb-000003
表示根据设置使用,Host和Loopback用的时候L1层的30和31号实体无效。
As shown in Figure 8, it is assumed that it is a resource allocation diagram of a traffic management chip: The queue from PQ in Figure 8 flows to the next-level node according to the setting of the tree, and the root preference level is irrelevant. For example, the queue of entity No. 0 at layer L3 always flows to entity No. 0 at layer L2. In the picture
Figure PCTCN2019112746-appb-000001
with
Figure PCTCN2019112746-appb-000002
Indicates four priority queues, → indicates all the four priority queues,
Figure PCTCN2019112746-appb-000003
It indicates that according to the setting, when Host and Loopback are used, entities 30 and 31 of the L1 layer are invalid.
如图8所示,本流量管理芯片的资源数是:L1,2(32×8),L3,4(4K×4)模式下的情况,每个L3下挂L4的时候,支持4个优先级。总共支持16K个L4PQ队列。若在现有的设计上,满足支持16K以上的PQ队列支持,或者每个L3挂L4的时候,支持4个以上的优先级是不可能的。As shown in Figure 8, the number of resources of the traffic management chip is: L1, 2 (32 × 8), L3, 4 (4K × 4) mode, when L4 is attached to each L3, supports 4 priority level. A total of 16K L4PQ queues are supported. If the existing design satisfies the PQ queue support of more than 16K, or when each L3 is linked to L4, it is impossible to support more than 4 priorities.
即如果一个用户占用一个L3资源,一个用户下面需要支持8类业务报文的优先级调度,在现有的PQ实现方法上,是无法实现的。因为该硬件限制了一个L3下挂4个优先级的L4调度。必须使用两个L3和8个L4队列才可以实现8队列优先级调度如图9所示。That is, if a user occupies an L3 resource, a user needs to support priority scheduling of 8 types of service packets, which cannot be achieved in the existing PQ implementation method. Because the hardware restricts an L4 schedule with 4 priority levels under L3. Two L3 and 8 L4 queues must be used to achieve 8 queue priority scheduling as shown in Figure 9.
步骤可如图11所示:The steps can be shown in Figure 11:
S1101:设备初始化。S1101: Device initialization.
初始状态:没有接入QOS业务,流量管理芯片的所有队列都在资源池里待分配。Initial state: No QOS service is connected, and all queues of the traffic management chip are to be allocated in the resource pool.
资源池内分配PQ队列具体如下:The allocation of PQ queues in the resource pool is as follows:
S1102:申请QOS业务并PQ队列扩容叠加流程。S1102: Application for QOS service and PQ queue expansion and stacking process.
配置模块将包含8条PQ队列的策略QOS业务和PQ队列扩容标记透传到表管理模块。The configuration module transparently transmits the strategy QOS service and PQ queue expansion mark containing 8 PQ queues to the table management module.
S1103:表管理模块将PQ队列配置和队列扩容标记透传给流量芯片管理模块。S1103: The table management module transparently transmits the PQ queue configuration and queue expansion flag to the traffic chip management module.
S1104:流量管理芯片模块收到表管理模块的信息后,先从资源池分配一个port(L1)、1个subport(L2)、1个class(L3)和4个queue(L4)作为扩容PQ模拟队列的基础调度器和PQ队列。S1104: After receiving the information from the table management module, the traffic management chip module first allocates one port (L1), one subport (L2), one class (L3), and four queues (L4) from the resource pool as capacity expansion PQ simulation The basic scheduler and PQ queue of the queue.
然后生成表信息FLOWID0、FLOWID1、FLOWID2、FLOWID3:Then generate table information FLOWID0, FLOWID1, FLOWID2, FLOWID3:
FLOWID0:00 0000 0000 0000 0000 0000 00000 0000;FLOWID0: 000000000000000000000000000000;
FLOWID1:00 0000 0000 0000 0000 0000 00000 0001;FLOWID1: 000000000000000000000000000001;
FLOWID2:00 0000 0000 0000 0000 0000 00000 0010;FLOWID2: 0000000000000000000000000010;
FLOWID3:00 0000 0000 0000 0000 0000 00000 0011。FLOWID3: 000000000000000000000000000011.
S1105:同时分配两个不同的队列深度阈值(丢弃阈值)1M、2M匹配不同的precedence。S1105: Two different queue depth thresholds (discard thresholds) are allocated at the same time. 1M and 2M match different precedence.
将两个队列深度阈值转化成两个不同的profile信息填充到FLOWID的第30和31bit。Convert the two queue depth thresholds into two different profile information and fill them into the 30th and 31st bits of FLOWID.
经过重新组合后生成新的表信息:After reassembly, new table information is generated:
FLOWID0_EX1:0000 0000 0000 0000 0000 0000 00000 0000;FLOWID0_EX1: 00000000000000000000000000000000;
FLOWID1_EX1:0000 0000 0000 0000 0000 0000 00000 0001;FLOWID1_EX1: 00000000000000000000000000000001;
FLOWID2_EX1:0000 0000 0000 0000 0000 0000 00000 0010;FLOWID2_EX1: 0000 0000 0000 0000 0000 0000 0000;
FLOWID3_EX1:0000 0000 0000 0000 0000 0000 00000 0011;FLOWID3_EX1: 0000 0000 0000 0000 0000 0000 00001;
FLOWID0_EX2:0100 0000 0000 0000 0000 0000 00000 0000;FLOWID0_EX2: 01000000000000000000000000000000;
FLOWID1_EX2:0100 0000 0000 0000 0000 0000 00000 0001;FLOWID1_EX2: 01000000000000000000000000000001;
FLOWID2_EX2:0100 0000 0000 0000 0000 0000 00000 0010;FLOWID2_EX2: 010000000000000000000000000000;
FLOWID3_EX2:0100 0000 0000 0000 0000 0000 00000 0011。FLOWID3_EX2: 01000000000000000000000000000011.
S1106:然后将新的表信息回填给表管理模块。同时将调度信息配置通过SDK配置到底层芯片。S1106: Then backfill the new table information to the table management module. At the same time, the scheduling information configuration is configured to the underlying chip through the SDK.
S1107:入队模块通过查询表管理模块中的flowid信息,将不同precedence的报文送入到不同的模拟PQ队列号。实际入队的是FLOWID0、FLOWID1、FLOWID2、FLOWID3。从效果看是8条PQ业务。S1107: The enqueue module sends the messages of different precedence to different analog PQ queue numbers by looking up the flowid information in the table management module. The actual enrollment is FLOWID0, FLOWID1, FLOWID2, FLOWID3. From the effect, it is 8 PQ services.
综上,8条PQ队列的QOS业务在实际中只使用了4个硬件队列资源,极大了减少了资源的使用。不仅如此,在有限的硬件资源限制下,可以支持超出硬件资源限制的配置实例。In summary, the QOS service of 8 PQ queues actually uses only 4 hardware queue resources, which greatly reduces the use of resources. Not only that, but under limited hardware resource limits, configuration examples that exceed hardware resource limits can be supported.
S1108:解除QOS业务。S1108: The QOS service is released.
解除QOS业务具体如下:配置模块将解除的8条PQ队列的策略QOS业务和PQ队列扩容标记透传到表管理模块。The details of releasing the QOS service are as follows: the configuration module transparently transmits the policy QOS service and the PQ queue expansion mark of the released 8 PQ queues to the table management module.
表管理模块将解除的8条PQ队列配置和队列扩容标记透传给流量芯片管理模块。同时表管理模块将回填的flowid恢复默认值。The table management module transparently transmits the released eight PQ queue configurations and queue expansion marks to the traffic chip management module. At the same time, the table management module restores the backfilled flowid to the default value.
流量管理芯片模块将QOS调度使用的调度器信息、度使用的调度器和PQ队列回收,QOS参数恢复默认值下发给SDK,写入芯片。The traffic management chip module collects the scheduler information used by QOS scheduling, the scheduler used by QOS, and the PQ queue. The QOS parameters are restored to the default value and sent to the SDK to be written into the chip.
本实施例中使用较少的硬件队列资源,实现了较多队列配置的应用。节省了流量管理芯片的硬件资源。在资源有限的情况下,可以很好的发挥作用。In this embodiment, fewer hardware queue resources are used, and more applications for queue configuration are realized. Save the hardware resources of the traffic management chip. In the case of limited resources, it can play a good role.
生成的调度资源如图10所示,将图9与图10进行对比可知:本实施例和现有的实现PQ对的QOS方法在硬件方面的区别包括:本实施例重点是节省了流量管理芯片模块的硬件队列资源。The generated scheduling resources are shown in FIG. 10. Comparing FIG. 9 with FIG. 10 shows that the hardware difference between this embodiment and the existing QOS method for implementing PQ pairs includes: This embodiment focuses on saving the traffic management chip The hardware queue resources of the module.
图9所示的现有技术总共使用了8个硬件队列,实现8个PQ队列的调度。The prior art shown in FIG. 9 uses a total of 8 hardware queues to implement scheduling of 8 PQ queues.
图10所述的本实施例总共使用了4个硬件队列,实现了8个PQ队列的调度。需要支持同等的PQ队列数,本实施例中的硬件资源需求更少。The embodiment shown in FIG. 10 uses a total of 4 hardware queues and implements scheduling of 8 PQ queues. It is necessary to support the same number of PQ queues, and the hardware resource requirements in this embodiment are less.
本实施例中的配置模块、表管理模块和流量管理芯片管理模块都需要增加PQ队列扩容标记,表管理模块和流量管理模块交互的flowid信息新增两字节丢弃阈值信息。In this embodiment, the configuration module, the table management module, and the traffic management chip management module all need to add a PQ queue expansion flag, and the flowid information interacted by the table management module and the flow management module adds two bytes of discard threshold information.
综上可知,通过本实施例,至少存在以下有益效果:In summary, this embodiment has at least the following beneficial effects:
现有技术的流量管理芯片模块包含硬件调度队列资源N个,那么支持QOS的调度队列个数最多N个。存在耗费资源的缺点。在硬件调度队列资源有限时,可支持QOS的队列个数受到限制,无法实现队列数扩展。在本实施例中,在接入QOS业务时,在实际的硬件队列资源基础上,模拟出虚拟的PQ队列,节省了硬件调度队列资源,并扩容了可支持QOS业务的队列个数。The traffic management chip module in the prior art includes N hardware scheduling queue resources, so the number of scheduling queues supporting QOS is at most N. There is a disadvantage of consuming resources. When the hardware scheduling queue resources are limited, the number of queues that can support QOS is limited, and the number of queues cannot be expanded. In this embodiment, when accessing the QOS service, a virtual PQ queue is simulated on the basis of actual hardware queue resources, which saves hardware scheduling queue resources and expands the number of queues that can support QOS services.
本申请实施例,提供一种网络设备,可以作为实体装置来理解,包括处理器以及存储有所述处理器可执行指令的存储器,当所述指令被处理器执行时,执行如下操作:配置QOS业务,并依据配置的QOS业务生成PQ队列扩容请求;基于所述PQ队列扩容请求,选择PQ队列号;基于丢弃阈值和所述PQ队列号 生成模拟PQ队列号;将所述QOS业务的报文放入模拟PQ队列号。An embodiment of the present application provides a network device, which can be understood as a physical device, including a processor and a memory storing executable instructions of the processor. When the instructions are executed by the processor, the following operations are performed: configuring QOS Business, and generate a PQ queue expansion request based on the configured QOS service; select a PQ queue number based on the PQ queue expansion request; generate a simulated PQ queue number based on the drop threshold and the PQ queue number; convert the QOS service message Put in the analog PQ queue number.
上述方法步骤的具体实施例过程可参见第一实施例和第二实施例,本实施例在此不再重复赘述。For the specific embodiment process of the above method steps, refer to the first embodiment and the second embodiment, and this embodiment will not be repeated here.
处理器可以是通用处理器,例如中央处理器(Central Processing Unit,CPU),还可以是数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC),或者是被配置成实施本本申请实施例的一个或多个集成电路。其中,存储器配置为存储所述处理器的可执行指令;存储器,配置为存储程序代码,并将该程序代码传输给处理器。存储器可以包括易失性存储器(Volatile Memory),例如随机存取存储器(Random Access Memory,RAM);也可以包括非易失性存储器(Non-Volatile Memory),例如只读存储器(Read-Only Memory,ROM)、快闪存储器(Flash Memory)、硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);还可以包括上述种类的存储器的组合。The processor can be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU), a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or a One or more integrated circuits configured to implement the embodiments of the present application. Wherein, the memory is configured to store executable instructions of the processor; the memory is configured to store program code and transmit the program code to the processor. The memory may include volatile memory (Volatile Memory), such as random access memory (Random Access Memory, RAM); may also include non-volatile memory (Non-Volatile Memory), such as read-only memory (Read-Only Memory, ROM), flash memory (Flash), hard disk (HDD), or solid-state drive (SSD); it can also include a combination of the above types of memory.
本申请实施例,提供一种提供计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如下方法步骤:配置QOS业务,并依据配置的QOS业务生成PQ队列扩容请求;基于所述PQ队列扩容请求,选择PQ队列号;基于丢弃阈值和所述PQ队列号生成模拟PQ队列号;将所述QOS业务的报文放入模拟PQ队列号。An embodiment of the present application provides a computer-readable storage medium that stores a computer program on the computer-readable storage medium. When the computer program is executed by a processor, the following method steps are implemented: a QOS service is configured, and the The QOS service generates a PQ queue expansion request; based on the PQ queue expansion request, a PQ queue number is selected; a simulated PQ queue number is generated based on the discard threshold and the PQ queue number; the QOS service packet is placed in the simulated PQ queue number .
上述方法步骤的具体实施例过程可参见第一实施例和第二实施例,本实施例在此不再重复赘述。其中,计算机可读存储介质包括但不限于为:ROM、RAM、磁盘或光盘等。For the specific embodiment process of the above method steps, refer to the first embodiment and the second embodiment, and this embodiment will not be repeated here. Among them, the computer-readable storage medium includes, but is not limited to: ROM, RAM, magnetic disk or optical disk.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that in this article, the terms "include", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, It also includes other elements that are not explicitly listed, or include elements inherent to this process, method, article, or device. Without more restrictions, the element defined by the sentence "include one..." does not exclude that there are other identical elements in the process, method, article or device that includes the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The sequence numbers of the above embodiments of the present application are for description only, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方 案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform, and of course, can also be implemented by hardware, but in many cases the former is better Implementation. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, The CD-ROM includes several instructions to enable a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the embodiments of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本申请的保护之内。The embodiments of the present application have been described above with reference to the drawings, but the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only schematic, not limiting, and those of ordinary skill in the art Under the inspiration of this application, there are many forms that can be made without departing from the scope of the application and the scope of the claims, all of which fall within the protection of this application.

Claims (9)

  1. 一种优先队列PQ队列扩容实现方法,包括:A method for implementing the expansion of the priority queue PQ queue, including:
    依据配置的服务质量QOS业务生成PQ队列扩容请求;Generate PQ queue expansion request based on the configured quality of service QOS service;
    基于所述PQ队列扩容请求,选择PQ队列号;Select the PQ queue number based on the PQ queue capacity expansion request;
    基于丢弃阈值和所述PQ队列号生成模拟PQ队列号;Generate a simulated PQ queue number based on the discard threshold and the PQ queue number;
    将所述QOS业务的报文放入所述模拟PQ队列号。Put the QOS service message into the simulated PQ queue number.
  2. 如权利要求1所述的方法,其中,所述选择PQ队列号,包括:The method of claim 1, wherein the selection of the PQ queue number includes:
    在资源池里选择PQ队列号。Select the PQ queue number in the resource pool.
  3. 如权利要求1所述的方法,其中,所述依据配置的QOS业务生成PQ队列扩容请求,包括:The method according to claim 1, wherein the generating the PQ queue expansion request according to the configured QOS service comprises:
    配置QOS业务的PQ队列数量以及所述QOS业务的报文的优先级;Configure the number of PQ queues of the QOS service and the priority of the QOS service packets;
    基于配置的所述PQ队列数量生成PQ队列扩容请求。Generate a PQ queue expansion request based on the configured number of PQ queues.
  4. 如权利要求3所述的方法,在所述将所述QOS业务的报文放入所述模拟PQ队列号之后,还包括,The method according to claim 3, after the putting the QOS service message into the simulated PQ queue number, further comprising,
    将所述模拟PQ队列号还原为PQ队列号。Restore the simulated PQ queue number to the PQ queue number.
  5. 如权利要求4所述的方法,其中,所述基于丢弃阈值和所述PQ队列号生成模拟PQ队列号,包括:The method of claim 4, wherein the generating of the simulated PQ queue number based on the discard threshold and the PQ queue number includes:
    选择多个不同的丢弃阈值;Select multiple different discard thresholds;
    基于所述PQ队列号和所述多个不同的丢弃阈值生成多个模拟PQ队列号。A plurality of simulated PQ queue numbers are generated based on the PQ queue number and the plurality of different discard thresholds.
  6. 如权利要求5所述的方法,其中,所述将所述QOS业务的报文放入所述模拟PQ队列号,包括:The method according to claim 5, wherein the placing the message of the QOS service into the simulated PQ queue number includes:
    查询所述模拟PQ队列号信息;Query the information of the simulated PQ queue number;
    基于查询信息,将不同优选级别的报文放入相应的模拟PQ队列号。Based on the query information, the packets of different preference levels are put into the corresponding analog PQ queue numbers.
  7. 一种优先队列PQ队列扩容实现装置,包括:A device for realizing the expansion of priority queue PQ queue, including:
    配置模块,配置为依据配置的服务质量QOS业务生成PQ队列扩容请求;The configuration module is configured to generate a PQ queue expansion request according to the configured quality of service QOS service;
    控制模块,配置为基于所述PQ队列扩容请求,选择PQ队列号;A control module configured to select a PQ queue number based on the PQ queue expansion request;
    确定模块,配置为基于丢弃阈值和所述PQ队列号生成模拟PQ队列号;A determination module configured to generate an analog PQ queue number based on the discard threshold and the PQ queue number;
    入队模块,配置为将所述QOS业务的报文放入所述模拟PQ队列号。The enqueue module is configured to put the QOS service message into the simulated PQ queue number.
  8. 一种网络设备,所述网络设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执 行时实现如权利要求1至6中任一项所述的方法。A network device, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being implemented by the processor as claimed The method according to any one of 1 to 6.
  9. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至6中任一项所述的方法。A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
PCT/CN2019/112746 2018-12-04 2019-10-23 Pq expansion implementation method, device, equipment and storage medium WO2020114133A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811473910.6A CN111277513B (en) 2018-12-04 2018-12-04 PQ queue capacity expansion realization method, device, equipment and storage medium
CN201811473910.6 2018-12-04

Publications (1)

Publication Number Publication Date
WO2020114133A1 true WO2020114133A1 (en) 2020-06-11

Family

ID=70974057

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/112746 WO2020114133A1 (en) 2018-12-04 2019-10-23 Pq expansion implementation method, device, equipment and storage medium

Country Status (2)

Country Link
CN (1) CN111277513B (en)
WO (1) WO2020114133A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651615A (en) * 2009-09-14 2010-02-17 中兴通讯股份有限公司 Method and device for scheduling messages
CN101674242A (en) * 2009-10-13 2010-03-17 福建星网锐捷网络有限公司 Service message sending control method and device
CN102104545A (en) * 2011-02-12 2011-06-22 华为技术有限公司 Credit scheduling method and device and bypass device for solving linear speed of packet
US20130343398A1 (en) * 2012-06-20 2013-12-26 Redline Communications Inc. Packet-based communication system with traffic prioritization

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436987A (en) * 2008-10-06 2009-05-20 中兴通讯股份有限公司 Method and apparatus for scheduling and configuring QoS service
CN101860475B (en) * 2010-04-02 2013-04-03 北京邮电大学 Autonomous queue management method based on context awareness
CN101958836B (en) * 2010-10-12 2014-11-05 中兴通讯股份有限公司 Queuing resource management method and device in hierarchical service quality
CN104753818B (en) * 2013-12-30 2019-04-30 深圳市中兴微电子技术有限公司 A kind of array dispatching method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651615A (en) * 2009-09-14 2010-02-17 中兴通讯股份有限公司 Method and device for scheduling messages
CN101674242A (en) * 2009-10-13 2010-03-17 福建星网锐捷网络有限公司 Service message sending control method and device
CN102104545A (en) * 2011-02-12 2011-06-22 华为技术有限公司 Credit scheduling method and device and bypass device for solving linear speed of packet
US20130343398A1 (en) * 2012-06-20 2013-12-26 Redline Communications Inc. Packet-based communication system with traffic prioritization

Also Published As

Publication number Publication date
CN111277513A (en) 2020-06-12
CN111277513B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
US8064344B2 (en) Flow-based queuing of network traffic
US6795870B1 (en) Method and system for network processor scheduler
US20050163048A1 (en) Method and system for providing committed information rate (CIR) based fair access policy
WO2019033857A1 (en) Packet control method and network device
US8571048B2 (en) Dynamic memory queue depth algorithm
US11968111B2 (en) Packet scheduling method, scheduler, network device, and network system
KR100875739B1 (en) Apparatus and method for packet buffer management in IP network system
US20060045009A1 (en) Device and method for managing oversubsription in a network
EP3588880B1 (en) Method, device, and computer program for predicting packet lifetime in a computing device
JP7487316B2 (en) Service level configuration method and apparatus
WO2020090474A1 (en) Packet forwarding apparatus, method and program
EP3029898A2 (en) Virtual output queue authorization management method and device, and computer storage medium
CN113315720B (en) Data flow control method, system and equipment
WO2015149460A1 (en) Fiber channel over ethernet flow control method, device and system
CN108667746B (en) Method for realizing service priority in deep space delay tolerant network
WO2019061302A1 (en) Message processing method and device
WO2020114133A1 (en) Pq expansion implementation method, device, equipment and storage medium
Astuti Packet handling
Irawan et al. Performance evaluation of queue algorithms for video-on-demand application
CN112311678B (en) Method and device for realizing message distribution
US10805225B2 (en) Methods for the processing of data packets, corresponding device, computer program product, storage medium and network node
JP4391346B2 (en) COMMUNICATION CONTROL METHOD, COMMUNICATION CONTROL DEVICE, CONTROL PROGRAM, AND RECORDING MEDIUM
JP2004032602A (en) Packet transmitting apparatus and its method
WO2007047866A2 (en) Using cascaded devices to expand oversubscription ratio
JP5759941B2 (en) Communication apparatus and priority control method

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: 19894161

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 15/10/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19894161

Country of ref document: EP

Kind code of ref document: A1