Queue management method, queue management architecture, network card chip and network card device

CN122985672APending Publication Date: 2026-10-27WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611055216.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]然而,上述串行遍历式队列管理处理方式存在执行效率低的问题

Benefits of technology

[0037]上述队列管理方法、队列管理架构、网卡芯片和网卡设备,通过功能单元标识检索映射关系批量定位对应待管理队列,依托队列状态下发统一队列管理指示,无需逐个遍历查询全部队列,可快速完成同一功能单元下多离散队列的集中管控,大幅简化多队列调度逻辑,提升批量队列管理的处理效率,降低队列查询与控制过程中的资源开销。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122985672A_ABST
    Figure CN122985672A_ABST
Patent Text Reader

Abstract

The application relates to a queue management method, a queue management architecture, a network card chip and a network card device, and is applied to a queue management arbitrator. The method comprises the following steps: responding to a queue management request triggered by a target function control module; the queue management request comprises a function unit identifier; at least one to-be-managed queue corresponding to the function unit identifier is determined from a queue mapping relationship storage library according to the function unit identifier; the queue mapping relationship storage library stores mapping relationships between a plurality of function units and subordinate queues; queue management instructions are sent to a queue management controller according to queue states of the at least one to-be-managed queue, so that the queue management controller sends management instructions of the at least one to-be-managed queue to a downstream business module. The method can improve the queue batch management efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network device queue management technology, and in particular to a queue management method, queue management architecture, network interface card (NIC) chip, and network interface card (NIC) device. Background Technology

[0002] With the rapid development of cloud computing, virtualization, and high-speed network technologies, high-speed network hardware devices such as network adapters, smart network interface cards (NICs), data processing units (DPUs), and remote direct memory access (RDMA) high-speed interconnect devices have become widely adopted. Currently, the integrated deployment scheme of multi-function virtualization architecture and discrete queues can achieve secure resource isolation and flexible scheduling among multiple tenants and services, and has become the mainstream deployment mode for high-speed network hardware devices.

[0003] Because services have a complete lifecycle and hardware queue resources have an upper limit, resources need to be allocated and reclaimed on demand through queue online / offline management. Furthermore, as service scale continues to expand, the number of queues carried by high-speed network hardware increases significantly. Batch management of queues under each functional unit has become a high-frequency operation during service startup and shutdown. In related technologies, the process of managing large numbers of queues under each functional unit generally adopts a serial traversal approach. That is, each functional unit is traversed sequentially according to its order, and then all queues under each functional unit are managed serially. After the management of a single queue is completed, the corresponding hardware resources are released, until all queues under all functional units have been processed.

[0004] However, the above-mentioned serial traversal queue management method suffers from low execution efficiency. Summary of the Invention

[0005] Therefore, it is necessary to provide a queue management method, queue management architecture, network interface card chip, and network interface card device that can improve the efficiency of batch queue management in response to the above-mentioned technical problems.

[0006] Firstly, this application provides a queue management method applied to a queue management arbitrator, comprising:

[0007] Responding to a queue management request triggered by the target function control module; the queue management request includes a function unit identifier;

[0008] Based on the functional unit identifier, at least one queue to be managed corresponding to the functional unit identifier is determined from the queue mapping relationship repository; the queue mapping relationship repository stores multiple mapping relationships between functional units and their subordinate queues;

[0009] Based on the queue status of at least one queue to be managed, a queue management instruction is sent to the queue management controller, so that the queue management controller sends management instructions for at least one queue to be managed to the downstream business modules.

[0010] In one embodiment, the queue management request is sent by the target function control module after obtaining the operation permission to initiate the queue management request; before responding to the queue management request triggered by the target function control module, the method further includes:

[0011] Receive permission requests from at least one functional control module;

[0012] Based on the priority of the functional control modules, arbitrate one functional control module from at least one functional control module to serve as the target functional control module, and grant the target functional control module the operation permission to initiate queue management requests.

[0013] In one embodiment, the method further includes, before sending a queue management instruction to the queue management controller:

[0014] Obtain the queue identifier of at least one queue to be managed;

[0015] Based on the queue identifier of at least one queue to be managed, retrieve the queue status of at least one queue to be managed from the queue status repository; the queue status repository stores the real-time status of all queues deployed under all functional units.

[0016] In one embodiment, the queue state includes an active state and an idle state, and sending a queue management instruction to the queue management controller based on the queue state of at least one queue to be managed includes:

[0017] If the queue to be managed is in an active state and the queue management request is a queue closure request, then an instruction to close the queue to be managed is sent to the queue management controller.

[0018] If the queue to be managed is in an idle state and the queue management request is a queue close request, then a queue close response for the queue to be managed will be generated.

[0019] In one embodiment, when there are multiple active queues to be managed, sending an instruction to the queue management controller to close the queues to be managed includes:

