[go: up one dir, main page]

CN120017600B - A message processing system - Google Patents

A message processing system Download PDF

Info

Publication number
CN120017600B
CN120017600B CN202510477556.8A CN202510477556A CN120017600B CN 120017600 B CN120017600 B CN 120017600B CN 202510477556 A CN202510477556 A CN 202510477556A CN 120017600 B CN120017600 B CN 120017600B
Authority
CN
China
Prior art keywords
module
request message
state
rqe
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202510477556.8A
Other languages
Chinese (zh)
Other versions
CN120017600A (en
Inventor
杨惠
卓超
李韬
原玉磊
吕高锋
荀鹏
熊智挺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN202510477556.8A priority Critical patent/CN120017600B/en
Publication of CN120017600A publication Critical patent/CN120017600A/en
Application granted granted Critical
Publication of CN120017600B publication Critical patent/CN120017600B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The request message verification module in the message processing system provided by the invention verifies the received request message and maintains QP state information, screens out the request message passing verification, the RQE processing verification module verifies RQE and maintains QP state information, judges whether the RQE space is enough to distribute the request message, the request message load uploading module writes the request message load into a host and maintains QP state information according to the remote address or RQE address of the request message, and the completion verification module determines and informs the request message processing mode according to the QP state information so as to maintain QP state information synchronization, and the response construction module constructs a response message. The processing system can further decouple each processing operation through the QP state information maintenance and synchronization mechanism, avoid the similar head blocking problem of each module, realize the full pipelining processing of the RDMA network card on the request message and improve the processing performance of the response end of the RDMA network card.

Description

一种报文处理系统A message processing system

技术领域Technical Field

本发明涉及远程直接内存访问技术领域,特别是涉及一种报文处理系统。The present invention relates to the technical field of remote direct memory access, and in particular to a message processing system.

背景技术Background Art

近年来,随着人工智能、云计算等技术的快速发展,RoCEv2(RDMA over ConvergedEthernet)技术在数据中心得到广泛的应用,众多国内外厂商由此推出各自的RDMA相关IP与产品。然而,一方面,目前RDMA相关软件虽已有一系列的开源支持,比如OFED(OpenFabrics Enterprise Distribution),但是各大厂商对于其硬件实现架构仍不会公开;另一方面,对于部署在数据中心的RDMA网卡,其所支持的链路带宽多为百Gbps级别,此种数量级的数据处理需求对于实现RDMA网卡的FPGA(Filed Programmable Gate Array,现场可编程逻辑门阵列)或者ASIC(Application Specific Integrated Circuit,专用集成电路)而言,需要进行精密的流水化设计才可满足;以RDMA网卡响应端对RC(ReliableConnection,可靠连接)服务类型的Send请求报文的处理流程为例,基于IB(InfiniBand,无限带宽)协议要求,其处理至少包括Opcode和PSN(Packet Sequence Number,报文序列号)等一系列信息的校验、从主机获取RQE(Receive Queue Element,接收队列元素)、报文长度累计检测、报文数据上送主机、生成CQE(Completion Queue Element,完成队列元素)上送主机等众多步骤,且同一个QP的报文处理可能出现类似头阻塞问题极大提高了各个步骤之间的耦合度,比如只有当QP(Queue Pai,队列对)的上一个报文完成更新ePSN(ExpectedPacket Sequence Number,预期报文序列号)后才下一次报文才可用此ePSN决策其处理方式,而每一个报文的最大处理延时动辄需要数百个时钟周期,显然,简单的报文处理机制难以满足百Gbps级别的带宽需求。In recent years, with the rapid development of technologies such as artificial intelligence and cloud computing, RoCEv2 (RDMA over ConvergedEthernet) technology has been widely used in data centers, and many domestic and foreign manufacturers have launched their own RDMA-related IPs and products. However, on the one hand, although there is a series of open source support for RDMA-related software, such as OFED (OpenFabrics Enterprise Distribution), major manufacturers still do not disclose their hardware implementation architecture; on the other hand, for RDMA network cards deployed in data centers, the link bandwidth they support is mostly at the level of hundreds of Gbps. For FPGA (Field Programmable Gate Array) or ASIC (Application Specific Integrated Circuit) that implements RDMA network cards, this order of magnitude of data processing needs require precise pipeline design to meet; Taking the processing flow of the Send request message of the RC (Reliable Connection) service type at the RDMA network card responder as an example, based on the IB (InfiniBand) protocol requirements, its processing includes at least the verification of a series of information such as Opcode and PSN (Packet Sequence Number), obtaining RQE (Receive Queue Element) from the host, accumulating message length detection, sending message data to the host, generating CQE (Completion Queue Element) and other information, and so on. Element, complete queue element) to the host and many other steps, and the message processing of the same QP may have similar head blocking problems, which greatly increases the coupling between the various steps. For example, only when the previous message of QP (Queue Pai, queue pair) completes the update of ePSN (Expected Packet Sequence Number) can the next message use this ePSN to decide its processing method, and the maximum processing delay of each message requires hundreds of clock cycles. Obviously, a simple message processing mechanism is difficult to meet the bandwidth requirements of hundreds of Gbps.

因此,提供一种解决上述问题的报文处理系统是本领域技术人员亟待解决的问题。Therefore, providing a message processing system that solves the above problems is an urgent problem to be solved by those skilled in the art.

发明内容Summary of the invention

本发明的目的在于提供一种报文处理系统,该系统结构简单,安全、有效、可靠且操作简便,在满足IB协议要求的前提下,实现硬件流水化处理以提高RDMA网卡响应端的处理性能。The object of the present invention is to provide a message processing system, which has a simple structure, is safe, effective, reliable and easy to operate, and realizes hardware pipeline processing to improve the processing performance of the RDMA network card responder under the premise of meeting the requirements of the IB protocol.

基于以上目的,本发明提供的技术方案如下:Based on the above objectives, the technical solution provided by the present invention is as follows:

一种报文处理系统,包括:A message processing system, comprising:

请求报文校验模块,用于校验接收到的请求报文并维护第一QP状态信息,筛选出校验通过的请求报文;A request message verification module, used to verify the received request message and maintain the first QP state information, and filter out the request message that passes the verification;

RQE处理校验模块,用于校验从主机中获取的RQE并维护第二QP状态信息,校验RQE的空间是否足够分配给所述请求报文使用;An RQE processing and verification module, used to verify the RQE obtained from the host and maintain the second QP state information, and verify whether the RQE space is sufficient to be allocated to the request message;

请求报文负载上传模块,用于根据请求报文中的远程地址或RQE中的地址,将请求报文负载写入主机并维护第三QP状态信息;A request message payload upload module, used to write the request message payload to the host and maintain the third QP state information according to the remote address in the request message or the address in the RQE;

完成校验模块,用于根据所述第一QP状态信息、所述第二QP状态信息和所述第三QP状态信息,确定请求报文处理方式,并通告所述请求报文处理方式以维护所述第一QP状态信息、所述第二QP状态信息和所述第三QP状态信息同步;a completion verification module, configured to determine a request message processing mode according to the first QP state information, the second QP state information, and the third QP state information, and notify the request message processing mode to maintain synchronization of the first QP state information, the second QP state information, and the third QP state information;

响应报文构造模块,用于根据所述请求报文处理方式构建响应报文。The response message construction module is used to construct a response message according to the request message processing method.

优选地,所述请求报文校验模块包括:发送校验模块、合理性校验模块、第一筛选模块和第一QP状态模块;Preferably, the request message verification module includes: a sending verification module, a rationality verification module, a first screening module and a first QP state module;

所述发送校验模块,用于校验接收到的请求报文是否为报文处理系统的所述请求报文;The sending verification module is used to verify whether the received request message is the request message of the message processing system;

所述合理性校验模块,用于校验所述请求报文是否合理;The rationality checking module is used to check whether the request message is reasonable;

所述第一筛选模块,用于筛选所述发送校验模块判断结果与所述合理性校验模块判断结果均为是的所述请求报文;The first screening module is used to screen the request messages whose judgment results of the sending verification module and the rationality verification module are both yes;

所述第一QP状态模块,用于在所述发送校验模块判断结果与所述合理性校验模块判断结果任一为否时,标记所述请求报文异常,更新所述第一QP状态信息。The first QP status module is used to mark the request message as abnormal and update the first QP status information when either the judgment result of the sending verification module or the judgment result of the rationality verification module is negative.

优选地,所述第一QP状态模块,还用于当所述第一QP状态信息中的QP类型为RC类型时,根据RC类型QP硬件状态对应处理所述请求报文;Preferably, the first QP state module is further configured to process the request message according to the RC type QP hardware state when the QP type in the first QP state information is the RC type;

所述第一QP状态模块,包括:第一状态切换子模块;The first QP state module includes: a first state switching submodule;

所述第一状态切换子模块,具体用于,当主机创建或重启QP时切换至normal状态;The first state switching submodule is specifically used to switch to the normal state when the host creates or restarts the QP;

若所述合理性校验模块判断结果为否,则切换至wait_send_nack状态;If the judgment result of the rationality check module is no, switch to the wait_send_nack state;

若完成校验模块通告所述请求报文为IB协议所定义的B类错误时,则切换至wait_epsn状态;If the completion check module notifies that the request message is a Class B error defined by the IB protocol, it switches to the wait_epsn state;

若所述请求报文触发IB协议所定义的A类或C类错误或主机配置QP错误或所述完成校验模块通告IB协议所定义的A类或C类错误任一种时,则切换至error状态。If the request message triggers a Class A or Class C error defined in the IB protocol or a host configuration QP error, or the completion check module notifies any of the Class A or Class C errors defined in the IB protocol, the state is switched to the error state.

