Queue management and invocation methods, network interface cards (NICs), and storage media
By caching the enqueue information of data packets on cloud infrastructure chips and using a combination of local queues and virtual queue linked lists for management, the problem of low queue management and scheduling efficiency in cloud computing scenarios is solved, and efficient utilization and flexible scheduling of storage resources are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- T-HEAD (SHANGHAI) SEMICON CO LTD
- Filing Date
- 2023-04-10
- Publication Date
- 2026-05-26
Smart Images

Figure CN116366573B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a queue management and calling method, a network interface card device, and a storage medium. Background Technology
[0002] In traditional network interface card (NIC) devices, cloud infrastructure chips typically employ a hierarchical, fixed mapping based on service type, attribute, priority, and atomic queue ID. However, in cloud computing applications, the data packet types carried on cloud infrastructure chips are highly complex, encompassing multiple host nodes, network, storage, and other services. The granularity of atomic queues for each service ranges from hundreds to thousands, and each atomic queue has a priority attribute. If a hierarchical, fixed mapping scheme continues, maintaining tens to hundreds or thousands of queue management records becomes necessary when fine-grained queue management and scheduling are required for all services. This incurs significant storage resource overhead within the chip, leaving storage space underutilized most of the time and resulting in low efficiency in queue management and scheduling. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a queue management and invocation method, a network interface card device, and a storage medium to at least partially solve the above-mentioned problems.
[0004] According to a first aspect of the present invention, a queue management and scheduling method is provided, applied to a network interface card (NIC) device for inter-cloud service business interaction. The method includes: caching a first data packet for the inter-cloud service business interaction; obtaining an enqueue information packet for the first data packet, wherein the enqueue information packet includes at least a cache address of the first data packet, a first scheduling granularity information, and a second scheduling granularity information, wherein the first scheduling granularity is greater than the second scheduling granularity; and determining, based on the first scheduling granularity information and the second scheduling granularity information, a queue management list for managing the cache address of the data packet, a queue management method for the first data packet, and a queue management list for managing the first data packet, based on the first scheduling granularity information and the second scheduling granularity information, a queue management list for managing ... based on the first scheduling granularity information and the second scheduling granularity information, a queue management list for managing the first data packet, based on the first scheduling granularity information and the second scheduling The enqueue node of the enqueue information message is matched with the local queue and the virtual queue to be enqueued. The queue management list consists of a local queue list and a virtual queue list whose sub-chains are attached to the local queue list. The sub-chains of the local queue list are formed by local queues at the first scheduling granularity, and the sub-chains of the virtual queue list are formed by virtual queues at the second scheduling granularity. Based on the local queue and the virtual queue to be enqueued, the enqueue operation is performed on the enqueue information message. At least the dequeue and scheduling of the local queue are performed on the message cache address after the enqueue information message is enqueued.
[0005] In another implementation of the present invention, the first scheduling granularity is based on the network interface card device's configuration of at least one of the physical transmission port, service transmission port, and transmission quality of service for data packets, and the second scheduling granularity is based on the network interface card device's configuration of the service transmission atomic granularity for data packets.
[0006] In another implementation of the present invention, the step of performing dequeueing and scheduling of the local queue at least for the message cache address after the enqueued information message is enqueued includes: determining the local queue to be dequeued and the virtual queue to be dequeued from the queue management list based on the first scheduling granularity and the second scheduling granularity, respectively, as the queues to be dequeued; and scheduling the second data message based on the first scheduling granularity and the second scheduling granularity.
[0007] In another implementation of the present invention, determining the local queue to be dequeued and the virtual queue to be dequeued from the queue management list based on the first scheduling granularity and the second scheduling granularity respectively, as the queue to be dequeued, includes: determining the local queue corresponding to the first scheduling granularity as the local queue to be dequeued from the queue management list, and determining the head virtual queue of the local queue to be dequeued as the virtual queue to be dequeued.
[0008] In another implementation of the present invention, scheduling the second data packet based on the first scheduling granularity and the second scheduling granularity includes: querying the flow control status indicator table based on the virtual queue to be dequeued; if the flow control status indicator table indicates that the virtual queue to be dequeued is not in a flow control state, then initiating aggregate scheduling of the second data packet; if the flow control status indicator table indicates that the virtual queue to be dequeued is in a flow control state, then stopping the scheduling of the second data packet and performing aggregate scheduling queue switching.
[0009] In another implementation of the present invention, the method further includes: determining linked list pointer information of the local queue to be dequeued and the virtual queue to be dequeued before dequeueing; updating the linked list pointer information to indicate the queue pointer state of the local queue to be dequeued and the virtual queue to be dequeued after dequeueing; determining linked list statistics information of the local queue to be dequeued and the virtual queue to be dequeued before dequeueing; and updating the linked list statistics information to indicate the queue statistics state of the local queue to be dequeued and the virtual queue to be dequeued after dequeueing.
[0010] In another implementation of the present invention, the step of performing an enqueue operation on the enqueue information message based on the local queue to be enqueued and the virtual queue to be enqueued includes: determining the linked list pointer information of the local queue to be enqueued and the virtual queue to be enqueued before enqueueing; and updating the linked list pointer information to indicate the queue pointer state of the local queue to be enqueued and the virtual queue to be enqueued after enqueueing.
[0011] In another implementation of the present invention, the step of performing an enqueue operation on the enqueue information message based on the local queue to be enqueued and the virtual queue to be enqueued further includes: determining the linked list statistics information of the local queue to be enqueued and the virtual queue to be enqueued before enqueueing; and updating the linked list statistics information to indicate the queue statistics status of the local queue to be enqueued and the virtual queue to be enqueued after enqueueing.
[0012] In another implementation of the present invention, determining the local queue and virtual queue to be enqueued that match the enqueuing node of the enqueuing information message includes: if the queue status indication of the original fine-grained queue number of the enqueuing information message is not allocated, then determining an idle virtual queue in the virtual queue resource pool as the virtual queue to be enqueued, and modifying the queue status indication of the original fine-grained queue number of the enqueuing information message to be allocated.
[0013] In another implementation of the present invention, determining the local queue and virtual queue to be enqueued that match the enqueuing node of the enqueuing information message further includes: if the queue status indication of the original fine-grained queue number of the enqueuing information message has been assigned, then determining the corresponding virtual queue through the original fine-grained queue number as the virtual queue to be enqueued.
[0014] In another implementation of the present invention, the method further includes: if the queue status of the virtual queue associated with the cached information message indicates an empty state, releasing the virtual queue back into the virtual queue resource pool, and simultaneously clearing the queue status of the original fine-grained queue number of the enqueued information message.
[0015] According to a second aspect of the present invention, a network interface card (NIC) device is provided for inter-cloud service interaction, comprising: a caching unit for caching a first data packet of the inter-cloud service interaction and obtaining an enqueue information packet of the first data packet, wherein the enqueue information packet includes at least a cache address of the first data packet, a first scheduling granularity information, and a second scheduling granularity information, wherein the first scheduling granularity is greater than the second scheduling granularity; and a determining unit for determining, based on the first scheduling granularity information and the second scheduling granularity information, a queue management list for managing the cache address of the packet and determining the enqueue information packet. The queuing node matches the local queue and the virtual queue to be enqueued. The queue management list consists of a local queue list and a virtual queue list whose sub-chains are attached to the local queue list. The sub-chains of the local queue list are formed by local queues at the first scheduling granularity, and the sub-chains of the virtual queue list are formed by virtual queues at the second scheduling granularity. The enqueue unit performs an enqueue operation on the enqueue information packet based on the local queue and the virtual queue to be enqueued. The scheduling unit performs dequeueing and scheduling on the local queue at least for the packet buffer address after the enqueue information packet is enqueued.
[0016] According to a third aspect of the present invention, a network interface card (NIC) device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, wherein the executable instruction causes the processor to perform an operation corresponding to the method described in the first aspect.
[0017] According to a fourth aspect of the present invention, a computer storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0018] In an embodiment of the present invention, a first data packet transmitted between cloud services is cached to obtain an enqueue information packet for the first data packet. The enqueue information packet includes at least the cache address of the first data packet, first scheduling granularity information, and second scheduling granularity information. Based on the cache address of the packet after the enqueue information packet is enqueued, the second data packet corresponding to the dequeue information packet is obtained. Queue management is performed on the cached packet information of the data packets, avoiding direct management of the data packets. In addition, the first scheduling granularity is larger than the second scheduling granularity. Based on the first scheduling granularity information and the second scheduling granularity information, enqueue and dequeue operations of the information packets are performed from the queue management linked list that manages the cache addresses of the packets, respectively. Since the queue management linked list consists of a local queue linked list and a virtual queue linked list whose sub-chains are attached to the local queue linked list, the sub-chains of the local queue linked list are formed by local queues at the first scheduling granularity, and the sub-chains of the virtual queue linked list are formed by virtual queues at the second scheduling granularity. This reduces queue management overhead, improves queue management efficiency, and enables flexible queue scheduling at a smaller granularity. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0020] Figure 1 This is a schematic diagram of the hardware and software configuration for queue management and scheduling of a network interface card (NIC) device according to an embodiment of the present invention.
[0021] Figure 2 This is a flowchart of the steps of a queue management and invocation method according to another embodiment of the present invention.
[0022] Figure 3A for Figure 2 A schematic diagram of the queue management topology based on scheduling granularity in the embodiment.
[0023] Figure 3B for Figure 2 A schematic diagram illustrating the storage principle of the queue management linked list in this embodiment.
[0024] Figure 4A for Figure 2 A schematic block diagram illustrating the queuing process of cached information packets in an embodiment.
[0025] Figure 4B for Figure 4A A diagram illustrating the linked list operations in the example dequeue process.
[0026] Figure 5A for Figure 2 A schematic block diagram illustrating the dequeueing process of cached information packets in an embodiment.
[0027] Figure 5B for Figure 5A A schematic diagram of the linked list operations in the dequeue process shown in the example.
[0028] Figure 6A for Figure 2 A schematic block diagram of an example of virtual queue pooling management (virtual queue allocation process) in an embodiment.
[0029] Figure 6B for Figure 2 A schematic block diagram of virtual queue pooling management (virtual queue release process) of another example of the embodiment.
[0030] Figure 7 This is a schematic block diagram of a network interface card (NIC) device according to another embodiment of the present invention.
[0031] Figure 8 This is a schematic diagram of a network interface card (NIC) device according to another embodiment of the present invention. Detailed Implementation
[0032] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art should fall within the protection scope of the present invention.
[0033] The specific implementation of the embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0034] Figure 1 This is a schematic diagram illustrating the hardware and software configuration for queue management and scheduling of a network interface card (NIC) device according to an embodiment of the present invention. The NIC device can be used for inter-service communication between cloud services. Figure 1 The hardware and software configurations for queue management and scheduling shown can be implemented using the infrastructure chip in the network interface card (NIC) device. The infrastructure chip can be configured as a hardware accelerator such as an FPGA, ASIC, or DPU to accelerate the processor in the NIC device.
[0035] Specifically, in Figure 1 In the infrastructure chip 10, the data stream enters the cloud infrastructure chip from a physical port such as physical port AN 11 (used to communicate with the cloud server, cloud storage or switch), and the data stream is processed by the data packet basic processing module 130 to form information packets and data packets.
[0036] For example, the basic data packet processing module 130 performs multi-layer protocol parsing, keyword extraction, data packet header modification or deletion, virtual network switching, and other processing on the data packets.
[0037] After a data packet is sent to the packet cache management module 120, the packet cache management module 120 can store the data packet in the packet cache module (not shown) and return the cache information packet of the data packet to the packet scheduling management module 110. Specifically, the cache information packet includes, but is not limited to, the starting address and ending address of the data packet, packet length, physical port number, service port number, priority, service atomic granularity queue, and other information.
[0038] Overall, in this embodiment of the invention, the message scheduling management module 110 performs a message scheduling management initialization operation once during the initialization phase. Then, it performs message reception through the message receiving process 112 and performs tasks such as sending cached message messages and scheduling data messages through the data scheduling process 113. It should be understood that the message receiving process 112 and the data scheduling process 113 can be executed in parallel. When executing the message receiving process 112 and / or the data scheduling process 113, the allocation and release of virtual queues can also be achieved through the virtual queue pooling management 111.
[0039] Specifically, the initialization operation of the message scheduling management module 110 includes the initialization of the cached linked list of cached information messages, the initialization of the virtual queue resource pool, and the initialization of queue management table entries. The initialization of the information message cached linked list includes associating the storage addresses of the cached information message cache modules in the form of a sequential linked list pointer and activating the linked list quota protection mechanism. During initialization, all storage addresses are available; that is, the storage addresses of all cached information message cache modules are linked between the current free linked list head pointer and the current free linked list tail pointer, forming the current free linked list.
[0040] During the initialization of the virtual queue resource pool, the available virtual resource entries in the initialization virtual queue resource pool table are configured from 0 to n, with the resource pool head pointer set to 0 and the tail pointer set to n. During the initialization of the queue management table, the message scheduling management table entry is initialized to zero.
[0041] Generally, in the queue management of cached information messages, either static or dynamic cache allocation methods can be used. Static cache allocation allocates a fixed amount of storage space to each queue of cached information messages, with messages entering their corresponding storage spaces sequentially. However, each queue has limited storage capacity, resulting in low time utilization of storage resources in unused queues. Dynamic cache allocation, on the other hand, does not require allocating fixed storage space to specific queues of cached information messages. Instead, it uses a linked list to dynamically occupy and release overall storage space, thus improving both the space and time utilization of storage resources.
[0042] In cloud computing applications, the data packets carried on cloud infrastructure chips are quite complex, involving multiple host nodes, network, storage, and other services. The atomic queue granularity for each service ranges from hundreds to thousands of packets, and each atomic queue has a priority attribute. If a hierarchical fixed mapping scheme is continued, when fine-grained queue management and scheduling are required for all services, hundreds or thousands of queue management records need to be maintained. This results in a huge overhead on the chip's storage resources, with storage space often not being fully utilized, leading to low efficiency in queue management and scheduling. In other words, the number of cached message queues that cloud infrastructure chips need to manage is enormous, and the complexity of queue order is difficult to predict. Therefore, a linked list structure is suitable for cloud infrastructure chips to maximize the utilization of limited storage resources.
[0043] The following will combine Figure 2 The queue management and invocation methods of embodiments of the present invention are described in detail, and in conjunction with Figure 1 The message scheduling management module 110 pairs Figure 2 The queue management and invocation methods will be explained further.
[0044] Figure 2 The queue management and scheduling methods shown can be applied to network interface card (NIC) devices for inter-service business interactions in cloud services, for example, Figure 1 The network interface card (NIC) device is shown. Furthermore, the queue management and scheduling methods can be executed by the packet scheduling management module 110, including:
[0045] S210: Cache the first data packet transmitted between cloud services for business interaction, and obtain the enqueue information packet of the first data packet. The enqueue information packet includes at least the cache address of the first data packet, the first scheduling granularity information and the second scheduling granularity information, wherein the first scheduling granularity is greater than the second scheduling granularity.
[0046] S220: Based on the first scheduling granularity information and the second scheduling granularity information respectively, determine the local queue and the virtual queue to be enqueued that match the enqueue node of the enqueue information message from the queue management linked list of the management message cache address. The queue management linked list consists of a local queue linked list and a virtual queue linked list whose sub-chains are attached to the local queue linked list. The sub-chains of the local queue linked list are formed by the local queues at the first scheduling granularity, and the sub-chains of the virtual queue linked list are formed by the virtual queues at the second scheduling granularity.
[0047] S230: Perform enqueue operation on enqueue information messages based on the local queue to be enqueued and the virtual queue to be enqueued.
[0048] S240: Perform local queue dequeueing and scheduling at least for the message cache address after the enqueued information message.
[0049] In an embodiment of the present invention, a first data packet transmitted between cloud services is cached to obtain an enqueue information packet for the first data packet. The enqueue information packet includes at least the cache address of the first data packet, first scheduling granularity information, and second scheduling granularity information. Based on the cache address of the packet after the enqueue information packet is enqueued, the second data packet corresponding to the dequeue information packet is obtained. Queue management is performed on the cached packet information of the data packets, avoiding direct management of the data packets. In addition, the first scheduling granularity is larger than the second scheduling granularity. Based on the first scheduling granularity information and the second scheduling granularity information, enqueue and dequeue operations of the information packets are performed from the queue management linked list that manages the cache addresses of the packets, respectively. Since the queue management linked list consists of a local queue linked list and a virtual queue linked list whose sub-chains are attached to the local queue linked list, the sub-chains of the local queue linked list are formed by local queues at the first scheduling granularity, and the sub-chains of the virtual queue linked list are formed by virtual queues at the second scheduling granularity. This reduces queue management overhead, improves queue management efficiency, and enables flexible queue scheduling at a smaller granularity.
[0050] It should be understood that, for ease of description, the enqueued cached information message is called the enqueued information message, the dequeued cached information message is called the dequeued information message, the data message received by the infrastructure chip is called the first data message, the first data message is cached to obtain the enqueued information message, and the dequeued information message is used for the sending and scheduling of the second data message.
[0051] In general, the queue management of cached information packets in various embodiments of the present invention is performed using a queue management linked list. The queue management linked list consists of a local queue linked list and a virtual queue linked list whose sub-chains are attached to the local queue linked list. The sub-chains of the local queue linked list are formed by local queues at a first scheduling granularity, and the sub-chains of the virtual queue linked list are formed by virtual queues at a second scheduling granularity.
[0052] When scheduling data packets, the scheduling elements include, but are not limited to, the physical transmission port, service transmission port, quality of service (QoS), and service transmission granularity. The first scheduling granularity described herein can be based on some configurations of the aforementioned elements, and a second scheduling granularity smaller than the first can be based on other configurations. Preferably, the first scheduling granularity is based on the network interface card (NIC) device's configuration of at least one of the physical transmission port, service transmission port, and QoS of the data packet, and the second scheduling granularity is based on the NIC device's configuration of the service transmission granularity of the data packet. Accordingly, queue management of local queues in a local queue list can be performed for the physical transmission port, service transmission port, and QoS of the data packet, and queue management of virtual queues in a virtual queue list can be performed using the service transmission granularity of the data packet, for example... Figure 3A This diagram illustrates three scheduling layers: the physical port layer, indicating the physical transmission port of the data packet; the service port layer, indicating the service transmission port of the data packet; and the quality of service (QoS) differential layer, indicating the transmission QoS of the data packet. The physical port layer includes, but is not limited to, Ethernet interfaces / PCIe interfaces. The service port layer includes, but is not limited to, carrying network services, storage services, and RDMA services. The QoS differential layer includes, but is not limited to, indicating high, medium, and low priorities.
[0053] The next layer below the Quality of Service (QoS) difference layer is the Business Atomic Layer, which indicates the atomic granularity of data packet transmission. In other words, the Business Atomic Layer indicates the minimum atomic granularity of hardware offloading attached to the current service port.
[0054] Therefore, in other words, queues distinguished by the physical port layer, service port layer, and quality of service difference layer based on the first scheduling granularity indication are local queues, while queues distinguished by the service atom layer based on the second scheduling granularity indication are virtual queues. Accordingly, local queues are not limited to being fixedly calculated and determined by information such as physical port number, service port number, and quality of service priority; virtual queues are not limited to being determined by physical port number, service port number, quality of service priority, and service atom number, but are determined according to their respective virtual queue pooling management modules. For example, the maximum allocation capacity of a virtual queue is the total number of addresses in the queue linked list.
[0055] Further reference Figure 3A The physical port layer includes ports PORT0-PORTN (which can be used as...) Figure 1(Examples of physical ports A-N11) The next level of the physical port layer is the service port layer, which includes various port types. For example, port PORT0 corresponds to port types TYPE0-TYPEm; port PORTN corresponds to port types TYPE0-TYPEh. Further, the next level of the service port layer is the Quality of Service (QoS) differentiation layer, which corresponds to the queue management of the local queue linked list. For example, port type TYPE0 corresponds to local queues loc_q0, loc_q1, and loc_q2; port type TYPE1 corresponds to local queues loc_q3, loc_q4, and loc_q5; ...; port type TYPEh corresponds to local queues loc_q(n-2), loc_q(n-1), and loc_qn. Furthermore, the next layer below the Quality of Service (QoS) difference layer is the Business Atomic Layer, which indicates the atomic granularity of service transmission of data packets. This Business Atomic Layer corresponds to the queue management of the virtual queue linked list. For example, local queue loc_q0 is attached to virtual queues q_0_0-q_0_k; ...; local queue loc_qn is attached to virtual queues q_0_0-q_0_k. It should be understood that the pooling management of the virtual queue linked list can adopt... Figure 1 The virtual queue pooling management in the process is executed in step 111.
[0056] Without loss of generality, a physical port can be connected to (e.g., fixedly connected) multiple service ports, a service port can be connected to (e.g., fixedly connected) multiple quality of service difference ports, and a quality of service difference port can be connected to (e.g., dynamically connected) multiple service atoms.
[0057] Furthermore, the queue management list for message cache addresses can manage the enqueue and dequeue processes of local queues and / or virtual queues. For example... Figure 3B As shown, the linked list of total length nk includes a free linked list of length nk. Each local queue is a sub-link of the local queue linked list; that is, a local queue sub-link is maintained for each local queue. The virtual queue linked list is attached to the sub-link of the local queue linked list, and the virtual queue is a sub-link of the virtual queue linked list. The head and tail pointers of multiple virtual queue sub-links are linked in sequence to form their subordinate local queue sub-links.
[0058] Specifically, if the virtual queue to be enqueued is in a linked state, the head pointer of the local free list is assigned to the tail pointer of the virtual queue to be enqueued. If the virtual queue to be enqueued is not linked, or if the virtual queue to be enqueued is the tail virtual queue of the local queue to be enqueued, the head pointer of the local free list is assigned to the tail pointer of the local queue to be enqueued. If the total number of packets in the dequeue is equal to the preset number, that is, the total number of packets after dequeueing is empty, the linked state information of the dequeue can be set to not linked.
[0059] The following will combine Figure 4A Detailed description Figure 2 The embodiment describes the queuing process for cached information packets. Specifically, the data stream processed by the basic data packet processing module 130 forms queued information packets and data packets. The cached information packets are input to the information packet receiving process 112 for processing, and the data packets are cached in the data packet cache 420.
[0060] Furthermore, the message receiving process 112 receives the enqueuing message, and performs information identification and extraction of the packet length, physical port number, service port number, priority, and service atomic granularity queue information (i.e., first scheduling granularity information and second scheduling granularity information) of the enqueuing message through information parsing and identification 425. Then, it determines the virtual queue to be enqueued through virtual queue allocation 430.
[0061] It should be understood that after determining the local queue and the virtual queue to be enqueued, the linked list limit protection mechanism 435 can be executed, that is, the packet loss operation or enqueue operation of the local queue to be enqueued can be performed. Specifically, the linked list limit protection mechanism 435 extracts the total packet length of the local queue cache and the local queue cache threshold by confirming the local queue number and the virtual queue number to be enqueued, and determines the relationship between the total packet length of the local queue cache and the local queue cache threshold. If the total packet length of the local queue cache is greater than the local queue cache threshold, the packet loss operation is performed on the local queue to be enqueued in the packet loss operation 445; if the total packet length of the local queue cache is less than the local queue cache threshold, the enqueue operation of the local queue to be enqueued is performed in the enqueue operation 440.
[0062] Furthermore, during the packet loss operation, the packet loss operation 445 can send queue packet loss information to the message cache management module 120. The queue packet loss information includes, but is not limited to, the start address and end address of the first data packet and the packet loss flag. Then, the message cache management module 120 deletes the first data packet cached in the message cache management module 120 according to the queue packet loss information.
[0063] Furthermore, during the enqueue operation, the enqueue operation 440 may specifically include operations such as buffering information messages 460, refreshing enqueue statistics entries 455, and refreshing the enqueue linked list 450.
[0064] The cached message 460 caches the message in the message cache module (not shown), with the address being the current free list head pointer, i.e., using... Figure 3B The queue management linked list shown operates by performing pointer operations on the list. Correspondingly, it maintains the entries corresponding to the pointer operations.
[0065] Accordingly, this can be achieved by maintaining the linked list management information of the queue management linked list that manages the message cache address. For example, the linked list management information may include linked list pointer information as shown in Table 1 and linked list statistics information as shown in Table 2.
[0066] For example, refreshing the enqueue list 450 includes refreshing the enqueue free list and occupied list through the management of the virtual queue list and the local queue list. As shown in Table 1, the list pointer information includes various entries such as the local queue head pointer entry, the virtual queue head pointer entry, the local queue tail pointer entry, the virtual queue tail pointer entry, the local queue head virtual queue list entry, the virtual queue before list entry, the local queue tail virtual queue list entry, and the virtual queue after list entry.
[0067] Table 1: Linked List Pointer Information
[0068] Local queue head pointer entry Virtual queue head pointer entry Local queue tail pointer entry Virtual queue tail pointer entry Local queue head virtual queue list item The previous queue list item in the virtual queue Local queue tail virtual queue list item Virtual queue next queue list item
[0069] The refresh operation of Table 1 will be explained further below:
[0070] The refresh operation for each entry in the linked list pointer information will be explained in the following cases:
[0071] If the local queue linked list is "not linked" and the virtual queue linked list is also "not linked," then the next pointer of the tail pointer of the local queue to be enqueued is updated to point to itself, thus forming a circular linked list within the local queue. Figure 4B As shown.
[0072] Accordingly, in the local queue head pointer entry, the content at the address of the local queue to be enqueued is updated to the current free list head pointer; in the local queue tail pointer entry, the content at the address of the local queue to be enqueued is updated to the current free list head pointer; in the local queue head virtual queue list entry, the content at the address of the local queue to be enqueued is updated to the virtual queue to be enqueued; in the local queue tail virtual queue list entry, the content at the address of the local queue to be enqueued is updated to the virtual queue to be enqueued; in the virtual queue head pointer entry, the content at the address of the virtual queue to be enqueued is updated to the current free list head pointer; in the virtual queue tail pointer entry, the content at the address of the virtual queue to be enqueued is updated to the current free list head pointer; in the virtual queue preceding list entry, the content at the address of the virtual queue to be enqueued is updated to the virtual queue to be enqueued; in the virtual queue following list entry, the content at the address of the virtual queue to be enqueued is updated to the virtual queue to be enqueued.
[0073] If the status of the local queue linked list is "linked," and the status of the virtual queue linked list is "not linked," then the next pointer of the local queue tail pointer is updated to the current free list head pointer. The next pointer of the free list head pointer is then updated to the local queue head pointer, creating a circular linked list within the local queue. Figure 4B As shown.
[0074] Accordingly, maintain the local queue head pointer entry; in the local queue tail pointer entry, update the content at the address of the local queue to be enqueued to the current free list head pointer; maintain the local queue head virtual queue entry; in the local queue tail virtual queue entry, update the content at the address of the local queue to be enqueued to the virtual queue to be enqueued; in the virtual queue head pointer entry, update the content at the address of the virtual queue to be enqueued to the current free list head pointer; in the virtual queue tail pointer entry, update the content at the address of the virtual queue to be enqueued to the current free list head pointer; in the virtual queue preceding queue entry, update the content at the address of the virtual queue to be enqueued to the tail virtual queue of the local queue to be enqueued, and update the content at the address of the head virtual queue of the local queue to be enqueued; in the virtual queue following queue entry, update the content at the address of the tail virtual queue of the local queue to be enqueued, and update the content at the address of the virtual queue to the head virtual queue of the local queue to be enqueued.
[0075] If the status of the local queue linked list is "linked," and the status of the virtual queue linked list is also "linked," and the current virtual queue to be enqueued is the tail virtual queue of the local queue to be enqueued, then the next pointer of the tail pointer of the local queue to be enqueued is updated to the head pointer of the free list, and the next pointer of the head pointer of the free list is updated to the head pointer of the local queue to be enqueued. A circular linked list is formed internally within the local queue. Figure 4B As shown.
[0076] Accordingly, maintain the local queue head pointer entry; in the local queue tail pointer entry, update the content of the local queue to be enqueued at the address to the current free list head pointer; maintain the local queue head virtual queue list entry; maintain the local queue tail virtual queue list entry; maintain the virtual queue head pointer entry; in the virtual queue tail pointer entry, update the content of the virtual queue to be enqueued at the address to the current free list head pointer; maintain the virtual queue preceding the list entry; maintain the virtual queue following the list entry.
[0077] If the status of the local queue linked list is "linked," and the status of the virtual queue linked list is also "linked," and the current virtual queue to be enqueued is not the tail virtual queue of the local queue, then the next pointer of the tail pointer of the virtual queue to be enqueued in the virtual queue linked list is updated to the head pointer of the free list, and the next pointer of the head pointer of the current free list is updated to the head pointer of the queue after the virtual queue to be enqueued. Figure 4B As shown.
[0078] Accordingly, maintain the local queue head pointer entry; maintain the local queue tail pointer entry; maintain the local queue head virtual queue list entry; maintain the local queue tail virtual queue list entry; maintain the virtual queue head pointer entry; in the virtual queue tail pointer entry, update the content of the virtual queue to be enqueued at the address to the current free list head pointer; maintain the virtual queue preceding the list entry; maintain the virtual queue following the list entry.
[0079] Without loss of generality, determine the linked list pointer information before enqueuing the local queue and the virtual queue to be enqueued, and update the linked list pointer information to indicate the queue pointer state after enqueuing the local queue and the virtual queue to be enqueued.
[0080] For example, the queuing statistics table entry 455 is refreshed through the management statistics of the virtual queue linked list and the local queue linked list, which include the queuing free chain and the occupied chain. As shown in Table 2, the linked list statistics information includes various entries such as the local queue total queue list entry, the local queue total packet length list entry, the local queue chain status list entry, the virtual queue chain status list entry, and the local queue non-empty status mapping table.
[0081] Table 2: Linked List Statistics
[0082] Local queue total list item Local queue total packet length entries Local queue chained status table entries Virtual queue chained status table entries Local queue non-empty state mapping table
[0083] In general, the enqueue statistics operations indicated by the linked list statistics include updating the local queue non-empty state bit mapping table, the total packet length and total number of packets corresponding to the enqueue local queue, and the chaining status of the enqueue local queue and the enqueue virtual queue.
[0084] The refresh operation in Table 2 will be further explained below: In the virtual queue chaining status table entry, the content of the virtual queue to be enqueued at the address is updated to chained; in the local queue chaining status table entry, the content of the local queue to be enqueued at the address is updated to chained; in the local queue total queue list entry, the content of the local queue to be enqueued at the address is updated to the total number of local queues to be enqueued plus 1; in the local queue total packet length table entry, the content of the local queue to be enqueued at the address is updated to the total packet length of the local queue to be enqueued plus the packet length of the local queue to be enqueued; in the local queue non-empty state bit mapping table, the corresponding index bit of the local queue to be enqueued is updated to the "1" state.
[0085] Without loss of generality, determine the linked list statistics before enqueuing the local queue and the virtual queue to be enqueued, and update the linked list statistics to indicate the queue statistics status after enqueuing the local queue and the virtual queue to be enqueued.
[0086] The following will combine Figure 5A Detailed description Figure 2 The dequeueing process of cached information packets in this embodiment. Figure 5A As shown, the data scheduling process 113 in the message scheduling management module 110 performs the scheduling of dequeue information messages. The data scheduling process 113 selects dequeue information messages according to the demand scheduling strategy and then performs the dequeue operation 530.
[0087] The demand scheduling strategy based on data scheduling process 113 is determined at least based on a first scheduling granularity. Preferably, the demand scheduling strategy can be determined based on a first scheduling granularity and a second scheduling granularity. For example, the first scheduling granularity indicates multi-level scheduling including first-level scheduling, second-level scheduling, and third-level scheduling, and the second scheduling granularity indicates fourth-level scheduling. Exemplarily, the above-mentioned multi-level scheduling can be performed based on a local queue non-empty state mapping table (e.g., a bit mapping table), an active flow control state mapping table (e.g., an active credit bit mapping table), etc., wherein the local queue non-empty state mapping table includes multiple layers of entries, each layer of entries indicating the non-empty state of the local queue, and the flow control state mapping table includes multiple layers of entries, each layer of entries indicating the flow control state of the corresponding physical port.
[0088] As an example, Level 1 scheduling 510 can instruct RR / WRR round-robin scheduling to be performed between individual physical ports (e.g., physical ports PORT0-PORTN mentioned above) based on the first layer of the local queue non-empty state mapping table and the first layer of the flow control state mapping table. Level 2 scheduling 515 can instruct RR / WRR round-robin scheduling to be performed between individual service ports based on the second layer of the local queue non-empty state mapping table and the second layer of the flow control state mapping table. Level 3 scheduling 520 can instruct RR / WRR round-robin scheduling within a service port based on the second layer of the local queue non-empty state mapping table, the second layer of the flow control state mapping table, and service priority. That is, the local queue to be dequeued is obtained through the above multi-level scheduling.
[0089] It should be understood that the aforementioned local queue non-empty state mapping table and active flow control state mapping table include a first layer for distinguishing physical port levels, a second layer for distinguishing service port levels, and a third layer for distinguishing intra-service priorities. It should also be understood that each layer in the mapping table represents a full OR logical operation of the layer below it.
[0090] Furthermore, the message scheduling management module 110 can also perform multi-level performance isolation management for multi-level scheduling.
[0091] For example, active rate limiting can be implemented at the physical port layer. For instance, rate limiting can be applied based on the traffic rate of the services carried by a physical port. When a physical port triggers rate limiting, the physical port number is refreshed to 1 in its corresponding physical port rate limiting status mapping table; otherwise, the physical port number is 0.
[0092] For example, proactive credit flow control can be maintained at the service quality difference layer and in relation to back-end business modules. For instance, in the mode of updating the sendable window quota after dequeueing, a sendable window can be maintained for each local queue; that is, all local queues are arranged in order to form a sendable window table. When a local queue is retrieved, the remaining sendable window quota can be refreshed by subtracting the length of the retrieved data packet from the length of the cached information packet. Then, the remaining adjustable quota table is written back to refresh, and proactive flow control is triggered when the remaining quota does not meet the maximum packet length requirement for retrieval.
[0093] For example, in the update mode of the sendable window quota after the response, after each business module processes a data packet, it sends the length of the processed data packet, as well as the physical port number, service port number, priority, etc., as a response to the packet scheduling management module 110. The packet scheduling management module 110 parses the local queue and data packet length based on the information in the response, and refreshes the remaining sendable window quota by adding the packet length in the scheduled information packet to the data packet length in the response. Then, it writes back to refresh the remaining adjustable quota table, and releases active flow control when the remaining quota meets the maximum packet length for scheduling.
[0094] In the refresh operation of the active flow control state mapping table, when active flow control is triggered, the local queue is marked as 0; otherwise, the local queue is marked as 1. The remaining quota is sufficient to schedule out a maximum packet length, which satisfies the requirement that the next data packet can be scheduled out and received without blocking.
[0095] In one example, the local queue to be dequeued can be determined as the dequeue queue regardless of whether the virtual queue is enabled. In another example, the local queue to be dequeued is determined as the dequeue queue when the virtual queue is not enabled; when the virtual queue is enabled, the virtual queue is scheduled based on the fourth-level scheduling to obtain the virtual queue to be dequeued, and the local queue to be dequeued and the virtual queue to be dequeued are used as the dequeue queue. Specifically, the fourth-level scheduling 525 instructs fine-grained scheduling of atomic queues within the service. Without loss of generality, as an example of performing dequeueing and scheduling of the local queue at least for the packet buffer address after the enqueued information packet, the local queue to be dequeued and the virtual queue to be dequeued are determined from the queue management list based on the first scheduling granularity and the second scheduling granularity, respectively, and used as the dequeue queue; the second data packet is scheduled based on the first scheduling granularity and the second scheduling granularity.
[0096] Furthermore, for the virtual queue to be dequeued, the passive flow control mapping table (e.g., the passive flow control bit mapping table) can be queried to determine whether the virtual queue to be dequeued is under flow control. If it is, data scheduling process 113 is disabled, and the aggregation scheduling queue switching process is executed; if it is not, the aggregation scheduling process is executed. Specifically, during the aggregation scheduling process, based on the third-level scheduling result, the head pointer of the local queue to be dequeued and the head virtual queue of the local queue to be dequeued are confirmed. During the aggregation scheduling queue switching process, if the head and tail pointers of the virtual queue to be dequeued are different and at least one of the following has been reached—the maximum number of aggregation scheduling packets, the maximum aggregation scheduling packet length, or flow control by the business—then the passive switching process of aggregation scheduling can be executed, and an aggregation end (bursteop) flag is added to the second data packet of the dequeue information message in the queue to be dequeued; otherwise, the passive switching process of aggregation scheduling is not executed.
[0097] Without loss of generality, the flow control status indicator table can be queried based on the virtual queue to be dequeued. If the flow control status indicator table indicates that the virtual queue to be dequeued is not in a flow control state, then the aggregation scheduling of the second data packet is started; if the flow control status indicator table indicates that the virtual queue to be dequeued is in a flow control state, then the scheduling of the second data packet is stopped, and the aggregation scheduling queue switch is performed.
[0098] Then, perform a dequeue operation 530 on the queue to be dequeued. Accordingly, execute the information message output 545, refresh the dequeue list 535, and refresh the dequeue statistics table entries 540.
[0099] In the information message output 545, using the local queue to be dequeued as the address, the total number of packets in the local queue in Table 2 is read, and the head pointer information of the local queue in Table 1 is read. The dequeued information message is then extracted from the information message cache module (not shown), with the corresponding extraction address being the head pointer of the local queue. Further, the extracted dequeued information message is sent to the message cache management module 120 for second data message extraction, and then sent to subsequent service processing modules (not shown). After service function offloading, it is distributed to the physical port indicated by the physical port number (e.g., physical ports PORT0-PORTN mentioned above).
[0100] In the "Refresh Dequeue Statistics Table 540" step, Table 2 is refreshed. For example, in the "Local Queue Total Queue List" entry, the content for the local queue to be dequeued is updated to indicate the total number of local queues to be dequeued minus 1. In the "Local Queue Total Packet Length Table" entry, the content for the local queue to be dequeued is updated to indicate the total packet length of the local queue to be dequeued minus the packet length of the local queue to be dequeued.
[0101] In the dequeue list refresh 535, the head pointer of the queue to be dequeued is updated to the next pointer of the tail pointer of the free list in the list, and the head pointer of the queue to be dequeued is used as the tail pointer of the free list after this dequeue operation is completed.
[0102] Without loss of generality, the linked list pointer information before the local queue and the virtual queue to be dequeued can be determined, and the linked list pointer information can be updated to indicate the queue pointer state after the local queue and the virtual queue to be dequeued can be dequeued; the linked list statistics information before the local queue and the virtual queue to be dequeued can be determined, and the linked list statistics information can be updated to indicate the queue statistics state after the local queue and the virtual queue to be dequeued can be dequeued.
[0103] Accordingly, Table 1 is updated using the following operations:
[0104] If the virtual queue to be dequeued is not emptied after this dequeue operation, the aggregate scheduling queue switching process will be executed.
[0105] Accordingly, in the local queue head pointer entry, the content at the address of the local queue to be dequeued is updated to the head pointer of the next queue after the virtual queue to be dequeued; in the local queue tail pointer entry, the content at the address of the local queue to be dequeued is updated to the tail pointer of the virtual queue to be dequeued; in the local queue head virtual queue list entry, the content at the address of the local queue to be dequeued is updated to the next virtual queue after the virtual queue to be dequeued; in the local queue tail virtual queue list entry, the content at the address of the local queue to be dequeued is updated to the virtual queue to be dequeued; in the virtual queue head pointer entry, the content at the address of the virtual queue to be dequeued is updated to the next pointer after the head pointer of the virtual queue to be dequeued; the virtual queue tail pointer entry is maintained; the virtual queue preceding queue list entry is maintained; the virtual queue following queue list entry is maintained, and so on. Figure 5B As shown.
[0106] Without loss of generality, the local queue corresponding to the first scheduling granularity is determined from the queue management list as the local queue to be dequeued, and the head virtual queue of the local queue to be dequeued is determined as the virtual queue to be dequeued.
[0107] If the virtual queue to be dequeued is not emptied after this dequeue operation, the aggregate scheduling queue switching process will not be executed.
[0108] Accordingly, in the local queue head pointer entry, the content at the address of the local queue to be dequeued is updated to the next pointer of the local queue head pointer; the local queue tail pointer entry is maintained; the local queue head virtual queue list entry is maintained; the local queue tail virtual queue list entry is maintained; in the virtual queue head pointer entry, the content at the address of the virtual queue to be dequeued is updated to the next pointer of the virtual queue head pointer; the virtual queue tail pointer entry is maintained; the virtual queue preceding the list entry is maintained; the virtual queue following the list entry is maintained, such as... Figure 5B As shown.
[0109] If the local queue to be dequeued is not empty after this dequeue operation, and the virtual queue to be dequeued is empty, then the aggregation scheduling queue exhaustion operation is performed, that is, an aggregation end flag is added to the current data packet.
[0110] Accordingly, in the local queue head pointer entry, the content at the address of the local queue to be dequeued is updated to the next pointer of the local queue head pointer; the local queue tail pointer entry is maintained; in the local queue head virtual queue list entry, the content at the address of the local queue to be dequeued is updated to the next virtual queue of the virtual queue to be dequeued; the local queue tail virtual queue list entry is maintained; in the virtual queue head pointer entry, the content at the address of the virtual queue to be dequeued is cleared; in the virtual queue tail pointer entry, the content at the address of the virtual queue to be dequeued is cleared; in the virtual queue preceding queue list entry, the content at the address of the next queue of the virtual queue to be dequeued is updated to the tail queue of the local queue to be dequeued, and the content at the address of the virtual queue to be dequeued is cleared; in the virtual queue following queue list entry, the content at the address of the tail queue of the local queue to be dequeued is updated to the next queue of the virtual queue to be dequeued, and the content at the address of the virtual queue to be dequeued is cleared, such as... Figure 5B As shown.
[0111] If the local queue to be dequeued is empty after this dequeue operation, the corresponding index bit of the local queue to be enqueued will be updated to "0" in the local queue non-empty state bit mapping table. Furthermore, a full OR operation will be performed on the bit mapping relationship of this layer based on the third-level bit mapping relationship of the local queue non-empty state bit mapping table to obtain the second-level bit mapping relationship. Then, a full OR operation will be performed on the bit mapping relationship of this layer based on the second-level bit mapping relationship of the local queue non-empty state bit mapping table to obtain the first-level bit mapping relationship. Simultaneously, an aggregation scheduling queue exhaustion operation will be performed, i.e., an aggregation end marker will be added to the current data packet.
[0112] Accordingly, in the local queue head pointer entry, the content at the address of the local queue to be dequeued is cleared; the local queue tail pointer entry is maintained; in the local queue head virtual queue list entry, the content at the address of the local queue to be dequeued is cleared; in the local queue tail virtual queue list entry, the content at the address of the local queue to be dequeued is cleared; in the virtual queue head pointer entry, the content at the address of the virtual queue to be dequeued is cleared; in the virtual queue tail pointer entry, the content at the address of the virtual queue to be dequeued is cleared; in the virtual queue preceding queue list entry, the content at the address of the local queue to be dequeued is cleared; in the virtual queue following queue list entry, the content of the tail queue at the address of the local queue to be dequeued is updated to the content of the following queue of the virtual queue to be dequeued, and the content at the address of the virtual queue to be dequeued is cleared, as follows. Figure 5B As shown.
[0113] In other words, if the virtual queue to be dequeued is not empty after this dequeue operation, the virtual queue chained status table entry is maintained, and the local queue chained status table entry is also maintained.
[0114] If the local queue to be dequeued is not empty and the virtual queue to be dequeued is empty after this dequeue operation, the content of the virtual queue to be dequeued at the address is updated to "not linked" in the virtual queue linked status table entry, and the local queue linked status table entry is maintained.
[0115] If the local queue to be dequeued is empty after this dequeue operation, the content of the virtual queue to be dequeued at the address in the virtual queue chaining status table will be updated to "not chained".
[0116] In the local queue chaining status table entry, update the content of the local queue to be dequeued to "not chained"; and update the corresponding local queue to be enqueued index bit in the queue non-empty status bit mapping table to "0". Otherwise, maintain the queue non-empty status bit mapping table.
[0117] The following will Figure 6A and Figure 6B To describe the virtual queue pooling management mentioned above 111. Figure 6A The example describes the virtual queue allocation mechanism in Virtual Queue Pooling Management 111. Figure 6B The example describes the virtual queue release mechanism in Virtual Queue Pooling Management 111.
[0118] for Figure 6A In the virtual queue allocation process, during information parsing and identification 425, the original fine-grained queue number is determined based on the physical port number, service port number, quality of service priority, and service atom number of the first data packet. Then, an original fine-grained information bit mapping table lookup (615) is performed, that is, based on the original fine-grained queue number, the queue occupancy bit mapping table is queried to determine whether the original fine-grained queue number has been allocated a corresponding virtual queue. If the value corresponding to the original fine-grained queue number in the queue occupancy bit mapping table is 1 (650), then the virtual queue mapping table is queried based on the original fine-grained queue number (660) to obtain the virtual queue number corresponding to the original fine-grained queue number, that is, the mapping table entry between the original fine-grained queue number and the virtual queue number (645). Accordingly, the virtual queue number is input to the multiplexer 670 to output the virtual queue number corresponding to this information packet (680).
[0119] If the original fine-grained queue number in the queue occupancy bit mapping table corresponds to a value of 0 (620), a new virtual queue is allocated from the virtual queue resource pool (635) (630). Simultaneously, the virtual queue mapping table is updated (645) using the original fine-grained queue number as the address and the virtual queue number as the data, and the value in the queue occupancy bit mapping table is updated to 1 (625). After allocating the new virtual queue, it is written to the original fine-grained and virtual queue mapping table entry (645). Correspondingly, the new virtual queue number is input to the multiplexer 670 to output the virtual queue number corresponding to this information message (680).
[0120] Without loss of generality, if the queue status indicator of the original fine-grained queue number of the enqueue message is not assigned, then an idle virtual queue in the virtual queue resource pool is identified as the virtual queue to be enqueued, and the queue status indicator of the original fine-grained queue number of the enqueue message is assigned. Alternatively, if the queue status indicator of the original fine-grained queue number of the enqueue message is assigned, then the corresponding virtual queue is determined by the original fine-grained queue number and designated as the virtual queue to be enqueued.
[0121] for Figure 6B The virtual queue release process can be performed if the current virtual queue is completely empty (605). Specifically, the virtual queue pooling management 111 calculates the original fine-grained queue number based on the physical port number, service port number, service quality priority, and service atom number of the second data packet. Then, the virtual queue pooling management 111 updates the value in the original fine-grained queue occupancy bit mapping table to 0 (625) and releases the virtual queue (610) back to the virtual queue resource pool (635). Correspondingly, the virtual queue pooling management 111 removes the mapping relationship between the original fine-grained queue and the virtual queue (665) to obtain the modified original fine-grained and virtual queue mapping table entries (645).
[0122] Without loss of generality, if the queue status of the virtual queue for the cached message indicates an empty state, the virtual queue is released back into the virtual queue resource pool, and the queue status of the original fine-grained queue number of the enqueued message is cleared.
[0123] It should be understood that during initialization, the virtual queue resource pool 635 stores the currently available virtual queue numbers (0-N) bit by bit in each address. Initially, the head pointer is 0 and the tail pointer is N. When a virtual queue is allocated, the head pointer is incremented by 1; when a virtual queue is released, the tail pointer is incremented by 1. That is, the head and tail pointers can be used to maintain the current usage status of the virtual queue resource pool 635. As an example, if the difference between the tail pointer and the head pointer is less than a threshold, the allocation of the current virtual queue is stopped.
[0124] It should also be understood that the address of the virtual queue passive flow control mapping table is the virtual queue address. When the virtual queue pooling management 111 allocates a virtual queue, the corresponding bit in the virtual queue passive flow control mapping table is refreshed to 1 by default. The message scheduling management module 110 queries the corresponding service module (not shown) for the current flow control status of the atomic service based on the physical port number, service port number, and atomic service number. The service module provides service atomic-level passive flow control information, which includes, but is not limited to, responses such as maintaining flow control feedback and releasing flow control feedback from the service module to the message scheduling management module 110 based on its own rate limiting processing and the current receivable status of the atomic service. The corresponding bit in the virtual queue passive flow control mapping table is refreshed to "1" or "0" by default.
[0125] When releasing a virtual queue, the corresponding bit in the virtual queue passive flow control mapping table is refreshed to 0 by default. If the business module replies with a business atomic-level passive flow control information indicating that it is in the virtual queue release state, then there is no need to perform queue flow control management, that is, flow control information can be discarded.
[0126] The following will combine Figure 7 A network interface card (NIC) device according to another embodiment of the present invention will be described in detail. Figure 7 Network interface card (NIC) devices are used for business interactions between cloud services, including:
[0127] The caching unit 710 caches the first data packet of the business interaction between cloud services and obtains the enqueue information packet of the first data packet. The enqueue information packet includes at least the cache address of the first data packet, the first scheduling granularity information and the second scheduling granularity information, wherein the first scheduling granularity is greater than the second scheduling granularity.
[0128] The determining unit 720, based on the first scheduling granularity information and the second scheduling granularity information respectively, determines, from the queue management linked list of the management message cache address, the local queue to be enqueued and the virtual queue to be enqueued that match the enqueuing node of the enqueuing information message. The queue management linked list consists of a local queue linked list and a virtual queue linked list whose sub-chains are attached to the local queue linked list. The sub-chains of the local queue linked list are formed by the local queues of the first scheduling granularity, and the sub-chains of the virtual queue linked list are formed by the virtual queues of the second scheduling granularity.
[0129] Enqueue unit 730 performs an enqueue operation on the enqueue information message based on the local queue to be enqueued and the virtual queue to be enqueued.
[0130] The scheduling unit 740 performs dequeueing and scheduling of the local queue at least for the message cache address after the enqueued information message is enqueued.
[0131] In an embodiment of the present invention, a first data packet transmitted between cloud services is cached to obtain an enqueue information packet for the first data packet. The enqueue information packet includes at least the cache address of the first data packet, first scheduling granularity information, and second scheduling granularity information. Based on the cache address of the packet after the enqueue information packet is enqueued, the second data packet corresponding to the dequeue information packet is obtained. Queue management is performed on the cached packet information of the data packets, avoiding direct management of the data packets. In addition, the first scheduling granularity is larger than the second scheduling granularity. Based on the first scheduling granularity information and the second scheduling granularity information, enqueue and dequeue operations of the information packets are performed from the queue management linked list that manages the cache addresses of the packets, respectively. Since the queue management linked list consists of a local queue linked list and a virtual queue linked list whose sub-chains are attached to the local queue linked list, the sub-chains of the local queue linked list are formed by local queues at the first scheduling granularity, and the sub-chains of the virtual queue linked list are formed by virtual queues at the second scheduling granularity. This reduces queue management overhead, improves queue management efficiency, and enables flexible queue scheduling at a smaller granularity.
[0132] In other examples, the first scheduling granularity is based on the network interface card (NIC) device's configuration of at least one of the physical transmission port, service transmission port, and transmission quality of service for data packets, while the second scheduling granularity is based on the NIC device's configuration of the service transmission atomic granularity for data packets.
[0133] In other examples, the scheduling unit is specifically used to: determine, based on the first scheduling granularity and the second scheduling granularity, from the queue management linked list, a local queue to be dequeued and a virtual queue to be dequeued, as queues to be dequeued; and schedule the second data packet based on the first scheduling granularity and the second scheduling granularity.
[0134] In other examples, the determining unit is specifically used to: determine, from the queue management linked list, the local queue corresponding to the first scheduling granularity as the local queue to be dequeued, and determine the head virtual queue of the local queue to be dequeued as the virtual queue to be dequeued.
[0135] In other examples, the scheduling unit is specifically used to: query the flow control status indicator table based on the virtual queue to be dequeued; if the flow control status indicator table indicates that the virtual queue to be dequeued is not in a flow control state, then initiate the aggregation scheduling of the second data packet; if the flow control status indicator table indicates that the virtual queue to be dequeued is in a flow control state, then stop the scheduling of the second data packet and perform the aggregation scheduling queue switch.
[0136] In other examples, the network interface card (NIC) device further includes a dequeue unit: determining linked list pointer information before the local queue and the virtual queue to be dequeued; updating the linked list pointer information to indicate the queue pointer state after the local queue and the virtual queue to be dequeued; determining linked list statistics information before the local queue and the virtual queue to be dequeued; and updating the linked list statistics information to indicate the queue statistics state after the local queue and the virtual queue to be dequeued.
[0137] In other examples, the enqueue unit is specifically used to: determine the linked list pointer information before the local queue to be enqueued and the virtual queue to be enqueued; and update the linked list pointer information to indicate the queue pointer state after the local queue to be enqueued and the virtual queue to be enqueued.
[0138] In other examples, the enqueue unit is also used to: determine the linked list statistics before the local queue to be enqueued and the virtual queue to be enqueued; and update the linked list statistics to indicate the queue statistics status after the local queue to be enqueued and the virtual queue to be enqueued.
[0139] In other examples, the determining unit is specifically used to: if the queue status indicator of the original fine-grained queue number of the enqueue message is not assigned, determine an idle virtual queue in the virtual queue resource pool as the virtual queue to be enqueued, and assign the queue status indicator of the original fine-grained queue number of the enqueue message.
[0140] In other examples, the determining unit is also used to: if the queue status indication of the original fine-grained queue number of the enqueue information message has been assigned, determine the corresponding virtual queue by the original fine-grained queue number as the virtual queue to be enqueued.
[0141] In other examples, the determining unit is also used to: if the queue status of the virtual queue of the cached information message indicates an empty state, release the virtual queue back to the virtual queue resource pool, and at the same time clear the queue status of the original fine-grained queue number of the enqueued information message.
[0142] The following will combine Figure 8 The present invention describes a schematic diagram of a network interface card (NIC) device according to another embodiment. The specific embodiments of the present invention do not limit the specific implementation of the NIC device.
[0143] like Figure 8 As shown, the network card device may include: a processor 802 for executing program 810, a communications interface 804, a memory 806, and a communications bus 808.
[0144] The processor, communication interface, and memory communicate with each other via a communication bus.
[0145] The communication interface is used to communicate with other network interface cards (NICs) or servers.
[0146] The processor is used to execute programs, specifically the relevant steps in the above method embodiments.
[0147] Specifically, the program may include program code, which includes computer operation instructions.
[0148] The processor may be a CPU, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in a smart device may be of the same type, such as one or more CPUs; or they may be of different types, such as one or more CPUs and one or more ASICs.
[0149] Memory is used to store programs. Memory may include high-speed RAM, and may also include non-volatile memory, such as at least one disk drive.
[0150] The program may include multiple computer instructions, and specifically, the program can use these multiple computer instructions to cause the processor to execute any of the embodiments described in the foregoing method embodiments. Figure 2 The corresponding operations for queue management and scheduling methods.
[0151] The specific implementation of each step in the program can be found in the corresponding descriptions of the steps and units in the above method embodiments, which have corresponding beneficial effects, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.
[0152] This invention also provides a computer storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in any of the foregoing method embodiments. The computer storage medium includes, but is not limited to, compact disc read-only memory (CD-ROM), random access memory (RAM), floppy disk, hard disk, or magneto-optical disk.
[0153] This invention also provides a computer program product, including computer instructions that instruct a computing device to perform an operation corresponding to any of the methods in the above-described plurality of method embodiments.
[0154] Furthermore, it should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used for training the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with relevant regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0155] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of the present invention can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present invention.
[0156] The methods described above according to embodiments of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium and subsequently stored in a local recording medium, downloaded via a network. Thus, the methods described herein can be stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an Application Specific Integrated Circuit (ASIC) or a Field Programmable Gate Array (FPGA)). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., random access memory (RAM), read-only memory (ROM), flash memory, etc.) capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the methods shown herein.
[0157] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the embodiments of the present invention.
[0158] The above embodiments are only used to illustrate the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of the present invention, and the patent protection scope of the embodiments of the present invention should be defined by the claims.
Claims
1. A queue management and scheduling method, applied to network interface card (NIC) devices for inter-service business interaction in cloud services, the method comprising: The first data packet of the cloud service inter-service business interaction is cached to obtain the enqueue information packet of the first data packet. The enqueue information packet includes at least the cache address of the first data packet, the first scheduling granularity information and the second scheduling granularity information, wherein the first scheduling granularity is greater than the second scheduling granularity. Based on the first scheduling granularity information and the second scheduling granularity information respectively, the local queue to be enqueued and the virtual queue to be enqueued that match the enqueuing node of the enqueuing information message are determined from the queue management linked list of the management message cache address. The queue management linked list consists of a local queue linked list and a virtual queue linked list whose sub-chains are attached to the local queue linked list. The sub-chains of the local queue linked list are formed by the local queues of the first scheduling granularity, and the sub-chains of the virtual queue linked list are formed by the virtual queues of the second scheduling granularity. Based on the local queue to be enqueued and the virtual queue to be enqueued, the enqueue operation is performed on the enqueue information message; At least for the message cache address after the enqueued information message is enqueued, the local queue dequeue and scheduling are performed.
2. The method according to claim 1, wherein, The first scheduling granularity is based on the network interface card (NIC) device's configuration of at least one of the physical transmission port, service transmission port, and transmission quality of service for data packets, while the second scheduling granularity is based on the NIC device's configuration of the service transmission atomic granularity for data packets.
3. The method according to claim 1, wherein, The step of performing local queue dequeueing and scheduling on at least the message cache address after the enqueued information message is enqueued includes: Based on the first scheduling granularity and the second scheduling granularity respectively, the local queue to be dequeued and the virtual queue to be dequeued are determined from the queue management linked list and used as the queues to be dequeued. Based on the first scheduling granularity and the second scheduling granularity, schedule the second data packet corresponding to the dequeue information message.
4. The method according to claim 3, wherein, The step of determining the local queue and the virtual queue to be dequeued from the queue management list based on the first scheduling granularity and the second scheduling granularity, respectively, as the queues to be dequeued, includes: From the queue management linked list, the local queue corresponding to the first scheduling granularity is determined as the local queue to be dequeued, and the head virtual queue of the local queue to be dequeued is determined as the virtual queue to be dequeued.
5. The method according to claim 3, wherein, The scheduling of the second data packet based on the first scheduling granularity and the second scheduling granularity includes: Based on the virtual queue to be dequeued, query the flow control status indicator table; If the flow control status indicator table indicates that the virtual queue to be dequeued is not in flow control status, then the aggregation scheduling of the second data packet is initiated; If the flow control status indicator table indicates that the virtual queue to be dequeued is in a flow control state, then the scheduling of the second data packet is stopped, and the aggregate scheduling queue switch is performed.
6. The method according to claim 3, wherein, The method further includes: Determine the linked list pointer information of the local queue to be dequeued and the virtual queue to be dequeued before dequeueing; Update the linked list pointer information to indicate the state of the local queue to be dequeued and the queue pointer after the local queue to be dequeued. Determine the linked list statistics of the local queue to be dequeued and the virtual queue to be dequeued before dequeueing; The linked list statistics are updated to indicate the status of the local queue to be dequeued and the queue statistics after the local queue to be dequeued.
7. The method according to claim 1, wherein, The step of performing an enqueue operation on the enqueue information message based on the local queue to be enqueued and the virtual queue to be enqueued includes: Determine the linked list pointer information before enqueuing the local queue to be enqueued and the virtual queue to be enqueued; Update the linked list pointer information to indicate the state of the local queue to be enqueued and the queue pointer after the local queue to be enqueued.
8. The method according to claim 7, wherein, The step of performing an enqueue operation on the enqueue information message based on the local queue to be enqueued and the virtual queue to be enqueued further includes: Determine the linked list statistics information before the local queue and the virtual queue to be enqueued; The linked list statistics are updated to indicate the status of the local queue to be enqueued and the queue statistics after the local queue to be enqueued.
9. The method according to claim 1, wherein, The process of determining the local queue and virtual queue to be enqueued that match the enqueue node of the enqueue information message includes: If the queue status indicator of the original fine-grained queue number of the enqueue information message is not assigned, then an idle virtual queue in the virtual queue resource pool is determined as the virtual queue to be enqueued, and the queue status indicator of the original fine-grained queue number of the enqueue information message is assigned.
10. The method according to claim 9, wherein, The step of determining the local queue and virtual queue to be enqueued that match the enqueue node of the enqueue information message further includes: If the queue status indicator of the original fine-grained queue number of the enqueue information message has been assigned, then the corresponding virtual queue is determined by the original fine-grained queue number and used as the virtual queue to be enqueued.
11. The method according to claim 9, wherein, The method further includes: If the queue status of the virtual queue of the enqueued information message indicates an empty state, the virtual queue is released back into the virtual queue resource pool, and the queue status of the original fine-grained queue number of the enqueued information message is cleared.
12. A network interface card (NIC) device used for business interaction between cloud services, comprising: The caching unit caches the first data packet of the business interaction between the cloud services and obtains the enqueue information packet of the first data packet. The enqueue information packet includes at least the cache address of the first data packet, the first scheduling granularity information and the second scheduling granularity information, wherein the first scheduling granularity is greater than the second scheduling granularity. The determining unit, based on the first scheduling granularity information and the second scheduling granularity information respectively, determines the local queue and the virtual queue to be enqueued that match the enqueuing node of the enqueuing information message from the queue management linked list of the management message cache address. The queue management linked list consists of a local queue linked list and a virtual queue linked list whose sub-chains are attached to the local queue linked list. The sub-chains of the local queue linked list are formed by the local queues of the first scheduling granularity, and the sub-chains of the virtual queue linked list are formed by the virtual queues of the second scheduling granularity. The enqueue unit performs an enqueue operation on the enqueue information message based on the local queue to be enqueued and the virtual queue to be enqueued; The scheduling unit performs dequeueing and scheduling of the local queue at least for the message cache address after the enqueued information message is enqueued.
13. A network interface card (NIC) device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform an operation corresponding to the method according to any one of claims 1-11.
14. A computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the method according to any one of claims 1-11.