[0020] Based on the priority of the active queues to be managed, the target queue to be managed is arbitrated sequentially from multiple active queues to be managed, and a closing instruction for the target queue to be managed is sent to the queue management controller in sequence.

[0021] In one embodiment, the method further includes:

[0022] Receive queue management responses sent by downstream business modules via the queue management controller, and update the queue status of the corresponding queue to be managed;

[0023] After receiving queue management responses from all queues to be managed, a management completion signal is generated and sent to the upstream business module.

[0024] Secondly, this application also provides a queue management architecture, including:

[0025] At least one functional control module is used to send a queue management request to the queue management arbitrator; the queue management request includes a functional unit identifier;

[0026] The queue management arbitrator is used to receive a target queue management request sent by a target functional module in at least one functional control module, and determine at least one queue to be managed corresponding to the target functional unit identifier from the queue mapping relationship repository according to the target functional unit identifier in the target queue management request, and send a queue management instruction to the queue management controller according to the queue status of the at least one queue to be managed; the queue mapping relationship repository stores multiple mapping relationships between functional units and subordinate queues; the target functional module is any one of the at least one functional control module;

[0027] The queue management controller is used to send management instructions for at least one queue to be managed to downstream business modules.

[0028] In one embodiment, the above queue management architecture further includes: a queue control module;

[0029] At least one functional control module is also used to send a first permission request to the queue management arbitrator; each functional control module is responsible for processing a queue management request initiated by a host.

[0030] The queue control module is used to send queue management requests and second permission request requests to the queue management arbitrator.

[0031] The queue management arbitrator is used to arbitrate a control module from at least one functional control module and a queue control module, based on at least one first permission request and a second permission request, as well as the priorities of at least one functional control module and a queue control module, to serve as the target control module, and to grant the target control module the operation permission to initiate queue management requests.

[0032] In one embodiment, the above queue management architecture further includes: a queue status repository and an index result repository, which are respectively connected to the queue management arbitrator;

[0033] A queue status repository is used to store the real-time status of all queues deployed under all functional units;

[0034] An index result repository for storing queue identifiers for at least one queue to be managed.

[0035] Thirdly, this application also provides a network interface card (NIC) chip, including the queue management architecture described in the second aspect above.

[0036] Fourthly, this application also provides a network interface card (NIC) device, including the NIC chip described in the third aspect above.

[0037] The aforementioned queue management method, queue management architecture, network interface card (NIC) chip, and NIC device can locate corresponding queues to be managed in batches by retrieving mapping relationships through functional unit identifiers. Relying on the queue status to issue unified queue management instructions, it is not necessary to traverse and query all queues one by one. It can quickly complete the centralized management and control of multiple discrete queues under the same functional unit, greatly simplify the multi-queue scheduling logic, improve the processing efficiency of batch queue management, and reduce the resource overhead in the queue query and control process. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a diagram illustrating the application environment of a queue management method in one embodiment;

[0040] Figure 2 This is a flowchart illustrating a queue management method in one embodiment;

[0041] Figure 3 This is a flowchart illustrating the queue management method in another embodiment;

[0042] Figure 4 This is a flowchart illustrating the queue management method in another embodiment;

[0043] Figure 5 This is a flowchart illustrating the queue management method in another embodiment;

[0044] Figure 6 This is a flowchart illustrating the queue management method in another embodiment;

[0045] Figure 7 This is a flowchart illustrating the queue management method in another embodiment;

[0046] Figure 8 This is a structural block diagram of the queue management architecture in one embodiment;

[0047] Figure 9 Here is a block diagram of the queue management architecture in another embodiment;

[0048] Figure 10 Here is a block diagram of the queue management architecture in another embodiment;

[0049] Figure 11 This is a block diagram of the queue management architecture in another embodiment. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0051] With the rapid development of cloud computing, virtualization, and high-speed network technologies, high-speed network hardware devices such as network adapters, smart network interface cards (NICs), data processing units (DPUs), and remote direct memory access (RDMA) high-speed interconnect devices have become widely adopted. Currently, the integrated deployment scheme of multi-function virtualization architecture and discrete queues can achieve secure resource isolation and flexible scheduling among multiple tenants and services, and has become the mainstream deployment mode for high-speed network hardware devices.

[0052] Because services have a complete lifecycle and hardware queue resources have an upper limit, resources need to be allocated and reclaimed on demand through queue online / offline management. Furthermore, as service scale continues to expand, the number of queues carried by high-speed network hardware increases significantly. Batch management of queues under each functional unit has become a high-frequency operation during service startup and shutdown. In related technologies, the process of managing large numbers of queues under each functional unit generally adopts a serial traversal approach. That is, each functional unit is traversed sequentially according to its order, and then all queues under each functional unit are managed serially. After the management of a single queue is completed, the corresponding hardware resources are released, until all queues under all functional units have been processed.

[0053] However, the aforementioned serial traversal queue management method suffers from low execution efficiency. Therefore, this application provides a queue management method aimed at solving the aforementioned problems.