优选地,所述第一QP状态模块还用于,Preferably, the first QP state module is further configured to:

当处于error状态时,调用网卡直接静默丢弃所有所述请求报文;When in error state, the network card is called to directly and silently discard all the request messages;

当处于normal状态时,则调用网卡丢弃错误重传的所述请求报文,将剩余所述请求报文按照IB协议根据所述合理性校验模块判断结果进行标记处理;When in the normal state, the network card is called to discard the request message that is retransmitted in error, and the remaining request messages are marked according to the IB protocol and the judgment result of the rationality check module;

当处于wait_send_nack状态时,调用网卡处理正确重传的所述请求报文,丢弃剩余所述请求报文;When in the wait_send_nack state, calling the network card to process the correctly retransmitted request message and discarding the remaining request messages;

当处于wait_epsn状态时,调用网卡处理所述合理性校验模块判断结果为是或正确重传的所述请求报文,丢弃剩余所述请求报文,其中,处理所述合理性校验模块判断结果为是的所述请求报文的处理方式与处于normal状态时处理方式一致。When in the wait_epsn state, the network card is called to process the request message whose judgment result of the rationality check module is yes or correctly retransmitted, and the remaining request messages are discarded, wherein the processing method of the request message whose judgment result of the rationality check module is yes is consistent with the processing method when in the normal state.

优选地,所述RQE处理校验模块包括:缓存模块、RQE状态校验模块、RQE空间校验模块、第二筛选模块和第二QP状态模块;Preferably, the RQE processing verification module includes: a cache module, an RQE state verification module, an RQE space verification module, a second screening module and a second QP state module;

所述缓存模块,用于从主机中获取活跃QP的RQE并分QP缓存至网卡;The cache module is used to obtain the RQE of the active QP from the host and cache it to the network card in different QPs;

所述RQE状态校验模块,用于校验RQE是否正确,若为否,则标记为畸形RQE;The RQE status verification module is used to verify whether the RQE is correct, if not, it is marked as a malformed RQE;

所述RQE空间校验模块,用于根据所述请求报文查看网卡中是否存在已缓存对应QP的RQE,若存在,则将已缓存对应QP的RQE分配给所述请求报文,若不存在,则触发RNR错误,标记所述请求报文;The RQE space check module is used to check whether there is an RQE corresponding to the QP cached in the network card according to the request message, and if so, allocate the RQE corresponding to the QP cached to the request message; if not, trigger an RNR error and mark the request message;

所述第二筛选模块,用于筛选所述RQE状态校验模块判断结果与所述RQE空间校验模块判断结果均为是的所述请求报文;The second screening module is used to screen the request message whose judgment result of the RQE state verification module and the judgment result of the RQE space verification module are both yes;

所述第二QP状态模块,用于在所述RQE状态校验模块判断结果与所述RQE空间校验模块判断结果任一为否时,标记所述请求报文异常,更新所述第二QP状态信息。The second QP status module is used to mark the request message as abnormal and update the second QP status information when either a judgment result of the RQE status check module or a judgment result of the RQE space check module is negative.

优选地,所述第二QP状态模块,还用于当所述第二QP状态信息中QP类型为RC类型时,根据RC类型QP硬件状态对应处理所述请求报文;Preferably, the second QP state module is further configured to process the request message according to the RC type QP hardware state when the QP type in the second QP state information is the RC type;

所述第二QP状态模块,包括:第二状态切换子模块;The second QP state module includes: a second state switching submodule;

所述第二状态切换子模块,具体用于,当主机创建或重启QP时切换至normal状态;The second state switching submodule is specifically used to switch to the normal state when the host creates or restarts the QP;

若所述RQE空间校验模块判断结果为否或所述请求报文已被标记为IB协议所定义的B类错误时,则切换至wait_send_nack状态;If the judgment result of the RQE space check module is no or the request message has been marked as a Class B error defined by the IB protocol, it switches to the wait_send_nack state;

若完成校验模块通告所述请求报文为IB协议所定义的B类错误时,则切换至wait_epsn状态;If the completion check module notifies that the request message is a Class B error defined by the IB protocol, it switches to the wait_epsn state;

若所述请求报文已被标记为IB协议所定义的A类或C类错误或所述主机配置QP错误或所述完成校验模块通告IB协议所定义的A类或C类错误任一种时,则切换至error状态。If the request message has been marked as a Class A or Class C error defined in the IB protocol, or the host configuration QP error, or the completion check module notifies any of the Class A or Class C errors defined in the IB protocol, then the state is switched to the error state.

优选地,所述第二QP状态模块还用于,Preferably, the second QP state module is further used for:

当处于error状态时,调用网卡直接静默丢弃所有所述请求报文;When in error state, the network card is called to directly and silently discard all the request messages;

当处于wait_send_nack状态时,调用网卡处理正确重传的所述请求报文,丢弃剩余所述请求报文;When in the wait_send_nack state, calling the network card to process the correctly retransmitted request message and discarding the remaining request messages;

当处于normal状态或wait_epsn状态时,若所述请求报文触发RNR错误且所述请求报文已被标记为所述合理性校验模块判断结果为否的B类错误,则将所述请求报文重新标记为RNR错误。When in the normal state or the wait_epsn state, if the request message triggers an RNR error and the request message has been marked as a Class B error with a negative judgment result by the rationality check module, the request message is re-marked as an RNR error.

优选地,所述RQE空间校验模块还包括:二重校验子模块;Preferably, the RQE space check module further comprises: a double check submodule;

所述二重校验子模块,用于网卡中已存在对应QP的RQE之后,校验RQE是否畸形以及所述RQE所对应剩余主机内存空间是否支持当前所述请求报文负载数据写入;The double check submodule is used to check whether the RQE corresponding to the QP is deformed and whether the remaining host memory space corresponding to the RQE supports the writing of the current request message payload data after the RQE corresponding to the QP already exists in the network card;

若所述RQE被标记为畸形,则将所述请求报文标记为畸形RQE错误;If the RQE is marked as malformed, marking the request message as a malformed RQE error;

若所述RQE所对应剩余主机内存空间不支持当前所述请求报文负载数据写入,则将所述请求报文标记为无效请求错误。If the remaining host memory space corresponding to the RQE does not support the writing of the current request message payload data, the request message is marked as an invalid request error.

优选地,所述第二QP状态模块,还包括:第三状态切换子模块;Preferably, the second QP state module further includes: a third state switching submodule;

所述第三状态切换子模块,具体用于,当主机创建或重启QP时切换至normal状态;The third state switching submodule is specifically used to switch to the normal state when the host creates or restarts the QP;

若所述请求报文已被标记为IB协议所定义的A类或C类错误或主机配置QP错误或所述完成校验模块通告IB协议所定义的A类或C类错误或所述请求报文被标记为所述畸形RQE错误或所述无效请求错误任一种时,则切换至error状态。If the request message has been marked as a Class A or Class C error defined by the IB protocol or a host configuration QP error, or the completion check module notifies a Class A or Class C error defined by the IB protocol, or the request message is marked as either the malformed RQE error or the invalid request error, then switch to the error state.

优选地,所述请求报文负载上传模块包括:负载上传模块、负载数据写入模块和第三QP状态模块;Preferably, the request message load uploading module includes: a load uploading module, a load data writing module and a third QP state module;

所述负载上传模块,用于判断所述请求报文是否需要进行负载上传;The load uploading module is used to determine whether the request message needs to be loaded and uploaded;

所述负载数据写入模块,用于在所述负载上传模块判断结果为是时,根据所述请求报文中的远程地址或所述RQE中的地址从主机中获取对应的物理页地址,根据所述物理页地址将请求报文负载写入主机内存,并构造请求报文描述符;The load data writing module is used to, when the load uploading module determines that the result is yes, obtain the corresponding physical page address from the host according to the remote address in the request message or the address in the RQE, write the request message load into the host memory according to the physical page address, and construct a request message descriptor;

所述第三QP状态模块,用于当所述第三QP状态信息中的QP类型为RC类型时,根据RC类型QP硬件状态对应处理所述请求报文。The third QP state module is configured to process the request message according to the RC type QP hardware state when the QP type in the third QP state information is the RC type.

优选地,所述第三QP状态模块,包括:第四状态切换子模块;Preferably, the third QP state module comprises: a fourth state switching submodule;

第四状态切换子模块,具体用于,当主机创建或重启QP时切换至normal状态;The fourth state switching submodule is specifically used to switch to the normal state when the host creates or restarts the QP;

若所述请求报文已被标记为IB协议所定义的A类或C类错误或所述主机配置QP错误或所述完成校验模块通告IB协议所定义的A类或C类错误任一种时,则切换至error状态。If the request message has been marked as a Class A or Class C error defined in the IB protocol, or the host configuration QP error, or the completion check module notifies any of the Class A or Class C errors defined in the IB protocol, then the state is switched to the error state.

优选地,所述完成校验模块,包括:请求报文处理方式确定模块和通告模块;Preferably, the completion verification module includes: a request message processing mode determination module and a notification module;

所述请求报文处理方式确定模块,用于根据所述请求报文描述符中包含的所述第一QP状态信息、所述第二QP状态信息和所述第三QP状态信息确定请求报文处理方式;The request message processing mode determining module is used to determine the request message processing mode according to the first QP state information, the second QP state information and the third QP state information included in the request message descriptor;

