Rdma state management method based on interface polling and mask check and related device
Patent Information
- Application Number
- CN202611167523.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-08-03
AI Technical Summary
现有机制缺乏硬件级的并发轮询能力,往往依赖软件串行处理或缺乏硬件级的高效调度,难以公平且无阻塞地处理多Function并发的状态修改请求
本发明所述基于接口轮询与掩码校验的RDMA状态管理方法及相关装置在具体操作时,通过schedule_16模块响应所述状态转移请求,得到响应所述状态转移请求的valid信号repos_statechgreq_vld,实现对最高16个虚拟化功能接口状态修改请求的实时轮询与优先级仲裁,使得RDMA网卡在面对多用户场景下的并发请求时,能够做到不依赖软件串行排队,提升状态跳转指令的处理效率。另外,本发明在RDMA的DEAL_STATECHG状态,判断QP状态跳转是否合法,同时判断QP上下文信息中修改QP属性对应的RDMA中的必须修改属性掩码required_mask及可选属性掩码optional_mask是否正确,避免错误上下文信息被写入存储,保障控制器的运行稳定性,满足RDMA网络对高并发、高稳定性和易维护性的严苛要求。
Smart Images

Figure CN122691858B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of remote direct memory access, and relates to an RDMA state management method and related apparatus based on interface polling and mask verification. Background Technology
[0002] In RDMA (Remote Direct Memory Access) network communication, data transmission is based on QPs (Queue Pairs), and each QP contains multiple working states throughout its lifecycle. Typically, software issues state transition requests and synchronously updates the QP context information by reading and writing to hardware registers. Since different state transition directions impose different requirements on QP context attributes, strictly divided into required attributes and optional attributes, state management during software-hardware interaction becomes extremely complex.
[0003] With the widespread adoption of network interface card (NIC) hardware virtualization technology (Function) in modern RDMA architectures and other scenarios such as cloud computing, NICs need to support multiple Functions. Existing technologies have gradually revealed the following obvious shortcomings when handling such complex concurrent state transitions: Existing mechanisms lack hardware-level concurrent polling capabilities, often relying on software serial processing or lacking efficient hardware-level scheduling, making it difficult to handle concurrent state modification requests from multiple functions fairly and without blocking.
[0004] Since QP context data is usually large, its arrival time in the hardware often lags behind the state transition instruction itself. Existing architectures lack robust asynchronous data synchronization mechanisms when dealing with this time difference between instructions and large amounts of data, which can easily lead to state machine deadlock or reading illegal old contexts.
[0005] Existing verification technologies suffer from inefficient logic and coarse-grained error reporting. Current designs rely excessively on software drivers to ensure instruction validity, lacking a unified, robust verification architecture based on bit-width mapping and masks at the underlying hardware level. If the software issues an illegal instruction—for example, omitting a required attribute or modifying an invalid optional attribute—the hardware can easily allow it, leading to network communication interruptions or drainage errors. Furthermore, it cannot accurately relay the specific error cause to the software, significantly increasing system debugging and maintenance costs.
[0006] In summary, when faced with complex multi-function concurrent requests in modern virtualized network interface cards (NICs), existing technologies lack efficient hardware-level polling scheduling and asynchronous data synchronization mechanisms, and their underlying validity checks are rudimentary and error feedback mechanisms are inadequate. These shortcomings not only reduce the execution efficiency of QP state transitions but also easily lead to state machine anomalies or misreading of old data, making it difficult to meet the stringent requirements of RDMA networks for high concurrency, high stability, and ease of maintenance. Summary of the Invention
[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide an RDMA state management method and related apparatus based on interface polling and mask verification. This method and system meet the stringent requirements of RDMA networks for high concurrency, high stability and easy maintenance.
[0008] To achieve the above objectives, this invention discloses an RDMA state management method based on interface polling and mask verification, comprising: In the FUNCTION_SCHEDULE state of RDMA (functional task scheduling state), the scheduler polls the flag qp_statechg_reg_tag of the acquired state transition request to obtain the Function ID. The schedule_16 module responds to the state transition request and obtains the valid signal repos_statechgreq_vld in response to the state transition request. The valid signal repos_statechgreq_vld and the Function ID are sent to an external register, and then the system enters the WAIT_REG_REPOS_REQ state of RDMA (waiting for hardware resource reclamation request state). In the WAIT_DAT_TRANS_FINISHED state of RDMA (waiting for data transmission to complete), obtain the relevant information about the QP state transition. The relevant information about the QP state transition includes the QP number, the QP transition state, and the QP context information, and then enter the DEAL_STATECHG state of RDMA (processing state change state). In the DEAL_STATECHG state of RDMA, it is determined whether the QP state transition is valid. Simultaneously, it is checked whether the required_mask and optional_mask of the RDMA corresponding to the modified QP attribute in the QP context information are correct. If the QP state transition is valid and the required_mask and optional_mask of the RDMA corresponding to the modified QP attribute in the QP context information are correct, the qp_mapper module is used to query whether the QP number is activated. If the QP number is not activated, the QP state is updated locally. If the QP number is activated, the QP state is sent to the external controller. After receiving a response from the external controller, the QP state is updated locally.
[0009] Furthermore, the process of determining whether the QP state transition is valid is as follows: The actual physical state of the target QP is read from the state storage module state_mng. The actual physical state of the target QP is matched with the QP state. When the two match successfully, the path of this QP state transition is used as the index to obtain the mask hard_mask from the mask storage module mask_mem. When the mask hard_mask is non-zero, the QP state transition is considered valid.
[0010] Furthermore, the process of determining whether the mask required_mask corresponding to the modified QP attribute in the QP context information is correct is as follows: Based on the checks to prevent missing modifications and to prevent out-of-bounds errors, the system determines whether the required_mask and optional_mask of the RDMA corresponding to the modified QP attribute in the QP context information are correct.
[0011] Furthermore, the process for preventing leaked verification is as follows: Obtain the valid mask soft_mask, and perform a bitwise AND operation between the valid mask soft_mask and the mask required_mask corresponding to the modified QP attribute in the QP context information. If the result is the mask required_mask corresponding to the modified QP attribute in the QP context information, the anti-leakage verification is considered to be qualified; otherwise, the anti-leakage verification is considered to be unqualified.
[0012] Furthermore, the process of preventing boundary crossing verification is as follows: Perform a bitwise OR operation on the required_mask corresponding to the modified QP attribute in the QP context information and the optional_mask of the optional attribute in RDMA, followed by a NOT operation, to obtain the mask corresponding to the attribute that cannot be modified during the current QP state transition. Perform a AND operation on the mask corresponding to the attribute that cannot be modified during the current QP state transition and the valid mask soft_mask. If the result of the AND operation is all zeros, the out-of-bounds check is considered to be qualified; otherwise, the out-of-bounds check is considered to be unqualified.
[0013] Furthermore, it also includes: When the QP state transition is successful and the required_mask corresponding to the modified QP attribute in the QP context information is correct, then the underlying state update, context exact overwrite, and success feedback are performed.
[0014] Furthermore, it also includes: If the QP state transition fails, error code 4'b0001 is output to an external register; If the anti-leakage check fails, error code 4'b0010 is output to an external register; If the out-of-bounds check fails, error code 4'b0011 is output to an external register.
[0015] This invention discloses an RDMA state management system based on interface polling and mask verification, comprising: The polling module, in the FUNCTION_SCHEDULE state of RDMA, polls the flag qp_statechg_reg_tag of the acquired state transition request through the polling scheduler to obtain the Function ID. It then responds to the state transition request through the schedule_16 module, obtains the valid signal repos_statechgreq_vld in response to the state transition request, sends the valid signal repos_statechgreq_vld and the Function ID to an external register, and then enters the WAIT_REG_REPOS_REQ state of RDMA. The acquisition module is used to obtain relevant information about QP state transition in the WAIT_DAT_TRANS_FINISHED state of RDMA. The relevant information about QP state transition includes QP number, QP transition state and QP context information, and then enters the DEAL_STATECHG state of RDMA. The update module is used to determine whether the QP state transition is valid in the DEAL_STATECHG state of RDMA, and to check whether the required_mask and optional_mask of the RDMA corresponding to the modified QP attribute in the QP context information are correct. If the QP state transition is valid and the required_mask and optional_mask of the RDMA corresponding to the modified QP attribute in the QP context information are correct, then the qp_mapper module is used to query whether the QP number is activated. If the QP number is not activated, the QP state is updated locally. If the QP number is activated, the QP state is sent to the external controller, and the QP state is updated locally after receiving the response from the external controller.
[0016] The present invention discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the RDMA state management method based on interface polling and mask verification.
[0017] The present invention discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the RDMA state management method based on interface polling and mask verification.
[0018] The present invention has the following beneficial effects: The RDMA state management method and related apparatus based on interface polling and mask verification described in this invention, in specific operation, responds to the state transition request through the schedule_16 module, obtaining a valid signal repos_statechgreq_vld in response to the state transition request. This enables real-time polling and priority arbitration of state modification requests for up to 16 virtualization function interfaces, allowing the RDMA network card to handle concurrent requests in multi-user scenarios without relying on software serial queuing, thus improving the processing efficiency of state transition instructions. Furthermore, in the DEAL_STATECHG state of RDMA, this invention determines whether the QP state transition is valid, and simultaneously checks whether the required_mask and optional_mask of the RDMA corresponding to the modified QP attributes in the QP context information are correct. This prevents erroneous context information from being written to storage, ensuring the operational stability of the controller and meeting the stringent requirements of RDMA networks for high concurrency, high stability, and ease of maintenance.
[0019] Furthermore, by outputting error codes, this invention facilitates rapid identification of the source of errors, thereby reducing the development and debugging costs of RDMA network systems. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a system structure diagram of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] The accompanying drawings illustrate various structural schematic diagrams according to embodiments disclosed in this invention. These drawings are not to scale, and some details have been enlarged for clarity, and some details may have been omitted. The shapes of the various regions and layers shown in the drawings, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.
[0024] Example 1 refer to Figure 1 The RDMA state management method based on interface polling and mask verification described in this invention includes the following steps: 1) RDMA IDLE state: In the IDLE state, a state transition request is obtained, and it is determined whether the flag qp_statechg_reg_tag of the state transition request is non-zero. When the flag qp_statechg_reg_tag of the state transition request is non-zero, the FUNCTION_SCHEDULE state is entered.
[0025] 2) RDMA's FUNCTION_SCHEDULE state: The scheduler polls the flag qp_statechg_reg_tag of the state transition request to calculate the Function ID. The schedule_16 module responds to the state transition request, obtaining the valid signal repos_statechgreq_vld in response to the state transition request. The valid signal repos_statechgreq_vld and the Function ID are output to an external register, and then the system enters the WAIT_REG_REPOS_REQ state.
[0026] 3) RDMA's WAIT_REG_REPOS_REQ state: Upon receiving the response signal repos_statechg_req_rdy from the external register, it enters the WAIT_DAT_TRANS_FINISHED state.
[0027] 4) RDMA's WAIT_DAT_TRANS_FINISHED state: Obtain relevant information about QP state transitions, including QP number, QP transition state, and QP context information, and then enter the DEAL_STATECHG state.
[0028] 5) RDMA's DEAL_STATECHG state: Determines whether the QP state transition is valid. Simultaneously, checks if the required_mask and optional_mask of the RDMA corresponding to the modified QP attribute in the QP context information are correct. If both checks are valid, the qp_mapper module queries whether the QP number is activated. If the QP number is not activated, the QP state is updated locally. If the QP number is activated, the QP state is sent to the external controller. After receiving the response from the external controller, the QP state is updated locally. Simultaneously, the QP context information and the byte corresponding to the required_mask are sent to the external module for write enable. Send a state transition completion signal statechg_finished_vld to an external register, and send the updated QP status to the external register; If any of the above judgments are invalid, the QP state and QP context information will not be updated. Instead, the state transition completion signal statechg_finished_vld, the current QP state, and the error code of this state transition will be sent directly to the external register. Then it jumps to the STATE_FINISH state (state change processing completed state).
[0029] In this embodiment, the process of determining whether the QP state transition is valid is as follows: The actual physical state of the target QP is read from the state storage module state_mng. The actual physical state of the target QP is matched with the QP state. If the two match successfully, the path of this QP state transition is used as the index to obtain the mask hard_mask from the mask storage module mask_mem. The mask hard_mask is composed of RequiredAttributes and Optional Attributes. If the mask hard_mask is non-zero, the current QP state transition is considered valid; otherwise, the current QP state transition is considered invalid.
[0030] In this embodiment, the process of determining whether the required_mask and optional_mask of the RDMA corresponding to the modified QP attribute in the QP context information are correct is as follows: Based on the checks to prevent omissions and out-of-bounds errors, we determine whether the mask required_mask corresponding to the modified QP attribute in the QP context information is correct.
[0031] Specifically, the process for preventing omissions and modifications during verification is as follows: Obtain the valid mask soft_mask, perform a bitwise AND operation between soft_mask and required_mask. If the result is required_mask, it means that all required attributes under the current QP state jump path have been accurately modified and no omission check has occurred, then the omission check is qualified; otherwise, the omission check is considered unqualified. The process of preventing boundary crossing is as follows: Perform a bitwise OR operation on required_mask and optional_mask in RDMA, followed by a NOT operation, to obtain the mask corresponding to the attributes that cannot be modified during the current QP state transition. Perform a AND operation on the mask corresponding to the attributes that cannot be modified during the current QP state transition and soft_mask. If the result of the AND operation is all zeros, it means that the modification is strictly limited to the allowed attribute range and no illegal attributes have been modified beyond the authorization. In this case, the out-of-bounds check is qualified; otherwise, the out-of-bounds check is unqualified. If both the anti-leakage check and the anti-outboundion check pass, then the mask corresponding to the modified QP attribute in the QP context information is considered correct, and the following operations are performed: State-level update: Send a write enable signal to the state storage module (state_mng) to update the physical state of the target QP to the desired state (state_exp).
[0032] Contextually accurate overwrite: The valid soft_mask is automatically parsed and a byte write enable signal byte_wr_en controlled by hardware logic is generated. This byte write enable signal byte_wr_en, along with the complete 512-bit QP context information, is sent to the external queue management module to ensure that only the attribute bytes specified by the mask are overwritten and no other unauthorized data is tampered with.
[0033] Successful feedback: Return a valid state transition completion signal (statechg_finished_vld = 1) to an external register, output the updated current state (state_cur_finished = state_exp), and provide the code representing "no error" (state_err_finished = 4'b0000).
[0034] If the QP status transition fails, the anti-leakage check fails, or the anti-outboundion check fails, the following operations will be performed: If the QP state transition fails, error code 4'b0001 is output to an external register.
[0035] If the anti-leakage verification fails, error code 4'b0010 is output to an external register.
[0036] If the out-of-bounds check fails, error code 4'b0011 is output to an external register.
[0037] Through the above operations, the source of illegal software commands can be accurately traced.
[0038] 6) RDMA STATE_FINISH state: When the statechg_finished_rdy signal sent by an external register is received, the current processing is completed, and the process jumps back to the IDLE state to wait for the next QP state transition request.
[0039] Example 2 refer to Figure 2 The RDMA state management system based on interface polling and mask verification described in this invention includes: The polling module, in the FUNCTION_SCHEDULE state of RDMA, polls the flag qp_statechg_reg_tag of the acquired state transition request through the polling scheduler to obtain the Function ID. It then responds to the state transition request through the schedule_16 module, obtains the valid signal repos_statechgreq_vld in response to the state transition request, sends the valid signal repos_statechgreq_vld and the Function ID to an external register, and then enters the WAIT_REG_REPOS_REQ state of RDMA. The acquisition module is used to obtain relevant information about QP state transition in the WAIT_DAT_TRANS_FINISHED state of RDMA. The relevant information about QP state transition includes QP number, QP transition state and QP context information, and then enters the DEAL_STATECHG state of RDMA. The update module is used to determine whether the QP state transition is valid in the DEAL_STATECHG state of RDMA, and to check whether the required_mask and optional_mask of the RDMA corresponding to the modified QP attribute in the QP context information are correct. If the QP state transition is valid and the required_mask and optional_mask of the RDMA corresponding to the modified QP attribute in the QP context information are correct, then the qp_mapper module is used to query whether the QP number is activated. If the QP number is not activated, the QP state is updated locally. If the QP number is activated, the QP state is sent to the external controller, and the QP state is updated locally after receiving the response from the external controller.
[0040] It should be noted that this invention, through real-time polling and priority arbitration of up to 16 virtualization function interface status modification requests, enables the RDMA network card to handle concurrent requests in multi-user scenarios without relying on software serial queuing, thus improving the processing efficiency of status transition instructions. Furthermore, this invention, by determining the correctness of the required_mask and optional_mask of the RDMA corresponding to the modified QP attribute in the QP context information, prevents erroneous context information from being written to storage, ensuring the stability of the controller's operation and demonstrating its high practicality.
[0041] The module division in this embodiment of the invention is illustrative and represents only one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional modules in the various embodiments of the invention can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0042] Example 3 A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the RDMA state management method based on interface polling and mask verification. For example, the method includes: in the FUNCTION_SCHEDULE state of the RDMA, polling the flag qp_statechg_reg_tag of the acquired state transition request through a polling scheduler to obtain a Function ID; responding to the state transition request through the schedule_16 module to obtain a valid signal repos_statechgreq_vld in response to the state transition request; and combining the valid signal repos_statechgreq_vld and the Function ID. The ID is sent to an external register, and then the system enters the WAIT_REG_REPOS_REQ state of the RDMA. In the WAIT_DAT_TRANS_FINISHED state of the RDMA, information related to the QP state transition is obtained, including the QP number, QP transition state, and QP context information. Then, the system enters the DEAL_STATECHG state of the RDMA. In the DEAL_STATECHG state of the RDMA, it determines whether the QP state transition is valid and simultaneously checks the mandatory attribute mask (re) in the RDMA corresponding to the modified QP attribute in the QP context information. The `required_mask` and `optional_mask` are checked for correctness. If the QP state transition is successful and the required_mask and optional_mask in the RDMA corresponding to the modified QP attribute in the QP context information are correct, the `qp_mapper` module queries whether the QP number is activated. If the QP number is not activated, the QP state is updated locally. If the QP number is activated, the QP state is sent to an external controller. After receiving a response from the external controller, the QP state is updated locally. The memory may include main memory, such as high-speed random access memory, or it may also include non-volatile memory, such as at least one disk storage device. The processor, network interface, and memory are interconnected via an internal bus, which can be an industry-standard architecture bus, a peripheral component interconnection standard bus, or an extended industry-standard architecture bus. The bus can be divided into address bus, data bus, and control bus. The memory stores programs; specifically, the program may include program code, which includes computer operation instructions. Memory can include main memory and non-volatile memory, and provides instructions and data to the processor.
[0043] Example 4 A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the RDMA state management method based on interface polling and mask verification. For example, it includes: in the FUNCTION_SCHEDULE state of the RDMA, polling the flag qp_statechg_reg_tag of the acquired state transition request through a polling scheduler to obtain a Function ID; responding to the state transition request through the schedule_16 module to obtain a valid signal repos_statechgreq_vld in response to the state transition request; and combining the valid signal repos_statechgreq_vld and the Function ID. The ID is sent to an external register, and then the system enters the WAIT_REG_REPOS_REQ state of the RDMA. In the WAIT_DAT_TRANS_FINISHED state of the RDMA, information related to the QP state transition is obtained, including the QP number, QP transition state, and QP context information. Then, the system enters the DEAL_STATECHG state of the RDMA. In the DEAL_STATECHG state of the RDMA, it determines whether the QP state transition is valid and simultaneously checks the mandatory attribute mask (re) in the RDMA corresponding to the modified QP attribute in the QP context information. The `required_mask` and `optional_mask` are checked for correctness. If the QP state transition is successful and the required_mask and optional_mask in the RDMA corresponding to the modified QP attribute in the QP context information are correct, the `qp_mapper` module queries whether the QP number is activated. If the QP number is not activated, the QP state is updated locally. If the QP number is activated, the QP state is sent to an external controller, and the QP state is updated locally after receiving a response from the external controller. Specifically, the computer-readable storage medium includes, but is not limited to, volatile memory and / or non-volatile memory.
[0044] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and disclosure of the invention. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0045] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
[0046] The above description is merely a preferred embodiment of the present invention and does not constitute any limitation on the present invention. Any simple modifications, alterations, or equivalent structural changes made to the above embodiments based on the technical essence of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for RDMA state management based on interface polling and mask verification, characterized in that, include: In the FUNCTION_SCHEDULE state of RDMA, the scheduler polls the flag qp_statechg_reg_tag of the acquired state transition request to obtain the Function ID. The schedule_16 module responds to the state transition request and obtains the valid signal repos_statechgreq_vld in response to the state transition request. The valid signal repos_statechgreq_vld and the Function ID are sent to an external register, and then the RDMA enters the WAIT_REG_REPOS_REQ state. In the WAIT_DAT_TRANS_FINISHED state of RDMA, obtain the relevant information about the QP state transition. The relevant information about the QP state transition includes the QP number, the QP transition state, and the QP context information, and then enter the DEAL_STATECHG state of RDMA. In the DEAL_STATECHG state of RDMA, it is determined whether the QP state transition is valid. At the same time, it is determined whether the required_mask and optional_mask of the RDMA corresponding to the QP attribute modification in the QP context information are correct. If the QP state transition is valid and the required_mask and optional_mask of the RDMA corresponding to the QP attribute modification in the QP context information are correct, then the qp_mapper module is used to query whether the QP number is activated. If the QP number is not activated, the QP state is updated locally. When the QP number is activated, the QP status is sent to the external controller. After receiving a response from the external controller, the QP status is updated locally.
2. The RDMA state management method based on interface polling and mask verification according to claim 1, characterized in that, The process for determining whether a QP state transition is valid is as follows: The actual physical state of the target QP is read from the state storage module state_mng. The actual physical state of the target QP is matched with the QP state. When the two match successfully, the path of this QP state transition is used as the index to obtain the mask hard_mask from the mask storage module mask_mem. When the mask hard_mask is non-zero, the QP state transition is considered valid.
3. The RDMA state management method based on interface polling and mask verification according to claim 1, characterized in that, The process of determining whether the required_mask and optional_mask of the RDMA corresponding to the modified QP attribute in the QP context information are correct is as follows: Based on the checks to prevent missing modifications and to prevent out-of-bounds errors, the system determines whether the required_mask and optional_mask of the RDMA corresponding to the modified QP attribute in the QP context information are correct.
4. The RDMA state management method based on interface polling and mask verification according to claim 3, characterized in that, The process for preventing leakage and modifying the verification is as follows: Obtain the valid mask soft_mask, and perform a bitwise AND operation between the valid mask soft_mask and the mask required_mask corresponding to the modified QP attribute in the QP context information. If the result is the mask required_mask corresponding to the modified QP attribute in the QP context information, the anti-leakage verification is considered to be qualified; otherwise, the anti-leakage verification is considered to be unqualified.
5. The RDMA state management method based on interface polling and mask verification according to claim 4, characterized in that, The process of preventing boundary crossing verification is as follows: Perform a bitwise OR operation on the required_mask corresponding to the modified QP attribute in the QP context information and the optional_mask of the optional attribute in RDMA, followed by a NOT operation, to obtain the mask corresponding to the attribute that cannot be modified during the current QP state transition. Perform a AND operation on the mask corresponding to the attribute that cannot be modified during the current QP state transition and the valid mask soft_mask. If the result of the AND operation is all zeros, the out-of-bounds check is considered to be qualified; otherwise, the out-of-bounds check is considered to be unqualified.
6. The RDMA state management method based on interface polling and mask verification according to claim 1, characterized in that, Also includes: When the QP state transition is successful and the required_mask and optional_mask of the RDMA corresponding to the modified QP attribute in the QP context information are correct, then the underlying state update, context exact overwrite, and success feedback are performed.
7. The RDMA state management method based on interface polling and mask verification according to claim 5, characterized in that, Also includes: If the QP state transition fails, error code 4'b0001 is output to an external register; If the anti-leakage check fails, error code 4'b0010 is output to an external register; If the out-of-bounds check fails, error code 4'b0011 is output to an external register.
8. An RDMA state management system based on interface polling and mask verification, characterized in that, include: The polling module, in the FUNCTION_SCHEDULE state of RDMA, polls the flag qp_statechg_reg_tag of the acquired state transition request through the polling scheduler to obtain the Function ID. It then responds to the state transition request through the schedule_16 module, obtains the valid signal repos_statechgreq_vld in response to the state transition request, sends the valid signal repos_statechgreq_vld and the Function ID to an external register, and then enters the WAIT_REG_REPOS_REQ state of RDMA. The acquisition module is used to obtain relevant information about QP state transition in the WAIT_DAT_TRANS_FINISHED state of RDMA. The relevant information about QP state transition includes QP number, QP transition state and QP context information, and then enters the DEAL_STATECHG state of RDMA. The update module is used to determine whether the QP state transition is valid in the DEAL_STATECHG state of RDMA, and at the same time, to determine whether the required_mask and optional_mask of the RDMA corresponding to the QP attribute modification in the QP context information are correct. If the QP state transition is valid and the required_mask and optional_mask of the RDMA corresponding to the QP attribute modification in the QP context information are correct, then the qp_mapper module is used to query whether the QP number is activated. If the QP number is not activated, the QP state is updated locally. When the QP number is activated, the QP status is sent to the external controller. After receiving a response from the external controller, the QP status is updated locally.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the RDMA state management method based on interface polling and mask verification as described in any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the RDMA state management method based on interface polling and mask verification as described in any one of claims 1-7.
Citation Information
Patent Citations
Dynamic adjustment method and device for base address register of PCIe endpoint equipment and storage medium
CN122240307A
Computing in parallel processing environments
US10078613B1