[0054] Having described the background technology of the queue management method above, the application environment of the queue management method will be introduced below. The queue management method provided in this application embodiment can be applied to, for example... Figure 1 The queue management architecture 01 shown is located in the network interface card (NIC) chip and includes a queue management arbitrator 10, at least one functional control module 11, and a queue management controller 12. The queue management method provided in this embodiment is specifically applied to the queue management arbitrator 10. The queue management arbitrator 10 has the function of responding to queue management requests sent by at least one functional control module 11, arbitrating at least one queue to be managed from a large number of queues according to the queue management request, and sending queue management instructions to at least one queue to be managed.

[0055] The queue management method provided in this application will be described in detail below with reference to specific embodiments.

[0056] In one exemplary embodiment, such as Figure 2 As shown, a queue management method is provided, applied to a queue management arbitrator, so that this method can be applied to... Figure 1 Taking queue management in [the context of the game] as an example, the explanation includes:

[0057] S201, responding to a queue management request triggered by the target function control module; the queue management request includes a function unit identifier.

[0058] The target function control module can be any one of multiple function control modules, and each function control module can send a queue management request to the queue management arbitrator. It should be noted that the target function control module can be a function control module determined sequentially from the multiple function control modules according to their order; alternatively, the target function control module can be a function control module arbitrated by the queue management arbitrator from the multiple function control modules.

[0059] Among them, queue management request refers to the request triggered by the function control module to manage the subordinate queues of the function unit. Queue management request can be a batch queue closing request or a batch queue opening request.

[0060] For example, when the function control module is a function level reset (FLR) control module, the queue management request can be a batch queue close request, which is used to close queues under the function unit in batches.

[0061] In this embodiment, when queue management is required, the upstream task module (e.g., the FLR request interaction module) will send a queue management request to the function control module. The function control module will then send the queue management request to the queue management arbitrator, so that the queue management arbitrator can determine the queue to be managed based on the functional unit identifier in the queue management request, and then manage the queue to be managed.

[0062] Optionally, if there is more than one functional control module, the queue management arbitrator can arbitrate the target functional control module from among the multiple functional control modules, and then respond to the queue management request triggered by the target functional control module.

[0063] S202. Based on the functional unit identifier, determine at least one queue to be managed corresponding to the functional unit identifier from the queue mapping relationship repository; the queue mapping relationship repository stores multiple mapping relationships between functional units and their subordinate queues.

[0064] The mapping relationship between multiple functional units and their subordinate queues is shown in Table 1 below. The mapping relationship includes the mapping relationship between each queue and the functional unit type and functional unit identifier.

[0065] Table 1. Mapping relationship between multiple functional units and subordinate queues

[0066]

[0067] In this embodiment, after receiving the queue management request triggered by the target function control module, at least one queue to be managed can be queried from the queue mapping relationship repository based on the function unit identifier in the queue management request.

[0068] Optionally, the queue management request may also include multiple functional unit identifiers. In this case, the queue management arbitrator will first arbitrate a target functional unit identifier from these multiple functional unit identifiers. Then, based on the target functional unit identifier, it will determine at least one first queue to be managed corresponding to the target functional unit identifier from the queue mapping relationship repository. Further, it will arbitrate again from the other functional unit identifiers besides the target functional unit identifier to obtain a new target functional unit identifier. Based on the new target functional unit identifier, it will determine at least one second queue to be managed corresponding to the new target functional unit identifier from the queue mapping relationship repository, and so on, until the other functional unit identifiers are empty. Finally, it will obtain multiple queues to be managed corresponding to each functional unit identifier.

[0069] S203. Based on the queue status of at least one queue to be managed, send a queue management instruction to the queue management controller, so that the queue management controller sends management instructions for at least one queue to be managed to the downstream business modules.

[0070] The queue status includes active, idle, and empty states. The active state indicates that there are pending requests in the queue, meaning that the hardware is performing business processes such as memory access, packet assembly, message transmission, or retransmission, and hardware resources are continuously occupied. The idle state indicates that there are no pending requests in the queue, and no hardware processing resources are occupied. Various configuration and resource reclamation operations are supported. The empty state is a transitional state. The host stops issuing new requests, and the hardware only processes the remaining requests in the queue memory. After all existing messages have been processed, the queue switches to the idle state, which facilitates the smooth termination of business and the reclamation of queue resources.

[0071] In this embodiment, after at least one queue to be managed has been determined, if the queue status of the queue to be managed is active and the queue management request is a queue closure request, an instruction to close the queue to be managed is sent to the queue management controller, so that the queue management controller sends the queue closure instruction of the queue to be managed to the downstream business module.

[0072] Optionally, if the queue status of the queue to be managed is idle and the queue management request is a queue close request, that is, there are no pending requests in the queue, then a queue close response for the queue to be managed can be generated directly.

