Communication method and communication device

By storing process commands from multiple source devices in a shared remote command table on the target device, and determining the processing strategy based on storage space usage, the problem of wasted storage resources in a single QP is solved, and message transmission rate and resource utilization efficiency are improved.

CN119544633APending Publication Date: 2025-02-28HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311093485.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-28
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In IB and RoCE networks, the read and atomic message rates of a single QP are not high, resulting in a waste of storage resources. How to save storage resources while ensuring message rate has become an urgent problem to be solved.

Method used

By setting a shared Remote Command Table (RCT) on the target device to store process commands from multiple source devices, and determining the processing strategy based on the storage space usage of the RCT, resource sharing is achieved, saving storage resources.

Benefits of technology

It improves the transmission rate of remote commands, reduces resource waste, avoids the starvation of certain process commands, and optimizes the use of network resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544633A_ABST
    Figure CN119544633A_ABST
Patent Text Reader

Abstract

A communication method and a communication device, the communication method being applied to a first host, the communication method comprising: setting a first remote command table (RCT) in the first host, the first RCT being used for storing remote commands corresponding to a plurality of processes of at least one second host; and the first host receives a message of a far-end command from any one of the at least one second host, and determines a processing strategy of the far-end command according to the use condition of the storage space of the first RCT. In the communication method, the first host can set one RCT for the plurality of processes of the at least one second host, the plurality of processes share one RCT, and the RCT does not need to be set for each process, so that resource sharing can be realized, and resource overhead is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In enterprise data centers or supercomputing centers, the network architecture used by business computing clusters is usually an infinite bandwidth (IB) network or a remote direct memory access (RDMA overconverged Ethernet, RoCE) network based on converged Ethernet. IB networks and RoCE networks allow the use of remote direct memory access (RDMA) technology in traditional Ethernet. Based on the mature ecosystem of traditional Ethernet, they have obvious cost advantages and their version evolution speed is much higher than other types of networks. They will become the mainstream network selection in the future.

[0003] In IB networks and RoCE networks, when establishing a queue pair (QP), the source device and the destination device negotiate the maximum outstanding number of read operations and atomic operations that can be sent, and each QP sets a dedicated queue resource to store Read and Atomic commands. The larger the number of QPs, the more storage resources.

[0004] Currently, the outstanding number of Read and Atomic messages of a single QP negotiated by the source device and the destination device is often not large, for example, the outstanding number is 128. Because the outstanding number of Read and Atomic messages of a single QP is small, when the round trip time (RTT) is large, the rate of Read and Atomic messages of a single QP is not high. Therefore, how to save storage resources while ensuring the rate of Read and Atomic messages of a single QP has become an urgent problem to be solved. Summary of the invention

[0005] The present application provides a communication method and apparatus, which uses shared resources by a target device to receive remote commands issued by multiple source devices, thereby saving storage resources.

[0006] In a first aspect, a communication method is provided, which is applied to a first host. The method can be executed by the first host, or can also be executed by a circuit or chip configured in the first host, which is not limited in the present application. For ease of description, the following description is based on the first host execution as an example.

[0007] The communication method includes: setting a first remote command table RCT in the first host, the first RCT is used to store remote commands corresponding to multiple processes, and the multiple processes belong to at least one second host; receiving a message of a remote command from any second host of the at least one second host, and determining a processing strategy for the remote command based on the usage of the storage space of the first RCT.

[0008] Based on the above technical solution, the first host is used as the target device and the second host is used as the source device. For the first host, the first host is the local end and the second host is the remote end. The command sent by the second host is called a remote command. Specifically, in this solution, a first RCT is set in the first host, and the first RCT can be used to store remote commands corresponding to multiple processes of at least one second host. When the first host receives a remote command from the second host, the processing strategy of the remote command can be determined according to the storage space usage of the first RCT. In this communication method, the first host can set an RCT for multiple processes of at least one second host. The multiple processes share one RCT, and there is no need to set an RCT for each process separately, so that resource sharing can be achieved and resource overhead can be saved. Moreover, in this solution, multiple processes share one RCT, and the storage space of the RCT can be set larger to ensure the transmission rate of remote commands.

[0009] In combination with the first aspect, in some implementations of the first aspect, the message header of the remote command includes a first identifier, and the first identifier is used to identify that the remote command is an initially transmitted remote command or a retransmitted remote command.

[0010] Based on the above technical solution, the message packet header of the remote command sent by the second host includes a first identifier, which indicates that the remote command is an initially transmitted remote command or a retransmitted remote command, so that the first host can process different types of remote commands specifically according to the type of remote command.

[0011] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: setting a first threshold in the first RCT; determining the processing strategy of the remote command based on the storage space usage of the first RCT, including: determining the processing strategy of the remote command based on the first threshold and the storage space usage of the first RCT.

[0012] In combination with the first aspect, in certain implementations of the first aspect, the processing strategy for the remote command is determined based on the first threshold and the storage space usage of the first RCT, including: if the used storage space of the first RCT exceeds the first threshold, using a first processing strategy to process the remote command; if the used storage space of the first RCT does not exceed the first threshold, using a second processing strategy to process the remote command.

[0013] Based on the above technical solution, a first threshold can be set in the first RCT, and when determining the processing strategy of the remote command, the relationship between the used storage space of the first RCT and the first threshold is considered. Different processing strategies are adopted according to whether the used storage space of the first RCT exceeds the first threshold. Therefore, different processing strategies for remote commands can be accurately determined based on the used storage space of the first RCT.

[0014] In combination with the first aspect, in certain implementations of the first aspect, the used storage space of the first RCT exceeds the first threshold, and a first processing strategy is adopted to process the remote command, including: if the remote command is an initially transmitted remote command, determining to discard the remote command; if the remote command is a retransmitted remote command, determining to receive the remote command and storing the remote command in the first RCT.

[0015] Based on the above technical solution, when the used storage space of the first RCT exceeds the first threshold, the first host can give priority to processing the retransmitted remote commands, thereby avoiding repeated discarding of a certain remote command to a certain extent.

[0016] In combination with the first aspect, in certain implementations of the first aspect, when it is determined to discard the remote command, the method further includes: sending a first transaction negative acknowledgment TANAK, wherein the first TANAK is used to indicate retransmission of the remote command after a first time length.

[0017] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: setting a second threshold in the first RCT, the second threshold being greater than the first threshold; determining the processing strategy of the remote command based on the storage space usage of the first RCT, including: determining the processing strategy of the remote command based on the second threshold and the storage space usage of the first RCT.

[0018] In combination with the first aspect, in certain implementations of the first aspect, the processing strategy of the remote command is determined based on the second threshold and the storage space usage of the first RCT, including: if the used storage space of the first RCT exceeds the second threshold, and the remote command is an initially transmitted remote command, determining to discard the remote command; the method also includes: sending a second transaction negative acknowledgment TANAK, the second TANAK is used to indicate retransmission of the remote command after a second time period, and the second time period is greater than the first time period.

[0019] Based on the above technical solution, different thresholds can be set in the first RCT, and when a remote command is received, the usage degree of the first RCT can be determined based on the relationship between the used storage space of the first RCT and the different thresholds. When the used storage space of the first RCT exceeds the second threshold, the remote command initially transmitted is discarded, and compared with the case where the used storage space of the first RCT exceeds the first threshold, the first host indicates that the interval for retransmitting the remote command is longer to avoid congestion of the first RCT. For example, when the used storage space of the first RCT exceeds the second threshold, the first RCT has stored a large number of remote commands to be processed and the congestion is heavy, so the first host can instruct the second host to increase the retransmission interval and reduce the remote command sending rate through the second TANAK.

