Communication method and device

By introducing the indication information mechanism and sending only status in the RDMA network, the communication disconnection problem caused by virtual machine hot migration is solved, the communication stability and reliability are improved, the signaling overhead is reduced, and the deployment cost is lowered.

CN114443206BActive Publication Date: 2025-09-12HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202011196982.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-31
Publication Date
2025-09-12
Estimated Expiration
2040-10-31

AI Technical Summary

Technical Problem

In an RDMA network, communication connections may be disconnected due to reasons such as virtual machine hot migration, affecting the stability and reliability of communication.

Method used

By introducing an indication information mechanism into the RDMA network, shielding the error reporting function, and using TPN messages to carry indication information, the state migration of the communication connection is realized, the connection disconnection caused by virtual machine hot migration is avoided, and the sending-only state is adopted to improve the communication stability and reliability.

Benefits of technology

It improves the stability and reliability of communication between virtual machines, reduces signaling overhead, lowers deployment costs, and enables fast self-recovery of communication connections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114443206B_ABST
    Figure CN114443206B_ABST
Patent Text Reader

Abstract

The present application provides a communication method and apparatus that can solve the problem of disconnection of communication connections due to reasons such as hot migration of virtual machines, thereby improving the stability and reliability of communication, and can be applied to communication systems. The method includes: a first device sends a first message to a second device, and receives indication information from the second device. The indication information can be used to shield the error reporting function of the first device. The error reporting function is: if the first device times out and does not receive the second message from the second device, the first device sends an error message to the business system, and the error message can be used to trigger the business system to disconnect the communication connection between the first device and the second device. The communication connection can be a QP connection used for communication between the first device and the second device. The second message can be a response message to the first message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a communication method and device. Background Art

[0002] Currently, in a remote direct memory access (RDMA) network based on an input / output (I / O) standard (Infiniband, IB) architecture of a new generation of network equipment hardware platforms, based on the single root I / O virtualization (SR-IOV) protocol, the physical device (physical function, PF) of the network interface card (NIC) can create a corresponding virtual device (virtual function, VF) for each virtual machine (VM). Communication between virtual machines is achieved through the communication connections created for the corresponding virtual machines by the virtual devices, such as queue pair (QP) connections.

[0003] However, if the virtual machine at one end cannot communicate with the virtual machine at the other end in time due to hot migration, fault self-recovery, etc., the communication connection will be disconnected, thereby affecting the stability and reliability of the communication. Summary of the Invention

[0004] The embodiments of the present application provide a communication method and apparatus that can solve the problem of disconnection of communication connections due to reasons such as hot migration of virtual machines, thereby improving the stability and reliability of communication.

[0005] To achieve the above objectives, this application adopts the following technical solutions:

[0006] In a first aspect, a communication method is provided. The communication method is applied to an RDMA network, and the RDMA network may include: a first device and a second device. The communication method may include: the first device sending a first message to the second device, and receiving indication information from the second device.

[0007] Among them, either the first device or the second device can be a terminal device or a network device such as a server, can be an RDMA network card in the terminal device or the network device, can be a virtual device in the RDMA network card, or can be a virtual machine on the virtual device.

[0008] Furthermore, the first message may be one of the following: an RDMA write request message, an RDMA send message, and an RDMA read request message. The indication information may be used to shield the error reporting function of the first device. The error reporting function is: if the first device does not receive the second message from the second device within a timeout period, the first device sends an error message to the business system, and the error message may be used to trigger the business system to disconnect the communication connection between the first device and the second device. The communication connection may be a QP connection for communication between the first device and the second device. The second message may be a response message to the first message, for example, the second message may be one of the following: a data message, a receiver not ready (RNR) message, an acknowledgement (ACK) message, or a non-acknowledgement (NAK) message.

[0009] Based on the communication method described in the first aspect, since the indication information can instruct the first device to block the error reporting function, when the first device fails to receive the second message from the second device within a timeout period, the communication connection will not be disconnected due to reporting error information. Therefore, the problem of disconnection of the communication connection due to reasons such as hot migration of virtual machines is solved, thereby improving the stability and reliability of communication.

[0010] In one possible design, the indication information may be carried in a timer paused notification (TPN) message. This allows message multiplexing, thereby reducing signaling overhead and improving communication efficiency.

[0011] Optionally, the TPN message may be an acknowledgment (ACK) message or a non-acknowledgement (NAK) message in which the value of the syndrome field in the acknowledgment extended transport header (AETH) is a first value. It can be understood that by defining the value of the syndrome field in the AETH of the ACK message or the NAK message, the TPN message can be defined quickly and conveniently.

[0012] In one possible design, the indication information is used by the first device to transition the state of the communication connection to a send-only state. In the send-only state, the first device disables the error reporting function. It can be understood that in the IB architecture, disabling the error reporting function by adding a send-only state to the communication connection minimizes changes to the IB architecture, facilitating implementation and reducing deployment costs.

[0013] In one possible design, the method described in the first aspect may further include: after the first device receives the second message from the third device, it sends a third message to the third device. The third device is the device to which the virtual machine on the second device is located after hot migration. The third device may be a terminal device or a network device such as a server, an RDMA network card in the terminal device or network device, or a virtual device in the RDMA network card. In this way, communication between the first device and another virtual machine migrated from the second device to the third device can be restored, thereby improving communication reliability.

[0014] Optionally, after the first device receives the second message from the third device, sending the third message to the third device may include: after the first device receives the second message from the third device, migrating the state of the communication connection from a send-only state to a send-ready state (ready to send), thereby sending the third message to the third device. It can be understood that through state migration, communication between the first device and the virtual machine can be quickly and conveniently restored.

[0015] In a second aspect, a communication method is provided. The communication method is applied to an RDMA network, and the RDMA network may include: a first device and a second device. The communication method may include: the second device receiving a first message from the first device and sending indication information to the first device.

[0016] The error reporting function includes the following: if the first device fails to receive the second message from the second device within a timeout period, the first device sends an error message to the service system. This error message can be used to trigger the service system to disconnect the communication connection between the first and second devices. The communication connection can be a QP connection used for communication between the first and second devices. The second message can be a response message to the first message.

[0017] In one possible design, the second device sending the indication information to the first device may include: upon the second device determining that a virtual machine on the second device is undergoing hot migration, sending the indication information to the first device, and the virtual machine can be used to communicate with the first device. In this way, the indication information is sent to the first device in a timely manner.

[0018] In one possible design, the indication information may be carried in a TPN message.

[0019] Optionally, the TPN message is an ACK message or a NAK message in which the value of the syndrome field of AETH is the first value.

[0020] In one possible design scheme, the indication information can be used by the first device to migrate the state of the communication connection to a send-only state. In the send-only state, the first device blocks the error reporting function.

[0021] In one possible design scheme, the second message is one of the following: a data message, an RNR message, an ACK message, or a NAK message.

[0022] In addition, the technical effects of the communication method described in the second aspect can refer to the technical effects of the communication method described in the first aspect, and will not be repeated here.

[0023] In a third aspect, a communication device is provided. The communication device is applied to an RDMA network, and the RDMA network may further include: a second device. The communication device may include: a sending module and a receiving module. The sending module is used to send a first message to the second device. The receiving module is used to receive indication information from the second device. The indication information is used to shield the error reporting function of the communication device. The error reporting function is: if the communication device times out and does not receive the second message from the second device, an error message is sent to the business system. The second message is a response message to the first message. The error information is used to trigger the business system to disconnect the communication connection between the communication device and the second device.

[0024] In one possible design, the indication information is carried in a TPN message.

[0025] Optionally, the TPN message is an ACK message or a NAK message in which the value of the syndrome field of AETH is the first value.

[0026] In one possible design scheme, the indication information is used by the communication device described in the third aspect to migrate the state of the communication connection to a sending-only state. In the sending-only state, the communication device shields the error reporting function.

[0027] In a possible design scheme, the sending module is further configured to send a third message to the third device after the receiving module receives the second message from the third device. The third device is the device where the virtual machine on the second device is located after hot migration.

[0028] Optionally, the communication device described in the third aspect may further include: a processing module. The processing module is configured to, after the receiving module receives the second message from the third device, migrate the state of the communication connection from the send-only state to the send-ready state, and the sending module is further configured to send a third message to the third device.

[0029] In one possible design scheme, the second message is one of the following: a data message, an RNR message, an ACK message, or a NAK message.