[0073] Optionally, if the queue status of the queue to be managed is empty and the queue management request is a queue opening request, an instruction to open the queue to be managed is sent to the queue management controller, so that the queue management controller sends the queue opening instruction of the queue to be managed to the downstream business module.

[0074] In this embodiment, the corresponding queues to be managed are located in batches by retrieving the mapping relationship through the functional unit identifier. Based on the queue status, a unified queue management instruction is issued. It is not necessary to traverse and query all queues one by one. The centralized management and control of multiple discrete queues under the same functional unit can be completed quickly, which greatly simplifies the multi-queue scheduling logic, improves the processing efficiency of batch queue management, and reduces the resource overhead in the queue query and control process.

[0075] In one exemplary embodiment, in the above Figure 2 Based on the illustrated embodiment, the queue management request is sent by the target function control module after obtaining the operation permission to initiate the queue management request; the steps prior to responding to the queue management request triggered by the target function control module can also be described, see [link to documentation]. Figure 3 The above methods also include:

[0076] S301, Receive permission request from at least one functional control module.

[0077] The permission request is used to request the queue management arbitrator to grant the function control module the permission to initiate queue management requests. Only after the queue management arbitrator grants the function control module the permission to initiate queue management requests can the function control module send queue management requests to the queue management arbitrator.

[0078] In this embodiment, before responding to the queue management request triggered by the target function control module, at least one function control module may first send a permission request to the queue management arbitrator so that the queue management arbitrator can arbitrate the target function control module from at least one function control module.

[0079] Optionally, the function control module supports FLR at the physical function (PF) and virtual function (VF) levels. When the function control module executes a PF-level FLR, it automatically performs FLR operations on the queues of all associated VFs.

[0080] Optionally, the function control module supports FLR for single or multiple function units and allows mixed reset of PF and VF to meet batch shutdown requirements of different granularities.

[0081] S302. Based on the priority of the functional control modules, arbitrate one functional control module from at least one functional control module as the target functional control module, and grant the target functional control module the operation permission to initiate queue management requests.

[0082] In this embodiment, after the queue management arbitrator receives a permission request from at least one functional control module, it arbitrates one functional control module from the at least one functional control module according to the priority of each functional control module, and grants the target functional control module the operation permission to initiate queue management requests.

[0083] In this embodiment, permission arbitration is performed based on the priority of each functional control module, and only a single module is granted permission to initiate queue management requests. This avoids conflicts caused by multiple modules issuing queue management instructions at the same time, ensures the orderly execution of queue control logic in multi-module concurrent scenarios, and improves the stability and reliability of the queue management process.

[0084] In one exemplary embodiment, in the above Figure 2 Based on the illustrated embodiment, the steps prior to sending queue management instructions to the queue management controller can also be described; see [link to relevant documentation]. Figure 4 The above methods also include:

[0085] S401. Obtain the queue identifier of at least one queue to be managed.

[0086] In this embodiment, after determining at least one queue to be managed, the queue identifier of at least one queue to be managed can be obtained.

[0087] S402. Based on the queue identifier of at least one queue to be managed, obtain the queue status of at least one queue to be managed from the queue status repository; the queue status repository stores the real-time status of all queues deployed under all functional units.

[0088] In this embodiment, after obtaining the queue identifier of at least one queue to be managed, the queue status of at least one queue to be managed can be obtained from the queue status repository based on the queue identifier of at least one queue to be managed, so as to send a queue management instruction to the queue management controller based on the queue status of at least one queue to be managed, thereby managing the queue.

[0089] In this embodiment, the real-time status of the corresponding queue is read directly from the repository based on the queue identifier. The repository retains all queue status data in a unified manner, which can quickly and accurately retrieve the status information of the target queue, eliminating the need for a full queue traversal retrieval process, shortening the status query time, and improving the real-time performance and query efficiency of multi-queue status reading.

[0090] In an exemplary embodiment, the queue states described above include: an active state and an idle state. Figure 2 Based on the embodiments described above, the process of sending a queue management instruction to the queue management controller according to the queue status of at least one queue to be managed can also be described, see [link to relevant documentation]. Figure 5 That is, the above-mentioned S203 includes:

[0091] S501. If the queue status of the queue to be managed is active and the queue management request is a queue closure request, then send an instruction to close the queue to be managed to the queue management controller.

[0092] In this embodiment, when the queue status of the queue to be managed is active and the queue management request is a queue closure request, an instruction to close the queue to be managed is sent to the queue management controller.

[0093] Optionally, this embodiment also considers the method of sending an instruction to close the queues to the queue management controller when there are multiple queues to be managed. That is, when there are multiple active queues to be managed, the above-mentioned S501 includes:

[0094] Based on the priority of the active queues to be managed, the target queue to be managed is arbitrated sequentially from multiple active queues to be managed, and a closing instruction for the target queue to be managed is sent to the queue management controller in sequence.