[0020] In combination with the first aspect, in certain implementations of the first aspect, the processing strategy of the remote command is determined based on the usage of the RCT, including: if the first RCT is full, determining to discard the remote command; the method also includes: sending a third transaction negative acknowledgment TANAK, the third TANAK is used to indicate retransmission of the remote command; if the remote command is a retransmitted remote command, the third TANAK is used to indicate retransmission of the remote command after a first time length.

[0021] Based on the above technical solution, if the first RCT is full after the first host receives the message of the remote command, the first host will discard the remote command regardless of whether the remote command is the first transmitted remote command or the retransmitted remote command, and instruct the source device to retransmit. For the first transmitted remote command, the second host retransmits the remote command after receiving the second time length after the third TANAK, and for the retransmitted remote command, the third TANAK instructs the second host to retransmit the remote command after receiving the first time length after the third TANAK, so that the transmission frequency of the 'retransmitted remote command again' is higher than that of the 'retransmitted remote command for the first time', so that the 'retransmitted remote command again' has a higher probability of being received than the 'retransmitted remote command for the first time'.

[0022] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: setting a second RCT in the first host, the remote commands stored in the first RCT and the remote commands stored in the second RCT being processed with different priorities; or, the second RCT and the first RCT correspond to different processes.

[0023] Based on the above technical solution, the first host can set multiple RCTs, for example, set RCTs for different processes, each RCT corresponds to multiple processes, and for example, set multiple RCTs for remote commands of different priorities, etc.

[0024] In combination with the first aspect, in some implementations of the first aspect, the method further includes: establishing a transport layer connection group TPG between the first host and the at least one second host respectively.

[0025] In combination with the first aspect, in some implementations of the first aspect, the remote command includes a read request or an atomic request.

[0026] In combination with the first aspect, in certain implementations of the first aspect, the receiving of a remote command message from any one of the at least one second host includes: receiving a remote command message from any one of the at least one second host through a communication interface Jetty, wherein Jetty is used to receive a remote command message from the at least one second host.

[0027] In a second aspect, a communication method is provided, which is applied to a second host. The method can be executed by the second host, or can also be executed by a circuit or chip configured in the second host, which is not limited in the present application. For ease of description, the following description is given by taking the execution of the second host as an example.

[0028] The communication method comprises: generating a remote command message, wherein the message header of the remote command comprises a first identifier, wherein the first identifier is used to identify that the remote command is an initially transmitted remote command or a retransmitted remote command; and sending the remote command message to a first host.

[0029] In combination with the second aspect, in some implementations of the second aspect, the method further includes: receiving a first transaction negative acknowledgment TANAK from the first host, the first TANAK being used to indicate retransmission of the remote command after a first time period; or receiving a second transaction negative acknowledgment TANAK from the first host, the second TANAK being used to indicate retransmission of the remote command after a second time period, the second time period being greater than the first time period.

[0030] The technical effects of the method shown in the above second aspect and its possible design can refer to the technical effects in the first aspect and its possible design.

[0031] In a third aspect, a communication device is provided, which includes: a storage module for storing programs; a processing module for executing the programs stored in the storage module, and when the programs stored in the storage module are executed, the processing module is used to execute the methods provided by the above aspects.

[0032] According to a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable medium stores a program code for execution by a device, wherein the program code includes code for executing the methods provided in the above aspects.

[0033] According to a fifth aspect, a computer program product comprising instructions is provided. When the computer program product is run on a computer, the computer is used to execute the methods provided in the above aspects.

[0034] In a sixth aspect, a chip is provided, which includes a processing module and a communication interface. The processing module reads instructions stored in a memory through the communication interface to execute the methods provided in the above aspects.

[0035] Optionally, as an implementation method, the chip may also include a storage module, in which instructions are stored, and the processing module is used to execute the instructions stored on the storage module. When the instructions are executed, the processing module is used to execute the methods provided by the above aspects.

[0036] In a seventh aspect, a chip is provided, comprising a network management unit for executing the method provided in the first aspect and a bus device for executing the method provided in the second aspect.

[0037] In an eighth aspect, a computer system is provided, which includes the chip shown in the seventh aspect.

[0038] In a ninth aspect, a terminal device is provided, the terminal device comprising the chip shown in the seventh aspect. For example, the terminal device includes but is not limited to mobile phones, vehicles and other terminals.

[0039] In a tenth aspect, a system for accessing a configuration space is provided, the system comprising a first host for executing the method provided in the first aspect and a second host for executing the method provided in the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A schematic diagram of the structure of a computer device provided in an embodiment of the present application.

[0041] Figure 2 A schematic diagram of a data center provided in an embodiment of the present application.

[0042] Figure 3 It is a schematic diagram of a universal bus protocol message format provided in an embodiment of the present application.

[0043] Figure 4 It is a structural diagram of a host provided in an embodiment of the present application.

[0044] Figure 5 It is a schematic flow chart of a communication method provided by the present application.

[0045] Figure 6 It is a schematic diagram of setting a threshold in the first RCT provided in an embodiment of the present application.

[0046] Figure 7 It is a schematic diagram of a remote command transmission provided in an embodiment of the present application.

[0047] Figure 8 It is a schematic diagram of another remote command transmission provided in an embodiment of the present application.

[0048] Fig. 9 This is a schematic diagram of another remote command transmission provided in an embodiment of the present application.

[0049] Fig.10 This is a schematic diagram of another remote command transmission provided in an embodiment of the present application.

[0050] Fig.11 A schematic structural diagram of a communication device 1100 provided in an embodiment of the present application is shown.

[0051] Fig.12 A schematic structural diagram of a chip system 1200 provided in an embodiment of the present application is shown.

[0052] Fig.13 A conceptual partial view of a computer program product provided by an embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0053] In order to facilitate understanding of the embodiments of the present application, the following explanations are made.

[0054] First, "at least one" shown in the present application refers to one or more, and "multiple" refers to two or more. In addition, in the embodiments of the present application, "first", "second" and various digital numbers (for example, "#1", "#2", etc.) are only for the convenience of description, and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of each process below does not mean the order of execution. The execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. It should be understood that the objects described in this way can be interchangeable under appropriate circumstances, so as to be able to describe the schemes outside the embodiments of the present application. In addition, in the embodiments of the present application, words such as "S510" are only for the convenience of description, and are not intended to limit the order of execution steps.

[0055] Second, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0056] Third, the "storage" involved in the embodiments of the present application may refer to storage in one or more memories. The one or more memories may be separately set or integrated in an encoder or decoder, a processor, or a communication device. The one or more memories may also be partially separately set and partially integrated in a decoder, a processor, or a communication device. The type of memory may be any form of storage medium, and the present application is not limited thereto.

[0057] Fourth, the term “comprising” (also referred to as “includes”, “including”, “comprises” and / or “comprising”) involved in the embodiments of the present application when used in this specification specifies the existence of stated features, integers, steps, operations, elements, and / or parts, but does not exclude the existence or addition of one or more other features, integers, steps, operations, elements, parts, and / or groups thereof.

[0058] Fifth, the "if" involved in the embodiments of the present application can be interpreted as meaning "when" or "upon" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if it is determined that..." or "if [the stated condition or event] is detected" can be interpreted as meaning "when determining..." or "in response to determining..." or "when [the stated condition or event] is detected" or "in response to detecting [the stated condition or event]".

[0059] Sixth, the terms used in the description of various examples in the embodiments of the present application are only for describing specific examples and are not intended to be limiting. As used in the description of various examples and in the appended claims, the number forms "a", "an" and "the" are intended to include plural forms as well, unless the context clearly indicates otherwise.