所述通告模块,用于将所述请求报文描述符中的报文信息分别发送至所述请求报文校验模块、所述RQE处理校验模块和所述请求报文负载上传模块,以更新对应的QP状态信息。The notification module is used to send the message information in the request message descriptor to the request message verification module, the RQE processing verification module and the request message load upload module respectively, so as to update the corresponding QP status information.

优选地,所述响应报文构造模块,具体用于根据所述请求报文描述符生成响应报文描述符,根据所述响应报文描述符构造响应报文;Preferably, the response message construction module is specifically used to generate a response message descriptor according to the request message descriptor, and construct a response message according to the response message descriptor;

若所述响应报文为读取响应报文,则所述响应报文构造模块,还具体用于根据所述响应报文描述符、所述请求报文中的远程地址以及所述物理页地址构造所述响应报文。If the response message is a read response message, the response message construction module is further specifically used to construct the response message according to the response message descriptor, the remote address in the request message, and the physical page address.

本发明所提供的报文处理系统,是通过请求报文校验模块校验接收到的请求报文并维护QP状态信息,筛选出校验通过的请求报文;通过RQE处理校验模块校验RQE并维护QP状态信息,判断RQE空间是否足够分配请求报文;通过请求报文负载上传模块,根据请求报文远程地址或RQE地址,将请求报文负载写入主机并维护QP状态信息;通过完成校验模块根据上述模块的QP状态信息确定并通告请求报文处理方式,以维护QP状态信息同步,通过响应构造模块构建响应报文。通过QP状态信息维护与同步机制可进一步解耦各个处理操作,避免各模块为实现异常情况处理而导致出现类似头阻塞问题,可以实现RDMA网卡对于请求报文的全流水化处理,提高RDMA网卡响应端的处理性能。The message processing system provided by the present invention verifies the received request message and maintains the QP status information through the request message verification module, and selects the request message that passes the verification; verifies the RQE and maintains the QP status information through the RQE processing verification module, and determines whether the RQE space is sufficient to allocate the request message; writes the request message load to the host and maintains the QP status information according to the request message remote address or RQE address through the request message load upload module; determines and notifies the request message processing mode according to the QP status information of the above module through the completion verification module to maintain the synchronization of the QP status information, and constructs the response message through the response construction module. Through the QP status information maintenance and synchronization mechanism, each processing operation can be further decoupled to avoid the occurrence of similar head blocking problems caused by each module to realize abnormal situation processing, and the full pipeline processing of the RDMA network card for the request message can be realized, and the processing performance of the RDMA network card response end can be improved.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

图1为本发明实施例提供的一种报文处理系统的结构示意图;FIG1 is a schematic diagram of the structure of a message processing system provided by an embodiment of the present invention;

图2为本发明实施例提供的请求报文校验模块的结构示意图;FIG2 is a schematic diagram of the structure of a request message verification module provided in an embodiment of the present invention;

图3为本发明实施例提供的RQE处理校验模块的结构示意图;FIG3 is a schematic diagram of the structure of an RQE processing and verification module provided in an embodiment of the present invention;

图4为本发明实施例提供的请求报文负载上传模块的结构示意图;FIG4 is a schematic diagram of the structure of a request message load upload module provided in an embodiment of the present invention;

图5为本发明实施例提供的完成校验模块的结构示意图。FIG5 is a schematic diagram of the structure of a completion verification module provided in an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

本发明实施例采用递进的方式撰写。The embodiments of the present invention are written in a progressive manner.

本发明实施例提供了一种报文处理系统。主要解决现有技术中,各个模块实现异常情况处理而导致出现类似头阻塞问题导致RDMA网卡响应端的处理性能降低的技术问题。The embodiment of the present invention provides a message processing system, which mainly solves the technical problem in the prior art that each module implements abnormal situation processing, resulting in similar head blocking problems and reducing the processing performance of the RDMA network card responder.

如图1所示,一种报文处理系统,包括:As shown in FIG1 , a message processing system includes:

请求报文校验模块,用于校验接收到的请求报文并维护第一QP状态信息,筛选出校验通过的请求报文;A request message verification module, used to verify the received request message and maintain the first QP state information, and filter out the request message that passes the verification;

RQE处理校验模块,用于校验从主机中获取的RQE并维护第二QP状态信息,校验RQE的空间是否足够分配给请求报文使用;An RQE processing and verification module is used to verify the RQE obtained from the host and maintain the second QP state information, and to verify whether the RQE space is sufficient to be allocated to the request message;

请求报文负载上传模块,用于根据请求报文中的远程地址或RQE中的地址,将请求报文负载写入主机并维护第三QP状态信息;A request message payload upload module, used to write the request message payload to the host and maintain the third QP state information according to the remote address in the request message or the address in the RQE;

完成校验模块,用于根据第一QP状态信息、第二QP状态信息和第三QP状态信息,确定请求报文处理方式,并通告请求报文处理方式以维护第一QP状态信息、第二QP状态信息和第三QP状态信息同步;A completion verification module is used to determine a request message processing mode according to the first QP state information, the second QP state information, and the third QP state information, and to notify the request message processing mode to maintain synchronization of the first QP state information, the second QP state information, and the third QP state information;

响应报文构造模块,用于根据请求报文处理方式构建响应报文。The response message construction module is used to construct the response message according to the request message processing method.

实际运用过程中,请求报文校验模块接收由网卡传输的请求报文,对该报文进行校验并维护第一QP状态信息,筛选出校验通过的请求报文;将校验通过的请求报文发送至RQE处理校验模块,RQE处理校验模块预先从主机中获取活跃QP的RQE,校验该RQE并维护第二QP状态信息,校验该RQE的空间是否足够分配给校验通过的请求报文使用;若是,则通过请求报文负载上传模块根据请求报文中的远程地址或RQE中的地址,将请求报文负载写入主机并维护第三QP状态信息;通过完成校验模块接收上述模块所维护的QP状态信息,确定请求报文处理方式并发送给响应报文构造模块,并通告给上述模块,从而使各个模块的QP状态信息同步;通过响应构造模块根据请求报文处理方式构建响应报文。During actual use, the request message verification module receives the request message transmitted by the network card, verifies the message and maintains the first QP state information, and selects the request message that passes the verification; the request message that passes the verification is sent to the RQE processing verification module, and the RQE processing verification module obtains the RQE of the active QP from the host in advance, verifies the RQE and maintains the second QP state information, and verifies whether the space of the RQE is sufficient to be allocated to the request message that passes the verification; if so, the request message payload upload module writes the request message payload to the host and maintains the third QP state information according to the remote address in the request message or the address in the RQE; the completion verification module receives the QP state information maintained by the above module, determines the request message processing method and sends it to the response message construction module, and notifies the above module, so that the QP state information of each module is synchronized; the response construction module constructs a response message according to the request message processing method.

优选地,请求报文校验模块包括:发送校验模块、合理性校验模块、第一筛选模块和第一QP状态模块;Preferably, the request message verification module includes: a sending verification module, a rationality verification module, a first screening module and a first QP state module;

发送校验模块,用于校验接收到的请求报文是否为报文处理系统的请求报文;A sending verification module is used to verify whether the received request message is a request message of the message processing system;

合理性校验模块,用于校验请求报文是否合理;A rationality check module is used to check whether the request message is reasonable;

第一筛选模块,用于筛选发送校验模块判断结果与合理性校验模块判断结果均为是的请求报文;The first screening module is used to screen the request messages whose judgment results of the sending verification module and the rationality verification module are both yes;

第一QP状态模块,用于在发送校验模块判断结果与合理性校验模块判断结果任一为否时,标记请求报文异常,更新第一QP状态信息。The first QP state module is used to mark the request message as abnormal and update the first QP state information when either the judgment result of the sending verification module or the judgment result of the rationality verification module is negative.

实际运用过程中,在进行RoCEv2报文的筛选时,先基于报文的以太网二、三、四层头部信息判断是否为送往本端的RoCEv2报文,再根据IB协议的BTH(Base TransportHeader,基本传输头)头部信息以及对应的QPC(Queue Pair Context,队列对上下文)信息判断是否为合理的RoCEv2请求报文,只有合理的RoCEv2请求报文才会进行上述后续模块处理,否则会按照协议要求直接静默丢弃或送往网卡其他处理逻辑;In actual use, when screening RoCEv2 messages, first determine whether it is a RoCEv2 message sent to the local end based on the Ethernet layer 2, 3, and 4 header information of the message, and then determine whether it is a reasonable RoCEv2 request message based on the BTH (Base Transport Header) header information of the IB protocol and the corresponding QPC (Queue Pair Context) information. Only reasonable RoCEv2 request messages will be processed by the above subsequent modules, otherwise they will be directly silently discarded or sent to other processing logic of the network card according to the protocol requirements;

对于RoCEv2请求报文进行的初步校验,指可基于报文的BTH与 ETH(ExtendedTransport Header,拓展传输头)信息、QPC、MRC(Memory Region Context,内存区域上下文)以及模块自行维护的QP相关状态信息直接进行判断的校验,若初步校验通过,则继续后续模块的处理,否则根据错误原因执行相关异常处理操作。初步校验的内容包括: Opcode类型是否支持、Opcode顺序的正确性、PSN正确性、R_Key(Remote Key,远端密钥)与访问需求是否匹配、Q_Key(Queue Key,队列密钥)正确性、报文长度与PMTU(Path MaximumTransmission Unit,路径最大传输单元)是否匹配、Pad Count的正确性等。其中:The preliminary verification of the RoCEv2 request message refers to the verification that can be directly judged based on the BTH and ETH (Extended Transport Header) information of the message, QPC, MRC (Memory Region Context) and the QP-related status information maintained by the module itself. If the preliminary verification passes, the processing of the subsequent modules will continue, otherwise the relevant exception handling operations will be performed according to the cause of the error. The contents of the preliminary verification include: whether the Opcode type is supported, the correctness of the Opcode sequence, the correctness of the PSN, whether the R_Key (Remote Key) matches the access requirement, the correctness of the Q_Key (Queue Key), whether the message length matches the PMTU (Path Maximum Transmission Unit), the correctness of the Pad Count, etc. Among them:

Opcode类型校验,用于检查报文对应QP是否支持报文BTH头部信息中Opcode字段对应的请求类型;Opcode type check is used to check whether the QP corresponding to the message supports the request type corresponding to the Opcode field in the BTH header information of the message;

Opcode顺序校验,用于检查报文的Opcode与对应QP的上一个正确报文的Opcode是否顺承;因此,请求报文校验模块需要记录各个QP的上一个正确报文的Opcode;Opcode sequence check is used to check whether the Opcode of the message is in sequence with the Opcode of the last correct message of the corresponding QP; therefore, the request message check module needs to record the Opcode of the last correct message of each QP;

PSN校验,用于检查报文的PSN是否等于对应QP的ePSN;因此,请求报文校验模块需要维护各个QP的ePSN值;PSN check is used to check whether the PSN of the message is equal to the ePSN of the corresponding QP; therefore, the request message check module needs to maintain the ePSN value of each QP;

R_Key校验,用于检查处理RDMA Write或者RDMA Read请求报文时所需访问MR的操作类型与空间大小是否在其R_Key的访问权限之内,R_Key的访问权限可从MRC中获取;R_Key check is used to check whether the operation type and space size required to access the MR when processing RDMA Write or RDMA Read request messages are within the access rights of the R_Key. The access rights of the R_Key can be obtained from the MRC.

Q_Key校验,用于检查请求报文的Q_Key与对应目的QP是否匹配;Q_Key check, used to check whether the Q_Key of the request message matches the corresponding destination QP;

报文长度校验,包括检查报文负载长度与MTU、Opcode是否匹配,以及RDMA Write请求所有的报文负载总长度是否与其RETH(RDMA Extended Transport Header,RDMA拓展传输头)中的DMA Length字段相匹配;因此,请求报文校验模块需要基于QP记录RDMA Write请求报文中的RETH,以及该请求所有报文负载长度的累加值;Message length check, including checking whether the message payload length matches the MTU and Opcode, and whether the total length of all message payloads in the RDMA Write request matches the DMA Length field in its RETH (RDMA Extended Transport Header). Therefore, the request message check module needs to record the RETH in the RDMA Write request message based on the QP, as well as the cumulative value of the payload length of all messages in the request.

Pad Count校验,用于检查BTH中的Pad Count字段与Opcode是否匹配。Pad Count check is used to check whether the Pad Count field in BTH matches the Opcode.

在对报文进行初步校验时,会维护QP相关状态信息,若在校验过程中发现错误,则会标记报文异常,同时更新QP相关状态信息,以便于决策对应QP后续报文的处理方式。When performing preliminary verification on the message, QP-related status information will be maintained. If an error is found during the verification process, the message will be marked as abnormal and the QP-related status information will be updated to facilitate decision-making on how to handle subsequent messages of the corresponding QP.

如图2所示,优选地,第一QP状态模块,还用于当第一QP状态信息中的QP类型为RC类型时,根据RC类型QP硬件状态对应处理请求报文;As shown in FIG2 , preferably, the first QP state module is further configured to process the request message according to the RC type QP hardware state when the QP type in the first QP state information is the RC type;

第一QP状态模块,包括:第一状态切换子模块;The first QP state module includes: a first state switching submodule;

第一状态切换子模块,具体用于,当主机创建或重启QP时切换至normal状态;A first state switching submodule, specifically used to switch to a normal state when the host creates or restarts a QP;

若合理性校验模块判断结果为否,则切换至wait_send_nack状态;If the rationality check module determines that the result is no, it switches to the wait_send_nack state;

若完成校验模块通告请求报文为IB协议所定义的B类错误时,则切换至wait_epsn状态;If the verification module notification request message is completed and it is a Class B error defined by the IB protocol, it switches to the wait_epsn state;

若请求报文触发IB协议所定义的A类或C类错误或主机配置QP错误或完成校验模块通告IB协议所定义的A类或C类错误任一种时,则切换至error状态。If the request message triggers a Class A or Class C error defined in the IB protocol, or a host configuration QP error, or the completion check module notifies any of the Class A or Class C errors defined in the IB protocol, it switches to the error state.

实际运用过程中,当第一QP状态信息中的QP类型为RC类型时,进行四种状态的转换,在每种状态下对应处理请求报文,用于进一步决策报文的处理方式。QP硬件状态包括normal、wait_send_nack、wait_epsn、error四个状态。当主机创建或者重启QP时进入normal状态,此状态用于正常流水化处理请求报文;在此状态时,若检测到带有无效PSN的报文则进入wait_send_nack状态,若检测到完成校验模块通告IB协议所定义的B类错误时则进入wait_epsn状态,若检测到有本模块正在处理的请求报文触发IB协议所定义的A类或C类错误、主机配置QP进入错误相关状态以及完成校验模块通告IB协议所定义的A类或C类错误三种情况中的一种则进入error状态;In actual use, when the QP type in the first QP state information is the RC type, four state transitions are performed, and the corresponding request message is processed in each state to further decide the message processing method. The QP hardware state includes four states: normal, wait_send_nack, wait_epsn, and error. When the host creates or restarts the QP, it enters the normal state, which is used for normal pipeline processing of request messages; in this state, if a message with an invalid PSN is detected, it enters the wait_send_nack state; if it is detected that the completion check module notifies a Class B error defined in the IB protocol, it enters the wait_epsn state; if it is detected that the request message being processed by this module triggers a Class A or Class C error defined in the IB protocol, the host configures the QP to enter an error-related state, and the completion check module notifies a Class A or Class C error defined in the IB protocol, it enters the error state;

wait_send_nack状态,用于发现带有无效PSN报文后等待网卡发送对应的Unacknowledge报文;在此状态时,若检测到完成校验模块通告IB协议所定义B类错误时则进入wait_epsn状态,若检测到有主机配置QP进入错误相关状态以及完成校验模块通告IB协议所定义的A类或C类错误两种情况中的一种则进入error状态;The wait_send_nack state is used to wait for the network card to send the corresponding Unacknowledge message after discovering an invalid PSN message. In this state, if it is detected that the completion check module notifies the B-type error defined in the IB protocol, it will enter the wait_epsn state. If it is detected that the host configuration QP enters the error-related state and the completion check module notifies the A or C-type error defined in the IB protocol, it will enter the error state.

wait_epsn状态,用于在网卡发送B类错误导致的Unacknowledge报文后,等待对端重现发送正确的请求报文;在此状态时,若检测到有包括PSN校验的所有校验都正确的报文时则进入normal状态,若检测到有本模块正在处理的请求报文PSN正确但触发了IB协议所定义的A类或C类错误、主机配置QP进入错误相关状态两种情况中的一种则进入error状态;The wait_epsn state is used to wait for the peer end to resend the correct request message after the network card sends the Unacknowledge message caused by the Class B error. In this state, if a message with all the checks including the PSN check is detected to be correct, it will enter the normal state. If it is detected that the request message being processed by this module has a correct PSN but triggers the Class A or Class C error defined by the IB protocol, or the host configuration QP enters the error-related state, it will enter the error state.

error状态用于网卡丢弃对应QP的报文;在此状态,若主机创建或者重启QP后,方可进入normal状态。The error state is used when the network card discards the corresponding QP message. In this state, the host can enter the normal state only after creating or restarting the QP.

优选地,第一QP状态模块还用于,Preferably, the first QP state module is further configured to:

当处于error状态时,调用网卡直接静默丢弃所有请求报文;When in error state, the network card is called to silently discard all request messages;

当处于normal状态时,则调用网卡丢弃错误重传的请求报文,将剩余请求报文按照IB协议根据合理性校验模块判断结果进行标记处理;When in the normal state, the network card is called to discard the request message that is retransmitted with error, and the remaining request messages are marked according to the IB protocol based on the judgment result of the rationality check module;

当处于wait_send_nack状态时,调用网卡处理正确重传的请求报文,丢弃剩余请求报文;When in the wait_send_nack state, the network card is called to process the correctly retransmitted request messages and the remaining request messages are discarded;

当处于wait_epsn状态时,调用网卡处理合理性校验模块判断结果为是或正确重传的请求报文,丢弃剩余请求报文,其中,处理合理性校验模块判断结果为是的请求报文的处理方式与处于normal状态时处理方式一致。When in the wait_epsn state, the network card is called to process the request messages whose judgment result is yes or correctly retransmitted by the rationality check module, and the remaining request messages are discarded. Among them, the processing method of the request messages whose judgment result is yes by the rationality check module is consistent with the processing method in the normal state.