[0030] Optionally, the sending module and the receiving module described in the third aspect may also be integrated into one module, such as a transceiver module, to centrally implement the sending function and the receiving function of the communication device described in the third aspect.

[0031] Optionally, the communication device described in the third aspect may further include a storage module, wherein the storage module stores a program or instruction. When the processing module described in the third aspect executes the program or instruction, the communication device described in the third aspect may execute the method described in the first aspect.

[0032] It should be noted that the communication device described in the third aspect can be a terminal device or a network device such as a server, or it can be a chip (system) or other parts or components that can be set in a terminal device or a network device, or it can be a device that includes a terminal device or a network device. This application does not limit this.

[0033] In addition, the technical effects of the communication device described in the third aspect can refer to the technical effects of the communication method described in the first aspect, and will not be repeated here.

[0034] In a fourth aspect, a communication device is provided. The communication device is applied to an RDMA network, and the RDMA network may further include: a first device. The communication device may include: a sending module and a receiving module. The receiving module is used to receive a first message from the first device. The sending module is used to send indication information to the first device. The indication information is used to shield the error reporting function of the first device. The error reporting function is: if the first device times out and does not receive the second message from the communication device, the first device sends an error message to the business system. The second message is a response message to the first message, and the error message is used to trigger the business system to disconnect the communication connection between the first device and the communication device.

[0035] In one possible design scheme, the indication information is: information sent by the communication device described in the fourth aspect during the hot migration of a virtual machine on the communication device, where the virtual machine is used to communicate with the first device.

[0036] In one possible design, the indication information is carried in a TPN message.

[0037] Optionally, the TPN message is an ACK message or a NAK message in which the value of the syndrome field of AETH is the first value.

[0038] In one possible design scheme, the indication information is used by the first device to migrate the state of the communication connection to a send-only state. In the send-only state, the first device blocks the error reporting function.

[0039] In one possible design scheme, the second message is one of the following: a data message, an RNR message, an ACK message, or a NAK message.

[0040] Optionally, the sending module and the receiving module described in the fourth aspect may also be integrated into one module, such as a transceiver module, to centrally implement the sending function and the receiving function of the communication device described in the fourth aspect.

[0041] Optionally, the communication device described in the fourth aspect may further include a processing module, which is used to implement the processing function of the communication device.

[0042] Optionally, the communication device described in the fourth aspect may further include a storage module, wherein the storage module stores a program or instruction. When the processing module described in the fourth aspect executes the program or instruction, the communication device described in the fourth aspect may execute the communication method described in the second aspect.

[0043] It should be noted that the communication device described in the fourth aspect can be a terminal device or a network device such as a server, or it can be a chip (system) or other parts or components that can be set in a terminal device or a network device, or it can be a device that includes a terminal device or a network device. This application does not limit this.

[0044] In addition, the technical effects of the communication device described in the fourth aspect can refer to the technical effects of the communication method described in the second aspect, and will not be repeated here.

[0045] In a fifth aspect, a communication device is provided. The communication device may include: a processor coupled to a memory. The processor is configured to execute a computer program stored in the memory to cause the device to perform the communication method described in either the first aspect or the second aspect.

[0046] Optionally, the communication device described in the fifth aspect may further include: a receiver and a transmitter. The receiver is used to implement the receiving function of the communication device, and the transmitter is used to implement the transmitting function of the communication device. The transmitter and receiver may also be integrated into a single device, such as a transceiver. The transceiver is used to implement the transmitting and receiving functions of the communication device.

[0047] It should be noted that the communication device described in the fifth aspect can be a terminal device or a network device such as a server, or it can be a chip (system) or other parts or components that can be set in a terminal device or a network device, or it can be a device that includes a terminal device or a network device. This application does not limit this.

[0048] In addition, the technical effects of the communication device described in the fifth aspect can refer to the technical effects of the communication method described in the first aspect, and will not be repeated here.

[0049] In a sixth aspect, a communication device is provided. The communication device may include a processor and a memory. The memory is configured to store a computer program, and when the processor executes the computer program, the communication device performs the communication method described in either the first aspect or the second aspect.

[0050] Optionally, the communication device described in the sixth aspect may further include: a receiver and a transmitter. The receiver is used to implement the receiving function of the communication device, and the transmitter is used to implement the transmitting function of the communication device. Optionally, the transmitter and receiver may be integrated into a single device, such as a transceiver. The transceiver is used to implement the transmitting and receiving functions of the communication device.

[0051] It should be noted that the communication device described in the sixth aspect can be a terminal device or a network device such as a server, or it can be a chip (system) or other parts or components that can be set in a terminal device or a network device, or it can be a device that includes a terminal device or a network device. This application does not limit this.

[0052] In addition, the technical effects of the communication device described in the sixth aspect can refer to the technical effects of the communication method described in the first aspect, and will not be repeated here.

[0053] In a seventh aspect, a communication device is provided. The communication device may include a processor and an interface circuit. The interface circuit is configured to receive code instructions and transmit them to the processor; the processor is configured to execute the code instructions to perform the communication method described in either the first aspect or the second aspect.

[0054] Optionally, the communication device described in the seventh aspect may further include: a receiver and a transmitter. The receiver is used to implement the receiving function of the communication device, and the transmitter is used to implement the transmitting function of the communication device. Optionally, the transmitter and receiver may be integrated into a single device, such as a transceiver. The transceiver is used to implement the transmitting and receiving functions of the communication device.

[0055] Optionally, the communication device described in the seventh aspect may further include a memory storing a program or instruction. When the processor described in the seventh aspect executes the program or instruction, the communication device may execute the communication method described in either the first aspect or the second aspect.

[0056] It should be noted that the communication device described in the seventh aspect can be a terminal device or a network device such as a server, or it can be a chip (system) or other parts or components that can be set in a terminal device or a network device, or it can be a device that includes a terminal device or a network device. This application does not limit this.

[0057] In addition, the technical effects of the communication device described in the seventh aspect can refer to the technical effects of the communication method described in the first aspect, and will not be repeated here.

[0058] In an eighth aspect, a communication device is provided. The communication device may include a processor and a transceiver. The transceiver may be a transceiver circuit or an interface circuit, configured to exchange information between the communication device and another device. The processor executes program instructions to perform the communication method described in either the first or second aspect.

[0059] Optionally, the communication device described in the eighth aspect may further include a memory storing a program or instruction. When the processor described in the eighth aspect executes the program or instruction, the communication device may execute the communication method described in either the first aspect or the second aspect.

[0060] It should be noted that the communication device described in the eighth aspect can be a terminal device or a network device such as a server, or it can be a chip (system) or other parts or components that can be set in a terminal device or a network device, or it can be a device that includes a terminal device or a network device. This application does not limit this.

[0061] In addition, the technical effects of the communication device described in the eighth aspect can refer to the technical effects of the communication method described in the first aspect, and will not be repeated here.

[0062] In a ninth aspect, a communication system is provided. The communication system may include one or more terminal devices and one or more network devices such as servers, wherein the terminal devices or network devices are configured to execute the communication method described in either the first aspect or the second aspect.

[0063] In a tenth aspect, a computer-readable storage medium is provided. The computer-readable storage medium may include a computer program or instructions. When the computer program or instructions are executed on a computer, the computer executes the communication method described in either the first aspect or the second aspect.

[0064] In an eleventh aspect, a computer program product is provided. The computer-readable storage medium may include a computer program or instructions, which, when executed on a computer, causes the computer to execute the communication method according to any one of the first and second aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 A schematic diagram of the architecture of a direct-through network provided in an embodiment of the present application;

[0066] Figure 2 A schematic diagram of the process of hot migration of a virtual machine provided in an embodiment of the present application;

[0067] Figure 3 A schematic diagram of the structure of a virtual device provided in an embodiment of the present application;

[0068] Figure 4 A schematic diagram of the architecture of a communication system provided in an embodiment of the present application;

[0069] Figure 5 Schematic diagram of the communication method provided in this embodiment Figure 1 ;

[0070] Figure 6 A schematic diagram of the QP connection state migration process provided in an embodiment of the present application;

[0071] Figure 7 Schematic diagram of the communication method provided in this embodiment Figure 2 ;

[0072] Figure 8 Schematic diagram of the communication method provided in this embodiment Figure 3 ;

[0073] Figure 9 Schematic diagram of the structure of the communication device provided in the embodiment of the present application Figure 1 ;

[0074] Figure 10 Schematic diagram of the structure of the communication device provided in the embodiment of the present application Figure 2 . DETAILED DESCRIPTION