[0060] Seventh, the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0061] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0062] The present application relates to a processor in a computer system accessing a configuration space of an external device. The computer system may be a server or a terminal. The terminal includes but is not limited to user systems such as desktop computers, laptop computers, and smart phones. For ease of understanding, the structure of the computer system is introduced below.

[0063] See also Figure 1 As shown in the structural diagram of the computer system, the computer system includes a processor 101, an input output device (I / O device) 102, a memory 103, a cache 104, a memory management unit (MMU) 105, an input output memory management unit (IOMMU) 106, an external memory 107 and a bus 108.

[0064] The processor 101 includes at least one core. The core is also called a computing engine. Each core can independently execute tasks. When the processor 101 includes multiple cores, tasks from applications can be divided so that the application can make full use of multiple cores and execute more tasks within a specific time. In this embodiment, the processor 101 can be a main processor, such as a central processing unit (CPU).

[0065] The input / output device 102 refers to a hardware device that has the ability to input data and / or output data. The input / output device 102 can be divided into input devices and output devices. Among them, the input device can include devices such as a mouse, a keyboard, a joystick, a stylus, a microphone, etc., and the output device can include devices such as a display and a speaker.

[0066] The memory 103 is also called internal memory or main memory, and is used to temporarily store the operation data in the processor 101. Furthermore, the memory 103 is also used to temporarily store the data exchanged with the external memory 107. The memory 103 can usually be implemented by a storage medium such as a dynamic random access memory DRAM or a static random access memory (SRAM).

[0067] The cache 104 (in this embodiment, it refers to the processor cache, such as the CPU cache) is a component used to reduce the average time required for the processor 101 to access the memory 103. Figure 1 In the pyramid storage system, the cache 104 is located in the second layer from top to bottom, second only to the registers of the processor 101 ( Figure 1 103 (not shown), which is higher than the memory 103 (the memory 103 is located in the third layer from the top). Generally, the capacity of the cache 104 is much smaller than the memory 103, but the access speed can be close to the frequency of the processor 101.

[0068] The memory management unit 105 is a computer hardware for processing data access requests. The memory management unit 105 is specifically used to map the virtual address (VA) in the data access request. The memory management unit 105 can intercept the data access request issued by the core of the processor 101, and map (or translate) the virtual address in the data access request into a physical address (PA) so as to access the memory 103 according to the physical address.

[0069] The I / O memory management unit 106 is essentially a memory management unit. Similar to the memory management unit 105 mapping the virtual addresses visible to the processor 101 to physical addresses, the I / O memory management unit 106 is used to map the virtual addresses (also called device addresses or I / O addresses) visible to the input and output devices 102 to physical addresses.

[0070] The external memory 107 is also called external memory or auxiliary memory, and is usually used to persist data. For example, the external memory 107 can persist the operation data in the storage processor 101. Even if the power supply is abnormal, the data written into the external memory 107 can still be saved, thus avoiding data loss. In specific implementation, the external memory 107 includes at least one non-volatile memory 1071. When the external memory includes multiple non-volatile memories, these multiple non-volatile memories can be of the same type or different types. For example, in Figure 1In the example, the external memory 107 may include two types of non-volatile memories, such as storage class memory (SCM) and solid state drive (SSD).

[0071] The bus 108 is used to connect the various functional components of the computer system. The bus 108 is a common communication trunk for transmitting information between the various functional components of the computer system. The bus 108 can be a transmission line bundle formed by wires. Depending on the connection object, the bus 108 can also be divided into an internal bus and an external bus.

[0072] The internal bus uses an internal bus protocol to transmit information. The internal bus protocol includes a bus protocol for accessing the memory space of the computer system. The external bus uses an external bus protocol to transmit information. The external bus protocol includes a bus protocol for accessing the external memory space of the computer system. The memory space refers to the address space of the internal memory, and the external memory space refers to the address space of the external memory.

[0073] In some embodiments, the internal bus protocol includes but is not limited to the peripheral component interconnect (PCI) bus, the peripheral component interconnect (PCI Express, PCIe) protocol, the IntelTM Quick Path Interconnect (QPI) protocol, and the universal bus protocol. The external bus protocol includes but is not limited to the small computer system interface (SCSI) protocol or the serial attached SCSI (SAS) protocol.

[0074] It should be noted that Figure 1 The computer system shown is illustrated by taking the external memory 107 as a remote external memory. Figure 1 As shown, the external memory 107 includes a network card 1072. The network card 1072 may be, for example, a smart NIC network interface card (i.e., a network adapter card). The external memory 107 is connected to the network through the network card 1072, and then connected to other components of the computer system 101 through the network. The network may be a wired communication network, such as an optical fiber communication network, or a wireless communication network, such as a wireless local area network (WLAN) or a fifth generation (5G) mobile communication network.

[0075] In some possible implementations, the external memory 107 of the computer system may also be a local external memory, and other components of the computer system, such as the processor 101, may be connected to the local external memory via the bus 108. In other possible implementations, the computer system may include both remote external memory and local external memory. In addition, the embodiments of the present application may be applicable to centralized storage or distributed storage scenarios, which are not limited in this embodiment.

[0076] Exemplarily, the method for accessing the configuration space register of the bus device provided in the embodiment of the present application can also be applied to Figure 2 A server cluster communicating across a network, such as Figure 2 The data center shown. Figure 2 The internal structure of the switch or server shown in the above Figure 1 as shown in .

[0077] In addition, the internal bus protocol supported by the computer system involved in this application includes a universal bus protocol, and a transport layer connection can be established between computer systems. Among them, the universal bus protocol can also be called Lingqu bus protocol or unified bus protocol, a bus protocol standard, and this application does not limit the name of the universal bus protocol.

[0078] The universal bus protocol breaks down the existing barriers of various protocols and removes unnecessary conversion overhead in the middle, thereby achieving extremely low latency. The universal bus protocol defines an independent transaction layer (TA) and transport layer (TP). There is a connection between the transport layers, but no connection between the transaction layers. For the host, there is no connection between the transaction layers of the two hosts, but there is a connection between the transport layers. Then all transactions of any of the two hosts are carried on the transport layer for transmission. The universal bus protocol includes the transport layer and the transaction layer. The transport layer is responsible for network packet loss retransmission to ensure reliable transmission, and the transaction layer handles different transactions. The transport layer receives the packet from the network, strips off the transport layer header, and forwards it to the transaction layer.

[0079] The general bus protocol message format is as follows Figure 3 Specifically, the fields in the universal bus protocol message format are defined as shown in Table 1 below:

[0080] Table 1

[0081]

[0082]

[0083] Specifically, the transaction layer of the universal bus protocol and the interactive interface between the application are called Jetty. Application messages can be sent to any destination through a Jetty, and messages from any source can also be received through a Jetty. A Jetty that can only send is defined as (Jetty For Send, JFS); a Jetty that can only receive is defined as (Jetty For Receive, JFR).

[0084] Figure 4 is a schematic diagram of the structure of a host provided in an embodiment of the present application. Figure 4 Host A, Host B, and Host C shown in the figure can be applied to Figure 2 In the application scenario of cross-network communication shown in FIG. 1 , host A and host C can be understood as source devices, host B can be understood as target device, and the source device sends remote commands to the target device.

[0085] like Figure 4 As shown, host B contains several virtual machines (VMs), and one VM contains several processes and several remote command tables (RCTs) for receiving remote commands (such as Read commands). One process corresponds to several communication interfaces (such as Jetty), communication interfaces that can only send (such as JFS), and communication interfaces that can only send (such as JFR). Process-related messages can be transmitted through their corresponding communication interfaces. Among them, Jetty is bidirectional and can both receive and send; JFS is unidirectional and can only send; JFR is unidirectional and can only receive.

[0086] Jetty, JFS, JFR, and RCT have their own contexts (CXT). Several TP connections are established between two hosts (e.g. Figure 4 As shown in the figure, there are 8 TP connections in total (TP connection #0 to TP connection #7). These 8 TP connections can form a transport layer group (TPG). All traffic between two hosts passes through this TPG. These 8 TP connections can be distributed on different physical ports, and traffic is sent evenly between the 8 TP connections to achieve multi-port multi-path. TP connections and TPGs belong to the transport layer. The network between two hosts may lose packets. The TP connection is responsible for retransmission of network packet loss to ensure end-to-end reliability. The TP connection is responsible for end-to-end congestion control.

[0087] Figure 4 Host B contains several VMs and several processes.

[0088] Combined with the above Figures 1 to 4The application scenarios of the present application and the internal logic units of the host involved are briefly introduced. In order to facilitate the understanding of the embodiments of the present application, some basic concepts involved in the present application are briefly explained.

[0089] 1. Packet sequence number (PSN): When the transport layer on the sending side sends a packet, it adds a PSN to each packet to identify the packet. The PSN increases packet by packet. When the receiving side receives the packet, it returns TPACK (carrying the PSN of the received packet) to inform the transport layer on the sending side that the packet has been received correctly. If the receiving side receives the packet and finds that a packet with a smaller PSN than this packet has not been received, it determines that the "packet with a smaller PSN than this packet" is lost in the network and returns TPSACK (carrying the PSN of the received packet and the PSN of the lost packet). The transport layer on the sending side receives TPSACK and retransmits the lost packet.

[0090] 2. Segment sequence number (SSN): The message of the transaction layer may be relatively large, for example, 16MB. In the UB protocol, multiple transaction layers share a transport layer. In order to prevent a message of a transaction layer from occupying the transport layer connection for a long time, the transaction layer cuts the message into multiple slices when sending it to the transport layer, and marks each slice with an SSN to identify the slice. The SSN increases by slice, for example, a slice is 64KB, and a transaction layer only sends one slice to the transport layer at a time.

[0091] 3. Transaction ACK (TAACK): After the receiving side receives a segment (a segment is split into multiple packets at the transport layer) and executes it correctly (for example, correctly reads and writes memory), it returns TAACK to inform the transaction layer on the sending side that the segment has been executed correctly, or the receiving side successfully receives the message from the sending side and returns TAACK to inform the transaction layer on the sending side that the message has been successfully received.

[0092] 4. Transaction No OK ACK (TANAK): If the receiving side receives a Segment and an execution error occurs (for example, a page fault occurs when reading or writing memory), it returns TANAK to inform the transaction layer on the sending side to retransmit the segment. Alternatively, if the receiving side fails to successfully receive the message from the sending side, it returns TANAK to inform the transaction layer on the sending side to retransmit the message.

[0093] 5. Remote Direct Memory Access (RDMA): Data is directly transferred to the computer's storage area through the network, quickly moving data from one system to the remote system memory without the intervention of the operating system or kernel of the two computer devices. RDMA eliminates the overhead of external memory copying and context switching, thus freeing up memory bandwidth and CPU cycles to improve application system performance.

[0094] 6. Queue Pair (QP): A QP is connected to another QP. For example, messages in the send queue of a QP are transferred to the receive queue of another QP.

[0095] Specifically, before establishing a connection between two parties, RDMA first creates a context and a protection domain (PD) to associate a queue pair QP with a memory region (MR). Then, both parties create QPs. Each QP contains two first-in-first-out (FIFO) work queues: a send queue (SQ) for sending requests and a receive queue (RQ) for receiving requests. Each of them is associated with a completion queue (CQ). In order to allow the RDMA network card to have access to the memory, the memory needs to be registered. Such memory that can be accessed by both parties is called memory that supports RDMA access, and the remote address is the starting virtual address of this memory region. After both parties create MRs, they will generate an 8-byte type key respectively. Both parties should exchange their keys and the virtual addresses of the registered memory. Each MR contains its own key (lkey) and the key of the remote memory (rkey). The rkey must be used to access the remote registered memory. Under normal circumstances, it takes about 10 seconds to create 4096 connections through RDMA's native communication library RDMA_CM. On average, it takes between 1ms and 5ms to create each connection. When the RDMA payload is 32 bytes, the delay is about 4us each time. Therefore, in order to create a connection, it is necessary to delay the sending of hundreds of network data packets.

[0096] 7. Outstanding number: Outstanding refers to the host's ability to initiate multiple read and write transactions when no response is received. Assume that N instructions have been sent. If no write response is returned during this period, you must wait for the write response to be returned before you can continue to send commands through the address channel. If a write response is returned, then how many write responses have been returned, and then you can continue to send several instructions.

[0097] 8. Queue resources: Hosts negotiate the maximum outstanding number of read operations and atomic operations that can be sent, and each QP sets a dedicated queue resource to store Read and Atomic commands. The queue resources are not shared between QPs. The larger the number of QPs, the more storage resources are required. For example, QP#1 in host A is connected to QP#1 in host B, and QP#2 in host A is connected to QP#2 in host B. Host A needs to set up queue resources for QP#1 and QP#2 respectively to store the Read and Atomic commands transmitted by the corresponding QPs; similarly, host B needs to set up queue resources for QP#1 and QP#2 respectively to store the Read and Atomic commands transmitted by the corresponding QPs.

[0098] 9. Process: It is a running activity of a program in a computer on a certain data set. It is the basic unit for resource allocation in the system and the foundation of the operating system structure. In the early computer structure designed for processes, the process is the basic execution entity of the program; in the contemporary computer structure designed for threads, the process is the container of threads. A program is a description of instructions, data and their organizational form, and a process is the entity of the program.

[0099] Combination of the above Figure 2 The application scenarios of the communication method provided by this application are briefly introduced, as well as the basic concepts involved in this application. QP and queue resources are introduced in the basic concepts. The larger the network scale, the more QPs are required, and the greater the queue storage resource consumption.

[0100] In order to save storage resources, the outstanding number of Read and Atomic messages of a single QP negotiated between hosts (e.g., source device and target device) is often not large, for example, 128. However, if the outstanding number of Read and Atomic messages of a single QP is small, when the RTT is large, the Read and Atomic message rate of a single QP is not high.

[0101] In order to solve the problem of low Read and Atomic message rates in current resource usage methods, the present application proposes a communication method and device, in which a target device uses shared resources to receive Read and Atomic requests issued by multiple source devices, thereby saving storage resources. The communication method provided by the present application will be described in detail below in conjunction with the accompanying drawings.

[0102] It should be understood that the communication method provided in the embodiments of the present application can be applied to a computer system, for example, Figure 2 In the cross-network communication system shown.

[0103] It should also be understood that the embodiments shown below do not specifically limit the specific structure of the execution subject of the method provided in the embodiments of the present application, as long as the method provided in the embodiments of the present application can be implemented by running a program that records the code of the method provided in the embodiments of the present application. For example, the execution subject of the method provided in the embodiments of the present application may be a device, or a functional module in the device that can call and execute a program.

[0104] Figure 5 is a schematic flow chart of a communication method provided by the present application. In a scenario where a first host and at least one second host communicate with each other, such as Figure 2 In the scene shown.

[0105] exist Figure 5 In the illustrated embodiment, the first host can be used as a receiving end (or a target device (target)), and the second host can be used as a sending end (or an initiator) (or an initiator). For the receiving end, the receiving end is a local device, and the sending end is a remote device. The command received by the receiving end from the sending end is called a remote command.

[0106] Exemplarily, the above-mentioned first host can be a physical machine or a virtual machine. If the first host is a virtual machine, the steps executed by the first host can be executed by the virtual machine; similarly, the second host can be a physical machine or a virtual machine. If the second host is a virtual machine, the steps executed by the second host can be executed by the virtual machine.

[0107] Specifically, Figure 5 The method shown comprises the following steps:

[0108] S510: The first host sets a first RCT.

[0109] In this embodiment, the first host can be understood as a target device, receiving a remote command sent from at least one second host. Figure 4 The second host can be understood as a source device. For example, the second host can be the host B shown in FIG. Figure 4 Host A and / or Host C shown in .

[0110] As a possible implementation, a TP connection is established between the first host and each second host, and a remote command message from the second host is received through the TP connection. Figure 4 As shown, a TP connection is established between host A and host B, and a TP connection is established between host C and host B.

[0111] As another possible implementation method, when the link has a retransmission mechanism to ensure reliable transmission, there is no need to establish a transport layer connection. The link layer connection between the first host and each second host has a retransmission mechanism to ensure reliable transmission, and the remote command message from the second host can be received through the link layer connection.

[0112] It should be noted that the specific forms of the first host and the second host are not limited in this embodiment, and all devices that can implement the corresponding functions in this embodiment are within the protection scope of this application.

[0113] Exemplarily, the remote commands involved in this embodiment include but are not limited to Read and / or Atomic requests. The format and content of the remote commands are not limited in this application, and the description of the remote commands in the prior art can be referred to.

[0114] Specifically, the first RCT set by the first host is used to store remote commands corresponding to multiple processes, and the multiple processes belong to at least one second host.

[0115] For example, the first host communicates with the second host #1 and the second host #2, the second host #1 executes process #1 and process #2, and the second host #2 executes process #3 and process #4. The first host can set a first RCT, which is used to store remote commands corresponding to process #1, process #2, process #3 and process #4.

[0116] It should be understood that the remote commands of multiple processes in this embodiment can be understood as remote commands received by the first host through Jetty, wherein the first host can receive remote commands from one or more second hosts through a Jetty, which can be understood as Jetty corresponding to one or more processes.

[0117] By setting a first RCT to store remote commands of multiple processes in at least one second host, it is avoided to set a corresponding RCT for each process, and multiple processes share the RCT, that is, storage resource sharing is achieved. In addition, in this solution, multiple processes share one RCT, and the storage space of the RCT can be set larger, thereby ensuring the remote command transmission rate.

[0118] Exemplarily, the first host sets a first RCT, including: the first host sets at least one RCT, and the first RCT is any one of the at least one RCT.

[0119] If the first host sets multiple RCTs, the remote commands stored in the multiple RCTs have different processing priorities. For example, the first host sets RCT#1, RCT#2, and RCT#3, and the remote commands stored in the three RCTs have processing priorities such that the remote commands stored in RCT#1 have a higher processing priority than the remote commands stored in RCT#2, and the remote commands stored in RCT#2 have a higher processing priority than the remote commands stored in RCT#3. When the first host receives a message of a remote command, it can determine the priority of the remote command according to the priority indication information indicating the remote command to be processed carried in the message, and forward the received remote command to the RCT with matching priority according to the high and low processing priorities of the remote commands stored in the multiple RCTs.

[0120] If the first host sets multiple RCTs, the multiple RCTs may correspond to different processes, and different processes may belong to different or the same second hosts. For example, a connection is established between the first host and the second host #1, the second host #2, and the second host #3. The processes in the second host #1 include process #1, the processes in the second host #2 include process #2, and the processes in the second host #3 include process #3. The first host sets RCT #1 and RCT #2. RCT #1 is used to store remote commands of process #1, and RCT #2 is used to store remote commands of process #2 and process #3.

[0121] It should be understood that in this embodiment, there is no limitation on the specific number of RCTs set by the first host. For example, the first host receives remote commands corresponding to P processes from N second hosts, and the first host sets M RCTs, where N is a positive integer, P is an integer greater than or equal to 2, and M is a positive integer less than P.

[0122] Optionally, in this embodiment, the RCT set by the first host can be shared and used by multiple processes, so the RCT set by the first host can also be called a shared RCT.

[0123] In this embodiment, since the RCT is shared by remote commands corresponding to multiple processes in at least one second host, multiple processes share the RCT. When the RCT is full, the first host is forced to discard the received remote commands. There may be a situation where the remote commands issued by a process in a second host are always discarded.

[0124] For example, suppose that when the remote command sent by Jetty X of the second host #1 reaches the first host, the RCT in the first host is full and is discarded, and the first host notifies the second host #1 to retransmit; when the RCT is not full, the remote command sent by the Jetty of the second host #2 is received; when the remote command sent by Jetty X of the second host #1 is received again, the RCT is full again, and the remote command of the second host #1 is discarded again. Therefore, there may be a situation where the remote commands sent by Jetty X of the second host #1 are always discarded (or called starvation).

[0125] In order to reduce the risk that the remote commands of a process in a second host are always discarded, in this embodiment, the first host determines the remote command processing strategy based on the storage space usage of the first RCT.

[0126] Figure 5 The method flow shown also includes:

[0127] S520: The first host receives a remote command message from the second host.

[0128] The second host may be any one of the at least one second host mentioned above.

[0129] As a possible implementation manner, the second host may send the message of the remote command to the first host through the TPG between the second host and the first host.

[0130] In this implementation, after the transport layer of the first host receives the message of the remote command, if the packet verification passes, it returns TPACK (transport layer acknowledgment) to the second host. The TPACK is used to notify the transport layer on the source device side that "the packet has been received correctly"; if the PSN in the TPH is checked and it is found that there is packet loss in the network, a transport layer selective ACK (TPSACK) is returned. The TPSACK carries the PSN. TPSACK is used to notify the source device side that "the packet has been received correctly, but there is packet loss, and the packet corresponding to the lost PSN needs to be retransmitted."

[0131] As another possible implementation, the second host may send the remote command message to the first host via the link layer connection. In this implementation, the first host does not need to notify the second host whether the message is correctly received via TPACK or TPSACK.

[0132] It should be understood that this embodiment does not limit the message transmission method between the second host and the first host. This embodiment mainly involves how to determine the remote command processing strategy according to the storage space usage of the first RCT when the first host correctly receives the remote command message.

[0133] For example, the first host includes at least one virtual machine (VM), and the destination address of the remote command message sent by the second host can be the address of any one of the at least one VM. After the first host receives the remote command message from the network, it verifies through the LINK layer, IP layer and transport layer (for example, based on information such as PSN and SSN to determine whether there is packet loss, etc.), and then looks up the table based on the destination entity ID (DEID) to find out that the destination of the remote command is VM#1. The transport layer strips off the TPH and the previous part of the remote command message, and transfers the remaining part to VM#1.

[0134] S530: The first host determines a remote command processing strategy based on the storage space usage of the first RCT.

[0135] In this embodiment, the storage space usage of the RCT can be represented by parameters such as the storage space margin of the RCT, the storage space usage of the RCT, the storage space occupancy rate of the RCT, the storage space usage rate of the RCT, or the storage space utilization rate of the RCT.

[0136] Exemplarily, in this embodiment, a first threshold may be set in the first RCT, and the first threshold may also be referred to as a first waterline.

[0137] Specifically, when a first threshold is set in the first RCT, the first host determines the processing strategy of the remote command based on the storage space usage of the first RCT, including: the first host determines the processing strategy of the remote command according to the first threshold and the storage space usage of the first RCT. For example, if the used storage space of the first RCT exceeds the first threshold, the first processing strategy is used to process the remote command; if the used storage space of the first RCT does not exceed the first threshold, the second processing strategy is used to process the remote command. The first processing strategy and the second processing strategy are different. For example, the first processing strategy is to determine whether to receive or discard the remote command according to the type of the remote command, and the second processing strategy is to receive the remote command.

[0138] Exemplarily, the message packet header of the remote command may carry a first identifier, and the first identifier is used to identify the remote command as an initially transmitted remote command or a retransmitted remote command. The first identifier may be called a retransmission flag. The first host may give priority to receiving remote commands with retransmissions based on the storage space usage of the first RCT.

[0139] As a possible implementation manner, when the used storage space of the first RCT exceeds the first threshold, the first processing strategy is related to whether the remote command received by the first host is an initially transmitted remote command or a retransmitted remote command.

[0140] For example, if the remote command is an initially transmitted remote command, it is determined to discard the remote command; if the remote command is a retransmitted remote command, it is determined to receive the remote command and store the remote command in the first RCT.

[0141] In this implementation, after the first host determines to discard the remote command, it sends a first TANAK to the second host, and the first TANAK is used to instruct the retransmission of the remote command after a first time period. For example, the first TANAK carries indication information #1, and the indication information #1 is used to instruct the second host to retransmit the remote command after a first time period after receiving the first TANAK. After the first host determines to receive the remote command, when the remote command is executed, the first host sends a response message to the second host.

[0142] Furthermore, a second threshold value may be set in the first RCT, and the second threshold value is greater than the first threshold value. Figure 6 As shown, Figure 6 This is a schematic diagram of setting a threshold in the first RCT provided by an embodiment of the present application, for example, the first host sets the drop_new watermark and the delay_rty watermark in the first RCT, wherein the drop_new watermark is the first threshold and the delay_rty watermark is the second threshold.

[0143] In the case where the first threshold and the second threshold are set in the first RCT, the first host determines the remote command processing strategy according to the storage space usage of the first RCT, including: determining the remote command processing strategy according to the second threshold and the storage space usage of the first RCT. For example, if the used storage space of the first RCT exceeds the second threshold, the remote command is processed using the third processing strategy; if the used storage space of the first RCT does not exceed the second threshold, it is determined whether the used storage space of the first RCT exceeds the above-mentioned first threshold, and the above-mentioned first processing strategy and second processing strategy are referred to for processing according to the determination result.

[0144] As another possible implementation, when the used storage space of the first RCT exceeds the second threshold, the third processing strategy is related to whether the remote command received by the first host is an initially transmitted remote command or a retransmitted remote command.

[0145] For example, if the remote command is an initially transmitted remote command, it is determined to discard the remote command; if the remote command is a retransmitted remote command, it is determined to receive the remote command and store the remote command in the first RCT.

[0146] In this implementation, after the first host determines to discard the remote command, it sends a second TANAK to the second host, and the second TANAK is used to instruct the second host to retransmit the remote command after the second time period. For example, the second TANAK carries indication information #2, and the indication information #2 is used to instruct the second host to retransmit the remote command after the second time period after receiving the second TANAK. After the first host determines to receive the remote command, when the remote command is executed, the first host sends a response message to the second host.

[0147] It should be noted that the second duration is greater than the first duration, for example, the second duration is twice the first duration. That is to say, if the used storage space of the first RCT exceeds the second threshold, the first RCT has stored a large number of remote commands to be processed and is heavily congested, so the first host can instruct the second host to increase the retransmission interval and reduce the remote command sending rate through the second TANAK.

[0148] Exemplarily, the first host determines the remote command processing strategy according to the usage of the first RCT, and further includes: if the first RCT is full, determining to discard the remote command. And the first host sends a third TANAK to the second host, the third TANAK is used to indicate the retransmission of the remote command, for the first transmitted remote command, the third TANAK indicates the second host to retransmit the remote command after the second time length after receiving the third TANAK, and for the retransmitted remote command, the third TANAK indicates the second host to retransmit the remote command after the first time length after receiving the third TANAK, so that the transmission frequency of the 'retransmitted remote command again' is higher than that of the 'retransmitted remote command for the first time', so that the 'retransmitted remote command again' has a higher probability of being received than the 'retransmitted remote command for the first time'.

[0149] S540, the first host sends a TANAK or a response message to the second host.

[0150] As can be seen from the above step S530, the first host may feedback a TANAK (such as the first TANAK, the second TANAK or the third TANAK shown above) to the second host. The TANAK passes through the network and reaches the second host side, informing the second host to retransmit the remote command after a certain time interval (such as the first time interval or the second time interval).

[0151] The first host may feed back a response message to the second host, and the response message passes through the network and reaches the second host.

[0152] Figure 5In the illustrated embodiment, a first RCT is provided in the first host, and the first RCT can be used to store remote commands corresponding to multiple processes of at least one second host. When the first host receives a remote command from the second host, the processing strategy of the remote command can be determined according to the storage space usage of the first RCT. In this communication method, the first host can set an RCT for multiple processes of at least one second host, and the multiple processes share one RCT. There is no need to set an RCT for each process separately, so that resource sharing can be achieved and resource overhead can be saved. Moreover, in this solution, multiple processes share one RCT, and the storage space of the RCT can be set larger to ensure the remote command transmission rate.

[0153] Furthermore, by adding a retransmission flag in the message and / or setting a threshold in the RCT, the starvation problem that may be caused by multiple processes sharing the RCT is reduced.

[0154] To facilitate understanding, the communication method provided in this application is described with reference to specific examples.

[0155] Example 1: Take the remote command as a read request (Read), and a TPG is established between the target device and the source device as an example. This example includes the following steps:

[0156] Step 1: The application process in the source device (ie, the second host mentioned above) sends a 'Read' transaction to the JFS of the source device.

[0157] Step 2: The JFS of the source device sends 'Read' to TPG and encapsulates TPH.

[0158] Step 3: The Link layer of the source device encapsulates the Link header to obtain a 'Read' message. The 'Read' message selects the TP connection with the lightest load in the TPG and sends it to the target device (i.e., the first host mentioned above) through the network.

[0159] Step 4: The transport layer of the target device receives the packet. If the packet verification passes, it returns TPACK (transport layer acknowledgment) to the source device. The TPACK is used to notify the transport layer on the source device side that the packet has been received correctly. If the PSN in the TPH is checked and it is found that there is packet loss in the network, a transport layer selective acknowledgment (Transport Selective ACK, TPSACK) is returned. The TPSACK carries the PSN of the lost packet. TPSACK is used to notify the source device side that the packet has been received correctly, but there is packet loss, and the packet corresponding to the lost PSN needs to be retransmitted.

[0160] Step 5: The transport layer of the target device parses the packet and finds out that the destination of the packet is a VM, for example, by looking up the DEID table to determine the destination of the packet. The transport layer of the target device strips the TPH and the previous part of the packet and transfers the remaining part to the VM.

[0161] Step 6: The VM of the target device receives this 'Read' and determines the processing strategy of the 'Read' according to the storage space usage of the RCT.

[0162] For example, the VM of the target device receives a 'Read' and determines whether the RCT is full.

[0163] If the RCT is full (i.e., there is no available storage space), the target device discards this 'Read' and returns a TANAK to the source device, informing the source device to retransmit. If the 'Read' is an initial transmission, the indication information carried in the TANAK indicates retransmission after the second time period after receiving the TANAK; if the 'Read' is a retransmission, the indication information carried in the TANAK indicates retransmission after the first time period after receiving the TANAK.

[0164] If the RCT is not full, but the RCT usage depth exceeds the delay_rty watermark, if the 'Read' is an initial transmission, a TANAK is returned to the source device, informing the source device to retransmit after the second time period after receiving the TANAK; if the 'Read' is a retransmission, this 'Read' is received and stored in the RCT. When the 'Read' is executed, a read response (Read Response) is returned.

[0165] If the RCT is not full, but the RCT usage depth exceeds the drop_new watermark and does not exceed the delay_rty watermark, if the 'Read' is an initial transmission, a TANAK is returned to the source device to inform the source device to retransmit after the first period of time after receiving the TANAK; if the 'Read' is a retransmission, this 'Read' is received and stored in the RCT. When the 'Read' is executed, a read response (ReadResponse) is returned.

[0166] In addition, for ease of understanding, combined with Figures 7 to 10 The process of receiving or discarding a remote command when there is a TP connection or no TP connection between the first host and the second host is described.

[0167] Figure 7 It is a schematic diagram of a remote command transmission provided in an embodiment of the present application.

[0168] from Figure 7It can be seen that a TPG is established between the first host and the second host, and the remote command is a read request (read response). The second host sends a read request to the first host through TPG. After the transport layer of the first host receives the message carrying the read request, it returns TPACK to notify the second host that the read request has been correctly received. The first host determines the processing strategy for the read request based on the storage space usage of RCT. Figure 7 In the scenario shown, the first host determines to store the read request in RCT. After the read request is executed, the first host sends a read response to the second host to inform the source device that the read request has been successfully executed. After receiving the read response, the second host can return TPACK to notify the first host that the read response has been correctly received.

[0169] Figure 8 It is a schematic diagram of another remote command transmission provided in an embodiment of the present application.

[0170] from Figure 8 It can be seen that there is no TP connection between the first host and the second host, and the remote command is a read request. The second host sends a read request to the first host, and the first host determines the processing strategy of the read request based on the storage space usage of the RCT. Figure 8 In the scenario shown, the first host determines to store the read request in the RCT. After the read request is executed, the first host sends a read response to the second host to inform the source device that the read request has been successfully executed.

[0171] Fig. 9 This is a schematic diagram of another remote command transmission provided in an embodiment of the present application.

[0172] from Fig. 9 It can be seen that a TPG is established between the first host and the second host, and the remote command is a read request. The second host sends a read request to the first host through the TPG. After the transport layer of the first host receives the message carrying the read request, it returns TPACK to notify the second host that the read request has been correctly received. The first host determines the processing strategy for the read request based on the storage space usage of the RCT. Fig. 9 In the scenario shown, the first host determines to discard the read request, and sends a TANAK to the second host to inform the source device to retransmit. After receiving the TANAK, the second host can return a TPACK to notify the first host that the TANAK has been received.

[0173] Fig.10 It is a schematic diagram of another remote command transmission provided in an embodiment of the present application.

[0174] from Fig.10It can be seen that there is no TP connection between the first host and the second host, and the remote command is a read request. The second host sends a read request to the first host, and the first host determines the processing strategy of the read request based on the storage space usage of the RCT. Fig.10 In the scenario shown, the first host determines to discard the read request, and the first host sends a TANAK to the second host to inform the source device to retransmit.

[0175] It should be understood that the Figures 5 to 10 The specific examples shown are only to help those skilled in the art better understand the embodiments of the present application, and are not intended to limit the scope of the embodiments of the present application. It should also be understood that the sequence numbers of the above-mentioned processes do not mean the order of execution, and 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.

[0176] It should also be understood that in the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships.

[0177] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware 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 to exceed the scope of the present application.

[0178] The following, combined Figures 11 to 13 The communication device provided in the embodiment of the present application is described in detail. It should be understood that the description of the device embodiment corresponds to the description of the method embodiment, so the contents not described in detail can be referred to the method embodiment above, and some contents will not be repeated for the sake of brevity.

[0179] The embodiment of the present application can divide the functional modules of the first host or the second host according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.

[0180] Fig.11 A schematic structural diagram of a communication device 1000 provided in an embodiment of the present application is shown.

[0181] In one example, the communication device 1100 may be applied to a first host, and the communication device 1000 may be used to execute the above communication method, for example, to execute Figure 5 Specifically, the communication device 1100 may include a transceiver unit 1110 and a processing unit 1120 .

[0182] The processing unit 1120 is used to set a first remote command table RCT in the first host, wherein the first RCT is used to store remote commands corresponding to multiple processes, wherein the multiple processes belong to at least one second host. The transceiver unit 1010 is used to receive a message of a remote command from any second host of the at least one second host. The processing unit 1120 is used to determine a processing strategy for the remote command according to the usage of the storage space of the first RCT.

[0183] As an example, combining Figure 5 The transceiver unit 1010 may be used to execute S520 and S540, and the processing unit 1020 may be used to execute S510 and S530.

[0184] It should be noted that Fig.11 The device can also be used to execute the method steps involved in the embodiment variations shown in the above-mentioned figures, which will not be described in detail here.

[0185] In another example, the communication device 1100 may be applied to a second host, and the communication device 1100 may be used to execute the above communication method, for example, to execute Figure 5 The method shown.

[0186] The processing unit 1120 is used to generate a remote command message, wherein the remote command message header includes a first identifier, and the first identifier is used to identify the remote command as an initial remote command or a retransmitted remote command. The transceiver unit 1110 is used to send the remote command message to the first host.

[0187] As an example, combining Figure 5 , the transceiver unit 1010 can be used to execute S520 and S540.

[0188] It should be noted that Fig.11 The device can also be used to execute the method steps involved in the embodiment variations shown in the above-mentioned figures, which will not be described in detail here.

[0189] The present application embodiment also provides a chip system 1200, such as Fig.12 As shown, the chip system 1200 includes at least one processor and at least one interface circuit. As an example, when the chip system 1200 includes a processor and an interface circuit, the processor may be Fig.12 The processor 1210 shown in the solid line frame (or the processor 1210 shown in the dotted line frame) may be Fig.12 The interface circuit 1220 is shown in the solid line box (or the interface circuit 1220 is shown in the dotted line box).

[0190] When the chip system 1200 includes two processors and two interface circuits, the two processors include Fig.12 The processor 1210 shown in the solid line frame and the processor 1210 shown in the dotted line frame, the two interface circuits include Fig.12 The interface circuit 1220 shown in the solid line frame and the interface circuit 1220 shown in the dotted line frame. This is not limited. The processor 1210 and the interface circuit 1220 can be interconnected through a line. For example, the interface circuit 1220 can be used to receive a signal (such as an instruction stored in a memory). For another example, the interface circuit 1220 can be used to send a signal to another device (such as the processor 1210).

[0191] Exemplarily, the interface circuit 1220 may read the instruction stored in the memory and send the instruction to the processor 1210. When the instruction is executed by the processor 1210, the communication device may execute the various steps in the above embodiment. Of course, the chip system 1200 may also include other discrete devices, which is not specifically limited in the embodiment of the present application.

[0192] Another embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a communication device, the communication device executes each step performed by the communication device in the method flow shown in the above method embodiment. In some embodiments, the disclosed method can be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or encoded on other non-transitory media or products.

[0193] Fig.13A conceptual partial view of a computer program product provided by an embodiment of the present application is schematically shown, where the computer program product includes a computer program for executing a computer process on a computer device.

[0194] In one embodiment, the computer program product is provided using a signal bearing medium 1300. The signal bearing medium 1300 may include one or more program instructions, which when executed by one or more processors may provide the above-mentioned Figure 5 Thus, for example, reference to Figure 5 One or more features of S510 to S540 may be undertaken by one or more instructions associated with the signal bearing medium 1300. In addition, Fig.13 The program instructions in also describe example instructions.

[0195] In some examples, the signal bearing medium 1300 may include a computer readable medium 1301, such as, but not limited to, a hard drive, a compact disk (CD), a digital video disk (DVD), a digital tape, a memory, a read-only memory (ROM), or a random access memory (RAM), and the like.

[0196] In some implementations, the signal bearing medium 1300 may include a computer recordable medium 1302 such as, but not limited to, a memory, a read / write (R / W) CD, a R / W DVD, or the like.

[0197] In some embodiments, the signal bearing medium 1300 may include a communication medium 1303, such as, but not limited to, a digital and / or analog communication medium (e.g., a fiber optic cable, a waveguide, a wired communication link, a wireless communication link, etc.). The signal bearing medium 1300 may be communicated by a wireless form of the communication medium 1303. The one or more program instructions may be, for example, computer executable instructions or logic implemented instructions.

[0198] In some examples, various operations, functions, or actions are provided in response to one or more program instructions via computer-readable media 1301 , computer-recordable media 1302 , and / or communications media 1303 .

[0199] It should be understood that the arrangement described here is only for illustrative purposes. Thus, it will be appreciated by those skilled in the art that other arrangements and other elements (e.g., machines, interfaces, functions, sequences, and functional groups, etc.) can be used instead, and some elements can be omitted together according to the desired result. In addition, many of the described elements can be implemented as discrete or distributed components, or in any appropriate combination and position to combine other components to implement functional entities.

[0200] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it 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. When the computer executes the instructions on the computer and when the computer executes the instructions, the process or function according to 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 devices.

[0201] 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, computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer-readable storage media can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media integrated therein. Available media can be magnetic media (e.g., floppy disks, hard disks, tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid state drives (SSDs)).

[0202] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A communication method, characterized in that: Applied to a first host, the method comprises: Setting a first remote command table RCT in the first host, the first RCT being used to store remote commands corresponding to a plurality of processes, the plurality of processes belonging to at least one second host; A remote command message is received from any second host among the at least one second host, and a processing strategy of the remote command is determined according to the usage of the storage space of the first RCT.

2. The method according to claim 1, characterized in that The message header of the remote command includes a first identifier, and the first identifier is used to identify that the remote command is an initially transmitted remote command or a retransmitted remote command.

3. The method according to claim 2, characterized in that The method further comprises: setting a first threshold in the first RCT; The determining, according to the storage space usage of the first RCT, a processing strategy for the remote command includes: A processing strategy for the remote command is determined according to the first threshold and the storage space usage of the first RCT.

4. The method according to claim 3, characterized in that The determining, according to the first threshold and the storage space usage of the first RCT, a processing strategy for the remote command includes: If the used storage space of the first RCT exceeds the first threshold, adopting a first processing strategy to process the remote command; If the used storage space of the first RCT does not exceed the first threshold, the remote command is processed using a second processing strategy.

5. The method according to claim 4, characterized in that The used storage space of the first RCT exceeds the first threshold, and the remote command is processed using a first processing strategy, including: If the remote command is an initially transmitted remote command, determining to discard the remote command; If the remote command is a retransmitted remote command, it is determined that the remote command is received, and the remote command is stored in the first RCT.

6. The method according to claim 5, characterized in that In the case where it is determined to discard the remote command, the method further includes: A first transaction negative acknowledgment TANAK is sent, where the first TANAK is used to indicate to retransmit the remote command after a first time length of time after receiving the first TANAK.

7. The method according to any one of claims 3 to 6, characterized in that The method further comprises: Setting a second threshold in the first RCT, wherein the second threshold is greater than the first threshold; The determining, according to the storage space usage of the first RCT, a processing strategy for the remote command includes: A processing strategy for the remote command is determined according to the second threshold and the storage space usage of the first RCT.

8. The method according to claim 7, characterized in that The determining, according to the second threshold and the storage space usage of the first RCT, a processing strategy for the remote command includes: If the used storage space of the first RCT exceeds the second threshold, and the remote command is an initially transmitted remote command, determining to discard the remote command; The method further comprises: A second transaction negative acknowledgment TANAK is sent, where the second TANAK is used to indicate to retransmit the remote command after a second time duration of receiving the second TANAK, where the second time duration is greater than the first time duration.

9. The method according to any one of claims 2 to 8, characterized in that The determining, according to the usage of the first RCT, a processing strategy of the remote command includes: If the first RCT is full, determine to discard the remote command; The method further comprises: Sending a third transaction negative acknowledgment TANAK, wherein the third TANAK is used to indicate retransmission of the remote command; If the remote command is a retransmitted remote command, the third TANAK is used to indicate that the remote command is to be retransmitted after the first time duration of receiving the third TANAK.

10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: A second RCT is set in the first host, and remote commands stored in the first RCT and remote commands stored in the second RCT are processed at different priorities; or, the second RCT and the first RCT correspond to different processes.

11. The method according to any one of claims 1 to 10, characterized in that The method further comprises: A transport layer connection group TPG is established between the first host and the at least one second host respectively.

12. The method according to any one of claims 1 to 11, characterized in that The remote command includes a read request or an atomic request.

13. The method according to any one of claims 1 to 12, characterized in that The receiving of a remote command message from any second host among the at least one second host comprises: A message of a remote command from any second host among the at least one second host is received through the communication interface Jetty, and the Jetty is used to receive the message of the remote command from the at least one second host.

14. A communication method, characterized in that: Applied to the second host, the method comprises: Generate a remote command message, wherein the remote command message header includes a first identifier, and the first identifier is used to identify that the remote command is an initially transmitted remote command or a retransmitted remote command. Sending the remote command message to the first host.

15. The method according to claim 14, characterized in that The method further comprises: receiving a first transaction negative acknowledgment TANAK from the first host, wherein the first TANAK is used to indicate to retransmit the remote command after a first time length of receiving the first TANAK; or, A second transaction negative acknowledgment TANAK is received from the first host, where the second TANAK is used to indicate to retransmit the remote command after a second time duration of receiving the second TANAK, where the second time duration is greater than the first time duration.

16. A communication method, characterized in that: include: The first host sets a first remote command table RCT in the first host, wherein the first RCT is used to store remote commands corresponding to a plurality of processes, wherein the plurality of processes belong to at least one second host; The second host sends a remote command message to the first host, and the second host is any one of the at least one second host; The first host determines a processing strategy for the remote command according to storage space usage of the first RCT.

17. A communication system, characterized in that: comprising a first host and at least one second host, The first host is used to set a first remote command table RCT in the first host, wherein the first RCT is used to store remote commands corresponding to a plurality of processes, wherein the plurality of processes belong to the at least one second host; The second host is used to send a remote command message to the first host, and the second host is any one of the at least one second host; The first host is used to determine a processing strategy for the remote command according to storage space usage of the first RCT.

18. A communication device, characterized in that: include: A processor, configured to read instructions stored in a memory, wherein when the processor executes the instructions, the communication device implements the method described in any one of claims 1 to 13; or, the communication device implements the method described in claim 14 or 15.

19. A computer program product, characterized in that The computer program product comprises a computer program code, and when the computer program code is run on a computer, the method of any one of claims 1 to 13 is executed; or when the computer program code is run on a computer, the method of claim 14 or 15 is executed.

20. A computer-readable storage medium, characterized in that: Comprising a computer program, which, when running on a computer system, causes a processing module in the computer system to execute a method as described in any one of claims 1 to 13; or, when running on a computer system, causes a processing module in the computer system to execute a method as described in claim 14 or 15.

Citation Information

Cited By

  • Communication method and communication apparatus

    EP4753229A1

  • Communication method and communication apparatus

    WO2025044058A1