实际运用过程中,第一QP状态模块通过调用网卡基于QP状态的报文处理方式操作如下:若为error状态,则直接静默丢弃所有报文;若为normal状态,则静默丢弃错误的重传报文,其他报文则按照IB协议要求根据报文校验结果进行标记与处理,如标记为无效请求错误、远程访问错误、PSN序列错误等IB协议定义的A/B/C类错误;若为wait_send_nack状态,则只需处理正确的重传报文,其他报文全部丢弃;若为wait_epsn状态,则只需处理PSN正确的报文或者正确的重传报文,其中PSN正确的报文的处理方式与normal状态一致,而其他报文则全部丢弃。During actual use, the first QP state module operates as follows by calling the message processing method based on the QP state of the network card: if it is in the error state, all messages are silently discarded directly; if it is in the normal state, the erroneous retransmission message is silently discarded, and other messages are marked and processed according to the message verification results in accordance with the IB protocol requirements, such as marking as invalid request error, remote access error, PSN sequence error and other A/B/C errors defined by the IB protocol; if it is in the wait_send_nack state, only the correct retransmission message needs to be processed, and all other messages are discarded; if it is in the wait_epsn state, only the PSN correct message or the correct retransmission message needs to be processed, and the processing method of the PSN correct message is the same as that of the normal state, and all other messages are discarded.

优选地,RQE处理校验模块包括:缓存模块、RQE状态校验模块、RQE空间校验模块、第二筛选模块和第二QP状态模块;Preferably, the RQE processing verification module includes: a cache module, an RQE state verification module, an RQE space verification module, a second screening module and a second QP state module;

缓存模块,用于从主机中获取活跃QP的RQE并分QP缓存至网卡;The cache module is used to obtain the RQE of the active QP from the host and cache it to the network card in different QPs;

RQE状态校验模块,用于校验RQE是否正确,若为否,则标记为畸形RQE;RQE status check module, used to check whether the RQE is correct, if not, it is marked as a malformed RQE;

RQE空间校验模块,用于根据请求报文查看网卡中是否存在已缓存对应QP的RQE,若存在,则将已缓存对应QP的RQE分配给请求报文,若不存在,则触发RNR错误,标记请求报文;The RQE space check module is used to check whether there is an RQE corresponding to the QP cached in the network card according to the request message. If so, the RQE corresponding to the QP cached is allocated to the request message. If not, an RNR error is triggered and the request message is marked.

第二筛选模块,用于筛选RQE状态校验模块判断结果与RQE空间校验模块判断结果均为是的请求报文;The second screening module is used to screen the request messages whose judgment results of the RQE state verification module and the RQE space verification module are both yes;

第二QP状态模块,用于在RQE状态校验模块判断结果与RQE空间校验模块判断结果任一为否时,标记请求报文异常,更新第二QP状态信息。The second QP state module is used to mark the request message as abnormal and update the second QP state information when either the judgment result of the RQE state check module or the judgment result of the RQE space check module is negative.

实际运用过程中,在进行RQE处理时,会预先从主机中获取活跃QP的RQE缓存到网卡,同时基于MRC等信息检查RQE的正确性;当收到需要消耗RQE的请求报文时,若对应QP有RQE则可直接从缓存中取出使用,若无RQE,则执行对应的异常处理操作;此外,当对应QP处于错误等状态时,RQE处理与校验模块还会主动读取对应QP的RQE,以便于执行RQE刷新错误完成操作。在判断RQE的空间是否足够分配给报文使用时,即判断RQE所对应的剩余的主机内存空间是否足以支持当前报文负载数据的写入,还会检查RQE的正确性,若RQE正确且足够则继续后续模块的处理,否则执行对应的异常处理操作。在进行上述RQE处理和判断RQE的空间是否足够分配给报文时,均会维护对应的QP状态信息,当处理报文时发现任何异常则会标记报文异常,同时更新QP状态信息,以便于决策对应QP后续报文或者RQE的处理方式。In actual use, when performing RQE processing, the RQE of the active QP will be obtained from the host in advance and cached to the network card, and the correctness of the RQE will be checked based on MRC and other information; when a request message that needs to consume RQE is received, if the corresponding QP has RQE, it can be directly taken out from the cache for use, if there is no RQE, the corresponding exception handling operation will be performed; in addition, when the corresponding QP is in an error state, the RQE processing and verification module will also actively read the RQE of the corresponding QP to facilitate the execution of the RQE refresh error completion operation. When judging whether the RQE space is sufficient to be allocated to the message, that is, judging whether the remaining host memory space corresponding to the RQE is sufficient to support the writing of the current message payload data, the correctness of the RQE will also be checked. If the RQE is correct and sufficient, the processing of the subsequent modules will continue, otherwise the corresponding exception handling operation will be performed. When performing the above RQE processing and judging whether the RQE space is sufficient to be allocated to the message, the corresponding QP status information will be maintained. When any abnormality is found when processing the message, the message will be marked as abnormal, and the QP status information will be updated at the same time to facilitate the decision-making of the corresponding QP subsequent message or RQE processing method.

在本实施例中,具体是预先从主机中获取活跃QP的RQE并分QP缓存到网卡,同时基于RQE中SGE(Scatter/Gather Elements,散列/聚集元素)、L_Key、MRC等信息检查RQE是否正确,若RQE错误则标记为畸形RQE进行缓存。当RQE空间校验模块收到需要消耗RQE的请求报文时,则查看网卡缓存是否已有对应QP的RQE,若有RQE则将其取出分配给此请求报文,若没有则可能触发RNR(Receiver Not Ready,接收端未准备妥当)错误,需配合报文已被标记的状态以及QP状态等信息共同决策报文的处理方式。In this embodiment, the RQE of the active QP is obtained from the host in advance and cached to the network card in different QPs. At the same time, the RQE is checked to see if it is correct based on the SGE (Scatter/Gather Elements), L_Key, MRC and other information in the RQE. If the RQE is wrong, it is marked as a malformed RQE for caching. When the RQE space check module receives a request message that needs to consume RQE, it checks whether the network card cache has the RQE of the corresponding QP. If there is an RQE, it is taken out and assigned to this request message. If not, it may trigger an RNR (Receiver Not Ready) error. The message processing method needs to be jointly decided with the status of the message being marked and the QP status and other information.

如图3所示,优选地,第二QP状态模块,还用于当第二QP状态信息中QP类型为RC类型时,根据RC类型QP硬件状态对应处理请求报文;As shown in FIG3 , preferably, the second QP state module is further configured to process the request message according to the RC type QP hardware state when the QP type in the second QP state information is the RC type;

第二QP状态模块,包括:第二状态切换子模块;The second QP state module includes: a second state switching submodule;

第二状态切换子模块,具体用于,当主机创建或重启QP时切换至normal状态;The second state switching submodule is specifically used to switch to the normal state when the host creates or restarts the QP;

若RQE空间校验模块判断结果为否或请求报文已被标记为IB协议所定义的B类错误时,则切换至wait_send_nack状态;If the RQE space check module determines that the result is no or the request message has been marked as a Class B error defined by the IB protocol, it switches to the wait_send_nack state;

若完成校验模块通告请求报文为IB协议所定义的B类错误时,则切换至wait_epsn状态;If the verification module notification request message is completed and it is a Class B error defined by the IB protocol, it switches to the wait_epsn state;

若请求报文已被标记为IB协议所定义的A类或C类错误或主机配置QP错误或完成校验模块通告IB协议所定义的A类或C类错误任一种时,则切换至error状态。If the request message has been marked as a Class A or Class C error defined in the IB protocol, or a host configuration QP error, or the completion check module notifies any of the Class A or Class C errors defined in the IB protocol, it switches to the error state.

实际运用过程中,当第二QP状态信息中的QP类型为RC类型时,进行四种状态的转换,在每种状态下对应处理请求报文,用于进一步决策报文的处理方式。当主机创建或者重启QP时进入normal状态,此状态用于正常流水化处理请求报文;在此状态时,若检测到被标记为正常但触发RNR错误的报文或者已被标记为的IB协议所定义的B类错误的报文则进入wait_send_nack状态,若检测到完成校验模块通告IB协议所定义的B类错误时则进入wait_epsn状态,若检测到有正在处理的请求报文已被标记为IB协议所定义的A类或C类错误、主机配置QP进入错误相关状态以及完成校验模块通告IB协议所定义的A类或C类错误三种情况中的任何一种则进入error状态;In actual use, when the QP type in the second QP state information is the RC type, four states are converted, and the corresponding request message is processed in each state to further decide the message processing method. When the host creates or restarts the QP, it enters the normal state, which is used for normal pipeline processing of request messages; in this state, if a message marked as normal but triggering an RNR error or a message marked as a Class B error defined by the IB protocol is detected, it enters the wait_send_nack state, if it is detected that the completion check module notifies the Class B error defined by the IB protocol, it enters the wait_epsn state, if it is detected that the request message being processed has been marked as a Class A or Class C error defined by the IB protocol, the host configures the QP to enter the error-related state, and the completion check module notifies the Class A or Class C error defined by the IB protocol, it enters the error state;

wait_send_nack状态,用于检测到RNR错误后等待网卡发送对应的Unacknowledge报文;在此状态时,若检测到完成校验模块通告IB协议所定义B类错误时则进入wait_epsn状态,若检测到有主机配置QP进入错误相关状态以及完成校验模块通告IB协议所定义的A类或C类错误两种情况中的一种则进入error状态;The wait_send_nack state is used to wait for the network card to send the corresponding Unacknowledge message after detecting the RNR error. In this state, if it is detected that the completion check module notifies the B-type error defined in the IB protocol, it will enter the wait_epsn state. If it is detected that the host configuration QP enters the error-related state and the completion check module notifies the A or C-type error defined in the IB protocol, it will enter the error state.

