Network interface card, messaging method, storage device and host client

By introducing a data integrity field into the RDMA message, the network interface card verifies the IO data and decides whether to retransmit it, thus solving the problem of frequent retransmissions caused by integrity verification errors in IO data transmission and improving transmission efficiency and effectiveness.

CN115550079BActive Publication Date: 2026-11-20HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110722869.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-29
Publication Date
2026-11-20
Estimated Expiration
2041-06-29

AI Technical Summary

Technical Problem

In the existing IO data transmission process, errors in the integrity verification of IO data at the responding end lead to frequent retransmissions, which reduces transmission efficiency. Existing retransmission methods cannot correct the problem of incorrect IO data storage.

Method used

A data integrity field is introduced into the RDMA message to verify the integrity of the IO data through the network interface card, and to decide whether to retransmit the message based on the verification result, thus avoiding unnecessary retransmission.

Benefits of technology

It improves the efficiency of IO data transmission, saves bandwidth, reduces unnecessary retransmissions, and enhances the effectiveness of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115550079B_ABST
    Figure CN115550079B_ABST
Patent Text Reader

Abstract

The application discloses a network interface card, a message transmission method, a storage device and a host client, relates to the storage field, and is used for improving the transmission efficiency of IO data when the integrity of the IO data is incorrect. The network interface card comprises a processor and a communication interface. The communication interface is used for sending an RDMA message. The RDMA message comprises input and output (IO) data and a data integrity field. The data integrity field is used for checking the integrity of the IO data. The communication interface is also used for receiving first indication information. The first indication information is used for indicating whether the integrity check of the IO data is incorrect. The processor is used for determining whether the RDMA message is retransmitted according to the first indication information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage, and more particularly to a network interface card, a message sending and receiving method, a storage device, and a host client. Background Technology

[0002] Currently, much data is not stored locally, but rather on remote storage devices. For example... Figure 1 As shown in the illustration, this application provides a storage system including a storage device (or storage array) 11 and host clients 12. The storage device 11 is connected to the host clients 12 via a front-end fabric, and can provide data storage services to multiple host clients 12. With the rise of solid-state drives (SSDs) based on the non-volatile memory express (NVMe) specification, the protocol for remote access to the storage device 11 by the host clients 12 is gradually adopting NVMe, and the front-end fabric is gradually migrating to NVMe over fabric (NoF) networks based on switched networks. Remote direct memory access (RDMA) is a standard in NoF networks, which can reduce the latency of data access by the storage device.

[0003] When storage device 11 transmits IO data to host client 12, the responding end will verify the integrity of the IO data. If the verification fails, the requesting end will usually retransmit. However, if the IO data is incorrect, the requesting end will frequently retransmit. This retransmission can only fix errors that occur during the transmission of IO data, but cannot fix errors in the storage of IO data. Therefore, this retransmission is ineffective and reduces the transmission efficiency of IO data. Summary of the Invention

[0004] This application provides a network interface card, a message sending and receiving method, a storage device, and a host client to improve the transmission efficiency of IO data when there are errors in the integrity of IO data.

[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0006] Firstly, a network interface card is provided, which can be used as a requesting network interface card, including: a processor and a communication interface; the communication interface is used to send RDMA messages, the RDMA messages including IO data and data integrity fields, the IO data and data integrity fields can be one or more pairs, each data integrity field is adjacent to a segment of IO data, and is used to perform integrity verification on the immediately preceding IO data; the communication interface is also used to receive first indication information, the first indication information is used to indicate whether there is an error in the integrity verification of the IO data; the processor is used to determine whether to retransmit the RDMA message according to the first indication information.

[0007] The network interface card provided in this application embodiment sends an RDMA message to the network interface card of the requesting end. This RDMA message includes IO data and a data integrity field. The network interface card of the responding end can verify the integrity of the IO data based on the data integrity field and send first indication information to the network interface card of the requesting end. This first indication information indicates whether there is an error in the IO data integrity verification. The requesting end can determine whether to retransmit the RDMA message based on the first indication information. This avoids unnecessary retransmissions that occur when determining whether to retransmit the RDMA message based on receiving an ACK or NAK message, because such retransmissions cannot resolve integrity verification errors of the IO data itself, but only errors generated during transmission. The saved bandwidth can be used to transmit other IO data, thus improving the transmission efficiency of IO data.

[0008] In one possible implementation, the first indication information is further used to indicate the message sequence number of the RDMA message to which the IO data with integrity verification errors belongs. When there are multiple RDMA messages, the message sequence number can be used to determine which specific RDMA message contains the IO data with integrity verification errors.

[0009] In one possible implementation, the first indication information is carried in the acknowledgment or negative acknowledgment message of the RDMA message. The responding end can check for errors based on the validity of the RDMA message and send back an acknowledgment or negative acknowledgment message. A new field can be added to the acknowledgment or negative acknowledgment message to carry the first indication information. This new field can be located after the ACK extended transport header (AETH) field.

[0010] In one possible implementation, the processor is specifically configured to: if the first indication information indicates an error in the integrity check of the IO data, then check the integrity of the IO data; if the integrity check is error-free, then retransmit the RDMA message; if the integrity check is error-free, then do not retransmit the RDMA message. That is, the network interface card will only retransmit the RDMA message if the local integrity check of the IO data is error-free. In this case, the integrity check error of the IO data received by the other party is caused by network transmission, and retransmission can prevent the error from occurring. When the local integrity check of the IO data is error-free, retransmitting the RDMA message cannot prevent the integrity check of the IO data received by the other party from being error-free. Therefore, in this case, it is not necessary to immediately retransmit the RDMA message; instead, the information indicating an IO data integrity check error can be sent to the upper-layer protocol stack for further processing, thus improving the transmission efficiency of IO data.

[0011] In one possible implementation, the communication interface is further configured to: if the first indication information indicates an error in the integrity check of the IO data, send a second indication information, which is used to indicate the removal of the error information. Because the responding end on the other side will repeatedly send the first indication information to ensure that it is not lost, until it receives the second indication information, the second indication information is equivalent to indicating to stop sending acknowledgment (ACK) messages / negative acknowledgment (NAK) messages containing the first indication information.

[0012] In one possible implementation, the second indication information is carried in an acknowledgment message or a negative acknowledgment message, or in an RDMA write WRITE message, or in a send SEND message. A new field can be added to the acknowledgment message or negative acknowledgment message to carry the second indication information; this new field can be located after the ACK extended transport header (AETH) field. A new field can be added to the RDMA WRITE message to carry the first indication information; this new field can be located after the RDMA extended transport header (RETH) field. A new field can be added to the SEND message to carry the first indication information; this new field can be located after the base transport header (BTH) field.

[0013] Secondly, a network interface card is provided, which can be used as a response end network interface card, including: a processor and a communication interface; the communication interface is used to receive RDMA messages, the RDMA messages include IO data and data integrity fields, the IO data and data integrity fields can be one or more pairs, each data integrity field is adjacent to a segment of IO data, and is used to perform integrity verification on the immediately preceding IO data; the processor is used to verify the integrity of the IO data according to the data integrity fields; the communication interface is also used to send first indication information, the first indication information is used to indicate whether there is an error in the integrity verification of the IO data.

[0014] The network interface card provided in this application embodiment sends an RDMA message to the network interface card of the requesting end. This RDMA message includes IO data and a data integrity field. The network interface card of the responding end can verify the integrity of the IO data based on the data integrity field and send first indication information to the network interface card of the requesting end. This first indication information indicates whether there are errors in the IO data integrity verification. This allows the requesting end to determine whether to retransmit the RDMA message based on the first indication information, avoiding unnecessary retransmissions that occur when determining whether to retransmit the RDMA message based on received ACK or NAK messages. This is because such retransmissions cannot resolve integrity verification errors of the IO data itself, but only errors generated during transmission. The saved bandwidth can be used to transmit other IO data, thus improving the transmission efficiency of IO data.