[0075] First combine Figure 1-Figure 3 Introduce the technical terms involved in the technical solution of this application.

[0076] 1. Virtual Machine

[0077] A virtual machine is a complete computer system simulated through software that can perform the functions of a complete hardware system. A virtual machine can be created and run independently on a physical machine. Users can operate the virtual machine just like a physical machine, completing tasks and achieving similar results.

[0078] 2. Hot migration

[0079] "Hot migration" can also be called "dynamic migration" or "real-time migration." Hot migration involves the preservation and restoration of virtual machines. That is, before migration, the running state of the virtual machine on one physical machine is first saved, then quickly migrated to another physical machine and resumed. After resuming operation, the virtual machine continues to run smoothly in the state before the migration, and the user is unaware of the existence of this process. Currently, hot migration can be applied in scenarios such as computer sharing, database backup, and system hardware maintenance to achieve the effects of simplifying operation and maintenance, balancing loads, enhancing fault tolerance, and optimizing power management. For example, if a physical machine is overloaded, some virtual machines on the physical machine can be hot migrated to other physical machines to ensure normal business operations; or, if a physical machine is underloaded, the virtual machines can be hot migrated to a small number of physical machines, thereby powering off the corresponding physical machines to achieve energy conservation; or, if a physical machine is predicted to fail, virtual machines can be hot migrated to other physical machines in advance to prevent business interruption.

[0080] like Figure 2 As shown, the stages of hot migration may include: a prepare stage, a pre-copy stage, a stop-copy stage, a resume stage, and a release stage.

[0081] Specifically, after the virtual machine starts hot migration, hot migration enters the preparation phase. During the preparation phase, preparatory work related to hot migration can be performed, such as verifying the security of hot migration and verifying whether the opposite physical machine is reachable. After the preparation phase is completed, hot migration enters the pre-copy phase. During the pre-copy phase, data replication can be performed, that is, the relevant data of the virtual machine is copied and saved. After the copying and saving are completed, hot migration enters the shutdown copy phase. During the shutdown copy phase, the virtual machine stops running, and the local physical machine sends the saved data to the opposite physical machine to achieve the migration of the virtual machine from the local physical machine to the opposite physical machine. After the shutdown copy phase is completed, hot migration enters the recovery phase. During the recovery phase, the opposite physical machine activates the virtual machine to run, so that the services of the virtual machine are restored in sequence, and thus continue to provide external services. After the recovery phase is completed, hot migration enters the release phase. During the release phase, the opposite physical machine can notify the local physical machine so that the local physical machine can release the relevant data of the virtual machine, and thus the hot migration ends.

[0082] It is understood that during the downtime copy phase and most of the recovery phase of the hot migration, the virtual machine is temporarily unable to provide services due to the virtual machine's downtime. During other times, the virtual machine can provide services normally.

[0083] 3. Direct network

[0084] like Figure 1As shown, a direct network can be built based on the SR-IOV protocol. In a direct network, the physical device in the RMDA network card can enable a corresponding virtual device for the virtual machine. The virtual device can be a collection of hardware and software resources in the physical device for providing services to the virtual machine. In this way, the virtual machine can directly access the virtual device based on virtualization technology for direct I / O (VT-d) through the hypervisor interface in the virtual machine monitor (VMM), so as to interact with the upper-layer business system or other virtual machines through the virtual device.

[0085] 4. QP connection

[0086] like Figure 3 As shown, the virtual device can create a QP connection for the virtual machine on the virtual device. Data exchange between virtual machines can be achieved through the QP connection.

[0087] Specifically, a QP connection can include a send queue (SQ) and a receive queue (RQ). Regarding the SQ, the local virtual machine can place packets to be sent into the SQ and then send the packets to the remote virtual machine through the SQ. Regarding the RQ, the local virtual machine can receive packets from the remote virtual machine through the RQ and then retrieve and process the packets from the RQ.

[0088] 5. Other terms

[0089] In the embodiments of this application, words such as "exemplarily" and "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the word "exemplary" is intended to present concepts in a concrete way.

[0090] In the embodiments of the present application, the terms "information," "signal," "message," "channel," and "signaling" may sometimes be used interchangeably. It should be noted that, when the distinction between them is not emphasized, the meanings they intend to convey are the same. The terms "of," "corresponding," and "corresponding" may sometimes be used interchangeably. It should be noted that, when the distinction between them is not emphasized, the meanings they intend to convey are the same.

[0091] In the embodiments of the present application, sometimes a subscript such as W1 may be mistakenly written as a non-subscript form such as W1. When the difference is not emphasized, the meanings to be expressed are the same.

[0092] Furthermore, the present application will present various aspects, embodiments, or features in the context of systems that may include multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and / or may not include all of the devices, components, modules, etc. discussed in conjunction with the figures. Furthermore, combinations of these aspects may also be used.

[0093] The technical solution in this application will be described below with reference to the accompanying drawings.

[0094] See also Figure 4 The technical solutions of the embodiments of the present application can be applied to a communication system, which can be applicable to an RDMA network. The communication system can include: one or more terminal devices, and one or more network devices. A virtual machine can be deployed on the terminal device or the network device, and the virtual machine can be hot migrated between terminal devices, between network devices, or between a terminal device and a network device.

[0095] In the embodiments of the present application, the terminal device may be a terminal with transceiver functions or a chip or chip system that can be set in the terminal. The terminal device may also be referred to as a user device, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device. In the embodiments of the present application, the terminal device may be a mobile phone, a tablet computer, a computer, a virtual reality (VR) terminal device, or an augmented reality (AR) terminal device.

[0096] In the embodiments of the present application, the network device may be a server with transceiver functions or a chip or chip system that can be installed in the server. The network device in the embodiments of the present application may be a general-purpose server, a dedicated server, a network server, a database server, a server cluster composed of multiple sub-servers, etc.

[0097] For ease of explanation, the embodiments of the present application collectively refer to "terminal devices" and "network devices" as "devices".

[0098] It should be noted that the solutions in the embodiments of the present application can also be applied to other systems, and the corresponding names can also be replaced by the names of corresponding functions in other systems.

[0099] It should be understood that Figure 4This is a simplified schematic diagram for ease of understanding only. The communication system may also include other terminal devices and / or other network devices. Figure 4 Not drawn in.

[0100] The following will be combined Figure 5-Figure 8 The communication method provided in the embodiments of the present application is described in detail.

[0101] For example, Figure 5 Schematic diagram of the communication method provided in this embodiment Figure 1 This communication method can be applied to Figure 4 The communication system shown is applicable to the first device, the second device and the third device in the communication system.

[0102] Among them, any one of the first device, the second device and the third device can be a terminal device or a network device, can be an RDMA network card in the terminal device or the network device, can be a virtual device in the RDMA network card, or can be a virtual machine on the virtual device.

[0103] For ease of understanding, the following describes the communication method by taking the first device, the second device, and the third device as RDMA network cards as an example, but this is not intended to be limiting.

[0104] like Figure 5 As shown, the communication method includes the following steps:

[0105] S501: A first device sends a first message to a second device.

[0106] In an embodiment of the present application, a first device may establish a communication connection with a second device and interact with the second device based on the state of the communication connection. The communication connection may be a QP connection, but this is not limiting and may also be other types of communication connections.

[0107] like Figure 6 As shown, Figure 6 The figure shows the logical relationship between the various states of a QP connection. The states of a QP connection can include: reset state, initialized state, ready to receive state, ready to send state, send queue drain state, send queue error state, and error state. Optionally, the states of a QP connection can also include a send only state.

[0108] The following describes in detail the various states of the QP connection:

[0109] A. Reset state

[0110] After the first device creates the QP connection, the state of the QP connection is in the reset state. Alternatively, the first device may adjust the state of the QP connection to migrate the state of the QP connection from the error state to the reset state.

[0111] B. Initialization state

[0112] The first device may adjust the state of the QP connection to migrate the state of the QP connection from the reset state or the initialization state to the initialization state. In the initialization state, the QP connection may submit a received work request (WR) to the service system.

[0113] C. Ready to receive state

[0114] The first device can adjust the state of the QP connection to migrate the state of the QP connection from the initialization state to the ready-to-receive state. In the ready-to-receive state, the QP connection can submit the received work request to the business system or process the received work request.

[0115] D. Ready to send status