wait_epsn状态,用于在网卡发送B类错误导致的Unacknowledge报文后,等待对端重新发送正确的请求报文;在此状态时,若检测到有被标记为正常且RNR校验正确的报文时则进入normal状态,若检测到有请求报文被标记为IB协议所定义的A类或C类错误、主机配置QP进入错误相关状态两种情况中的一种则进入error状态,若检测到被标记为正常但触发RNR错误的报文或者已被标记为的IB协议所定义的B类错误的报文则进入wait_send_nack状态;The wait_epsn state is used to wait for the peer end to resend the correct request message after the network card sends the Unacknowledge message caused by the Class B error. In this state, if a message marked as normal and with correct RNR verification is detected, the normal state is entered. If a request message is detected to be marked as a Class A or Class C error defined by the IB protocol, or the host configuration QP enters an error-related state, the error state is entered. If a message marked as normal but triggering an RNR error or a message marked as a Class B error defined by the IB protocol is detected, the wait_send_nack state is entered.

error状态,用于网卡丢弃对应QP的报文以及进行RQE刷新错误完成;在此状态,若主机创建或者重启QP后,方可进入normal状态。The error state is used when the network card discards the corresponding QP message and completes the RQE refresh error. In this state, the host can enter the normal state only after creating or restarting the QP.

优选地,第二QP状态模块还用于,Preferably, the second QP state module is further configured to:

当处于error状态时,调用网卡直接静默丢弃所有请求报文;When in error state, the network card is called to silently discard all request messages;

当处于wait_send_nack状态时,调用网卡处理正确重传的请求报文,丢弃剩余请求报文;When in the wait_send_nack state, the network card is called to process the correctly retransmitted request messages and the remaining request messages are discarded;

当处于normal状态或wait_epsn状态时,若请求报文触发RNR错误且请求报文已被标记为合理性校验模块判断结果为否的B类错误,则将请求报文重新标记为RNR错误。When in the normal state or wait_epsn state, if the request message triggers an RNR error and the request message has been marked as a Class B error with a negative result of the rationality check module, the request message is re-marked as an RNR error.

实际运用过程中,第二QP状态模块通过调用网卡基于QP状态的报文处理方式操作如下:当QP处于normal状态或者wait_epsn状态时,若报文触发RNR错误且报文已被请求报文校验模块标记为PSN序列错误的B类错误,则将报文重新标记为RNR错误;若报文没有触发RNR错误或者已被请求报文校验模块标记为其他的A类或者C类错误,则无需修改请求报文校验模块决策的处理方式;In actual use, the second QP state module operates as follows by calling the message processing method based on the QP state of the network card: when the QP is in the normal state or the wait_epsn state, if the message triggers the RNR error and the message has been marked as a Class B error of a PSN sequence error by the request message verification module, the message is re-marked as an RNR error; if the message does not trigger the RNR error or has been marked as other Class A or Class C errors by the request message verification module, there is no need to modify the processing method decided by the request message verification module;

当QP处于wait_send_nack状态时,只有被标记为正常的重传报文才可执行后续处理,其他的报文都会丢弃;When QP is in the wait_send_nack state, only retransmitted packets marked as normal can be processed later, and other packets will be discarded;

QP处于error状态时,丢弃所有报文。When the QP is in the error state, all packets are discarded.

优选地,RQE空间校验模块还包括:二重校验子模块;Preferably, the RQE space check module further comprises: a double check submodule;

二重校验子模块,用于网卡中已存在对应QP的RQE之后,校验RQE是否畸形以及RQE所对应剩余主机内存空间是否支持当前请求报文负载数据写入;The double check submodule is used to check whether the RQE corresponding to the QP is deformed and whether the remaining host memory space corresponding to the RQE supports the writing of the current request message payload data after the RQE corresponding to the QP already exists in the network card;

若RQE被标记为畸形,则将请求报文标记为畸形RQE错误;If the RQE is marked as malformed, the request message is marked as a malformed RQE error;

若RQE所对应剩余主机内存空间不支持当前请求报文负载数据写入,则将请求报文标记为无效请求错误。If the remaining host memory space corresponding to the RQE does not support the writing of the current request message payload data, the request message is marked as an invalid request error.

实际运用过程中,在基于读取的RQE处理报文时,还会检查RQE是否畸形以及RQE所对应的剩余的主机内存空间是否足以支持当前报文负载数据的写入:若发现RQE被标记为畸形,则报文被标记为畸形RQE错误;若RQE所对应的剩余的主机内存空间不足以写入当前报文负载数据,则报文被标记为无效请求错误。上述两种错误均为IB协议所定义的A类或C类错误。In actual use, when processing a message based on the read RQE, it will also check whether the RQE is malformed and whether the remaining host memory space corresponding to the RQE is sufficient to support the writing of the current message payload data: if the RQE is found to be marked as malformed, the message is marked as a malformed RQE error; if the remaining host memory space corresponding to the RQE is insufficient to write the current message payload data, the message is marked as an invalid request error. The above two errors are both Class A or Class C errors defined by the IB protocol.

优选地,第二QP状态模块,还包括:第三状态切换子模块;Preferably, the second QP state module further includes: a third state switching submodule;

第三状态切换子模块,具体用于,当主机创建或重启QP时切换至normal状态;The third state switching submodule is specifically used to switch to the normal state when the host creates or restarts the QP;

若请求报文已被标记为IB协议所定义的A类或C类错误或主机配置QP错误或完成校验模块通告IB协议所定义的A类或C类错误或请求报文被标记为畸形RQE错误或无效请求错误任一种时,则切换至error状态。If the request message has been marked as a Class A or Class C error defined by the IB protocol, or a host configuration QP error, or the completion check module notifies a Class A or Class C error defined by the IB protocol, or the request message is marked as a malformed RQE error or an invalid request error, it switches to the error state.

实际运用过程中,当第二QP状态信息中的QP类型为RC类型时,进行二种状态的转换,在每种状态下对应处理请求报文,用于进一步决策报文的处理方式:在基于读取的RQE处理报文时,除了需要基于QP记录上述RQE所对应的剩余的主机内存空间大小,还需要维护用于RC类型QP的QP硬件状态,其包括normal和error两个状态,当主机创建或者重启QP时进入normal状态,此状态用于正常流水化处理请求报文;在此状态时,若检测到有正在处理的请求报文已被标记为IB协议所定义的A类或C类错误、正在处理的请求报文在本模块被标记为上述两种错误、主机配置QP进入错误相关状态、完成校验模块通告IB协议所定义的A类或C类错误四种情况中的任何一种则进入error状态;error状态,用于网卡丢弃对应QP的报文;在此状态,若主机创建或者重启QP后,方可进入normal状态。In actual application, when the QP type in the second QP state information is the RC type, two state conversions are performed, and the request message is processed in each state to further decide the processing method of the message: when processing the message based on the read RQE, in addition to recording the remaining host memory space size corresponding to the above RQE based on the QP, it is also necessary to maintain the QP hardware state for the RC type QP, which includes two states: normal and error. When the host creates or restarts the QP, it enters the normal state, which is used for normal pipeline processing of request messages; in this state, if it is detected that the request message being processed has been marked as a Class A or Class C error defined by the IB protocol, the request message being processed is marked as the above two errors in this module, the host configures the QP to enter the error-related state, and the completion verification module notifies the Class A or Class C error defined by the IB protocol, any of the four situations, then enter the error state; the error state is used for the network card to discard the message corresponding to the QP; in this state, if the host creates or restarts the QP, it can enter the normal state.

如图4所示,优选地,请求报文负载上传模块包括:负载上传模块、负载数据写入模块和第三QP状态模块;As shown in FIG4 , preferably, the request message load upload module includes: a load upload module, a load data writing module and a third QP state module;

负载上传模块,用于判断请求报文是否需要进行负载上传;The load upload module is used to determine whether the request message needs to be loaded.

负载数据写入模块,用于在负载上传模块判断结果为是时,根据请求报文中的远程地址或RQE中的地址从主机中获取对应的物理页地址,根据物理页地址将请求报文负载写入主机内存,并构造请求报文描述符;The load data writing module is used to obtain the corresponding physical page address from the host according to the remote address in the request message or the address in the RQE when the load upload module judges that the result is yes, write the request message load into the host memory according to the physical page address, and construct a request message descriptor;

第三QP状态模块,用于当第三QP状态信息中的QP类型为RC类型时,根据RC类型QP硬件状态对应处理请求报文。The third QP state module is used to process the request message according to the RC type QP hardware state when the QP type in the third QP state information is the RC type.

实际运用过程中,请求报文负载上传模块将报文负载写入主机内存时,首先判断报文是否需要进行负载上传,若不需要则直接进行后续模块的处理,若需要则基于请求报文中的远程地址或者RQE中的地址从主机获取对应物理页地址,然后根据物理页地址将报文负载数据写入主机内存,最终根据报文的处理情况构造请求报文描述符送给完成校验模块。During actual use, when the request message payload upload module writes the message payload into the host memory, it first determines whether the message needs to be uploaded. If not, it directly processes the subsequent modules. If necessary, it obtains the corresponding physical page address from the host based on the remote address in the request message or the address in RQE, and then writes the message payload data into the host memory according to the physical page address. Finally, it constructs a request message descriptor based on the processing status of the message and sends it to the completion verification module.

在本实施例中,收到需要进行负载上传的请求的第一个报文时,则记录报文RETH中的远程访问地址与长度或者分配的RQE中的SGE地址与长度,然后据此批量读取对应请求所需的物理页地址缓存到网卡,便于该请求后续的报文可直接从缓存中获取对应的物理页地址,以降低PCIE带宽占用率和后续报文处理延时。In this embodiment, when the first message of the request for load upload is received, the remote access address and length in the message RETH or the SGE address and length in the allocated RQE are recorded, and then the physical page addresses required for the corresponding requests are batch read and cached to the network card, so that subsequent messages of the request can directly obtain the corresponding physical page addresses from the cache, thereby reducing PCIE bandwidth occupancy and subsequent message processing delays.