[0015] In one possible implementation, the first indication information is further used to indicate the message sequence number of the RDMA message to which the IO data with integrity verification errors belongs. When there are multiple RDMA messages, the message sequence number can be used to determine which specific RDMA message contains the IO data with integrity verification errors.

[0016] In one possible implementation, the first indication information is carried in the acknowledgment or negative acknowledgment message of the RDMA message. The responding end can send back an acknowledgment or negative acknowledgment message based on the validity check of the RDMA message to check for errors. A new field can be added to the acknowledgment or negative acknowledgment message to carry the first indication information. This new field can be located after the ACK extended transport header (AETH) field.

[0017] In one possible implementation, the communication interface is further configured to: receive a second indication message, which indicates that there is an error in the integrity check of the IO data. To ensure that the first indication message is not lost, the responding end will repeatedly send the first indication message until it receives the second indication message. Therefore, the second indication message is equivalent to indicating to stop sending acknowledgment (ACK) messages / negative acknowledgment (NAK) messages containing the first indication message.

[0018] In one possible implementation, the second indication information is carried in an acknowledgment message or a negative acknowledgment message, or in an RDMA write WRITE message, or in a send SEND message. A new field can be added to the acknowledgment message or negative acknowledgment message to carry the second indication information; this new field can be located after the ACK extended transport header (AETH) field. A new field can be added to the RDMA WRITE message to carry the first indication information; this new field can be located after the RDMA extended transport header (RETH) field. A new field can be added to the SEND message to carry the first indication information; this new field can be located after the base transport header (BTH) field.

[0019] Thirdly, a message sending and receiving method is provided, including: sending a Remote Direct Memory Access (RDMA) message, the RDMA message including input / output IO data and a data integrity field, the data integrity field being used to verify the integrity of the IO data; receiving first indication information, the first indication information being used to indicate whether there is an error in the integrity verification of the IO data; and determining whether to retransmit the RDMA message based on the first indication information.

[0020] In one possible implementation, the first indication information is also used to indicate the message sequence number of the RDMA message to which the IO data with integrity verification error belongs.

[0021] In one possible implementation, the first indication information is carried in the acknowledgment message or negative acknowledgment message of the RDMA message.

[0022] In one possible implementation, determining whether to retransmit the RDMA message based on the first indication information includes: if the first indication information indicates that there is an error in the integrity check of the IO data, then checking the integrity of the IO data; if there is no error in the integrity check, then retransmitting the RDMA message; if there is an error in the integrity check, then sending the information that there is an error in the integrity check of the IO data to the upper-layer protocol stack.

[0023] In one possible implementation, the method further includes: if the first indication information indicates that there is an error in the integrity verification of the IO data, then sending a second indication information, the second indication information being used to indicate that the information indicating that there is an error in the integrity verification of the IO data should be cleared.

[0024] In one possible implementation, the second indication information is carried in an acknowledgment message or a negative acknowledgment message, or in an RDMA write WRITE message, or in a send SEND message.

[0025] Fourthly, a message sending and receiving method is provided, including: receiving a Remote Direct Memory Access (RDMA) message, the RDMA message including input / output I / O data and a data integrity field; verifying the integrity of the I / O data based on the data integrity field; and sending a first indication message, the first indication message being used to indicate whether there is an error in the integrity verification of the I / O data.

[0026] In one possible implementation, the first indication information is also used to indicate the message sequence number of the RDMA message to which the IO data with integrity verification error belongs.

[0027] In one possible implementation, the first indication information is carried in the acknowledgment message or negative acknowledgment message of the RDMA message.

[0028] In one possible implementation, the method further includes receiving a second indication message, which indicates that there is an error in the integrity check of the cleared IO data.

[0029] In one possible implementation, the second indication information is carried in an acknowledgment message or a negative acknowledgment message, or in an RDMA write WRITE message, or in a send SEND message.

[0030] Fifthly, a storage device is provided, comprising a network interface card and a controller as described in the first aspect and any embodiment thereof, or comprising a network interface card and a controller as described in the second aspect and any embodiment thereof, wherein the controller receives input / output (I / O) data or transmits I / O data through the network interface card.

[0031] In a sixth aspect, a host client is provided, including a network interface card and a processor as described in any of the second aspects and any of their embodiments, wherein the processor receives input / output (I / O) data or sends I / O data through the network interface card.

[0032] In a seventh aspect, a computer-readable storage medium is provided for storing one or more programs, the one or more programs including instructions that, when executed by a network interface card, cause the network interface card to perform the message sending and receiving method as described in the third aspect and any embodiment thereof, or to perform the message sending and receiving method as described in the fourth aspect and any embodiment thereof.

[0033] Eighthly, a computer program product containing instructions is provided, which, when executed on a network interface card, causes the network interface card to perform the message sending and receiving method as described in the third aspect and any embodiment thereof, or to perform the message sending and receiving method as described in the fourth aspect and any embodiment thereof.

[0034] The technical effects of the third to eighth aspects refer to the technical effects of the first to second aspects and any of their embodiments. Attached Figure Description

[0035] Figure 1 A schematic diagram of the architecture of a storage system provided in an embodiment of this application;

[0036] Figure 2 A schematic diagram of a QP provided in an embodiment of this application;

[0037] Figure 3 A schematic diagram of a reliable QP connection provided in an embodiment of this application;

[0038] Figure 4 A schematic diagram illustrating the order-preserving incrementing PSN of an RDMA message, provided as an embodiment of this application;

[0039] Figure 5A A schematic diagram illustrating the structure of a SEND message and its acknowledgment / negative acknowledgment message based on the IB protocol, provided for embodiments of this application;

[0040] Figure 5B A schematic diagram illustrating the structure of a SEND message and its acknowledgment / negative acknowledgment message based on the RoCEv2 protocol, provided for embodiments of this application;

[0041] Figure 6 A schematic diagram illustrating the interaction process between a requesting end and a responding end in a reliable connection, provided in an embodiment of this application;

[0042] Figure 7A A schematic diagram illustrating the structure of an RDMA WRITE message and an acknowledgment / negative acknowledgment message based on the IB protocol, provided for embodiments of this application;

[0043] Figure 7BA schematic diagram illustrating the structure of an RDMA WRITE message and an acknowledgment / negative acknowledgment message based on the RoCEv2 protocol, provided for embodiments of this application;

[0044] Figure 8A A schematic diagram illustrating the interaction process between the requesting and responding ends of another reliable connection provided in this application embodiment;

[0045] Figure 8B A schematic diagram of an RDMA write message containing a DIF provided for an embodiment of this application;

[0046] Figure 9A A schematic diagram illustrating the structure of an RDMA READ request message and an RDMA READ response message based on the IB protocol, provided for embodiments of this application;

[0047] Figure 9B A schematic diagram illustrating the structure of an RDMA READ request message and an RDMA READ response message based on the RoCEv2 protocol, provided for embodiments of this application;

[0048] Figure 10 A schematic diagram illustrating the interaction process between the requesting and responding ends of another reliable connection provided in this application embodiment;

[0049] Figure 11 This is a schematic diagram illustrating the process of a host client and a storage device performing I / O read / write operations using RDMA, as provided in an embodiment of this application.

[0050] Figure 12 A schematic diagram illustrating the interactive process of IO data mirroring backup provided in an embodiment of this application;

[0051] Figure 13 This is a schematic diagram of another storage system architecture provided in an embodiment of this application;

[0052] Figure 14 A flowchart illustrating a message sending and receiving method provided in an embodiment of this application;

[0053] Figure 15 This is a schematic diagram of the frame structure containing the DIF extended transmission header, provided in an embodiment of this application.

[0054] Figure 16 A flowchart illustrating another message sending and receiving method provided in an embodiment of this application;

[0055] Figure 17 A flowchart illustrating yet another message sending and receiving method provided in an embodiment of this application;

[0056] Figure 18A schematic diagram of another frame structure containing the DIF extended transmission header provided in this application embodiment;

[0057] Figure 19 This is a schematic diagram of another frame structure containing the DIF extended transmission header provided in an embodiment of this application. Detailed Implementation

[0058] As used herein, the terms “component,” “module,” “system,” etc., are intended to refer to a computer-related entity, which may be hardware, firmware, a combination of hardware and software, software, or running software. For example, a component may be, but is not limited to, a process running on a processor, a processor, an object, an executable file, a running thread, a program, and / or a computer. As an example, an application running on a computing device and the computing device itself can both be components. One or more components may reside in a running process and / or thread, and components may be located in a single computer and / or distributed among two or more computers. Furthermore, these components are capable of execution from various computer-readable media having various data structures thereon. These components may communicate locally and / or remotely via signals, such as based on one or more data packets (e.g., data from a component that interacts with a local system, another component in a distributed system, and / or signals that interact with other systems via a network such as the Internet).

[0059] In the embodiments of this application, "A / B" refers to either A or B, whichever is possible.

[0060] First, let me describe the concepts involved in this application:

[0061] like Figure 1 As shown, in the RDMA-based storage system, storage device 11 includes multiple controllers (e.g., first controller 111, second controller 112), multiple network interface cards (NICs) (e.g., first NIC 113, second NIC 114), disk enclosure 115, and storage media (e.g., hard disk drive (HDD) 116 or solid state drive (SSD) 117). The host client includes a third NIC 121 and a processor 122.

[0062] The disk enclosure 115 is optional. The storage medium can be mounted on the disk enclosure 115 or directly on the processor of the controller.

[0063] Multiple controllers in storage device 11 can operate in load-sharing mode to improve the throughput and reliability of the storage system. Multiple NICs in storage device 11 have high-speed serial computer extended bus (PCIe) interfaces and are connected to their respective controllers; for example, the first controller 111 is connected to the first NIC 113, and the second controller 112 is connected to the second NIC 114. The controllers in storage device 11 can receive read requests from host client 12 through their respective NICs, then read IO data from the storage medium, and the corresponding NICs return the IO data to host client 12. The controllers in storage device 11 can also receive write requests and IO data from host client 12 through their respective NICs and write the IO data to the storage medium.

[0064] The controller in storage device 11 includes a processor, memory, and software running on the processor. Software runs on the CPU 122 in host client 12. This software is layered and includes driver software and NoF protocol software (also known as the NoF protocol stack). Optionally, it may also include software using the Open Fabric Senterprise Distribution (OFED) (referred to as OFED software). The driver software provides the interface for controlling the NIC to the upper-layer software. The NoF protocol software implements NoF protocol control functions and I / O read / write functions. The OFED software is a set of open-source driver software, core kernel code, middleware, and user-level interface programs supporting infinite bandwidth fabric.

[0065] The storage device involved in the embodiments of this application may be referred to as a storage server, storage array, blade server, etc., and the name is not limited. The controller involved in the embodiments of this application may include, but is not limited to, a processor and a memory.

[0066] The processor involved in the embodiments of this application can be a chip. For example, it can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0067] The memory involved in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0068] The NIC involved in the embodiments of this application can also be called a network interface controller, network adapter, network card, or local area network adapter. It is a piece of computer hardware designed to allow computers to communicate on a computer network.

[0069] To improve data reliability, storage devices often employ a multi-controller architecture, where multiple controllers store multiple copies of the same data on the storage medium.

[0070] Storage devices connect to host clients via a network, providing data storage services to multiple host clients. With the rise of NVMe SSDs, the protocol for host clients to access storage devices has transitioned from Small Computer System Interface (SCSI) to NVMe. Correspondingly, the network has also migrated from Fibre Channel (FC) networks and Transmission Control Protocol / Internet Protocol (TCP / IP) networks to NoF networks.

[0071] The NoF protocol supports both memory and message type operations. Specifically, PCIe supports memory type operations, FC supports message type operations, and RDMA supports both memory and message type operations.

[0072] RDMA can transmit data from the storage space of the storage device as messages to the storage space of the host client via the network, in the form of RDMA messages; conversely, it can transmit data from the storage space of the host client as messages to the storage space of the storage device via the network. These transmission and copying operations are primarily performed by the network interface cards (e.g., RDMA network interface cards, RNICs) of the storage device and the host client, and do not require processor execution, thus not affecting the performance of the host client.

[0073] Currently, hardware implementations of RDMA include Infiniband (IB), RDMA over converged Ethernet (RoCE) (including RoCEv1 and RoCEv2), and the Internet Wide Area RDMA protocol (iWARP). Infiniband is a network specifically designed for RDMA, guaranteeing reliable transmission at the hardware level. RoCE and iWARP are both Ethernet-based RDMA technologies, supporting corresponding verb interfaces; RoCE also supports hardware-level guarantees of reliable transmission.

[0074] like Figure 2 As shown, RDMA is a transport layer network protocol that uses queue pairs (QPs) in the channel adapter (CA) to send and receive data (as messages) from the consumer. Each QP contains a send queue (SQ) and a receive queue (RQ), where the SQ is responsible for sending messages and the RQ is responsible for receiving messages. Each QP's SQ and RQ can be associated with a completion queue (CQ). Each QP has its own connection context to maintain its connection state, and the SQ, RQ, and CQ also have their own queue contexts to maintain their queue usage state.

[0075] In this application's embodiments, the consumer refers to the entity that uses QP to send and receive messages, generally referring to a software process, such as NoF protocol software.

[0076] When sending a message, the consumer posts a work queue element (WQE) to the SQ in the QP of this node (acting as the requester). This WQE includes the RDMA operation type, the address of the storage space pointing to the message to be transmitted, and the size of the message to be transmitted. The data to be transmitted is treated as a message, with a length supporting 0 bytes to 2GB. The network interface card segments the data pointed to by the WQE into packets according to the path maximum transmission unit (PMTU) and sends them to the network. When the network interface card has completed transmitting all the contents of the message pointed to by a WQE, it posts a completion queue element (CQE) to the CQ associated with the SQ to notify the consumer that the RDMA operation indicated by the posted WQE has been completed.

[0077] Before receiving a SEND message, the consumer submits a WQE to the RQ in the QP (responder) of this node. This WQE includes a pointer to the storage space capable of storing data and the size of that storage space. The network interface card (NIC) writes the data received from the network to the storage space pointed to by the WQE of the RQ. After the NIC completes data reception, it submits a CQE to the CQ associated with the RQ to notify the consumer that it has completed receiving an RDMA message. For receiving an RDMA READ response message, the NIC writes the received data to the storage space pointed to by the WQE of the corresponding RDMA READ operation. Furthermore, for the tail packet or single packet of the RDMA READ response message, after the NIC completes data reception, it submits a CQE to the CQ associated with the SQ to notify the consumer that it has completed the RDMA READ operation indicated by a specific WQE it submitted. For acknowledgement (ACK) or non-acknowledgement (NAK) messages received with an RDMA WRITE or SEND message, the network interface card submits a CQE to the CQ associated with the SQ to notify the consumer that the RDMA WRITE or RDMA SEND operation indicated by the submitted WQE has been completed. Acknowledgement (ACK) and non-acknowledgement (NAK) messages for SEND, RDMA READ response, and RDMA WRITE messages are described later.

[0078] RDMA supports both reliable and unreliable QP connections. Reliable QP connections only support a one-to-one communication model, meaning a QP on one node can only establish a QP connection with one QP on other nodes; no QP can simultaneously establish QP connections with multiple QPs on other nodes. For example, ... Figure 3 As shown, consumer A's QPx in node 1 establishes a QP connection with consumer B's QP a in node 2. Consumer A's QPx in node 1 cannot simultaneously establish QP connections with other QPs (e.g., QP b, QP c). NoF uses RDMA that supports reliable QP connections for communication.

[0079] In RDMA, messages received from a reliable QP connection must adhere to strict ordering. The responding end determines whether to accept a message based on whether the packet sequence numbers (PSNs) of the received messages are strictly ordered and incremented. For example... Figure 4 As shown in Figure A, the responding end only accepts a message when the PSN of the message is strictly incrementing (e.g., the PSN of the message is equal to n, n+1, n+2, n+3 in sequence), and can send back an acknowledgment (ACK) message for each message or send back an acknowledgment (ACK) message for multiple consecutive messages. Figure 4 As shown in Figure B, when the PSN of a message changes (for example, the PSN of a message is missing n+2), i.e., when a message with a certain PSN is lost, the responding end will discard all subsequent messages of that QP whose PSNs are not strictly incrementing, and will send back a negative acknowledgment (NAK) message. The requesting end will then retransmit the lost message according to the PSN. Figure 4 As shown in Figure C, if the receiving end continuously loses packets starting from a certain PSN, the requesting end will continuously retransmit the lost packets, and the responding end will continuously send back negative acknowledgments (NAK) messages until the maximum number of retransmissions is reached. At this point, it can be assumed that a network failure has occurred between the requesting and responding ends, and the QP connection between them will be broken. Figure 4 As shown in D, when the PSN of a message is the same as that of a received message (for example, a message with PSN n+1 is received repeatedly), the responding end will discard the duplicate message without having to send a negative acknowledgment (NAK) message.

[0080] RDMA supports message types including the SEND operation, which involves the processor and is applicable to transmission control messages (or command messages).

[0081] RDMA supports memory operations including RDMA read and RDMA write operations. These operations do not involve the processor; data reading or writing is accomplished through the network interface card's operation of the storage space, making them suitable for transmitting data messages.

[0082] The following sections describe the transmit operation, RDMA read operation, and RDMA write operation respectively:

[0083] Send operation

[0084] Sending operations can also be called push operations or having channel semantics. The requester pushes data to the responder without needing to know where the data is stored in the responder's memory. The responder's channel adapter places the data into the next available memory space in its QP, indicated by the WQE in the header of the QP's RQ.

[0085] The requesting end can initiate a sending operation by sending a SEND message, which includes the data to be pushed to the responding end. The data length can be 0 bytes to 2 bytes. 31 Between 2GB bytes, if the data length exceeds the path maximum transmission unit (PMTU), it will be segmented into multiple messages according to the PMTU size. The responding end then reassembles these messages to obtain the data. For a reliable connection, if the data is a short message (i.e., it does not need to be segmented into multiple messages), the responding end sends an ACK / NAK message to the requesting end for each message. If the data is a long message (i.e., segmented into multiple messages), the responding end can send an ACK / NAK message to the requesting end for each message, or send an ACK message to the requesting end for multiple consecutive messages of the same message, or send an ACK message to the requesting end for the last packet of the message. In addition, regardless of whether the data is a short or long message, the responding end can send an ACK message for multiple previously received messages. For example, an ACK message for a SEND message with PSN X can be used to confirm that messages with PSNs less than X preceding this SEND message have been successfully received by the responding end.

[0086] Each SEND message may include a four-byte immediate data (ImmDt). If an immediate data is to be included, it is included in the additional header field (immediate extended transport header or ImmDt field) of the last segment of the SEND message.

[0087] For example, assuming the SEND message is segmented into three packets, the structure of the SEND message and its acknowledgment (ACK) / negative acknowledgment (NAK) messages based on the IB protocol is as follows: Figure 5A As shown, the structure of the SEND message and the SEND message acknowledgment (ACK) / negative acknowledgment (NAK) message based on the RoCEv2 protocol is as follows: Figure 5B As shown, the interaction process between the requesting and responding ends of a reliable connection is as follows: Figure 6 As shown.

[0088] The local route header (LRH) field is used for routing through switches in the subnet.

[0089] The global route header (GRH) field is used to route to a destination outside the sender's local subnet.

[0090] The invariant CRC (ICRC) field covers all fields that should not be changed in the message and performs CRC checks on these fields.

[0091] The variable CRC (VCRC) field covers all fields of the message and performs CRC checks on these fields.

[0092] The ACK extended transport header (AETH) includes additional transport fields for ACK / NAK messages, which are included in each ACK / NAK message of the SEND message.

[0093] The Media Access Control (MAC) field is used for Layer 2 forwarding through switches in an Ethernet subnet.

[0094] The Internet Protocol (IP) field is used for Layer 3 forwarding through switches.

[0095] The User Datagram Protocol (UDP) field is used to indicate that the payload of the message is an RDMA message.

[0096] The base transport header (BTH) field indicates the destination QP, operation code, packet sequence numbers (PSN), and partition. The opCode field within the BTH field determines the start and end of the SEND message.

[0097] For SEND messages, if the data length is less than or equal to PMTU, the BTH opcode "SENDOnly" or "SEND Only with Immediate" is used to indicate that the message cannot be split (i.e., it is a single packet).

[0098] If the data length is zero, the BTH opcode "SEND Only" or "SEND Only with Immediate" is used, and the message does not contain a payload field. For a SEND message with the BTH opcode "SEND Only", other fields are as follows: Figure 5A or Figure 5B As shown in message 1; for a SEND message with BTH opcode "SEND Only with Immediate", other fields are as follows: Figure 5A or Figure 5B The message is shown in message 3.

[0099] If the length of the data is greater than the PMTU, the BTH opcode of the first message is "SEND First", indicating that the message is the first packet; the BTH opcode of the middle messages is "SEND Middle", indicating that the message is the middle packet; and the BTH opcode of the last message is "SEND Last" or "SEND Last with Immediate", indicating that the message is the last packet.

[0100] For acknowledgment (ACK) or negative acknowledgment (NAK) messages to send a SEND message, the BTH opcode is "Acknowledge".

[0101] For a given requesting QP, once a multi-packet send operation is initiated, no other SEND messages, RDMA WRITE messages, or RDMA READ request messages can be sent before the message with the opcode "SEND Last" or "SEND Last with Immediate".

[0102] The responding end does not know the final length of the data until the last message with the "SEND Last" or "SEND Last with Immediate" opcode arrives.

[0103] It should be noted that after the responding end completes the reception of the single packet or tail packet of the SEND message, it reports the CQE to the CQ associated with the RQ of this node. After the requesting end completes the sending process of the sending operation (receiving the acknowledgment (ACK) message corresponding to the single packet or tail packet of the SEND message), it submits the CQE to the CQ associated with the SQ of this node.

[0104] RDMA write operation

[0105] RDMA write operations are used by the requesting end to write data to the storage space of the responding end.

[0106] Before allowing the requesting end to perform an RDMA write operation, the responding end first allocates a memory space for access by its QP (or QP group). The responding end's channel adapter associates a 32-bit M_Key key with the virtual address of this memory space. The responding end sends the virtual address, length, and M_Key key of the memory space to the requesting end that can access the memory region. For example, this information can be sent to the requesting end using the send operation described above.

[0107] The requesting end can initiate an RDMA write operation by sending an RDMA WRITE message, which includes the data to be written to the responding end, the virtual address of the responding end's memory space, the length of the data, and the M_Key key. The data length can be 0 bytes to 2 bytes. 31 Similar to the sending operation, if the data length is greater than the PMTU, it will be segmented into multiple messages according to the PMTU size. The responding end then reassembles these messages to obtain the data. For reliable connections, if the data is a short message (i.e., it does not need to be segmented into multiple messages), the responding end sends an ACK / NAK message to the requesting end for each message. If the data is a long message (i.e., segmented into multiple messages), the responding end can send an ACK / NAK message to the requesting end for each message, or send an ACK message to the requesting end for multiple consecutive messages of the same data, or send an ACK message to the requesting end for the tail packet of the message. In addition, regardless of whether the data is a short or long message, the responding end can send an ACK message for multiple previously received messages. For example, an ACK message for an RDMA WRITE message with PSN X can be used to confirm that messages with PSNs less than X preceding this RDMA WRITE message have been successfully received by the responding end.

[0108] For example, assuming an RDMA WRITE message is segmented into three packets, the structure of the RDMA WRITE message based on the IB protocol and the RDMA WRITE message acknowledgment (ACK) / negative acknowledgment (NAK) message is as follows: Figure 7A As shown, the structure of the RDMA WRITE message and the RDMA WRITE message acknowledgment (ACK) / negative acknowledgment (NAK) message based on the RoCEv2 protocol is as follows: Figure 7B As shown. The interaction process between the requesting and responding ends of a reliable connection is as follows: Figure 8A As shown.

[0109] The RDMA extended transport header (RETH) includes additional transport fields for the RDMA operation. These include, for example, the virtual address of the target storage space, the length of the data for the RDMA operation, and the M_Key key. The responding end determines, based on the M_Key, that the requesting end has permission to access the corresponding virtual address and stores the data indicated by that length in the storage space pointed to by the virtual address.

[0110] Similar to the SEND operation, the OpCode field in the BTH field determines the start and end of the RDMA WRITE message:

[0111] For RDMA WRITE messages, if the data length is less than or equal to PMTU, the BTH opcode "RDMA WRITE Only" or "RDMA WRITE Only with Immediate" is used to indicate that the message is not split (i.e., it is a single packet).

[0112] If the data length is zero, the BTH opcode "RDMA WRITE Only" or "RDMA WRITE Only with Immediate" is used, and the data payload field is not present in the message. For an RDMA WRITE message with the BTH opcode "RDMA WRITE Only", other fields are as follows: Figure 7A or Figure 7B As shown in message 1; for the RDMA WRITE message with BTH opcode "RDMA WRITEOnly with Immediate", in the following... Figure 7A or Figure 7B In message 1, the ImmDt field is added after the RETH field, and the other fields are as shown in message 1.

[0113] If the length of the data is greater than the PMTU, the BTH opcode of the first message is "RDMA WRITE first", indicating that the message is the first packet; the BTH opcode of the middle message is "RDMA WRITE Middle", indicating that the message is the middle packet; and the BTH opcode of the last message is "RDMA WRITE Last" or "RDMA WRITE Last with Immediate", indicating that the message is the last packet.

[0114] For RDMA WRITE messages, the ACK or NAK acknowledgment message, the BTH opcode is "Acknowledge".

[0115] In addition, such as Figure 8B As shown, to improve data transmission reliability, RDMA write operations also support protection of IO data storage and transmission through data integrity field (DIF) verification. Each segment of an RDMAWRITE message can include one or more segments of IO data, each segment of IO data followed by a DIF field. Each DIF field is used to verify the integrity of the preceding IO data. The responding end can verify the validity of the message based on its PSN. Figure 4 The verification shown can also check the integrity of the IO data in the message based on the DIF field. If the validity check of the RDMA message fails, the responding end will send a negative acknowledgment (NAK) message to the requesting end, and the requesting end will retransmit the IO data. If the integrity check of the IO data fails, the responding end can send an acknowledgment (ACK) message or a negative acknowledgment (NAK) message to the requesting end. The protocol does not specify this, but generally, the responding end will send a negative acknowledgment (NAK) message to the requesting end, and the requesting end will retransmit the IO data; otherwise, the requesting end will consider the IO data storage to be successful.

[0116] RDMA read operation

[0117] RDMA read operation is the reverse of RDMA write operation, used by the requesting end to read data from the storage space of the responding end.

[0118] Before allowing the requesting end to perform an RDMA read operation, the responding end first grants the requesting end access to its virtual address, that is, sends the virtual address, length, and M_Key key of the data to be read by the RDMA read operation to the requesting end. For example, this information can be sent to the requesting end using the sending operation described above.

[0119] The requesting end can initiate an RDMA read operation by sending an RDMA READ Request message, which includes the virtual address of the responding end's memory space, the length of the data to be read in the RDMA operation, and the M_Key key. The responding end sends an RDMA READ Response message to the requesting end, which includes the data to be read. The length of the data to be read can be 0 bytes to 2 bytes. 31 If the length between bytes exceeds the PMTU, it will be segmented into multiple packets according to the PMTU size for transmission via multiple RDMA READ response messages. The requesting end then reassembles these packets to obtain the data. For reliable connections, there is no corresponding acknowledgment (ACK) message for the RDMA READ response message. If the requesting end detects packet loss in the RDMA READ response message, it will re-initiate the RDMA read operation.

[0120] For example, assuming the RDMA READ response message is segmented into three messages, the structure of the RDMA READ request message and RDMA READ response message based on the IB protocol is as follows: Figure 9A As shown, the structure of the RDMA READ request message and RDMA READ response message based on the RoCEv2 protocol is as follows: Figure 9B As shown. The interaction process between the requesting and responding ends of a reliable connection is as follows: Figure 10 As shown.

[0121] The opcode field in the BTH field determines the start and end of the message (RDMA READ request message or RDMA READ response message):

[0122] For an RDMA READ request message, the BTH opcode is "RDMA READ Request".

[0123] For RDMA READ response messages, if the data length is less than or equal to PMTU, the BTH opcode "RDMA READ Response Only" is used, indicating that the message cannot be split (i.e., it is a single packet).

[0124] If the data length is zero, the BTH opcode "RDMA READ Response Only" is used, and the RDMA read response message does not contain a data payload field, but all other fields are as follows: Figure 9A or Figure 9B The message is shown in message 1.

[0125] If the length of the data is greater than the PMTU, the BTH opcode of the first message is "RDMA READ Response first", indicating that the message is the first packet; the BTH opcode of the middle message is "RDMA READ Response Middle", indicating that the message is the middle packet; and the BTH opcode of the last message is "RDMA READ Response Last", indicating that the message is the last packet.

[0126] The host client and storage device use the aforementioned RDMA operations to complete the IO read / write process as follows: Figure 11 As shown:

[0127] The host client first discovers the storage device on the network and establishes a connection with it.

[0128] During an I / O write operation from the host client to the storage device, the host client sends a SEND message to the storage device. The data payload of this message is the I / O write command. For a reliable connection, the storage device can send an ACK message to the host client to acknowledge receipt of the I / O write command. Then, the storage device (as the requesting end) sends an RDMA READ request message to the host client (as the responding end), and the host client sends an RDMA READ response message to the storage device. The data payload of this message is the I / O data. After the storage device persistently stores the I / O data—that is, stores the I / O data on a hard disk drive (HDD) or solid-state drive (SSD)—it sends a SEND message to the host client. This message includes the I / O response, indicating that the I / O write operation is complete. The host client then sends an ACK message to the storage device to acknowledge receipt of the I / O response.

[0129] During an I / O read operation from the host client to the storage device, the host client sends a SEND message to the storage device. The data payload of this message is the I / O read command. For a reliable connection, the storage device can send an ACK message to the host client to acknowledge receipt of the I / O read command. After the storage device acquires the I / O data (i.e., retrieves the I / O data from a storage medium such as an HDD or SSD), the storage device (as the requesting end) sends an RDMAWRITE message to the host client (as the responding end). The data payload of this message is the I / O data. The host client sends an ACK message to the storage device to acknowledge receipt of the RDMAWRITE message. Finally, the storage device sends a SEND message to the host client, which includes the I / O response, indicating that the I / O read operation is complete. The host client then sends an ACK message to the storage device to acknowledge receipt of the I / O response.

[0130] This shows that a complete IO write operation uses the SEND operation to transmit command messages (such as command requests and command responses) and the RDMA READ operation to transmit data messages; a complete IO read operation uses the SEND operation to transmit command messages and the RDMA WRITE operation to transmit data messages.

[0131] To improve data storage reliability, the storage device can store a single set of IO data across multiple controllers on different storage media, achieving mirrored backup of the IO data. For example, for... Figure 1 In the storage system shown, the first controller 111 can be used as the main controller, the first NIC 113 can be used as the main NIC, the second controller 112 can be used as the mirror controller of the first controller 111, the second NIC 114 can be used as the mirror NIC of the first NIC 113, and the second controller 112 can back up the IO data stored by the first controller 111.

[0132] like Figure 12 As shown, with Figure 11Similar to the I / O write operation, during the I / O write operation from the host client to the storage device, the host client's processor (via the third NIC and the storage device's first NIC in sequence) sends a SEND message to the storage device's first controller. The data payload of this message is the I / O write command. For a reliable connection, the storage device's first NIC can (via the third NIC) send an ACK message to the host client's processor to acknowledge receipt of the I / O write command. Then, the storage device's first controller sends an RDMA READ request message to the host client's processor. The host client's processor (via the third NIC and the first NIC in sequence) sends an RDMA READ response message to the storage device's first controller. The data payload of each segment of this message is the I / O data. The storage device's first controller persists the I / O data (i.e., stores the I / O data on the storage medium) and (via the first NIC and the storage device's second NIC in sequence) sends an RDMA WRITE message to the storage device's second controller. The data payload of each segment of this message is the I / O data to be backed up. The storage device's second NIC (via the first NIC) sends an ACK message to the first controller to acknowledge receipt of the I / O data. The first controller of the storage device (via the first NIC and the third NIC in sequence) sends a SEND message to the processor of the host client. This message includes an IO response, indicating that the IO write operation is complete. The third NIC of the host client (via the first NIC) sends an ACK message to the first controller of the storage device to acknowledge the SEND message, indicating that the IO response has been received.

[0133] For example, regarding Figure 8B As described, the responding end can verify the validity of the message based on the PSN of each segment of the RDMA WRITE message. Figure 4 The verification shown can also check the integrity of the IO data in the message based on the DIF field. If there is an error in the message's validity check or the IO data's integrity check, the responding end will send a negative acknowledgment (NAK) message to the requesting end, and the requesting end will retransmit the IO data. However, this retransmission is only suitable for correcting errors that occur during IO data transmission. If errors occur during IO data storage (i.e., integrity errors), retransmission cannot correct these errors. When the number of retransmissions exceeds the limit, the QP connection between the requesting and responding ends will be broken, and subsequent RDMA operations will be unable to complete.

[0134] Therefore, the NIC, message sending and receiving method, storage device, and host client provided in the embodiments of this application, and the requesting end (e.g. Figure 1 The first NIC 113 of the storage device 11 sends a signal to the responding end (e.g., Figure 1The third NIC 121 of the host client 12 or the second NIC 114 of the storage device 11 sends an RDMA WRITE message. Each segment of the RDMA WRITE message includes IO data and the corresponding DIF field. After receiving the message, the responding end verifies the validity of the message and the integrity of the IO data, and sends an ACK message / NAK message to the requesting end. The ACK message / NAK message includes first indication information, which is used to indicate whether there is an error in the validity check of the message, and the first indication information is used to indicate whether there is an error in the integrity check of the IO data. Furthermore, the first indication information can also indicate the message sequence number (MSN) of the RDMA message to which the IO data with integrity check error belongs. In addition, to prevent the loss of ACK / NAK messages, the responding end can repeatedly send ACK / NAK messages containing the first indication information until it receives the second indication information from the requesting end. The second indication information is used to indicate that the integrity check of the IO data has errors (or, to indicate to stop sending ACK / NAK messages containing the first indication information). After receiving the second indication information, the responding end does not need to send ACK / NAK messages containing the first indication information again, unless there are new IO data integrity check errors. If the first indication message indicates an error in the integrity check of the IO data, the requesting end can first check the integrity of the IO data locally to determine whether there is an error in the IO data storage. If the local integrity check of the IO data is error-free, the RDMA message to which the IO data indicated by the first indication message belongs will be retransmitted. If the local integrity check of the IO data is error-free, the information indicating the error in the integrity check of the IO data will be sent to the upper-layer protocol stack (such as the NoF protocol stack) for further processing, without immediately retransmitting the RDMA message, because immediately retransmitting the RDMA message cannot prevent the integrity check of the IO data received by the other party from being incorrect.

[0135] like Figure 13 As shown, in Figure 1 Based on this, the first NIC 113 includes a first processor 1131 and a first communication interface 1132, the second NIC 114 includes a second processor 1141 and a second communication interface 1142, and the third NIC 121 includes a third processor 1211 and a third communication interface 1212. The processor is used to process control logic, and the communication interface is used to send and receive messages.

[0136] The first NIC 113 acts as the requesting end, and the second NIC 114 or the third NIC 121 acts as the responding end, executing as follows: Figure 14 The message sending and receiving method is shown. In this method, the first NIC 113 acts as the requesting end, and the second NIC 114 acts as the responding end. This method is suitable for... Figure 12 The first controller of the storage device shown sends RDMA WRITE messages to the second controller of the storage device sequentially through the first NIC and the second NIC, to realize a scenario where the second controller backs up the IO data stored by the first controller; the first NIC 113 acts as the requesting end and the third NIC 121 acts as the responding end, suitable for... Figure 11 The scenario shown illustrates a storage device sending an RDMA WRITE message to a host client to perform an I / O read operation.

[0137] like Figure 14 As shown, the message sending and receiving method includes:

[0138] S1401, The requesting end sends an RDMA message to the responding end.

[0139] Specifically, the first communication interface 1132 of the first NIC 113 sends an RDMA message to the second communication interface 1142 of the second NIC 114 or the third communication interface 1212 of the third NIC 121. Correspondingly, the second communication interface 1142 of the second NIC 114 or the third communication interface 1212 of the third NIC 121 receives the RDMA message from the first communication interface 1132 of the first NIC 113.

[0140] The RDMA message can be a single RDMA WRITE message (when IO data is not segmented) or multiple messages (when IO data is segmented). The RDMA message includes IO data and a DIF field, which is used to verify the integrity of the IO data. For example... Figure 8B As shown, there can be one or more pairs of IO data and DIF fields. Each DIF field is immediately following a segment of IO data and is used to perform integrity verification on the immediately preceding IO data.

[0141] S1402. The responding end verifies the validity of the RDMA message based on the PSN of the message and verifies the integrity of the IO data based on the DIF field.

[0142] Specifically, the second processor 1141 of the second NIC 114 verifies the validity of the RDMA message based on its PSN (refer to...). Figure 4(See the relevant description), and verify the integrity of the IO data based on the DIF field, or, the third processor 1211 of the third NIC 121 verifies the validity of the message based on the PSN of the RDMA message (see the relevant description). Figure 4 (Related description), and verify the integrity of IO data based on the DIF field.

[0143] The integrity of IO data is verified based on the DIF field as follows: Cyclic redundancy check 16 (CRC16) is calculated on the IO data, and the calculation result is compared with the DIF field (2-byte check value). If they match, there is no error in the verification; if they do not match, there is an error in the verification.

[0144] S1403. The responding end sends an ACK message / NAK message to the requesting end. The ACK message / NAK message includes first indication information.

[0145] Specifically, the second communication interface 1142 of the second NIC 114 or the third communication interface 1212 of the third NIC 121 sends an ACK message / NAK message to the first communication interface 1132 of the first NIC 113. Correspondingly, the first communication interface 1132 of the first NIC 113 receives the ACK message / NAK message from the second communication interface 1142 of the second NIC 114 or the third communication interface 1212 of the third NIC 121. The first communication interface 1132 of the first NIC 113 also receives the first indication information from the second communication interface 1142 of the second NIC 114 or the third communication interface 1212 of the third NIC 121.

[0146] like Figure 15 As shown in A, it is possible to... Figure 7A The acknowledgment (ACK) / negative acknowledgment (NAK) message of the RDMA WRITE message based on the IB protocol shown is extended by adding a DIF extended transport header (DIFETH) field to transmit first indication information, or, as... Figure 15 As shown in B, it is possible to... Figure 7BThe RoCEv2-based RDMA WRITE message shown in the illustration is extended by adding a DIFETH field to transmit first indication information. This application does not limit the specific name or number of added fields; for example, multiple DIFETH fields can be used to indicate whether different IO data integrity checks have errors. This application also does not limit the location of the added DIFETH field. Figure 15 It is located after the AETH field, but is not intended to be limited to it.

[0147] For example, as shown in Table 1, the DIFETH field can occupy 32 bits. Bits 29-31 are used to indicate the type of feedback information: bits 29-31 with a value of 000 indicate that the first indication information indicates no error in the integrity check of the IO data; bits 29-31 with a value of 001 indicate that the first indication information indicates an error in the integrity check of the IO data; bits 29-31 with a value of 010 indicate that the second indication information indicates clearing the information indicating an error in the integrity check of the IO data; and bits 29-31 with values ​​011-111 are reserved values. Bits 29-31 with a value of 000 or 001 are used when the responding end sends the first indication information to the requesting end; bits 29-31 with a value of 010 are used when the requesting end sends the second indication information to the responding end.

[0148] When bits 29-31 are 001, bits 24-28 (AAAAA) indicate the number of DIF check errors indicated by the first indication information. When bits 29-31 are 001, bits 0-23 (NN...NN) indicate that the first indication information also indicates the MSN of the RDMA message to which the IO data with integrity check errors belongs. When there are multiple RDMA messages, this message sequence number can be used to determine which specific RDMA message has IO data with integrity check errors. When bits 29-31 are 010, bits 0-23 (MM...MM) indicate that the second indication information also indicates the MSN of the RDMA message to which the IO data with integrity check errors to be cleared belongs. After receiving the second indication information, the responding end clears the integrity check error information with an MSN less than this MSN. In this table, "N" or "M" indicates that the value can be 0 or 1 and has practical meaning. In this table, "X" indicates that the value can be any value of 0 or 1 and has no practical meaning.

[0149] Table 1

[0150] Position [29:31] Position [24:28] Position [0:23] 000 XXXXX XX...XX 001 AAAAA NN...NN 010 XXXXX MM...MM 011-111 XXXXX XX...XX

[0151] like Figure 16As shown, if there is an error in the validity check of the RDMA message, and the information indicating an error in the integrity check of the IO data has been cleared (the second indication information has been received), the responding end executes step S1601: discard the IO data in the RDMA message, and reply to the requesting end with a negative acknowledgment (NAK) message. The negative acknowledgment (NAK) message includes the first indication information, which indicates that there is no error in the integrity check of the IO data.

[0152] If the validity check of the RDMA message is incorrect, and the information indicating an error in the integrity check of the IO data is not cleared (the second indication information is not received), the responding end executes step S1602: discard the IO data in the RDMA message, reply to the requesting end with a negative acknowledgment (NAK) message, the negative acknowledgment (NAK) message includes the first indication information, at this time the first indication information indicates the IO data with an integrity check error (for example, indicating the MSN of the RDMA message to which the IO data with an integrity check error belongs).

[0153] If the validity check of the RDMA message is correct, and the integrity check of the IO data in the RDMA message is correct, and the information indicating an error in the integrity check of the IO data has been cleared (the second indication information has been received), then the responding end executes step S1603: accept the IO data in the RDMA message, reply to the requesting end with an acknowledgment (ACK) message, the acknowledgment (ACK) message including the first indication information, at this time the first indication information indicates that there is no error in the integrity check of the IO data.

[0154] If the validity check of the RDMA message is correct, and the integrity check of the IO data in the RDMA message is correct, and the information indicating an error in the integrity check of the IO data has not been cleared (the second indication information has not been received), then the responding end executes step S1604: accept the IO data in the RDMA message, reply to the requesting end with an acknowledgment (ACK) message, the acknowledgment (ACK) message including the first indication information, at this time the first indication information indicates the IO data with an integrity check error (for example, indicating the MSN of the RDMA message to which the IO data with an integrity check error belongs).

[0155] If the validity check of the RDMA message is correct, but the integrity check of the IO data in the RDMA message is incorrect, the responding end executes steps S1605 and S1606: S1605: Record the information that the integrity check of the IO data is incorrect (e.g., the MSN of the RDMA message to which the IO data with the integrity check error belongs). S1606: Discard the IO data in the RDMA message and reply to the requesting end with an acknowledgment (ACK) message. The acknowledgment (ACK) message includes first indication information. At this time, the first indication information can indicate not only that the integrity check of the IO data is incorrect, but also the MSN of the RDMA message to which the IO data with the integrity check error belongs.

[0156] S1404. The requesting end determines whether to retransmit the RDMA message based on the ACK message / NAK message and the first indication information.

[0157] Specifically, the first processor 1131 of the first NIC 113 determines whether to retransmit the RDMA message based on the ACK / NAK message received by the first communication interface 1132 of the first NIC 113 and the first indication information.

[0158] like Figure 17 As shown, if the requesting end (specifically, the first communication interface 1132 of the first NIC 113) receives a negative acknowledgment (NAK) message, then step S1701 is executed: the requesting end (specifically, the first processor 1131 of the first NIC 113) determines to retransmit the RDMA message.

[0159] If the requesting end (specifically, the first communication interface 1132 of the first NIC 113) receives an acknowledgment (ACK) message, and the first indication information in the acknowledgment (ACK) message indicates that the integrity check of the IO data is error-free, then step S1702 is executed: the requesting end (specifically, the first processor 1131 of the first NIC 113) determines that it will no longer retransmit the RDMA message.

[0160] If the requesting end (specifically, the first communication interface 1132 of the first NIC 113) receives an acknowledgment (ACK) message, and the first indication information in the acknowledgment (ACK) message indicates an error in the integrity check of the IO data, then step S1703 is executed: The requesting end (specifically, the first processor 1131 of the first NIC 113) first performs a local check on the integrity of the IO data to determine whether there is an error in the IO data storage. If there is no error in the local integrity check of the IO data, then the requesting end (specifically, the first processor 1131 of the first NIC 113) determines to retransmit the RDMA message to which the IO data indicated by the first indication information belongs. If there is an error in the local integrity check of the IO data, then the requesting end (specifically, the first processor 1131 of the first NIC 113) determines not to retransmit the RDMA message.

[0161] Additionally, if the first indication information indicates an error in the integrity check of the IO data, the first communication interface 1132 of the first NIC 113 can report the first indication information to the NoF protocol software of the first controller.

[0162] Optionally, if the requesting end (specifically, the first communication interface 1132 of the first NIC 113) receives an acknowledgment (ACK) message, and the first indication information in the acknowledgment (ACK) message indicates an error in the integrity check of the IO data, step S1704 can also be executed: the requesting end (specifically, the first communication interface 1132 of the first NIC 113) sends a second indication information to the responding end. The second indication information is used to indicate the removal of the information indicating an error in the integrity check of the IO data (or, to indicate the cessation of sending the first indication information). The second indication information can also indicate the MSN of the RDMA message to which the IO data with the integrity check error belongs. After receiving the second indication information, the responding end can remove the information indicating an error in the integrity check of the IO data in RDMA messages smaller than that MSN. The responding end will no longer indicate to the requesting end that the cleared IO data has an integrity check error, unless a new IO data integrity check error occurs.

[0163] As mentioned above, the requesting end can send an ACK message or a NAK message to the responding end. This ACK / NAK message includes a DIFETH field, which carries second indication information. Additionally, the requesting end can send a SEND message or an RDMA WRITE message to the responding end. These SEND or RDMA WRITE messages also include a DIFETH field, which carries second indication information.

[0164] For example, such as Figure 18 As shown in A, it is possible to... Figure 5A The SEND message based on the IB protocol shown can be extended by adding a DIFETH field to transmit a second indication message, or, as... Figure 18 As shown in B, it is possible to... Figure 5B The RoCEv2-based SEND message shown is extended by adding a DIFETH field to transmit a second indication information. This application does not specify the location of the added DIFETH field. Figure 18 It is located after the BTH field, but is not intended to be limited to it.

[0165] Or, such as Figure 19 As shown in A, for Figure 7A The RDMA WRITE message based on the IB protocol shown is extended by adding a DIFETH field to transmit a second indication information, or, as... Figure 19 As shown in B, it is possible to... Figure 7B The RDMA WRITE message based on the RoCEv2 protocol shown is extended by adding a DIFETH field to transmit second indication information. This application does not specify the location of the added DIFETH field. Figure 19 It is located after the RETH field, but is not intended to be limited to it.

[0166] The network interface card, message sending and receiving method, storage device, and host client provided in this application embodiment involve a requesting network interface card sending an RDMA message to a responding network interface card. This RDMA message includes IO data and a DIF field. The responding network interface card verifies the integrity of the IO data based on the DIF field and sends first indication information to the requesting network interface card. This first indication information indicates whether there are errors in the IO data integrity verification. The requesting end can determine whether to retransmit the RDMA message based on the first indication information, avoiding unnecessary retransmissions that occur when determining whether to retransmit the RDMA message based on received ACK or NAK messages. This is because such retransmissions cannot resolve integrity verification errors in the IO data itself, but only errors generated during transmission. The saved bandwidth can be used to transmit other IO data, thus improving the transmission efficiency of IO data.

[0167] This application provides a computer-readable storage medium for storing one or more programs, wherein the one or more programs include instructions that, when executed by a network interface card, cause the network interface card to perform actions such as... Figure 14 , Figure 16 , Figure 17 The message sending and receiving methods are shown.

[0168] This application provides a computer program product including instructions that, when executed on a network interface card, cause the network interface card to perform actions such as... Figure 14 , Figure 16 , Figure 17 The message sending and receiving methods are shown.

[0169] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0170] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0171] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0172] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or modules may be electrical, mechanical, or other forms.

[0173] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located on one device or distributed across multiple devices. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0174] In addition, the functional modules in the various embodiments of this application can be integrated into one device, or each module can exist physically separately, or two or more modules can be integrated into one device.

[0175] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device including one or more servers, data centers, etc., that can be integrated with the medium. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium, etc.

[0176] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A network interface card, characterized in that, include: Processor and communication interface; The communication interface is used to send Remote Direct Memory Access (RDMA) messages. The RDMA message includes input / output I / O data and a data integrity field. The data integrity field is used to verify the integrity of the I / O data. The communication interface is also used to receive first indication information, which is used to indicate whether there is an error in the integrity verification of the IO data; The processor is specifically configured to: if the first indication information indicates that there is an error in the integrity check of the IO data, then check the integrity of the IO data; if there is no error in the integrity check, then retransmit the RDMA message; if there is an error in the integrity check, then do not retransmit the RDMA message.

2. The network interface card according to claim 1, characterized in that, The first indication information is also used to indicate the message sequence number of the RDMA message to which the IO data with integrity verification error belongs.

3. The network interface card according to any one of claims 1-2, characterized in that, The first indication information is carried in the acknowledgment message or negative acknowledgment message of the RDMA message.

4. The network interface card according to any one of claims 1-2, characterized in that, The communication interface is also used for: If the first indication information indicates that there is an error in the integrity verification of the IO data, then a second indication information is sent, which is used to indicate that the information indicating that there is an error in the integrity verification of the IO data is cleared.

5. The network interface card according to claim 4, characterized in that, The second indication information is carried in an acknowledgment message or a negative acknowledgment message, or in an RDMA write WRITE message, or in a send SEND message.

6. A message sending and receiving method, characterized in that, include: Send a Remote Direct Memory Access (RDMA) message, the RDMA message including input / output I / O data and a data integrity field, the data integrity field being used to verify the integrity of the I / O data; Receive first indication information, which is used to indicate whether there is an error in the integrity check of the IO data; If the first indication information indicates that there is an error in the integrity check of the IO data, then the integrity of the IO data is checked. If there is no error in the integrity check, then the RDMA message is retransmitted. If there is an error in the integrity check, then the RDMA message is not retransmitted.

7. The method according to claim 6, characterized in that, The first indication information is also used to indicate the message sequence number of the RDMA message to which the IO data with integrity verification error belongs.

8. The method according to claim 6 or 7, characterized in that, The first indication information is carried in the acknowledgment message or negative acknowledgment message of the RDMA message.

9. The method according to claim 6 or 7, characterized in that, Also includes: If the first indication information indicates that there is an error in the integrity verification of the IO data, then a second indication information is sent, which is used to indicate that the information indicating that there is an error in the integrity verification of the IO data is cleared.

10. The method according to claim 9, characterized in that, The second indication information is carried in an acknowledgment message or a negative acknowledgment message, or in an RDMA write WRITE message, or in a send SEND message.

11. A storage device, characterized in that, Includes a network interface card and a controller as described in any one of claims 1-5, wherein the controller receives input / output (IO) data or sends IO data through the network interface card.

Citation Information

Patent Citations

  • Network testing device based on dynamic connection end-to-end reliable transmission protocol

    CN112350897A

  • Partial successful data delivery in a data storage system

    US20190179536A1