[0116] The first device can adjust the state of the QP connection, transitioning it from the Ready to Receive state, the Send Queue Dry state, the Send Queue Error state, or the Ready to Send state to the Ready to Send state. In the Ready to Send state, the QP connection can submit received work requests to the service system, or process and send received work requests. In other words, in the Ready to Send state, the first device can send a first message to another device, such as the second device, via the QP connection.

[0117] E. Send queue dry state

[0118] If the SQ is dry after the QP connection sends a work request, that is, there is no work request in the SQ, the first device can adjust the state of the QP connection to migrate the state of the QP connection from the ready-to-send state or the send queue dry state to the send queue dry state.

[0119] F. Send queue error status

[0120] If a send WR completion error occurs when the QP connection is in the send queue dry state or the send queue dry state, the first device may report the send WR completion error to the service system. Alternatively, the first device may adjust the state of the QP connection to migrate the state of the QP connection from the completion error state to the send queue error state.

[0121] G. Error status

[0122] If a processing error related to the QP connection occurs in the initialization state, the ready-to-receive state, the ready-to-send state, or the send queue dry state, the first device may report the processing error to the service system. Alternatively, the first device may adjust the state of the QP connection to migrate the QP connection from the processing error state to the send queue error state.

[0123] If the QP connection receives a receive work request completion error (receive WRcompletion error) or an asynchronous event error (async error) in a send queue error state, the first device may, on the one hand, report the receive work request completion error or the asynchronous event error to the business system; on the other hand, the first device may adjust the state of the QP connection to migrate the state of the QP connection from the send queue error state to the send queue error state.

[0124] H. Send status only

[0125] If the first device receives an instruction from another device, such as a second device, while in the ready-to-send state, it can adjust the QP connection state to transition from the ready-to-send state to the send-only state. In the send-only state, the first device can disable error reporting, effectively blocking the reporting of processing errors to the service system. Furthermore, if the first device receives data, an RNR message, an ACK message, or a NAK message from another device while in the send-only state, it can adjust the QP connection state to transition from the send-only state back to the ready-to-send state.

[0126] In the embodiment of the present application, according to the above state description, the QP connection of the first device is in the ready-to-send state, and the first device can send the first message to the second device through the QP connection.

[0127] It can be understood that since this embodiment takes the first device and the second device as RDMA network cards as an example, the first device sending the first message to the second device through the QP connection can actually be: the virtual machine on the first device sends the first message to the virtual machine on the second device through the QP connection of the first device.

[0128] Specifically, depending on the application scenario, the type of the first message is also different. For example, if the first device needs to write data to the virtual machine on the second device, the first message can be an RDMA write message. For another example, if the first device needs the virtual machine to send data, the first message can be an RDMA send message. For another example, if the first device needs to read data from the virtual machine, the first message can be an RDMA read request message.

[0129] In addition, the RDMA write message, RDMA send message, or RDMA read request message sent by the first device may be a message sent in a whole packet, or may be a message sent in sub-packets.

[0130] S502: The second device sends indication information to the first device.

[0131] In an embodiment of the present application, after receiving the first message from the first device, the second device may send the first message to a virtual machine on the second device for processing.

[0132] If the virtual machine on the second device has not yet performed live migration, or if live migration has not yet entered the shutdown copy phase, the virtual machine can process the first message normally, thereby replying a second message to the first device through the QP connection of the second device. The second message is a response message to the first message. If the first message is an RDMA write message or an RDMA send message, the second message can be an ACK message, a NAK message, or an RNR message. If the first message is an RDMA read request message, the second message can be an RDMA read response message.

[0133] If the hot migration of the virtual machine on the second device enters the shutdown replication phase, the virtual machine cannot process the first message, so the first device cannot receive the second message either.

[0134] In an embodiment of the present application, after sending a first message to a second device, if the first device does not receive the second message within a preset time period, the first device may continue to send the first message to the second device. If the first device still does not receive the second message after sending the first message a preset number of times, such as seven times, the first device may determine that a sending timeout has occurred and, accordingly, perform an error reporting function, sending an error message, such as a processing error message, to the service system, so that the service system, based on the error message, instructs the first device to disconnect the QP connection of the first device.

[0135] In other words, to avoid a QP connection break, the second device can proactively send an instruction to the first device before the virtual machine live migration on the second device enters the shutdown replication phase, or send an instruction to the first device based on receiving a first message from the first device. The second device can include the instruction in a TPN message and then send the TPN message to the first device, instructing the first device to disable the error reporting function.

[0136] Specifically, the AETH field in an ACK or NAK message may include a syndrome field. The syndrome field may be an 8-bit field. The interpretation of the syndrome field may vary depending on the value of the syndrome field. For example, the values ​​of the syndrome field may be as shown in Table 1 below.

[0137] Table 1

[0138] Bit[7] Bit[6:5] Bits [4:0] 0 00 CCCCC 0 01 TTTTT 0 11 NNNNN 0 10 XXXXX

[0139] It should be understood that in Table 1, "CCCCC", "TTTTT", "NNNNN", and "XXXXX" are used to indicate different values ​​of bits 4:0, and do not indicate specific values ​​of bits 4:0.

[0140] Furthermore, due to the different values ​​of bits 4:0, the encoding type of the syndrome field is also different.

[0141] For example, if the value of bits 4:0 is "CCCC", the syndrome field may be the encoded end-to-end flow control credits code. If the value of bits 4:0 is "TTTTT", the syndrome field may be the RNR NAK timer field code. If the value of bits 4:0 is "NNNNN", the syndrome field may be the NAK code. If the value of bits 4:0 is "XXXXX", the syndrome field may be a reserved code.

[0142] Furthermore, the specific values ​​of bits 4:0 and the corresponding encoding interpretations are also different.

[0143] For example, the value of bit 4:0 "NNNNN" is specifically "00000", and the interpretation of the NAK code can be: message sequence error (PSN sequence error). The specific value of bit 4:0 "NNNNN" is "00001", and the interpretation of the NAK code can be: invalid request (invalid request). The specific value of bit 4:0 "NNNNN" is "00010", and the interpretation of the NAK code can be: remote access error (remote access error). The specific value of bit 4:0 "NNNNN" is "00011", and the interpretation of the NAK code can be: remote operational error (remote operational error). The specific value of bit 4:0 "N NNNN" is "0 0100", and the interpretation of the NAK code can be: invalid reliable datagram service type request (invalid RDrequest).

[0144] In other words, the specific value range of the custom code "XXXXX" can be "00101-11111". Within this range, setting the specific value of the custom code "XXXXX", such as setting it to "11111", "11101", "11001", etc., can make the value of the syndrome field the first value, and make the first value can be used to instruct the first device to disable the error reporting function. In this way, the syndrome field with the first value is the indication information described in the embodiment of the present application, and the ACK message or NAK message with the first value of the syndrome field is the TPN message described in the embodiment of the present application.

[0145] In the embodiment of the present application, after the first device receives the TPN message, the error reporting function can be shielded according to the indication information in the TPN message.

[0146] Specifically, as one implementation of the error reporting masking function, the indication information can trigger the first device to transition the state of its QP connection from the ready-to-send state to the send-only state, thereby masking the error reporting function. Subsequently, if the hot migration of the virtual machine on the second device completes the recovery phase, the QP connection of the first device can also transition from the send-only state to the ready-to-send state. For detailed implementation, see S503 and S504 below.

[0147] As another implementation of the error reporting function, the QP connection of the first device is configured with a program that can run in a send-only state. This program can be triggered to run by the instruction of the instruction information, and the execution of this program can achieve the error reporting function. In other words, the instruction information triggers the first device to run the program in the send-only state, thereby achieving the error reporting function of being blocked in the send-only state.

[0148] S503: The third device sends a second message to the first device.

[0149] In this embodiment of the present application, because the first device disables the error reporting function according to the instruction information, it can continuously send the first message to the second device. Furthermore, because the first device actually sends the first message to the virtual machine on the second device, the destination address in the first message is the address of the virtual machine. After the virtual machine hot migrates to the third device and resumes service under the trigger of the third device, the first message sent to the second device is received by the third device. In this way, the third device sends the first message to the virtual machine for processing, and the virtual machine can then reply with the second message to the first device through the QP connection of the third device.

[0150] It should be understood that the third device receiving the first message and replying to the first device with the second message is an exemplary interaction method and is not intended to be limiting. For example, if a virtual machine hot migrates to a third device and resumes service upon triggering the third device, the virtual machine can also send the second message to the first device via the QP connection of the third device.

