Method and device for improving SRQ reliability and readable storage medium
By introducing bitmap arrays and indirect address tables to manage SRQE occupancy and address, the reliability problem when multiple QPs share SRQ is solved, and the availability and memory utilization efficiency of SRQ are improved.
Patent Information
- Application Number
- CN202510470137.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, when multiple QPs share the same SRQ, the completion event caused by the exception of a certain QP or the processing time is not reported, resulting in the unavailability of the SRQ, affecting the service reliability of other QPs.
Introduce bitmap array and indirect address table, record the occupied state of SRQE through bitmap array, organize the address of SRQE, and use producer and consumer pointers to manage the production and consumption of SRQE to avoid SRQ unavailability caused by a certain QP exception.
Improves the reliability of SRQ, avoids queue unavailability problems caused by a single QP exception, improves the availability of SRQ, and can still be used effectively in memory-constrained environments.
Smart Images

Figure CN120371209A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and particularly to a method, device, and readable storage medium for improving the reliability of SRQ. Background Art
[0002] In today's era, artificial intelligence applications are becoming more and more widespread, large models are becoming more and more complex, and the amount of computation is increasing. Information interaction between computing nodes mostly uses the RDMA (Remote Direct Memory Access) protocol. The basic unit of RDMA communication is QP (Queue Pair), and each QP consists of a send queue SQ and a receive queue RQ. Since the recv operation of RDMA requires a receive buffer to be prepared in advance and WQE to be issued, each RQ will consume a certain amount of memory resources. Therefore, to save memory resources, SRQ (Share Receive Queue) is proposed, which allows multiple QPs to share the same receive queue, reducing the number of RQs and thus the memory resources consumed by preparing buffers and WQEs in advance. The number of connections between computing nodes is increasing, but the amount of data to be transmitted at the same time is limited, and the device memory is also limited. Using SRQ has become an increasingly popular choice. However, precisely because multiple QPs use the same SRQ simultaneously, the abnormality or complex business of a certain QP will affect the business of other QPs, and thus have a significant impact on the reliability of SRQ.
[0003] The prior art usually implements SRQ as a single circular queue. The host is responsible for sequentially producing SRQE (Share Receive Queue Element), and the QPs on the device are responsible for sequentially consuming SRQE. After the device finishes consuming, it needs to report a completion event to the host, and the host produces SRQE again at the original position. If the completion event of a certain SRQE is not reported or reported late, the entire circular queue may not be able to operate, resulting in SRQ being unavailable.
[0004] For example, assume that an SRQ is initialized with Max SRQEs, and these SRQEs form a circular queue. The addresses of each SRQE are not necessarily consecutive (usually allocated according to the memory page size, and cross-page addressing is completed through a page table). The host is responsible for producing SRQEs, and multiple QPs on the device are responsible for consuming SRQEs. SRQ maintains two pointers, one is PI (producer pointer, initially 0, indicating the index of the next SRQE to be produced), and the other is CI (consumer pointer, also initially 0, pointing to the next SRQE to be used). When the user submits a request, the PI pointer moves backward. After the hardware finishes processing, it reports a completion event, and the CI pointer moves backward. When SRQ is initialized, PI = CI = 0, asFigure 1 As shown
[0005] When the user issues two requests, the PI pointer moves back 2. At this time, PI = 2 and CI = 0, as Figure 2 shown
[0006] When the hardware finishes processing the first request and reports the completion event, the CI pointer moves back 1. At this time, PI = 2 and CI = 1, as Figure 3 shown
[0007] When PI catches up with CI, the software considers that the SRQE is full; when CI catches up with PI, the hardware considers that there is no available SRQE resource.
[0008] Because the consumers of each SRQE are different, there will be multiple abnormal scenarios that cause the completion event of the SRQE not to be reported in a timely manner, resulting in PI catching up with CI. When this situation occurs, the host cannot issue a new SRQE to the hardware, and the hardware cannot obtain an available SRQE, causing the SRQ to be unavailable, which in turn affects the user's business.
[0009] Scenario 1: Assume that QP0 and QP1 use the same SRQ. QP0 processes very simple transactions with very frequent data interactions but a small amount of data per interaction; QP1 processes complex transactions with very few data interactions but a large amount of data transferred each time. QP1 uses SRQE1. Since the data has not been received completely and the completion event has not been reported, QP has consumed a large number of SRQEs and all have reported the completion event. The user has issued a large number of requests, and PI has caught up with CI. At this time, only SRQE1 in the SRQ is occupied, and the other SRQEs are actually idle because the completion event has been reported.
[0010] Scenario 2: Assume that QP0 and QP1 use the same SRQ. An exception occurs after QP0 obtains the SRQE, resulting in the completion event not being reported, and ultimately causing PI to catch up with CI.
[0011] Both of the above scenarios will cause the SRQ to be unavailable. Essentially, the exception of a certain QP affects the business of other QPs. In fact, requests can still be issued to the SRQ. Summary of the Invention
[0012] In order to solve the problem that in the prior art, because the completion event of a certain SRQE is not reported or reported late, the entire queue may not be able to operate, resulting in the unavailability of the SRQ, this application proposes a method, device, and readable storage medium for improving the reliability of the SRQ.
[0013] This application is implemented through the following technical solutions:
[0014] A method for improving the reliability of SRQ, the method introducing a bitmap array and an indirect address table; wherein the number of bits in the bitmap array is the same as the maximum number of SRQEs in the SRQ, and each bit represents the occupancy status of the SRQE at the corresponding position in the SRQ; the number of elements in the indirect address table is the same as the maximum number of SRQEs in the SRQ, and each element is used to store the address of the produced SRQE. The indirect address table is organized in a circular linked list manner, and the indirect address table further includes a producer pointer and a consumer pointer. The producer pointer is used to point to the next indirect address table index to be produced, and the consumer pointer is used to point to the next indirect address table index to be used; the method includes:
[0015] Based on the bitmap array, the indirect address table, and the producer pointer, produce SRQEs and notify the hardware that new SRQE resources are available.
[0016] In some embodiments, the SRQE production process includes:
[0017] Receive an SRQ resource request;
[0018] Find the first free bit in the bitmap array. If not found, end; otherwise, continue with the subsequent steps;
[0019] Mark the found free bit in the bitmap array as occupied, obtain the SRQE corresponding to the marked bit, store the content according to the request, and mark the bit in the SRQE;
[0020] Obtain the indirect address table element according to the producer pointer, and write the address of the obtained SRQE into the obtained indirect address table element;
[0021] Move the producer pointer backward and notify the hardware that new SRQE resources are available.
[0022] The method further includes:
[0023] In some embodiments, the method further includes:
[0024] Based on the bitmap array, the indirect address table, and the consumer pointer, consume SRQE resources and report a completion event.
[0025] In some embodiments, the SRQE resource consumption process includes:
[0026] Obtain the indirect address table through DMA according to the consumer pointer saved inside the hardware, so as to obtain the address of the SRQE;
[0027] Obtain the SRQE through DMA according to the address of the SRQE, and process the obtained SRQE;
[0028] Report a completion event, carrying the bit in the SRQE flag, to set the corresponding bit position in the bitmap array to the idle state according to the flag;
[0029] Move the consumer pointer backward.
[0030] In some embodiments, when the bit in the bitmap array is 1, it represents that the SRQE at its corresponding position is occupied, and when the bit in the bitmap array is 0, it represents that the SRQE at its corresponding position is idle; in the initial state, all bits in the bitmap array are 0.
[0031] In some embodiments, the indirect address table occupies a continuous address space, and the starting address of the indirect address table is configured into the hardware during initialization.
[0032] In a second aspect, the present application proposes a device for improving the reliability of SRQ, and the device includes:
[0033] A bitmap array, the number of bits in the bitmap array is the same as the maximum number of SRQEs in the SRQ, and each bit represents the occupancy status of the SRQE at the corresponding position in the SRQ;
[0034] An indirect address table, the number of elements in the indirect address table is the same as the maximum number of SRQEs in the SRQ, each element is used to store the address of the produced SRQE, the indirect address table is organized in a circular linked list manner, and the indirect address table further includes a producer pointer and a consumer pointer, the producer pointer is used to point to the next indirect address table index to be produced, and the consumer pointer is used to point to the next indirect address table index to be used; the device further includes:
[0035] A receiving unit, configured to receive an SRQ resource request, and perform SRQE production based on the bitmap array, the indirect address table, and the producer pointer;
[0036] And an output unit, configured to notify the hardware that there is a new SRQE resource available.
[0037] In some embodiments, the device further includes:
[0038] An obtaining unit, configured to perform SRQE resource consumption based on the bitmap array, the indirect address table, and the consumer pointer;
[0039] And, a reporting unit, configured to report a completion event.
[0040] In a third aspect, the present application provides a DPU device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of any one of the above-mentioned methods are implemented.
[0041] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above-mentioned methods are implemented.
[0042] A method for improving the reliability of SRQ provided by the present application solves the problem of mutual interference between multiple different QPs by introducing a bitmap array and an indirect address table, avoids the problem of SRQ unavailability caused by an exception or excessive processing time of a certain QP, and greatly improves the availability of SRQ. At the same time, due to the addition of the indirect address table, the address of SRQE is no longer required to be continuous, and it can be used in an environment with limited memory.
[0043] Similarly, a device, equipment, and computer-readable storage medium for improving the reliability of SRQ provided by the present application have the same above-mentioned technical effects. Description of the Drawings
[0044] The drawings described herein are used to provide a further understanding of the embodiments of the present application, form a part of the present application, and do not limit the embodiments of the present application. In the drawings:
[0045] Figure 1 is a schematic diagram of the existing SRQ initialization;
[0046] Figure 2 is a schematic diagram of the existing SRQE production;
[0047] Figure 3 is a schematic diagram of the existing SRQE resource consumption;
[0048] Figure 4 is a schematic diagram of the SRQE production process proposed by the embodiment of the present application;
[0049] Figure 5 is a schematic diagram of the SRQE resource consumption process proposed by the embodiment of the present application;
[0050] Figure 6 is a schematic diagram of the device principle architecture proposed by the embodiment of the present application;
[0051] Figure 7 is a schematic block diagram of the DPU device principle proposed by the embodiment of the present application;
[0052] Figure 8Block diagram of the computer-readable storage medium proposed in the embodiments of the present application;
[0053] Figure 9 Example of the first generation of SRQE resources proposed in the embodiments of the present application;
[0054] Figure 10 Example of the first consumption of SRQE resources proposed in the embodiments of the present application;
[0055] Figure 11 Example of the secondary generation of SRQE resources proposed in the embodiments of the present application;
[0056] Figure 12 Example of the two-round consumption of SRQE resources proposed in the embodiments of the present application;
[0057] Reference numerals and corresponding component names:
[0058] 600 - device, 601 - bitmap array, 602 - indirect address table, 603 - shared receive queue, 604 - receive unit, 605 - output unit, 606 - acquisition unit, 607 - reporting unit, 700 - DPU device, 710 - memory, 720 - processor, 711 - computer program A, 800 - computer-readable storage medium, 811 - computer program B. Detailed implementation manners
[0059] In the following, the term "comprising" or "may comprise" that can be used in various embodiments of the present application indicates the presence of the invented functions, operations or elements, and does not limit the addition of one or more functions, operations or elements. In addition, as used in various embodiments of the present application, the terms "comprising", "having" and their cognates are only intended to represent specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be construed as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0060] In various embodiments of the present application, the expression "or" or "at least one of A or / and B" includes any combination or all combinations of the recited words. For example, the expression "A or B" or "at least one of A or / and B" may include A, may include B, or may include both A and B.
[0061] Expressions (such as "first", "second", etc.) used in various embodiments of the present application may modify various constituent elements in the various embodiments, but do not limit the corresponding constituent elements. For example, the above expressions do not limit the order and / or importance of the elements. The above expressions are only for the purpose of distinguishing one element from other elements. For example, the first user device and the second user device indicate different user devices, although both are user devices. For example, without departing from the scope of the various embodiments of the present application, the first element may be referred to as the second element, and similarly, the second element may also be referred to as the first element.
[0062] It should be noted that: if it is described that one constituent element is "connected" to another constituent element, the first constituent element may be directly connected to the second constituent element, and a third constituent element may be "connected" between the first constituent element and the second constituent element. Conversely, when one constituent element is "directly connected" to another constituent element, it can be understood that there is no third constituent element between the first constituent element and the second constituent element.
[0063] The terms used in the various embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the various embodiments of the present application. As used herein, the singular form is intended to also include the plural form unless the context clearly indicates otherwise. Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the various embodiments of the present application belong. The terms (such as those defined in a commonly used dictionary) will be interpreted as having the same meaning as the contextual meaning in the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning unless clearly defined in the various embodiments of the present application.
[0064] To make the purpose, technical solution and advantages of the present application clearer and more understandable, the following further details the present application in combination with embodiments and drawings. The illustrative embodiments and descriptions of the present application are only used to explain the present application and do not limit the present application.
[0065] Embodiment 1:
[0066] In the prior art, it is easy for the entire queue to be unable to operate and the SRQ to become unavailable because the completion event of a certain SRQE is not reported or reported late. In response to this, this embodiment proposes a method for improving the reliability of the SRQ. The method proposed in this embodiment improves the reliability of the SRQ by introducing a bitmap array and an indirect address table.
[0067] Among them, the number of bits in the bitmap array is the same as the maximum number of SRQEs in the SRQ. Each bit represents the occupancy status of the SRQE at the corresponding position in the SRQ. For example, when the corresponding bit is 1, it means that the SRQE at the corresponding position is occupied; when the corresponding bit is 0, it means that the SRQE at the corresponding position is idle. All bits in the bitmap array are 0 in the initial state.
[0068] The number of elements in the indirect address table (indirect address table, hereinafter referred to as IAT) is the same as the maximum number of SRQEs in the SRQ. Each element is used to store the address of the produced SRQE. The indirect address table is organized in a circular linked list manner. The indirect address table also includes a producer pointer PI and a consumer pointer CI. Among them, the producer pointer PI is maintained by the host and is used to point to the next IAT index to be produced; the consumer pointer CI is maintained by the hardware and is used to point to the next IAT index to be used. The IAT occupies a continuous address space, and the software initializes the starting address of the IAT to the hardware. The host is the producer, and multiple QPs on the device are the consumers.
[0069] The above method mainly includes two parts: the SRQE production step and the hardware resource consumption step.
[0070] Among them, as Figure 4 shown, the SRQE production step includes:
[0071] Step 410, receive the SRQ resource request.
[0072] Step 420, find the first bit in the bitmap array that is in the idle state. If not found, end; otherwise, continue with the subsequent steps.
[0073] Step 430, mark the bit in the bitmap array found in the previous step that is in the idle state as occupied.
[0074] Step 440, obtain the SRQE corresponding to the bit marked as occupied in the previous step, store the content according to the request, and mark the bit in the SRQE.
[0075] Step 450, obtain the IAT table element according to the IAT PI (producer pointer).
[0076] Step 460, write the address of the obtained SRQE into the obtained IAT table element.
[0077] Step 470, move the producer pointer PI backward and notify the hardware that there is a new SRQE resource available.
[0078] AsFigure 5 As shown in the figure, the hardware resource consumption steps include:
[0079] Step 510: The hardware obtains the IAT table through DMA according to the internally stored IAT CI (consumer pointer), and obtains the address of the SRQE. Optionally, when the software produces multiple SRQEs, this step can obtain multiple elements of the IAT at one time and cache the addresses of multiple SRQEs.
[0080] Step 520: The hardware obtains the SRQE through DMA.
[0081] Step 530: The hardware processes the SRQE.
[0082] Step 540: The hardware reports a completion event, carrying the bit flags in the SRQE, so that the software can set the corresponding bit in the bitmap array to the free state according to the flag.
[0083] Step 550: The consumer pointer CI is incremented.
[0084] The method proposed in this embodiment is applicable to the scenario where multiple QPs use SRQs, solves the mutual interference between different QPs, and avoids the problem of SRQ unavailability caused by the abnormality or excessive processing time of a certain QP, greatly improving the availability of the SRQ. At the same time, due to the addition of the indirect address table, the addresses of the SRQEs do not need to be continuous and can be used in an environment with limited memory.
[0085] This embodiment also proposes an embodiment of a device 600 for improving the reliability of the SRQ, as Figure 6 shown. The device 600 includes:
[0086] A bitmap array 601, where the number of bits in the bitmap array 601 is the same as the maximum number of SRQEs in the SRQ. Each bit represents the occupancy status of the SRQE at the corresponding position in the SRQ. When the corresponding bit is 1, it means that the SRQE at its corresponding position is occupied. When the corresponding bit is 0, it means that the SRQE at its corresponding position is free. In the initial state, all bits in the bitmap array are 0.
[0087] An indirect address table 602, where the number of elements in the indirect address table 602 is the same as the maximum number of SRQEs in the SRQ. Each element is used to store the address of the produced SRQE. The indirect address table 202 is organized in a circular linked list manner. The software maintains a producer pointer PI pointing to the next IAT index to be produced, and the hardware maintains a consumer pointer pointing to the next IAT index to be used. The indirect address table occupies a continuous address space, and the software initializes and configures the starting address of the IAT to the hardware.
[0088] A shared receive queue (SRQ) 603, which is composed of a plurality of shared receive queue elements (SRQEs). The apparatus 600 further includes:
[0089] A receiving unit 604, configured to receive an SRQ resource request, find the first bit that is 0 in the bitmap array 601. If not found, end the process. Otherwise, mark the found bit that is 0 in the bitmap array 601 as 1, and take the SRQE corresponding to the bit marked as 1. Store the content according to the request, and at the same time mark this bit in the SRQE. Obtain an IAT table element according to the IAT PI (producer pointer), write the address of the obtained SRQE into the IAT table element, and move the producer pointer PI backward.
[0090] And an output unit 605, which notifies the hardware that there is a new SRQE resource available.
[0091] Further, the apparatus 600 further includes:
[0092] An obtaining unit 606, which obtains an IAT table through DMA according to the IAT CI (consumer pointer) saved inside the hardware, obtains the SRQE address, obtains the SRQE through DMA according to the SRQE address, and processes the SRQE.
[0093] And a reporting unit 607, which reports a completion event, carrying the bit marked in the SRQE, so that the software sets the corresponding bit in the bitmap array to 0 according to this mark, and moves the consumer pointer CI backward.
[0094] This embodiment also proposes an embodiment of a DPU device 700, as Figure 7 shown. The DPU device 700 includes: a memory 710, a processor 720, and a computer program A711 stored on the memory 710 and executable on the processor 720. When the processor 720 executes the computer program A711, the following steps are implemented:
[0095] The SRQE production step;
[0096] The hardware resource consumption step.
[0097] Optionally, when the processor 720 executes the computer program A711, any implementation manner in the corresponding embodiment of the above method may be implemented.
[0098] It should be noted that the DPU device proposed in this embodiment is the device adopted to implement the above method. Therefore, based on the above method proposed in this embodiment, those skilled in the art can understand the specific implementation manner of the DPU device in this embodiment and its various variations. Therefore, the specific implementation of how the DPU device implements the above method will not be introduced in detail here. As long as the DPU device adopted by those skilled in the art to implement the above method falls within the scope of protection of this application.
[0099] This embodiment also proposes an embodiment of a computer-readable storage medium 800. As Figure 8 shown, a computer program B811 is stored on the computer-readable storage medium 800. When the computer program B811 is executed by a processor, the following steps are implemented:
[0100] SRQE production steps;
[0101] Hardware resource consumption steps.
[0102] Optionally, when the computer program B811 is executed by a processor, it can implement any one of the implementation manners in the corresponding embodiments of the above method.
[0103] It should be noted that in the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0104] Embodiment 2:
[0105] This embodiment further illustrates the method proposed in the above embodiment with a specific example of SRQE resource production and consumption. The specific process is as follows:
[0106] S1. When receiving 3 SRQE resource requests, the software sets the first 3 bit positions in the bitmap array to 1. At the same time, according to the resource requests, the data is stored in the first 3 SRQEs, namely SRQE0, SRQE1, and SRQE2, and the addresses of the 3 SRQEs are filled into the first three items of the indirect address table in sequence, as Figure 9 shown.
[0107] S2. After the hardware consumes the first SRQE and reports completion, the first bit position in the bitmap array is set to 0, as Figure 10 shown.
[0108] S3. When receiving a new SRQE resource request, find the first bit position that is 0 in the bitmap array, that is, the first bit position in the bitmap array. According to the resource request, store the data in its corresponding SRQE, that is, SRQE0, and move the producer pointer backward, as Figure 11As shown. At this time, the new SRQE resource request physically uses SRQE0 and does not need to be produced in sequence.
[0109] S4. Assume that the completion event of SRQE2 has not been reported back. The SRQE has been used up in one round (where the green mark is the second round of use and the blue mark is the first round of use), as Figure 12 shown. It shows that when an exception occurs in a certain SRQE, which does not cause the completion event not to be reported or reported late, it does not affect the use of other idle SRQEs.
[0110] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0111] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0112] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Therefore, the instructions executed on the computer or other programmable device provide means for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1Steps of functions specified in one or more boxes.
[0114] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of this application. It should be understood that the above are only specific embodiments of this application and are not used to limit the protection scope of this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this application shall be included within the protection scope of this application.
Claims
1. A method for improving the reliability of SRQ, characterized in that The method introduces a bitmap array and an indirect address table; wherein the number of bits in the bitmap array is the same as the maximum number of SRQEs in the SRQ, and each bit represents the occupancy status of the SRQE at the corresponding position in the SRQ; the number of elements in the indirect address table is the same as the maximum number of SRQEs in the SRQ, and each element is used to store the address of the produced SRQE. The indirect address table is organized in a circular linked list manner, and the indirect address table further includes a producer pointer and a consumer pointer. The producer pointer is used to point to the next indirect address table index to be produced, and the consumer pointer is used to point to the next indirect address table index to be used; the method includes: Based on the bitmap array, the indirect address table, and the producer pointer, produce an SRQE and notify the hardware that there is a new SRQE resource available.
2. The method for improving the reliability of SRQ according to claim 1, wherein, The SRQE production process includes: Receive an SRQ resource request; Find the first free bit in the bitmap array. If not found, end; otherwise, continue with the following steps; Mark the found free bit in the bitmap array as occupied, obtain the SRQE corresponding to the marked bit, store the content according to the request, and mark the bit in the SRQE at the same time; Obtain the indirect address table element according to the producer pointer, and write the address of the obtained SRQE into the obtained indirect address table element; Move the producer pointer backward and notify the hardware that there is a new SRQE resource available.
3. A method for improving the reliability of SRQ according to claim 1 or 2, characterized in that, The method further includes: Based on the bitmap array, the indirect address table, and the consumer pointer, consume the SRQE resource and report a completion event.
4. A method for improving the reliability of SRQ according to claim 3, characterized in that, The SRQE resource consumption process includes: Obtain the indirect address table through DMA according to the consumer pointer saved inside the hardware, so as to obtain the address of the SRQE; Obtain the SRQE through DMA according to the address of the SRQE and process the obtained SRQE; Report a completion event, carrying the bit marked in the SRQE, so as to set the corresponding bit in the bitmap array to the free state according to the mark; Move the consumer pointer backward.
5. A method for improving the reliability of SRQ according to claim 4, characterized in that, When the bit in the bitmap array is 1, it represents that the SRQE at its corresponding position is occupied. When the bit in the bitmap array is 0, it represents that the SRQE at its corresponding position is free; in the initial state, all bits in the bitmap array are 0.
6. A method for improving the reliability of SRQ according to claim 4, characterized in that, The indirect address table occupies a continuous address space, and the starting address of the indirect address table is configured into the hardware during initialization.
7. A device for improving the reliability of SRQ, characterized in that, The device includes: A bitmap array, wherein the number of bits in the bitmap array is the same as the maximum number of SRQEs in the SRQ, and each bit represents the occupancy status of the SRQE at the corresponding position in the SRQ; An indirect address table, where the number of elements in the indirect address table is the same as the maximum number of SRQEs in the SRQ, and each element is used to store the address of the produced SRQE. The indirect address table is organized in a circular linked list manner. The indirect address table further includes a producer pointer and a consumer pointer. The producer pointer is used to point to the next indirect address table index to be produced, and the consumer pointer is used to point to the next indirect address table index to be used; The apparatus further includes: A receiving unit, configured to receive an SRQ resource request, and perform SRQE production based on the bitmap array, the indirect address table, and the producer pointer; And an output unit, configured to notify the hardware that new SRQE resources are available.
8. The device for enhancing the reliability of SRQ according to claim 7, characterized in that The apparatus further includes: An obtaining unit, configured to perform SRQE resource consumption based on the bitmap array, the indirect address table, and the consumer pointer; And a reporting unit, configured to report a completion event.
9. A DPU device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1-6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1-6 are implemented.