优选地,第三QP状态模块,包括:第四状态切换子模块;Preferably, the third QP state module comprises: a fourth state switching submodule;

第四状态切换子模块,具体用于,当主机创建或重启QP时切换至normal状态;The fourth state switching submodule is specifically used to switch to the normal state when the host creates or restarts the QP;

若请求报文已被标记为IB协议所定义的A类或C类错误或主机配置QP错误或完成校验模块通告IB协议所定义的A类或C类错误任一种时,则切换至error状态。If the request message has been marked as a Class A or Class C error defined in the IB protocol, or a host configuration QP error, or the completion check module notifies any of the Class A or Class C errors defined in the IB protocol, it switches to the error state.

实际运用过程中,需要基于QP维护当前请求的下一个报文的访问地址与剩余长度,用于给该请求的后续报文的负载数据分配对应的内存缓存空间。此外,请求报文负载上传模块不对报文进行校验,但为了保证流水线处理报文的一致性,仍旧需要维护用于RC类型QP的QP硬件状态,其包括normal和error两个状态,其中:normal状态,用于正常流水化处理请求报文,当主机创建或者重启QP时进入normal状态;在此状态时,若检测到有正在处理的请求报文已被标记为IB协议所定义的A类或C类错误、主机配置QP进入错误相关状态、完成校验模块通告IB协议所定义的A类或C类错误三种情况中的任何一种则进入error状态;error状态,用于网卡丢弃对应QP的报文;在此状态,若主机创建或者重启QP后,方可进入normal状态。In actual application, it is necessary to maintain the access address and remaining length of the next message of the current request based on QP, so as to allocate the corresponding memory cache space for the payload data of the subsequent messages of the request. In addition, the request message payload upload module does not verify the message, but in order to ensure the consistency of pipeline processing messages, it is still necessary to maintain the QP hardware state for RC type QP, which includes two states: normal and error. Among them: normal state is used for normal pipeline processing of request messages. When the host creates or restarts QP, it enters the normal state; in this state, if it is detected that the request message being processed has been marked as a Class A or Class C error defined by the IB protocol, the host configures QP to enter the error-related state, and the completion verification module notifies the Class A or Class C error defined by the IB protocol, it enters the error state; error state is used for the network card to discard the corresponding QP message; in this state, if the host creates or restarts QP, it can enter the normal state.

如图5所示,优选地,完成校验模块,包括:请求报文处理方式确定模块和通告模块;As shown in FIG5 , preferably, the verification module is completed, including: a request message processing mode determination module and a notification module;

请求报文处理方式确定模块,用于根据请求报文描述符中包含的第一QP状态信息、第二QP状态信息和第三QP状态信息确定请求报文处理方式;A request message processing mode determining module, configured to determine a request message processing mode according to the first QP state information, the second QP state information and the third QP state information included in the request message descriptor;

通告模块,用于将请求报文描述符中的报文信息分别发送至请求报文校验模块、RQE处理校验模块和请求报文负载上传模块,以更新对应的QP状态信息。The notification module is used to send the message information in the request message descriptor to the request message verification module, the RQE processing verification module and the request message load upload module respectively to update the corresponding QP state information.

实际运用过程中,完成校验模块根据请求报文描述符中记录信息判断前面各模块对报文的处理情况具体体现为第一QP状态信息、第二QP状态信息和第三QP状态信息,然后基于IB协议决策如何构造响应报文描述符以及生成CQE。其中,响应报文包括Acknowledge报文、Unacknowledge报文和Read Response报文,当构造Unacknowledge报文的描述符时,会将对应请求报文描述符中的QPN(Queue Pair Number,队列对编号)、错误类型、ePSN等信息通告给请求报文校验模块、RQE处理校验模块、请求报文负载上传模块,以便于此三个模块更新对应QP的状态信息。In actual use, the completion verification module determines the processing of the message by the previous modules according to the information recorded in the request message descriptor, which is specifically reflected as the first QP status information, the second QP status information and the third QP status information, and then decides how to construct the response message descriptor and generate CQE based on the IB protocol. Among them, the response message includes Acknowledge message, Unacknowledge message and Read Response message. When constructing the descriptor of the Unacknowledge message, the QPN (Queue Pair Number), error type, ePSN and other information in the corresponding request message descriptor will be notified to the request message verification module, the RQE processing verification module, and the request message load upload module, so that these three modules can update the status information of the corresponding QP.

优选地,响应报文构造模块,具体用于根据请求报文描述符生成响应报文描述符,根据响应报文描述符构造响应报文;Preferably, the response message construction module is specifically used to generate a response message descriptor according to the request message descriptor, and construct a response message according to the response message descriptor;

若响应报文为读取响应报文,则响应报文构造模块,还具体用于根据响应报文描述符、请求报文中的远程地址以及物理页地址构造响应报文。If the response message is a read response message, the response message construction module is further specifically used to construct the response message according to the response message descriptor, the remote address in the request message, and the physical page address.

实际运用过程中,构造Acknowledge报文与Unacknowledge报文时,可直接基于描述符信息、QPC等信息完成;至于Read Response报文的构造,则还需要从主机获取数据以填充报文负载。将构造Read Response报文的处理流程分为物理页地址获取、MR数据读取、报文负载数据填充与封装三个步骤;其中:物理页地址获取步骤用于根据Read请求的远程地址、R_Key以及网卡缓存的MRC等信息从主机内存中获取RDMA读请求所需访问空间的物理页地址;MR数据获取步骤则用于根据物理页地址再次从主机内存中读取MR对应空间的数据;报文负载数据填充与封装步骤则用于将读取的MR数据填充进报文负载字段,然后构造报文头进行报文封装后转发。In actual application, the construction of Acknowledge and Unacknowledge messages can be done directly based on descriptor information, QPC and other information; as for the construction of Read Response messages, data needs to be obtained from the host to fill the message payload. The processing flow of constructing Read Response messages is divided into three steps: physical page address acquisition, MR data reading, and message payload data filling and encapsulation; among them: the physical page address acquisition step is used to obtain the physical page address of the access space required by the RDMA read request from the host memory according to the remote address of the Read request, R_Key and MRC of the network card cache; the MR data acquisition step is used to read the data of the MR corresponding space from the host memory again according to the physical page address; the message payload data filling and encapsulation step is used to fill the read MR data into the message payload field, and then construct the message header for message encapsulation and forwarding.

在本申请所提供的实施例中,应该理解到,所揭露的系统,可以通过其它的方式实现。以上所描述的系统实施例仅仅是示意性的,例如,模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个模块或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或模块的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the embodiments provided in the present application, it should be understood that the disclosed system can be implemented in other ways. The system embodiments described above are merely schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

另外,在本发明各实施例中的各功能模块可以全部集成在一个处理器中,也可以是各模块分别单独作为一个器件,也可以两个或两个以上模块集成在一个器件中;本发明各实施例中的各功能模块既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, all functional modules in the embodiments of the present invention may be integrated into one processor, or each module may be a separate device, or two or more modules may be integrated into one device; each functional module in the embodiments of the present invention may be implemented in the form of hardware or in the form of hardware plus software functional units.

应当理解,本申请中如若使用了“系统”、“装置”、“单元”和/或“模块”,仅是用于区分不同级别的不同组件、元件、部件、部分或装配的一种方法。然而,如果其他词语可实现相同的目的,则可通过其他表达来替换该词语。It should be understood that the use of "system", "device", "unit" and/or "module" in this application is only a method for distinguishing different components, elements, parts, parts or assemblies at different levels. However, if other words can achieve the same purpose, the word can be replaced by other expressions.

如本申请和权利要求书中所示,除非上下文明确提示例外情形,“一”、“一个”、“一种”和/或“该”等词并非特指单数,也可包括复数。一般说来,术语“包括”与“包含”仅提示包括已明确标识的步骤和元素,而这些步骤和元素不构成一个排它性的罗列,方法或者设备也可能包含其它的步骤或元素。由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "a kind" and/or "the" do not refer to the singular, but also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of clearly identified steps and elements, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements. The elements defined by the sentence "includes a..." do not exclude the existence of other identical elements in the process, method, commodity or device that includes the elements.

以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

以上对本发明所提供的一种报文处理系统进行了详细介绍。对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above is a detailed description of a message processing system provided by the present invention. The above description of the disclosed embodiments enables professionals and technicians in the field to implement or use the present invention. Various modifications to these embodiments will be obvious to professionals and technicians in the field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features disclosed herein.

Claims (11)