[0095] In this embodiment, when there are multiple active queues to be managed, a target queue to be managed can be arbitrated from the multiple active queues to be managed according to their priority, and a closing instruction for the target queue to be managed is sent to the queue management controller. After the target queue to be managed is closed, a new target queue to be managed is arbitrated from the other queues to be managed, and a new closing instruction for the target queue to be managed is sent to the queue management controller, and so on, until the other queues to be managed are empty. At this point, the closing instructions to the multiple active queues to be managed are completed.

[0096] In this embodiment, multiple active queues awaiting closure are arbitrated sequentially according to priority and closure commands are issued to achieve orderly batch shutdown of multiple discrete queues. This avoids downstream business command congestion and logical disorder caused by simultaneous closure of multiple queues, ensures the smooth execution of the queue closure process, and improves the orderliness of batch queue management and system operation stability.

[0097] S502. If the queue status of the queue to be managed is idle and the queue management request is a queue close request, then generate a queue close response for the queue to be managed.

[0098] In this embodiment, if the queue status of the queue to be managed is idle, it means that there are no pending requests in the queue to be managed. If the queue management request is still a queue close request at this time, then the queue close response of the queue to be managed is generated directly.

[0099] In this embodiment, queue closure requests are processed differently by distinguishing between the queue's active state and its idle state. Closing control commands are only issued to active queues that are running, while closure responses are directly generated for idle queues without the need to issue additional control signals. This reduces the transmission of invalid commands, lowers hardware interaction overhead, simplifies the queue management process, and improves overall processing efficiency.

[0100] In one exemplary embodiment, in the above Figure 2 Based on the illustrated embodiment, after sending a queue management instruction to the queue management controller, see [link to example]. Figure 6 The above methods also include:

[0101] S601. Receive the queue management response sent by the downstream business module through the queue management controller, and update the queue status of the corresponding queue to be managed.

[0102] In this embodiment, after sending a queue management instruction to the queue management controller, the queue management controller sends at least one management instruction for a queue to be managed to the downstream business module. After the downstream business module implements the management of the queue to be managed, it generates a queue management response for the queue to be managed and sends the queue management response to the queue management controller. Then, the queue management controller sends the queue management response to the queue management arbitrator so that the queue management arbitrator receives the queue management response of the queue to be managed and updates the queue status of the corresponding queue to be managed.

[0103] Optionally, after sending a queue close instruction to the queue management controller, the queue management controller sends at least one queue close instruction for a queue to be managed to the downstream business module. After closing the queue to be managed, the downstream business module generates a queue close response for the queue to be managed and sends the queue close response to the queue management controller. Then, the queue management controller sends the queue close response to the queue management arbitrator so that the queue management arbitrator receives the queue close response and updates the queue status of the queue to be managed to empty.

[0104] Optionally, after sending a queue open instruction to the queue management controller, the queue management controller sends at least one queue open instruction for a queue to be managed to the downstream business module. After opening the queue to be managed, the downstream business module generates a queue open response for the queue to be managed and sends the queue open response to the queue management controller. Then, the queue management controller sends the queue open response to the queue management arbitrator so that the queue management arbitrator receives the queue open response and updates the queue status of the queue to be managed to the active state.

[0105] S602. After receiving queue management responses from all queues to be managed, generate a management completion signal and send the management completion signal to the upstream business module.

[0106] In this embodiment, after all queues to be managed have completed queue management, the downstream business module sends a queue management response to the queue management arbitrator via the queue management controller. After the queue management arbitrator receives the queue management responses from all queues to be managed, it generates a management completion signal and sends the management completion signal to the upstream business module.

[0107] Optionally, when the queue management request is a batch queue closure request, and when all queues to be managed have completed the queue closure, the downstream business module sends a queue closure response to the queue management arbitrator via the queue management controller, and after the queue management arbitrator receives the queue closure responses from all queues to be managed, it generates a closure completion signal and sends the closure completion signal to the upstream business module.

[0108] Optionally, when the queue management request is a batch queue opening request, and when all queues to be managed have been opened, the downstream business module sends a queue opening response to the queue management arbitrator via the queue management controller, and after the queue management arbitrator receives the queue opening responses of all queues to be managed, it generates an opening completion signal and sends the opening completion signal to the upstream business module.

[0109] In this embodiment, feedback from downstream is received and the real-time status of the queue is updated synchronously. After all queues have been processed, a management completion signal is pushed upstream in a unified manner to achieve closed-loop control of the entire process status. This allows the upstream to know the execution results of batch queue operations in a timely manner, ensures the complete synchronization of upstream and downstream interaction logic, and improves the controllability of the queue management process.

[0110] In one exemplary embodiment, see Figure 7 It also provides a queue management method for use in a queue management arbitrator, including:

[0111] T1. Receive permission request from at least one functional control module;

[0112] T2. Based on the priority of the functional control modules, arbitrate one functional control module from at least one functional control module as the target functional control module, and grant the target functional control module the operation permission to initiate queue management requests.

[0113] T3. Responds to the queue management request triggered by the target function control module; the queue management request includes the functional unit identifier;

[0114] T4. Based on the functional unit identifier, determine at least one queue to be managed corresponding to the functional unit identifier from the queue mapping relationship repository; the queue mapping relationship repository stores multiple mapping relationships between functional units and their subordinate queues.

[0115] T5. Obtain the queue identifier of at least one queue to be managed;

[0116] T6. Based on the queue identifier of at least one queue to be managed, retrieve the queue status of at least one queue to be managed from the queue status repository; the queue status repository stores the real-time status of all queues deployed under all functional units;

[0117] T7. If the queue status of the queue to be managed is active and the queue management request is a queue close request, then send an instruction to close the queue to be managed to the queue management controller.

[0118] T8. If the queue status of the queue to be managed is idle and the queue management request is a queue close request, then generate a queue close response for the queue to be managed.

[0119] T9. Receive the queue management response sent by the downstream business module through the queue management controller, and update the queue status of the corresponding queue to be managed.

[0120] T10. After receiving queue management responses from all queues to be managed, generate a management completion signal and send the management completion signal to the upstream business module.

[0121] It should be noted that the descriptions of T1-T10 above can be found in the relevant descriptions in the above embodiments, and their effects are similar, so they will not be repeated here.

[0122] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0123] Based on the same inventive concept, this application also provides a queue management architecture for implementing the queue management method described above. The solution provided by this architecture is similar to the implementation scheme described in the above method; therefore, the specific limitations of one or more queue management architecture embodiments provided below can be found in the limitations of the queue management method described above, and will not be repeated here.

[0124] In one exemplary embodiment, such as Figure 8 As shown, a queue management architecture is provided, including: at least one functional control module 11, a queue management arbitrator 10, and a queue management controller 12, wherein:

[0125] At least one functional control module 11 is used to send a queue management request to the queue management arbitrator; the queue management request includes a functional unit identifier.

[0126] The queue management arbitrator 10 is used to receive a target queue management request sent by a target functional module in at least one functional control module, and determine at least one queue to be managed corresponding to the target functional unit identifier from the queue mapping relationship repository according to the target functional unit identifier in the target queue management request, and send a queue management instruction to the queue management controller according to the queue status of the at least one queue to be managed; the queue mapping relationship repository stores multiple mapping relationships between functional units and subordinate queues; the target functional module is any one of the at least one functional control module.

[0127] The queue management controller 12 is used to send management instructions for at least one queue to be managed to downstream business modules.

[0128] It should be noted that the specific implementation steps of at least one functional control module, queue management arbitrator, and queue management controller in the above queue management architecture have been described in detail in the various embodiments of the above queue management method, and will not be repeated here.

[0129] In one exemplary embodiment, see Figure 9 The above queue management architecture also includes: queue control module 13;

[0130] At least one of the above-mentioned functional control modules 11 is also used to send a first permission request to the queue management arbitrator; each functional control module is responsible for processing a queue management request initiated by a host.

[0131] The aforementioned queue control module 13 is used to send queue management requests and second permission application requests to the queue management arbitrator;

[0132] The queue management arbitrator 10 is used to arbitrate a control module from at least one functional control module and queue control module as the target control module based on at least one first permission request and a second permission request, as well as the priority of at least one functional control module and queue control module, and to grant the target control module the operation permission to initiate queue management requests.

[0133] The queue control module 13 is used to receive single queue management requests from upstream business modules and send the single queue management requests to the queue management arbitrator. The queue control module is also used to send a second permission request to the queue management arbitrator, which is used to request the queue control module 13 to initiate the single queue management request.

[0134] At least one functional control module 11 is also used to send a first permission request to the queue management arbitrator. The first permission request is used to request the operation permission for each functional control module 11 to initiate a single queue management request.

[0135] In this embodiment, the queue management arbitrator is used to, after receiving at least one first permission request sent by at least one functional control module and a second permission request sent by the queue control module, arbitrate one control module from the at least one functional control module and the queue control module according to their priorities, and grant the target control module the operation permission to initiate queue management requests, so that the target control module can send queue management requests to the queue management arbitrator.

[0136] In this embodiment, two types of entities are distinguished: the functional control module and the queue control module corresponding to the host, and differentiated permission application channels are configured. The arbitrator completes the permission competition adjudication based on the unified priority of each type of module, and only grants queue management operation permissions to a single module. This effectively avoids conflicts caused by multiple types of control modules issuing queue instructions concurrently, ensures the orderly processing of multi-source queue management requests, and improves the overall architecture scheduling stability. In addition, each functional control module handles a queue management request initiated by one host, that is, each functional control module is bound to a host one by one, isolating the queue management business of different hosts, avoiding mutual interference between requests from multiple hosts, and further reducing the probability of cross-host instruction conflicts in conjunction with the unified permission arbitration mechanism, thereby improving the isolation and reliability of queue management in multi-host concurrent scenarios.

[0137] In one exemplary embodiment, see Figure 10 The above queue management architecture also includes: queue status storage 14 and index result storage 15, which are respectively connected to queue management arbitrator 11;

[0138] Queue status repository 14 is used to store the real-time status of all queues deployed under all functional units;

[0139] Index result repository 15 is used to store queue identifiers for at least one queue to be managed.

[0140] Among them, the depth of the queue status repository 14, the index result repository 15, and the queue mapping relationship repository is consistent with the total number of queues and corresponds one-to-one with the queue sequence number, ensuring the accuracy of status query.

[0141] Optionally, the queue mapping repository can be physically implemented via registers or content-addressable memory (CAM) to support fast lookup and matching.

[0142] Optionally, the index result repository 15 can be implemented via registers to quickly retrieve the queue set required for batch closing, thereby improving operational efficiency.

[0143] Optionally, the queue status repository 14 can be implemented via registers or memory to provide a basis for status verification for the shutdown process.

[0144] In this embodiment, a queue status repository 14 and an index result repository 15 can be set in the queue management architecture so that the queue management arbitrator 11 can directly obtain the real-time status of all queues deployed under all functional units from the queue status repository 14, and send a queue management instruction to the queue management controller according to the queue status of the queue to be managed, so that the queue management controller sends a management instruction for at least one queue to be managed to the downstream business module, and the queue management arbitrator 11 can directly obtain the queue identifier of at least one queue to be managed from the index result repository 15, and further obtain the queue status of the queue to be managed.

[0145] In this embodiment, two independent queue status storage and index result storage are used to cache the real-time status of the queue and the identifier of the queue to be managed, respectively. The two types of storage resources are respectively connected to the queue management arbitrator to realize parallel read, write and query. The data is partitioned and stored without interference, which can quickly and independently retrieve the queue index and status information, reduce the read and write pressure of a single storage unit, and improve the queue information retrieval speed and hardware processing throughput.

[0146] In one exemplary embodiment, see Figure 11 It also provides a complete queue management architecture, including:

[0147] At least one functional control module 10 is used to send a first permission request to the queue management arbitrator 11; each functional control module 10 is responsible for processing a queue management request initiated by a host.

[0148] Queue control module 13 is used to send queue management requests and second permission request requests to queue management arbitrator 11;

[0149] The queue management arbitrator 11 is used to arbitrate a control module from at least one functional control module and queue control module as the target control module based on at least one first permission request and a second permission request, as well as the priority of at least one functional control module and queue control module, and to grant the target control module the operation permission to initiate queue management requests.

[0150] The target control module (at least one of the functional control module 10 and the queue control module 13) is used to send a target queue management request to the queue management arbitrator; the target queue management request includes a functional unit identifier;

[0151] The queue management arbitrator 11 is used to receive the target queue management request sent by the target control module, and determine at least one queue to be managed corresponding to the target functional unit identifier from the queue mapping relationship repository (index result repository 15, used to store the queue identifier of at least one queue to be managed) according to the target functional unit identifier in the target queue management request, and send a queue management instruction to the queue management controller according to the queue status of at least one queue to be managed (queue status repository 14, used to store the real-time status of all queues deployed under all functional units); the queue mapping relationship repository stores the mapping relationship between multiple functional units and subordinate queues; the target functional module is any one of the at least one functional control module;

[0152] The queue management controller 12 is used to send management instructions for at least one queue to be managed to downstream business modules.

[0153] It should be noted that the detailed descriptions of all modules in the queue management architecture provided in this embodiment have been described in detail in the above embodiments, and will not be repeated here.

[0154] The modules in the above queue management architecture can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the corresponding operations of each module.

[0155] In one exemplary embodiment, a network interface card (NIC) chip is also provided, including the queue management architecture described in the above embodiments.

[0156] In one exemplary embodiment, a network interface card (NIC) device is also provided, including the NIC chip as described in the above embodiments.

[0157] In the above embodiments, the functional modules in the network card chip, such as the key value generation module, the matching result determination module, and the judgment processing module, can be implemented in whole or in part through hardware circuits, firmware, or a combination of hardware and firmware.

[0158] Specifically, when implemented through hardware circuits, each functional module can utilize hardware logic devices such as Application-Specific Integrated Circuits (ASICs) and Field-Programmable Gate Arrays (FPGAs) to implement corresponding message feature extraction, hash operations, lookup matching, and action execution processing logic. When implemented using firmware, the firmware configures logic according to the corresponding application scenario and business requirements. This configuration logic can be stored in the network interface card chip's memory in the form of microcode or firmware programs, and executed by the chip's internal processor or logic operation unit, thereby generating all or part of the processes or functions according to the embodiments of this application, such as key-value concatenation and fusion matching.

[0159] Those skilled in the art will understand that the technical solution of this application is essentially an improvement on the internal hardware resource scheduling and packet data flow mechanism of network switching equipment. The technical solution of this application, or the part that contributes to the prior art, can be embodied through the hardware logic circuit design in the network interface card (NIC) chip, or it can be implemented by loading and executing firmware instructions in the NIC chip. These firmware instructions can be stored in on-chip storage media such as read-only memory (ROM), static random access memory (SRAM), and tri-state content-addressable memory (TCAM) inside the NIC chip, so that when the NIC chip processes packets, it can implement the packet processing method steps of any of the above embodiments of this application, thereby significantly saving on-chip storage resources and reducing chip costs while maintaining processing capabilities.

[0160] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0161] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A queue management method, characterized in that, The method, applied to a queue management arbitrator, includes: In response to a queue management request triggered by the target function control module; the queue management request includes a functional unit identifier; Based on the functional unit identifier, at least one queue to be managed corresponding to the functional unit identifier is determined from the queue mapping relationship repository; the queue mapping relationship repository stores multiple mapping relationships between functional units and their subordinate queues; Based on the queue status of the at least one queue to be managed, a queue management instruction is sent to the queue management controller, so that the queue management controller sends management instructions for the at least one queue to be managed to the downstream business modules.

2. The method according to claim 1, characterized in that, The queue management request is sent by the target function control module after it has obtained the operation permission to initiate the queue management request; Prior to responding to a queue management request triggered by the target function control module, the method further includes: Receive permission requests from at least one functional control module; Based on the priority of the functional control modules, one functional control module is arbitrated from the at least one functional control module to serve as the target functional control module, and the target functional control module is granted the operation permission to initiate queue management requests.

3. The method according to claim 1, characterized in that, Before sending a queue management instruction to the queue management controller, the method further includes: Obtain the queue identifier of the at least one queue to be managed; Based on the queue identifier of the at least one queue to be managed, the queue status of the at least one queue to be managed is obtained from the queue status repository; the queue status repository stores the real-time status of all queues deployed under all functional units.

4. The method according to claim 1, characterized in that, The queue status includes: active status and idle status. Sending a queue management instruction to the queue management controller based on the queue status of the at least one queue to be managed includes: If the queue status of the queue to be managed is the active status, and the queue management request is a queue closure request, then an instruction to close the queue to be managed is sent to the queue management controller; If the queue status of the queue to be managed is the idle state, and the queue management request is a queue closure request, then a queue closure response for the queue to be managed is generated.

5. The method according to claim 4, characterized in that, When there are multiple active queues to be managed, sending an instruction to the queue management controller to close the queues to be managed includes: Based on the priority of the queues to be managed in the active state, the target queue to be managed is arbitrated sequentially from multiple queues to be managed in the active state, and the closing instruction of the target queue to be managed is sent to the queue management controller in sequence.

6. The method according to claim 1, characterized in that, The method further includes: Receive the queue management response sent by the downstream business module via the queue management controller, and update the queue status of the corresponding queue to be managed; After receiving queue management responses from all queues to be managed, a management completion signal is generated and sent to the upstream business module.

7. A queue management architecture, characterized in that, The queue management architecture includes: At least one functional control module is used to send a queue management request to the queue management arbitrator; the queue management request includes a functional unit identifier; The queue management arbitrator is configured to receive a target queue management request sent by a target functional module in the at least one functional control module, determine at least one queue to be managed corresponding to the target functional unit identifier from the queue mapping relationship repository based on the target functional unit identifier in the target queue management request, and send a queue management instruction to the queue management controller based on the queue status of the at least one queue to be managed; the queue mapping relationship repository stores multiple mapping relationships between functional units and subordinate queues; the target functional module is any one of the at least one functional control module. The queue management controller is used to send management instructions for the at least one queue to be managed to downstream business modules.

8. The queue management architecture according to claim 7, characterized in that, The queue management architecture also includes: a queue control module; The at least one functional control module is also used to send a first permission request to the queue management arbitrator; each functional control module is responsible for processing a queue management request initiated by a host. The queue control module is used to send queue management requests and second permission application requests to the queue management arbitrator. The queue management arbitrator is used to arbitrate a control module from at least one functional control module and the queue control module as the target control module based on at least one first permission request and a second permission request, as well as the priorities of the at least one functional control module and the queue control module, and to grant the target control module the operation permission to initiate queue management requests.

9. The queue management architecture according to claim 7, characterized in that, The queue management architecture further includes: a queue status repository and an index result repository, wherein the queue status repository and the index result repository are respectively connected to the queue management arbitrator; The queue status repository is used to store the real-time status of all queues deployed under all functional units; The index result repository is used to store the queue identifiers of the at least one queue to be managed.

10. A network interface card (NIC) chip, characterized in that, The network interface card chip includes the queue management architecture as described in any one of claims 7-9.

11. A network interface card (NIC) device, characterized in that, The network interface card (NIC) device includes the NIC chip as described in claim 10.