[0151] S504: The first device sends a third message to the third device.

[0152] In an embodiment of the present application, when the first device receives the second message or data from the third device, the first device may migrate the state of the QP connection of the first device from the send-only state to the ready-to-send state, or the first device may no longer run the relevant procedures described in S503.

[0153] Furthermore, since the first device receives the second message from the third device, it can be considered that the first device has established a communication connection with the third device. In this case, the first device can continue to send the third message to the third device.

[0154] It is understood that the type of the third message may vary depending on the application scenario and is not specifically limited in the embodiments of the present application. For example, if the first device needs to write data to a virtual machine on the third device, the third message may be an RDMA write message. For another example, if the first device needs the virtual machine to send data, the third message may be an RDMA send message. For another example, if the first device needs to read data from the virtual machine, the third message may be an RDMA read request message.

[0155] The above is an overall introduction to the communication method of the embodiment of the present application. The following will be combined with specific application scenarios, such as application to a network card, to introduce in detail the process of the communication method of the embodiment of the present application.

[0156] For example, Figure 7 Schematic diagram of the communication method provided in this embodiment Figure 2 .exist Figure 7 In the example, RDMA network card 1 is the aforementioned first device, RDMA network card 2 is the aforementioned second device, and RDMA network card 3 is the aforementioned third device.

[0157] like Figure 7 As shown, the communication method includes the following steps:

[0158] S701: RDMA network card 1 sends an RDMA write message or an RDMA send message to RDMA network card 2, and the PSN of the message is X.

[0159] In the embodiment of the present application, the QP connection of RDMA network card 1 is in a ready-to-send state, and RDMA network card 1 can send an RDMA write message or an RDMA send message to RDMA network card 2. The packet sequence number (PSN) of the RDMA write message or the RDMA send message can be X, where X is an integer greater than or equal to 1.

[0160] In addition, the specific implementation of S701 can refer to the aforementioned S501 and will not be repeated here.

[0161] S702: RDMA network card 2 sends an ACK message to RDMA network card 1, and the PSN of the message is X.

[0162] In the embodiment of the present application, although the virtual machine on RDMA network card 2 is hot migrating to RDMA network card 3, after RDMA network card 2 receives the RDMA write message or RDMA send message sent by RDMA network card 1, because the hot migration has not yet entered the shutdown copy phase, the virtual machine can normally process the RDMA write message or RDMA send message and send an ACK message to RDMA network card 1 through the QP connection of RDMA network card 2. The PSN of the ACK message can be X.

[0163] S703: RDMA network card 1 sends an RDMA write message or an RDMA send message to RDMA network card 2, and the PSN of the message is X+1.

[0164] In the embodiment of the present application, RDMA network card 1 continues to send RDMA write messages or RDMA send messages to RDMA network card 2. The packet sequence number (PSN) of the RDMA write message or RDMA send message may be X+1.

[0165] S704: RDMA network card 2 sends a TPN message to RDMA network card 1.

[0166] In the embodiment of the present application, when the hot migration of the virtual machine on RDMA network card 2 enters the shutdown replication phase, RDMA network card 2 can send a TPN message carrying instruction information to RDMA network card 1 based on the RDMA write message or RDMA send message sent in S703. In order to avoid packet loss of RDMA network card 1, the TPN message can be sent periodically, and the PSN can remain unchanged.

[0167] In addition, the specific implementation of S704 can refer to the aforementioned S502 and will not be repeated here.

[0168] S705 , RDMA network card 1 migrates the state of the QP connection from the ready-to-send state to the send-only state.

[0169] The specific implementation of S705 can refer to the aforementioned S502 and will not be repeated here.

[0170] S706: RDMA network card 1 sends N RDMA write messages or RDMA send messages to RDMA network card 2, and the PSN is from X+2 to X+N+1.

[0171] In the embodiment of the present application, after RDMA network card 1 sends an RDMA write message or an RDMA send message, RDMA network card 1 may continue to send N RDMA write messages or RDMA send messages to RDMA network card 2 in sequence, where N is an integer greater than or equal to 1. Figure 7 The illustrated process uses N = 2 as an example, but this is not limiting. The PSNs of the N RDMA write messages or RDMA send messages can be from X + 2 to X + N + 1. However, because the hot migration has entered the shutdown copy phase or the recovery phase, RDMA network card 2 cannot reply to the N RDMA write messages or RDMA send messages.

[0172] S707 , RMDA network card 3 receives an RDMA write message or an RDMA send message from RMDA network card 1 , and the PSN is X+N+2.

[0173] In an embodiment of the present application, when RMDA network card 1 sends an RDMA write message or an RDMA send message with PSN of X+N+2 to RMDA network card 2, the virtual machine has been hot migrated to RMDA network card 3 and the recovery phase has ended. The RDMA write message or RDMA send message is then transmitted through RMDA network card 2 and received by RMDA network card 3.

[0174] S708, RMDA network card 3 sends an RNR message to RMDA network card 1, and the PSN is X.

[0175] In an embodiment of the present application, after RMDA network card 3 receives an RDMA write message or an RDMA send message with a PSN of X+N+2, the virtual machine determines that the work queue element (WQE) in the SQ or RQ of RMDA network card 3 is not ready, and then it can send an RNR message to RMDA network card 1, and the PSN of the RNR message can be X.

[0176] S709 , RDMA network card 1 migrates the state of the QP connection from the send-only state to the ready-to-send state.

[0177] In the embodiment of the present application, since the RDMA network card 1 receives the RNR message, the state of the QP connection is migrated from the send-only state to the ready-to-send state.

[0178] The specific implementation of S709 can refer to the aforementioned S504 and will not be repeated here.

[0179] S710 , RMDA network card 1 sends an RDMA write message or an RDMA send message to RMDA network card 3 , and the PSN is X+N+2.

[0180] In the embodiment of the present application, the RMDA network card 1 can retransmit the RDMA write message or RDMA send message with PSN of X+N+2 to the RMDA network card 3 based on the received RNR message.

[0181] In addition, the execution order of S709 and S710 is not limited.

[0182] S711, RMDA network card 3 sends a NAK message to RMDA network card 1, and the PSN is X.

[0183] In an embodiment of the present application, after the RMDA network card 3 hands over the RDMA write message or RDMA send message with PSN of X+N+2 to the virtual machine for processing, the virtual machine determines that the WQE in the SQ or RQ of the RMDA network card 3 is ready, and then further determines whether the PSN of X+N+2 is correct.

[0184] The virtual machine determines that the PSN is incorrect, X+N+2, and needs to retransmit the data from RMDA network card 1 starting from PSN X+2. Therefore, the virtual machine can send a NAK message to RMDA network card 1 through the QP connection of RMDA network card 3. The PSN of this NAK message is X, and the PSN of the RDMA write message or RDMA send message carried in this NAK message is X+2.

[0185] It can be understood that S708 and S710 Figure 7 The dashed lines in the middle indicate that S708 and S710 are optional steps. That is, after S707, if the virtual machine determines that the WQE in the SQ or RQ of RMDA NIC 3 is ready, it can directly execute S711. In this case, RMDA NIC 1 executes S709 after S711, which transitions the QP connection state from the send-only state to the ready-to-send state based on the receipt of the NAK message.

[0186] S712: RDMA network card 1 sends N+1 RDMA write messages or RDMA send messages to RDMA network card 3, and the PSN is from X+2 to X+N+2.

[0187] In an embodiment of the present application, since the PSN carried in the NAK message is X+2, the RDMA network card 1 can send N+1 RDMA write messages or RDMA send messages to the RDMA network card 3 in sequence based on the PSN of X+2. The PSN of the N+1 RDMA write messages or RDMA send messages can be from X+2 to X+N+2.

[0188] S713: RDMA network card 3 sends N+1 ACK packets to RDMA network card 1, and the PSNs are from X+1 to X+N+1.

[0189] In the embodiment of the present application, the virtual machine on the RDMA network card 3 sequentially receives and processes the N+1 RDMA write messages or RDMA send messages, so that the virtual machine can reply N+1 ACK messages to the RDMA network card 1 sequentially through the QP connection of the RDMA network card 3. The PSN of the N+1 ACK messages can be from X+1 to X+N+1.

[0190] It is understandable that Figure 7 The illustrated process is an exemplary process in the embodiment of the present application and is not intended to be limiting. For example, if, when executing S706, the hot migration of the virtual machine on RDMA network card 2 has not yet entered the shutdown replication phase, RDMA network card 2 can send N ACK messages to RDMA network card 1. Thus, after S706, the virtual machine on RDMA network card 3 can determine that the PSN is correct and directly execute S713. In this way, RDMA network card 1 executes S709 during or after the execution of S713, i.e., based on the receipt of the ACK message, it migrates the QP connection state from the send-only state to the ready-to-send state.

[0191] For example, Figure 8 Schematic diagram of the communication method provided in this embodiment Figure 3 .exist Figure 8 In the example, RDMA network card 1 is the aforementioned first device, RDMA network card 2 is the aforementioned second device, and RDMA network card 3 is the aforementioned third device.

[0192] like Figure 8 As shown, the communication method includes the following steps:

[0193] S801: RDMA network card 1 sends an RDMA read request message to RDMA network card 2, and the PSN of the message is X.

[0194] In the embodiment of the present application, the QP connection of RDMA network card 1 is in a ready-to-send state, and RDMA network card 1 can send an RDMA read request message to RDMA network card 2. The PSN of the RDMA read request message can be X, where X is an integer greater than or equal to 1.

[0195] In addition, the specific implementation of S801 can refer to the aforementioned S501 and will not be repeated here.

[0196] S802: RDMA network card 2 sends an RDMA read response message to RDMA network card 1, and the PSN of the message is X.

[0197] In the embodiment of the present application, although the virtual machine on RDMA network card 2 is hot migrating to RDMA network card 3, after RDMA network card 2 receives the RDMA read request message, because the hot migration has not yet entered the shutdown copy phase, the virtual machine can normally process the RDMA read request message through the doorbell mechanism, thereby sending an RDMA read response message to RDMA network card 1 through the QP connection of RDMA network card 2. The PSN of this ACK message can be X.

[0198] S803: RDMA network card 1 sends an RDMA read request message to RDMA network card 2, and the PSN of the message is X+2.

[0199] In the embodiment of the present application, RDMA network card 1 continues to send RDMA read request messages to RDMA network card 2. The message sequence number PSN of the RDMA read request message may be X+2.

[0200] S804: RDMA network card 2 sends a TPN message to RDMA network card 1.

[0201] The specific implementation of S804 may refer to the aforementioned S704 and S502, which will not be repeated here.

[0202] S805 , RDMA network card 1 migrates the state of the QP connection from the ready-to-send state to the send-only state.

[0203] The specific implementation of S804 may refer to the aforementioned S705 and S502, which will not be repeated here.

[0204] S806: RDMA network card 1 sends N RDMA read request messages to RDMA network card 2, and the PSNs are from X+2 to X+N+1.

[0205] In the embodiment of the present application, after RDMA network card 1 sends the RDMA read request message, RDMA network card 1 may continue to send N RDMA read request messages to RDMA network card 2 in sequence, where N is an integer greater than or equal to 1. Figure 8 The illustrated process uses N=2 as an example, but this is not limiting. The PSNs of the N RDMA read request messages can range from X+1 to X+N+1. However, because the hot migration has entered the shutdown copy phase or the recovery phase, RDMA network card 2 cannot reply to the N RDMA read request messages.

[0206] S807, RMDA network card 3 receives the RDMA read request message from RMDA network card 1, and the PSN is X+N+2.

[0207] In this embodiment of the present application, when RMDA network card 1 sends an RDMA read request message with PSN X+N+2 to RMDA network card 2, the virtual machine has already hot migrated to RMDA network card 3 and completed the recovery phase. In this way, the RDMA read request message is transparently transmitted by RMDA network card 2 and received by RMDA network card 3.

[0208] S808, RMDA network card 3 sends an RNR message to RMDA network card 1, and the PSN is X.

[0209] In an embodiment of the present application, after RMDA network card 3 receives a read request message with PSN of X+N+2, the virtual machine determines that the WQE in the SQ or RQ of RMDA network card 3 is not ready, and then it can send an RNR message to RMDA network card 1, and the PSN of the RNR message can be X.

[0210] S809 , RDMA network card 1 migrates the state of the QP connection from the send-only state to the ready-to-send state.

[0211] The specific implementation of S809 may refer to the aforementioned S709 and S504, which will not be repeated here.

[0212] S810, RMDA network card 1 sends an RDMA read request message to RMDA network card 3, and the PSN is X+N+2.

[0213] In the embodiment of the present application, RMDA network card 1 can retransmit the RDMA read request message with the PSN being X+N+2 to RMDA network card 3 based on the received RNR message.

[0214] In addition, the execution order of S809 and S810 is not limited.

[0215] S811, RMDA network card 3 sends a NAK message to RMDA network card 1, and the PSN is X.

[0216] In an embodiment of the present application, after the RMDA network card 3 hands over the RDMA read request message with PSN of X+N+2 to the virtual machine for processing, the virtual machine determines that the WQE in the SQ or RQ of the RMDA network card 3 is ready, and then further determines whether the PSN of X+N+2 is correct.

[0217] After confirmation, the virtual machine determines that the PSN is incorrect, X+N+2, and needs RMDA network card 1 to retransmit from PSN X+2. Therefore, the virtual machine can send a NAK message to RMDA network card 1 through the QP connection of RMDA network card 3. The PSN of this NAK message is X, and the PSN of the RDMA read request message carried in this NAK message is X+2.

[0218] It can be understood that S808 and S810 Figure 8The dashed lines in the middle indicate that S808 and S810 are optional steps. That is, after S807, if the virtual machine determines that the WQE in the SQ or RQ of RMDA NIC 3 is ready, S810 can be executed directly. In this case, RMDA NIC 1 executes S809 after S811, which transitions the QP connection state from the send-only state to the ready-to-send state based on the receipt of the NAK message.

[0219] S812: RDMA network card 1 sends N+1 RDMA read request packets to RDMA network card 3, and the PSNs are from X+2 to X+N+2.

[0220] In an embodiment of the present application, since the PSN carried in the NAK message is X+2, RDMA network card 1 can send N+1 RDMA read request messages to RDMA network card 3 in sequence based on the PSN of X+2. The PSNs of the N+1 RDMA read request messages can be from X+2 to X+N+2.

[0221] S813: RDMA network card 3 sends N+1 RDMA read response messages to RDMA network card 1.

[0222] In the embodiment of the present application, the virtual machine of RDMA network card 3 sequentially receives and processes these N+1 RDMA read request messages based on the doorbell mechanism, so that the virtual machine can sequentially reply N+1 RDMA read response messages to RDMA network card 1 through the QP connection of RDMA network card 3. The PSNs of these N+1 RDMA read response messages can be from X+1 to X+N+1.

[0223] It is understandable that Figure 8 The process shown is an exemplary process in the embodiment of the present application and is not intended to be limiting. For example, if, when executing S806, the hot migration of the virtual machine on RDMA network card 2 has not yet entered the shutdown copy stage, RDMA network card 2 can send N RDMA read response messages to RDMA network card 1. In this way, after S807, the virtual machine on RDMA network card 3 can determine that the PSN is correct and directly execute S813. In this way, RDMA network card 1 executes S809 during or after the execution of S813, that is, based on the receipt of the RDMA read response message, the state of the QP connection is migrated from the send-only state to the ready-to-send state.

[0224] It should also be noted that the virtual machine hot migration scenario described in the embodiments of this application is merely an example scenario and is not intended to be limiting. For example, the solution of this application can also be applied to virtual machine failure self-recovery scenarios. That is, when a virtual machine fails, the second device can also send an indication to the first device to prevent the QP connection from being disconnected.

[0225] In the embodiment of this application, based on Figure 5-Figure 8 The communication method shown in any one of the items, since the indication information can instruct the first device to shield the error reporting function, when the first device times out and fails to receive the second message from the second device, the communication connection will not be disconnected due to reporting error information, thereby solving the problem of communication connection being disconnected due to reasons such as virtual machine hot migration, thereby improving the stability and reliability of communication.

[0226] Combination of the above Figure 3-Figure 8 The communication method provided by the embodiment of the present application is described in detail. Figure 9-10 A communication device for executing the communication method provided in an embodiment of the present application is described in detail.

[0227] For example, Figure 9 This is a schematic diagram of the structure of the communication device provided in the embodiment of the present application. Figure 1 .like Figure 9 As shown, the communication device 900 includes: a receiving module 901 and a sending module 902. For the convenience of explanation, Figure 9 Only the main components of the communication device are shown.

[0228] In some embodiments, the communication device 900 may be adapted to Figure 4 In the communication system shown in FIG, execution Figure 5 The function of the first device in the communication method shown in Figure 4 In the communication system shown in FIG, execution Figure 7 The function of RDMA network card 1 in the communication method shown in FIG.

[0229] The sending module 902 is configured to send a first message to the second device.

[0230] Receiving module 901 is configured to receive an indication message from a second device. This indication message is used by communication device 900 to disable the error reporting function. The error reporting function is configured to send an error message to the service system if communication device 900 fails to receive a second message from the second device within a timeout period. The second message is a response message to the first message. The error message is used to trigger the service system to disconnect the communication connection between communication device 900 and the second device.

[0231] In one possible design, the indication information is carried in a TPN message.

[0232] Optionally, the TPN message is an ACK message or a NAK message in which the value of the syndrome field of AETH is the first value.

[0233] In one possible design, the indication information is used by the communication device 900 to migrate the state of the communication connection to a send-only state. In the send-only state, the communication device 900 masks an error reporting function.

[0234] In a possible design scheme, the sending module is further configured to send a third message to the third device after the receiving module receives the second message from the third device. The third device is the device where the virtual machine on the second device is located after hot migration.

[0235] Optionally, the communication device 900 may further include: a processing module 903. The processing module 903 ( Figure 9 (shown in a dotted box in the figure), after the receiving module 901 receives the second message from the third device, it migrates the state of the communication connection from the send-only state to the send-ready state, and the sending module 902 is also used to send a third message to the third device.

[0236] In one possible design scheme, the second message is one of the following: a data message, an RNR message, an ACK message, or a NAK message.

[0237] Optionally, the receiving module 901 and the sending module 902 may also be integrated into one module, such as a transceiver module ( Figure 9 The transceiver module is used to implement the sending and receiving functions of the communication device 900.

[0238] Optionally, the communication device 900 may further include a storage module ( Figure 9 (not shown), the storage module stores a program or instruction. When the receiving module 901 executes the program or instruction, the communication device 900 can execute Figure 5 The function of the first device in any of the communication methods shown in , or the communication apparatus 900 can perform Figure 7 The function of the RDMA network card 1 in any of the communication methods shown.

[0239] It should be understood that the processing module 901 involved in the communication device 900 can be implemented by a processor or a processor-related circuit component, which can be a processor or a processing unit; the transceiver module 902 can be implemented by a transceiver or a transceiver-related circuit component, which can be a transceiver or a transceiver unit.

[0240] It should be noted that the communication device 900 can be a terminal device or a network device, or a chip (system) or other parts or components that can be set in the terminal device or network device, or a device that includes a terminal device or a network device. This application does not limit this.

[0241] In addition, the technical effects of the communication device 900 can be referred to in Figure 5-Figure 8 The technical effects of the communication method shown in any one of the items will not be repeated here.

[0242] In some other embodiments, the communication device 900 may be suitable for Figure 4In the communication system shown in FIG, execution Figure 5 The function of the second device in the communication method shown in, or suitable for Figure 4 In the communication system shown in FIG, execution Figure 8 The function of RDMA network card 2 in the communication method shown in FIG.

[0243] The receiving module 901 is configured to receive a first message from a first device.

[0244] Transmitting module 902 is configured to send an instruction message to the first device. This instruction message is used by the first device to disable the error reporting function. The error reporting function is as follows: if the first device does not receive the second message from communication device 900 within a timeout period, the first device sends an error message to the service system. The second message is a response message to the first message, and the error message is used to trigger the service system to terminate the communication connection between the first device and communication device 900.

[0245] In one possible design scheme, the indication information is: information sent by the communication device 900 during the hot migration of a virtual machine on the communication device 900, where the virtual machine is used to communicate with the first device.

[0246] In one possible design, the indication information is carried in a TPN message.

[0247] Optionally, the TPN message is an ACK message or a NAK message in which the value of the syndrome field of AETH is the first value.

[0248] In one possible design scheme, the indication information is used by the first device to migrate the state of the communication connection to a send-only state. In the send-only state, the first device blocks the error reporting function.

[0249] In one possible design scheme, the second message is one of the following: a data message, an RNR message, an ACK message, or a NAK message.

[0250] Optionally, the receiving module 901 and the sending module 902 may also be integrated into one module, such as a transceiver module ( Figure 9 The transceiver module is used to implement the sending and receiving functions of the communication device 900.

[0251] Optionally, the communication device 900 may further include a processing module 903 ( Figure 9 The processing module 903 is used to implement the processing function of the communication device 900.

[0252] Optionally, the communication device 900 may further include a storage module ( Figure 9(not shown), the storage module stores a program or instruction. When the receiving module 901 executes the program or instruction, the communication device 900 can execute Figure 5 The function of the second device in any of the communication methods shown in , or the communication apparatus 900 can perform Figure 8 The function of the RDMA network card 2 in any of the communication methods shown.

[0253] It should be understood that the processing module 901 involved in the communication device 900 can be implemented by a processor or a processor-related circuit component, which can be a processor or a processing unit; the transceiver module 902 can be implemented by a transceiver or a transceiver-related circuit component, which can be a transceiver or a transceiver unit.

[0254] It should be noted that the communication device 900 can be a terminal device or a network device, or it can be a chip (system) or other parts or components set in the above-mentioned terminal device or network device, or a device that includes the terminal device or network device. The embodiments of the present application do not limit this.

[0255] In addition, the technical effects of the communication device 900 can be referred to Figure 5-Figure 8 The technical effects of the communication method shown in any one of the items will not be repeated here.

[0256] In addition, the processing module 901 involved in the communication device 900 can be implemented by a processor or a processor-related circuit component, which can be a processor or a processing unit; the transceiver module 902 can be implemented by a transceiver or a transceiver-related circuit component, which can be a transceiver or a transceiver unit.

[0257] For example, Figure 10 Schematic diagram of the structure of the communication device provided in the embodiment of the present application Figure 2 The communication device may be a terminal device or a network device, or may be a chip (system) or other component or assembly that can be provided in the terminal device or the network device. Figure 10 As shown, the communication device 1000 may include a processor 1001. Optionally, the communication device 1000 may further include a memory 1002 and / or a transceiver 1003 ( Figure 10 The processor 1001 is coupled to the memory 1002 and the transceiver 1003, for example, via a communication bus.

[0258] The following combination Figure 10 The components of the communication device 1000 are described in detail.

[0259] The processor 1001 is the control center of the communication device 1000 and can be a single processor or a collective term for multiple processing elements. For example, the processor 1001 can be one or more central processing units (CPUs), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, such as one or more digital signal processors (DSPs) or one or more field programmable gate arrays (FPGAs).

[0260] Optionally, the processor 1001 may execute various functions of the communication device 1000 by running or executing a software program stored in the memory 1002 and calling data stored in the memory 1002 .

[0261] In a specific implementation, as an embodiment, the processor 1001 may include one or more CPUs, such as Figure 10 CPU0 and CPU1 are shown in FIG.

[0262] In a specific implementation, as an embodiment, the communication device 1000 may also include multiple processors, such as Figure 2 1 and 1004. Each of these processors may be a single-CPU or a multi-CPU. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0263] The memory 1002 is used to store the software program for executing the solution of the present application, and the execution is controlled by the processor 1001. The specific implementation method can refer to the above method embodiment and will not be repeated here.

[0264] Alternatively, the memory 1002 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1002 may be integrated with the processor 1001 or exist independently and accessed through the interface circuit ( Figure 10 (not shown) is coupled to the processor 1001, which is not specifically limited in this embodiment of the present application.

[0265] Transceiver 1003 is used for communication with other communication devices. For example, if communication device 1000 is a terminal device, transceiver 1003 can be used to communicate with a network device or another terminal device. For another example, if communication device 1000 is a network device, transceiver 1003 can be used to communicate with a terminal device or another network device.

[0266] Optionally, the transceiver 1003 may include a receiver and a transmitter ( Figure 10 (not shown separately in the figure). The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.

[0267] Optionally, the transceiver 1003 may be integrated with the processor 1001, or may exist independently and communicate with the processor 1001 through the interface circuit ( Figure 10 (not shown) is coupled to the processor 1001, which is not specifically limited in this embodiment of the present application.

[0268] It should be noted that Figure 10 The structure of the communication device 1000 shown in the figure does not constitute a limitation on the communication device. The actual communication device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0269] In addition, the technical effects of the communication device 1000 can refer to the technical effects of the communication method described in the above method embodiment, and will not be repeated here.

[0270] An embodiment of the present application also provides a chip system, including: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the chip system implements the method in any of the above method embodiments.

[0271] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0272] Optionally, the memory in the chip system may be one or more memories. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in this application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. This application does not specifically limit the type of memory or the configuration of the memory and the processor.

[0273] An embodiment of the present application provides a communication system, which includes one or more terminal devices and one or more network devices.

[0274] Optionally, the communication system may further include: one or more terminal devices, and one or more network devices, wherein virtual machines may be deployed on the terminal devices or network devices, and the virtual machines may be hot migrated between terminal devices, between network devices, or between terminal devices and network devices.

[0275] Exemplarily, the chip system 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.

[0276] It should be understood that the processor in the embodiments of the present application may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0277] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0278] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. 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 computer-readable storage medium. 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 a wired (such as infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0279] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. A and B can be singular or plural. Furthermore, the character " / " as used herein generally indicates an "or" relationship between the associated objects, but it may also indicate an "and / or" relationship. For specific understanding, please refer to the context.

[0280] In this application, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.

[0281] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean 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 the present application.

[0282] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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.

[0283] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0284] 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 schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0285] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0286] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0287] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0288] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A communication method, characterized in that: The method is applied to a remote direct memory access (RDMA) network, the RDMA network including: a first device and a second device, and the method includes: The first device sends a first message to the second device; The first device receives indication information from the second device, wherein the indication information is sent by the second device based on the received first message, and the indication information is used to shield the error reporting function of the first device. The error reporting function is: if the first device times out and does not receive the second message from the second device, the first device sends an error message to the business system, and the second message is a response message to the first message. The error information is used to trigger the business system to disconnect the communication connection between the first device and the second device.

2. The communication method according to claim 1, wherein: The indication information is carried in a counting pause notification TPN message.

3. The communication method according to claim 2, wherein: The TPN message is: an acknowledgment notification ACK message or an abandonment acknowledgment notification NAK message, in which the value of the syndrome field of the acknowledgment notification extended transmission header is the first value.

4. The communication method according to any one of claims 1 to 3, characterized in that: The indication information is used by the first device to migrate the state of the communication connection to a send-only state. In the send-only state, the first device blocks the error reporting function.

5. The communication method according to claim 4, wherein: The method further comprises: After receiving the second message from the third device, the first device sends a third message to the third device, where the third device is the device where the virtual machine on the second device is located after hot migration. The communication method according to claim 5 , wherein: After receiving the second message from the third device, the first device sends a third message to the third device, including: After receiving the second message from the third device, the first device transitions the state of the communication connection from a send-only state to a send-ready state; The first device sends the third message to the third device.

7. The communication method according to claim 1, wherein: The second message is one of the following: a data message, a receiver not ready RNR message, an ACK message, or a NAK message.

8. A communication method, characterized in that: The method is applied to a remote direct memory access (RDMA) network, the RDMA network including: a first device and a second device, and the method includes: The second device receives the first message from the first device; The second device sends an indication message to the first device based on the first message, and the indication message is used for the first device to shield the error reporting function. The error reporting function is: if the first device times out and fails to receive the second message from the second device, the first device sends an error message to the business system, and the second message is a response message to the first message. The error message is used to trigger the business system to disconnect the communication connection between the first device and the second device.

9. The communication method according to claim 8, wherein: The second device sending indication information to the first device includes: The second device determines that the virtual machine on the second device is performing hot migration, and sends the indication information to the first device, where the virtual machine is used to communicate with the first device.

10. The communication method according to claim 8 or 9, characterized in that: The indication information is carried in a counting pause notification TPN message.

11. The communication method according to claim 10, wherein: The TPN message is: an acknowledgment notification ACK message or an abandonment acknowledgment notification NAK message, in which the value of the syndrome field of the acknowledgment notification extended transmission header is the first value.

12. The communication method according to any one of claims 8 to 11, characterized in that: The indication information is used by the first device to migrate the state of the communication connection to a send-only state. In the send-only state, the first device blocks the error reporting function.

13. The communication method according to claim 8, wherein: The second message is one of the following: a data message, a receiver not ready RNR message, an ACK message, or a NAK message.

14. A communication device, characterized in that: The device is applied to a remote direct memory access (RDMA) network, the RDMA network further comprising: a second device, the device comprising: a sending module and a receiving module; wherein, The sending module is configured to send a first message to the second device; The receiving module is used to receive indication information from the second device, wherein the indication information is sent by the second device based on the received first message, and the indication information is used for the communication device to shield the error reporting function, and the error reporting function is: if the communication device times out and fails to receive the second message from the second device, an error message is sent to the business system, and the second message is a response message to the first message. The error information is used to trigger the business system to disconnect the communication connection between the communication device and the second device.

15. The communication device according to claim 14, wherein: The indication information is carried in a counting pause notification TPN message. The communication device according to claim 15 , wherein: The TPN message is: an acknowledgment notification ACK message or an abandonment acknowledgment notification NAK message, in which the value of the syndrome field of the acknowledgment notification extended transmission header is the first value.

17. The communication device according to any one of claims 14 to 16, characterized in that: The indication information is used by the communication device to migrate the state of the communication connection to a send-only state. In the send-only state, the communication device blocks the error reporting function.

18. The communication device according to claim 17, wherein: The sending module is further configured to send a third message to a third device after the receiving module receives the second message from the third device. The third device is the device where the virtual machine on the second device is located after hot migration.

19. The communication device according to claim 18, wherein: The device further comprises: a processing module, wherein: The processing module is used to migrate the state of the communication connection from the send-only state to the send-ready state after the receiving module receives the second message from the third device, and the sending module is also used to send the third message to the third device.

20. The communication device according to claim 14, wherein: The second message is one of the following: a data message, a receiver not ready RNR message, an ACK message, or a NAK message.

21. A communication device, characterized in that: The device is applied to a remote direct memory access (RDMA) network, wherein the RDMA network further comprises: a first device, and the device comprises: a sending module and a receiving module; wherein, The receiving module is configured to receive a first message from the first device; The sending module is used to send indication information to the first device based on the first message, and the indication information is used for the first device to shield the error reporting function. The error reporting function is: if the first device times out and fails to receive the second message from the communication device, the first device sends an error message to the business system, and the second message is a response message to the first message. The error information is used to trigger the business system to disconnect the communication connection between the first device and the communication device.

22. The communication device according to claim 21, wherein: The indication information is: information sent by the communication device during a hot migration process of a virtual machine on the communication device, where the virtual machine is used to communicate with the first device.

23. The communication device according to claim 21 or 22, characterized in that: The indication information is carried in a counting pause notification TPN message.

24. The communication device according to claim 23, wherein: The TPN message is: an acknowledgment notification ACK message or an abandonment acknowledgment notification NAK message, in which the value of the syndrome field of the acknowledgment notification extended transmission header is the first value.

25. The communication device according to any one of claims 21 to 24, characterized in that: The indication information is used by the first device to migrate the state of the communication connection to a send-only state. In the send-only state, the first device blocks the error reporting function.

26. The communication device according to claim 21, wherein The second message is one of the following: a data message, a receiver not ready RNR message, an ACK message, or a NAK message.

27. A communication device, characterized in that: include: processor, memory, and transceiver; wherein, The transceiver is used to receive computer instructions and transmit them to the memory; The processor is configured to execute the computer instructions stored in the memory, so that the apparatus performs the communication method according to any one of claims 1 to 13.

28. A communication device, characterized in that: The device comprises a processor and a transceiver, wherein the transceiver is used to exchange information between the device and other devices, and the processor executes program instructions to perform the communication method according to any one of claims 1 to 13.

29. A computer-readable storage medium, characterized in that The computer-readable storage medium includes: a computer program or instructions, and when the computer program or instructions are executed on a computer, the computer is caused to execute the communication method according to any one of claims 1 to 13.

30. A computer program product, characterized in that The computer program product comprises: a computer program or instructions, and when the computer program or instructions are run on a computer, the computer is caused to perform the communication method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Keep-alive time regulation method, device and system

    CN102170399A

  • Method and device for message processing after cross-network relocation of VM device

    CN103916320A

  • RDMA (remote direct memory access) connection message processing method and related device

    CN104753816A

  • Shielding method and device for equipment warning

    CN107769954A

  • Multi-domain connection establishment in computer networking communications

    US20180152278A1