1. A message processing system, comprising:
The request message checking module is used for checking the received request message and maintaining the first QP state information, and screening out the request message passing the checking;
The RQE processing and checking module is used for checking the RQE acquired from the host and maintaining second QP state information, and checking whether the space of the RQE is enough to be distributed to the request message for use;
The request message load uploading module is used for writing the request message load into the host computer and maintaining third QP state information according to the remote address in the request message or the address in the RQE;
the completion checking module is used for determining a request message processing mode according to the first QP state information, the second QP state information and the third QP state information and notifying the request message processing mode to maintain synchronization of the first QP state information, the second QP state information and the third QP state information;
the response message construction module is used for constructing a response message according to the request message processing mode;
The request message checking module comprises a sending checking module, a rationality checking module, a first screening module and a first QP state module, wherein the first QP state module comprises a first state switching sub-module, is used for switching to a normal state when a host creates or restarts QP, is switched to a wait_send_nack state if the rationality checking module judges that the request message is not in the normal state, is switched to a wait_ epsn state if the completion checking module informs that the request message is a B-type error defined by IB protocol, is switched to an error_ epsn state if the request message triggers an A-type or C-type error defined by IB protocol or the host configures QP error or is switched to an error when the completion checking module informs any one of the A-type or C-type errors defined by IB protocol;
When the request message is in an error state, the network card is called to directly silence and discard all the request messages, when the request message is in a normal state, the network card is called to discard the request messages which are retransmitted in error, the rest of the request messages are marked according to the judging result of the rationality checking module according to an IB protocol, when the request message is in a wait_send_nack state, the network card is called to process the request messages which are retransmitted correctly, the rest of the request messages are discarded, when the request message is in a wait_ epsn state, the network card is called to process the request messages which are judged to be yes or retransmitted correctly, the rest of the request messages are discarded, wherein the processing mode of the request messages which are judged to be yes by the rationality checking module is consistent with the processing mode when the request messages are in the normal state.
2. The message processing system of claim 1, wherein,
The sending verification module is used for verifying whether the received request message is the request message of the message processing system;
The rationality checking module is used for checking whether the request message is rational;
The first screening module is used for screening the request message of which the judgment result of the sending verification module and the judgment result of the rationality verification module are both yes;
The first QP state module is configured to mark that the request packet is abnormal and update the first QP state information when either the determination result of the sending verification module and the determination result of the rationality verification module are negative;
And the first QP state module is further configured to correspondingly process the request packet according to an RC type QP hardware state when the QP type in the first QP state information is an RC type.
3. The message processing system of claim 2, wherein the RQE processing and checking module comprises a buffer module, a RQE state checking module, a RQE space checking module, a second screening module, and a second QP state module;
the caching module is used for acquiring the RQE of the active QP from the host and caching the RQE to the network card according to the QP;
the RQE state checking module is used for checking whether the RQE is correct, if not, marking the RQE as malformed;
The RQE space verification module is used for checking whether the RQE of the cached corresponding QP exists in the network card according to the request message, if so, distributing the RQE of the cached corresponding QP to the request message, and if not, triggering RNR error and marking the request message;
the second screening module is configured to screen the request packet in which the RQE state verification module and the RQE space verification module both determine that the result is positive;
and the second QP state module is configured to mark that the request packet is abnormal and update the second QP state information when the RQE state checking module determines that either the result or the RQE space checking module determines that the result is negative.
4. The message processing system of claim 3, wherein,
The second QP state module is further configured to correspondingly process the request packet according to an RC type QP hardware state when the QP type in the second QP state information is an RC type;
the second QP state module comprises a second state switching sub-module;
The second state switching sub-module is specifically configured to switch to a normal state when the host creates or restarts the QP;
If the RQE space verification module judges that the result is no or the request message is marked as the B-type error defined by IB protocol, switching to wait_send_nack state;
if the completion checking module informs that the request message is a B-type error defined by an IB protocol, switching to a wait_ epsn state;
And if the request message is marked as an A-type or C-type error defined by IB protocol or the host configures QP error or the completion checking module informs any one of the A-type or C-type errors defined by IB protocol, switching to error state.
5. The message processing system of claim 4, wherein,
The second QP state module is further used for,
When the request message is in an error state, calling a network card to directly silence and discard all the request messages;
when the request message is in the wait_send_nack state, calling a network card to process the correctly retransmitted request message, and discarding the rest request messages;
And when the request message is in a normal state or a wait_ epsn state, if the request message triggers an RNR error and the request message is marked as a B-type error with a negative judgment result of the rationality checking module, the request message is re-marked as the RNR error.
6. The message processing system of claim 3, wherein the RQE space verification module further comprises a double verification sub-module;
The double checking sub-module is used for checking whether the RQE is malformed and whether the residual host memory space corresponding to the RQE supports the current writing of the load data of the request message after the RQE corresponding to the QP exists in the network card;
if the RQE is marked as malformed, marking the request message as malformed RQE error;
And if the residual host memory space corresponding to the RQE does not support the current load data writing of the request message, marking the request message as an invalid request error.
7. The message processing system of claim 6, wherein the second QP status module further comprises a third status switch sub-module;
the third state switching sub-module is specifically configured to switch to a normal state when the host creates or restarts the QP;
And switching to an error state if the request message is marked as either a class A or class C error defined by IB protocol or the host configuration QP error or the completion checking module notifies a class A or class C error defined by IB protocol or the request message is marked as either the malformed RQE error or the invalid request error.
8. The message processing system of claim 1, wherein the request message load upload module comprises a load upload module, a load data write module, and a third QP status module;
The load uploading module is used for judging whether the request message needs load uploading or not;
The load data writing module is used for acquiring a corresponding physical page address from a host according to a remote address in the request message or an address in the RQE when the load uploading module judges that the load data is yes, writing the load of the request message into the main memory according to the physical page address, and constructing a request message descriptor;
and the third QP state module is configured to correspondingly process the request packet according to an RC type QP hardware state when the QP type in the third QP state information is an RC type.
9. The message processing system of claim 8, wherein the third QP status module comprises a fourth status switch sub-module;
a fourth state switching sub-module, specifically configured to switch to a normal state when the host creates or restarts the QP;
And if the request message is marked as a class A or class C error defined by the IB protocol or a host configuration QP error or the completion checking module informs any one of the class A or class C errors defined by the IB protocol, switching to an error state.
10. The message processing system of claim 8, wherein the completion verification module comprises a request message processing mode determination module and an announcement module;
The request message processing mode determining module is configured to determine a request message processing mode according to the first QP state information, the second QP state information, and the third QP state information included in the request message descriptor;
And the notification module is used for respectively sending the message information in the request message descriptor to the request message verification module, the RQE processing verification module and the request message load uploading module so as to update the corresponding QP state information.
11. The message processing system of claim 8, wherein the response message construction module is specifically configured to generate a response message descriptor according to the request message descriptor, and construct a response message according to the response message descriptor;
if the response message is a read response message, the response message construction module is further specifically configured to construct the response message according to the response message descriptor, the remote address in the request message, and the physical page address.
CN202510477556.8A 2025-04-16 2025-04-16 A message processing system Active CN120017600B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510477556.8A CN120017600B (en) 2025-04-16 2025-04-16 A message processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510477556.8A CN120017600B (en) 2025-04-16 2025-04-16 A message processing system

Publications (2)

Publication Number Publication Date
CN120017600A CN120017600A (en) 2025-05-16
CN120017600B true CN120017600B (en) 2025-07-04

Family

ID=95666059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510477556.8A Active CN120017600B (en) 2025-04-16 2025-04-16 A message processing system

Country Status (1)

Country Link
CN (1) CN120017600B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114443206A (en) * 2020-10-31 2022-05-06 华为技术有限公司 Communication method and device
CN115550079A (en) * 2021-06-29 2022-12-30 华为技术有限公司 Network interface card, message transceiving method, storage device and host client

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030065856A1 (en) * 2001-10-03 2003-04-03 Mellanox Technologies Ltd. Network adapter with multiple event queues
US7761619B2 (en) * 2005-05-13 2010-07-20 Microsoft Corporation Method and system for parallelizing completion event processing
CN103902486B (en) * 2014-04-08 2017-02-22 华为技术有限公司 System, device and method for implementation of remote direct memory access
CN114765631A (en) * 2021-01-14 2022-07-19 华为技术有限公司 Data transmission system, data transmission method and network device
CN119402444A (en) * 2024-10-16 2025-02-07 中国航空无线电电子研究所 A multi-node communication architecture based on RDMA

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114443206A (en) * 2020-10-31 2022-05-06 华为技术有限公司 Communication method and device
CN115550079A (en) * 2021-06-29 2022-12-30 华为技术有限公司 Network interface card, message transceiving method, storage device and host client

Also Published As

Publication number Publication date
CN120017600A (en) 2025-05-16

Similar Documents

Publication Publication Date Title
US20240291750A1 (en) System and method for facilitating efficient event notification management for a network interface controller (nic)
US10148581B2 (en) End-to-end enhanced reliable datagram transport
CN103098428B (en) A kind of message transmitting method, equipment and system realizing PCIE switching network
US8867537B1 (en) Method and system for processing network packets
TWI252651B (en) System, method, and product for managing data transfers in a network
US8542597B2 (en) Soft error recovery for converged networks
CN106603420B (en) It is a kind of in real time and failure tolerance network-on-chip router
WO2024125098A1 (en) Data transmission method and apparatus, and device and computer-readable storage medium
WO2023109891A1 (en) Multicast transmission method, apparatus and system
WO2022000208A1 (en) Data retransmission method and apparatus
CN116722884B (en) Network interface supporting remote data direct access protocol
CN120017600B (en) A message processing system
US12483622B2 (en) Intermediate apparatus, communication method, and program
US7024613B2 (en) Method and apparatus for implementing infiniband transmit queue
CN101276314A (en) Transmission device, transmission system and data transmission method
WO2022160206A1 (en) System-on-chip abnormality processing method and apparatus, and system on chip
CN120692196A (en) A data processing method and related equipment
CN120880999A (en) Message transmission method, PCIe device and computer readable storage medium
WO2024120344A1 (en) Wired serial bus data transmission method and system, and related apparatus
CN116939034A (en) Data transmission method, device, gateway, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant