Communication method and communication apparatus

By setting up a remote command table in the target device and processing remote commands according to the storage space usage, the problem of wasted storage resources in the IB network and RoCE network is solved, and efficient remote command transmission is achieved.

WO2025044058A1PCT designated stage expired Publication Date: 2025-03-06HUAWEI TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/074978
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-28
Filing Date
2024-01-31
Publication Date
2025-03-06

AI Technical Summary

Technical Problem

In IB networks and RoCE networks, there are not many outstanding Read and Atomic operations of a single queue pair, resulting in low message rates when the round trip time is large. How to save storage resources while ensuring the message rate becomes a problem.

Method used

By setting up a remote command table in the target device, receiving remote commands issued by multiple source devices, and determining processing strategies based on the usage of the storage space, realizing resource sharing and saving storage resources.

Benefits of technology

It realizes saving storage resources while ensuring message speed, improving the remote command transmission rate, and reducing resource overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024074978_06032025_PF_FP_ABST
    Figure CN2024074978_06032025_PF_FP_ABST
Patent Text Reader

Abstract

A communication method and a communication apparatus. The communication method is applied to a first host, and comprises: setting a first remote command table (RCT) in the first host, wherein the first RCT is used for storing remote commands corresponding to a plurality of processes of at least one second host; and the first host receiving a packet of a remote command from any second host among the at least one second host, and determining a processing policy for the remote command on the basis of the storage space usage condition 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 there is no need to set an RCT for each process, achieving resource sharing, saving resource overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Communication method and communication device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on August 28, 2023, with application number 202311093485.9 and application name “Communication Method and Communication Device”, the entire contents of which are incorporated by reference into this application. Technical Field

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

[0003] In enterprise data centers or supercomputing centers, computing clusters typically utilize Infiniband (IB) networks or Remote Direct Memory Access (RDMA) over Converged Ethernet (RoCE) networks. IB and RoCE networks allow the use of Remote Direct Memory Access (RDMA) technology within traditional Ethernet networks. Leveraging the mature ecosystem of traditional Ethernet, IB and RoCE offer significant cost advantages and significantly faster version evolution than other network types, making them the future mainstream network choices.

[0004] In IB and RoCE networks, when establishing a queue pair (QP), the source and destination devices negotiate the maximum outstanding number of read and atomic operations that can be sent. Each QP is assigned dedicated queue resources to store read and atomic commands. The larger the number of QPs, the more storage resources are available.

[0005] Currently, the number of outstanding reads and atoms per QP negotiated between source and destination devices is often small, for example, 128. Because of this small number of outstanding reads and atoms per QP, when the round-trip time (RTT) is long, the rate of reads and atoms per QP is low. Therefore, how to conserve storage resources while maintaining the rate of reads and atoms per QP has become a pressing issue.

[0006] Summary of the Invention

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

[0008] In a first aspect, a communication method is provided, applied to a first host. The method can be executed by the first host, or by a circuit or chip configured in the first host, without limitation in this application. For ease of description, the following description uses execution by the first host as an example.

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

[0010] Based on the above technical solution, the first host serves as the target device and the second host serves 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 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, it can determine the processing strategy of the remote command based on 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, thereby realizing resource sharing and saving resource overhead. Moreover, 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.

[0011] 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.

[0012] 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 in a targeted manner according to the type of remote command.

[0013] In combination with the first aspect, in certain implementations of the first aspect, the method further 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 includes: determining the processing strategy of the remote command based on the first threshold and the storage space usage of the first RCT.

[0014] 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.

[0015] 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.

[0016] 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.

[0017] 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.

[0018] 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, where the first TANAK is used to indicate retransmission of the remote command after a first time period.

[0019] In combination with the first aspect, in certain implementations of the first aspect, the method further 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.

[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 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 the retransmission of the remote command after a second time period, and the second time period is greater than the first time period.

[0021] Based on the above technical solution, different thresholds can be set in the first RCT, and when a remote command is received, the usage level 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 initially transmitted remote command is discarded, and compared to the case where the used storage space of the first RCT exceeds the first threshold, the first host instructs the retransmission of the remote command to be longer at an interval 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 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.

[0022] 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.

[0023] Based on the above technical solution, if the first RCT is full after the first host receives a remote command message, the first host will discard the remote command, regardless of whether the remote command is an initial remote command or a retransmitted remote command, and instruct the source device to retransmit it. For an initial remote command, the second host retransmits the remote command a second time period after receiving the third TANAK. For a retransmitted remote command, the third TANAK instructs the second host to retransmit the remote command a first time period after receiving the third TANAK. This ensures that the transmission frequency of the retransmitted remote command is higher than that of the first retransmitted remote command, thereby increasing the probability of the retransmitted remote command being received compared to the first retransmitted remote command.

[0024] In combination with the first aspect, in some 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 are processed with different priorities; or, the second RCT and the first RCT correspond to different processes.

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

[0026] 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.

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

[0028] 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 the Jetty is used to receive a remote command message from the at least one second host.

[0029] In a second aspect, a communication method is provided, applied to a second host. The method can be executed by the second host, or by a circuit or chip configured in the second host, without limitation in this application. For ease of description, the following description uses execution by the second host as an example.

[0030] The communication method includes: generating 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 initially transmitted remote command or a retransmitted remote command; and sending the remote command message to a first host.

[0031] 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.

[0032] 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.

[0033] 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. When the programs stored in the storage module are executed, the processing module is used to execute the methods provided in the above aspects.

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

[0035] In 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.

[0036] 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.

[0037] Optionally, as an implementation method, the chip may further include a storage module, in which instructions are stored. 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 in the above aspects.

[0038] In a seventh aspect, a chip is provided, which includes 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.

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

[0040] In a ninth aspect, a terminal device is provided, the terminal device including the chip described in the seventh aspect. For example, the terminal device includes but is not limited to a mobile phone, a vehicle, and other terminals.

[0041] 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

[0042] FIG1 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application.

[0043] FIG2 is a schematic diagram of a data center provided in an embodiment of the present application.

[0044] FIG3 is a schematic diagram of a universal bus protocol message format provided in an embodiment of the present application.

[0045] FIG4 is a schematic structural diagram of a host provided in an embodiment of the present application.

[0046] FIG5 is a schematic flow chart of a communication method provided in this application.

[0047] FIG6 is a schematic diagram of setting a threshold in the first RCT provided in an embodiment of the present application.

[0048] FIG7 is a schematic diagram of a remote command transmission provided in an embodiment of the present application.

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

[0050] FIG9 is a schematic diagram of another remote command transmission provided in an embodiment of the present application.

[0051] FIG10 is a schematic diagram of another remote command transmission provided in an embodiment of the present application.

[0052] FIG11 shows a schematic structural diagram of a communication device 1100 provided in an embodiment of the present application.

[0053] FIG12 shows a schematic structural diagram of a chip system 1200 provided in an embodiment of the present application.

[0054] FIG13 schematically shows a conceptual partial view of a computer program product provided by an embodiment of the present application. DETAILED DESCRIPTION

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

[0056] 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 internal logic, and should not constitute any limitation on 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 solutions other than 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 used to limit the order of execution of steps.

[0057] Second, in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

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

[0059] 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 presence of stated features, integers, steps, operations, elements, and / or parts, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts, and / or groups thereof.

[0060] Fifth, the phrase “if” used in the embodiments of the present application may 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” may be interpreted as meaning “upon determining…” or “in response to determining…” or “upon detecting [the stated condition or event]” or “in response to detecting [the stated condition or event].”

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

[0062] Seventh, the term "and / or" in this document simply describes an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0063] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

[0064] This application involves a processor in a computer system accessing the configuration space of an external device. The computer system can be a server or a terminal. Terminals include, but are not limited to, user systems such as desktop computers, laptops, and smartphones. For ease of understanding, the following describes the structure of the computer system.

[0065] 1 , 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.

[0066] The processor 101 includes at least one core. This 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, allowing the application to fully utilize multiple cores and execute more tasks within a specific time period. In this embodiment, the processor 101 can be a main processor, such as a central processing unit (CPU).

[0067] Input / output devices 102 refer to hardware devices capable of inputting and / or outputting data. Input / output devices 102 can be categorized as input devices and output devices. Input devices may include devices such as a mouse, keyboard, joystick, stylus, and microphone, while output devices may include devices such as a display and speakers.

[0068] Memory 103, also known as internal memory or main memory, is used to temporarily store computational data in processor 101. Furthermore, memory 103 is also used to temporarily store data exchanged with external memory 107. Memory 103 can typically be implemented using storage media such as dynamic random access memory (DRAM) or static random access memory (SRAM).

[0069] Cache 104 (in this embodiment, processor cache, such as a CPU cache) is used to reduce the average time required for processor 101 to access memory 103. Referring to Figure 1 , in the pyramid storage system, cache 104 is located in the second layer from the top, just below the processor 101 registers (not shown in Figure 1 ) and above memory 103 (which is located in the third layer from the top). Typically, the capacity of cache 104 is much smaller than that of memory 103, but its access speed can approach the frequency of processor 101.

[0070] The memory management unit 105 is a computer hardware component for processing data access requests. Specifically, the memory management unit 105 is configured to map virtual addresses (VAs) in data access requests. The memory management unit 105 can intercept data access requests issued by the core of the processor 101 and map (or translate) the virtual addresses in the data access requests into physical addresses (PAs) to facilitate access to the memory 103 based on the PAs.

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

[0072] 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 calculation data in the storage processor 101. Even if the power supply is abnormal, the data written to the external memory 107 can still be saved, 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 the example of Figure 1, the external memory 107 can include two types of non-volatile memories, such as storage class memory (SCM) and solid state drive (SSD).

[0073] Bus 108 is used to connect the various functional components of the computer system. Bus 108 is a common communication trunk that transmits information between the various functional components of the computer system. Bus 108 can be a transmission line formed by wires. Depending on the connection objects, bus 108 can be divided into internal buses and external buses.

[0074] 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.

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

[0076] It should be noted that the computer system shown in FIG1 is illustrated by taking the external memory 107 as the remote external memory. As shown in FIG1 , 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 is 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.

[0077] In some possible implementations, the computer system's external memory 107 may also be local external memory, and other components of the computer system, such as the processor 101, may be connected to the local external memory via a 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.

[0078] For example, the method for accessing the configuration space registers of the bus device provided in the embodiments of the present application can also be applied to the server cluster communicating across the network shown in FIG2 , such as the data center shown in FIG2 . The internal structure of the switch or server shown in FIG2 is as shown in FIG1 above.

[0079] In addition, the internal bus protocols supported by the computer systems involved in this application include a universal bus protocol, which enables transport layer connections to be established between computer systems. The universal bus protocol, which may also be referred to as the Lingqu bus protocol or unified bus protocol, is a bus protocol standard. This application does not limit the name of the universal bus protocol.

[0080] The Universal Bus Protocol breaks down existing protocol barriers, eliminating unnecessary intermediate conversion overhead to achieve extremely low latency. The Universal Bus Protocol defines independent transaction layers (TA) and transport layers (TP). Transport layers are connected, but transaction layers are not. For hosts, there is no connection between the transaction layers, but there is a connection between the transport layers. Therefore, all transactions between either host are carried over the transport layer. The Universal Bus Protocol consists of both the transport layer and the transaction layer. The transport layer is responsible for retransmitting lost packets to ensure reliable transmission, while the transaction layer handles its own distinct transactions. The transport layer receives packets from the network, strips off the transport layer header, and forwards them to the transaction layer.

[0081] The universal bus protocol message format is shown in Figure 3. Specifically, the field definitions in the universal bus protocol message format are shown in Table 1 below:

[0082] Table 1

[0083] Specifically, the interface between the transaction layer of the universal bus protocol and the application is called Jetty. Application messages can be sent to any destination through a Jetty, and messages can also be received from any source through a Jetty. A Jetty that can only send is defined as Jetty For Send (JFS), while 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 by an embodiment of the present application. The hosts (such as host A, host B, and host C shown in Figure 4) can be used in the application scenario of cross-network communication shown in Figure 2. Host A and host C can be understood as source devices, and host B can be understood as target device. The source device sends remote commands to the target device.

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

[0086] Jetty, JFS, JFR, and RCT each have their own context (CXT). Several TP connections are established between two hosts (e.g., TP connection #0 to TP connection #7 shown in Figure 4, for a total of eight TP connections). These eight TP connections form a transport layer group (TPG), through which all traffic between the two hosts passes. These eight TP connections can be distributed across different physical ports, with traffic evenly distributed across the eight TP connections, achieving multi-port multi-path. TP connections and TPGs belong to the transport layer. Packets may be lost over the network between two hosts. TP connections are responsible for retransmitting lost packets to ensure end-to-end reliability. TP connections also provide end-to-end congestion control.

[0087] In FIG4 , host B includes several VMs and several processes.

[0088] The above text briefly introduces the scenarios in which the present application can be applied and the internal logic units of the host involved in combination with Figures 1 to 4. In order to facilitate 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 assigns a PSN to each packet to identify it. The PSN increments packet by packet. Upon receiving a packet, the receiving side returns a TPACK (carrying the PSN of the received packet) to inform the sending transport layer that the packet has been received correctly. If the receiving side receives a packet but finds that a packet with a smaller PSN than the one it received has not been received, it determines that the packet with a smaller PSN than the one it received was lost in the network and returns a TPSACK (carrying the PSN of the received packet and the PSN of the lost packet). The sending transport layer receives the TPSACK and retransmits the lost packet.

[0090] 2. Segment sequence number (SSN): Transaction layer messages can be quite large, for example, 16MB. In the UB protocol, multiple transaction layers share a transport layer. To prevent a single transaction layer message from occupying the transport layer connection for extended periods, the transaction layer segments the message into multiple slices before sending it to the transport layer. Each slice is assigned an SSN to identify it. The SSN increments per slice. For example, a slice is 64KB, and a transaction layer sends only 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 sending side's transaction layer that the segment has been correctly executed, or the receiving side successfully receives the message from the sending side and returns TAACK to inform the sending side's transaction layer 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 sending side's transaction layer 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 sending side's transaction layer to retransmit the message.

[0093] 5. Remote Direct Memory Access (RDMA): This technology transfers data directly to a computer's storage area over a network, rapidly moving data from one system to a remote system's memory without requiring intervention from the operating systems or kernels of either computer. RDMA eliminates the overhead of external memory copies and context switches, freeing up memory bandwidth and CPU cycles for improved application performance.

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

[0095] Specifically, before establishing an RDMA connection, a context is first created. A protection domain (PD) is created to associate a queue pair (QP) with a memory region (MR). Both parties then create a QP. 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 these queues is associated with a completion queue (CQ). To allow the RDMA network card to access memory, the memory must be registered. This type of memory, which can be freely accessed by both parties, is called RDMA-accessible memory, and the remote address is the starting virtual address of this memory region. After both parties create an MR, they each generate an 8-byte key and exchange their keys and the virtual addresses of the registered memory. Each MR contains its own key (lkey) and the remote memory key (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_CM, the native communication library of RDMA. 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 establish 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 without receiving a response. 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 you can send several more instructions based on how many write responses have been returned.

[0097] 8. Queue Resources: Hosts negotiate the maximum outstanding number of Read and Atomic operations that can be sent, and each QP sets up dedicated queue resources to store Read and Atomic commands. 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. A process is a computer program's execution of a data set. It is the basic unit of system resource allocation and the foundation of operating system architecture. In early process-oriented computer architectures, processes were the basic execution entity of programs; in modern thread-oriented computer architectures, processes are containers for threads. A program is a description of instructions, data, and their organization; a process is the entity of the program.

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

[0100] To conserve storage resources, the number of outstanding Read and Atomic messages per QP negotiated between hosts (e.g., source and destination devices) is often small, such as 128. However, if the number of outstanding Read and Atomic messages per QP is small, the Read and Atomic message rate per QP is low when the RTT is large.

[0101] To address the low Read and Atomic message rates in current resource utilization methods, this application proposes a communication method and apparatus that uses shared resources to receive Read and Atomic requests from multiple source devices, thereby saving storage resources. The communication method provided by this application will be described in detail below with reference to 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, the cross-network communication system shown in FIG. 2 .

[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, it is sufficient. For example, the execution subject of the method provided in the embodiments of the present application can be a device, or a functional module in the device that can call and execute the program.

[0104] FIG5 is a schematic flow chart of a communication method provided by the present application, which is applied in a scenario where a first host communicates with at least one second host, such as the scenario shown in FIG2 .

[0105] In the embodiment shown in Figure 5, the first host can serve as a receiving end (or called a target device (target)), and the second host can serve as a sending end (or called an initiator device (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, the method shown in FIG5 includes 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 that receives remote commands from at least one second host. For example, the first host can be host B shown in Figure 4 above. The second host can be understood as a source device. For example, the second host can be host A and / or host C shown in Figure 4 above.

[0110] As a possible implementation, a TP connection is established between the first host and each second host, and remote command messages from the second hosts are received through the TP connection. As shown in FIG4 above, 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 scope of protection of this application.

[0113] For example, 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 reference can be made to the description of the remote commands in the prior art.

[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, process #1 and process #2 are executed in the second host #1, and process #3 and process #4 are executed in the second host #2. 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 up a first RCT to store remote commands for multiple processes on at least one second host, it's possible to avoid setting up a corresponding RCT for each process, thereby enabling multiple processes to share the RCT and, in other words, achieve storage resource sharing. Furthermore, in this solution, multiple processes share a single RCT, allowing for a larger storage space in the RCT, thereby ensuring a high remote command transmission rate.

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

[0119] If the first host is configured with multiple RCTs, the priorities of the remote commands stored in the multiple RCTs are different. For example, the first host is configured with RCT#1, RCT#2, and RCT#3, and the priorities of the remote commands stored in the three RCTs are as follows: the priority of the remote commands stored in RCT#1 is higher than the priority of the remote commands stored in RCT#2, and the priority of the remote commands stored in RCT#2 is higher than the priority of the remote commands stored in RCT#3. Then, when the first host receives a message of a remote command, it can determine the priority of the remote command based on 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 the matching priority according to the priorities of the remote commands stored in the multiple RCTs.

[0120] If the first host sets up multiple RCTs, these multiple RCTs can correspond to different processes, and different processes can belong to different or the same second host. For example, connections are established between the first host and second host #1, second host #2, and second host #3. The processes in second host #1 include process #1, the processes in second host #2 include process #2, and the processes in second host #3 include process #3. The first host sets up RCT #1 and RCT #2. RCT #1 is used to store remote commands for process #1, and RCT #2 is used to store remote commands for process #2 and process #3.

[0121] It should be understood that this embodiment does not limit 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, and 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 a remote command sent by Jetty X on host #1 arrives at host #1, but the RCT on host #1 is full and discarded. Host #1 then notifies host #1 to retransmit the command. When the RCT is not full, a remote command is received from another Jetty on host #2. When another remote command is received from Jetty X on host #1, the RCT is full again, and the remote command from host #1 is discarded again. Therefore, it is possible that remote commands sent by Jetty X on host #1 are constantly being discarded (or 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 a remote command processing strategy based on the storage space usage of the first RCT.

[0126] The method flow shown in FIG5 further 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 remote command message 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. The 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 can 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 through TPACK or TPSACK.

[0132] It should be understood that this embodiment does not impose any restrictions on the method of message transmission between the second host and the first host. This embodiment mainly involves how to determine the remote command processing strategy based on the storage space usage of the first RCT in the scenario where the first host correctly receives the remote command message.

[0133] For example, the first host includes at least one virtual machine (VM). 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 receiving the remote command message from the network, the first host verifies it through the LINK layer, IP layer, and transport layer (for example, to determine whether there is packet loss based on information such as the PSN and SSN). Then, based on the Destination Entity ID (DEID), it looks up the table and finds that the destination of the remote command is VM#1. The transport layer strips the TPH and the preceding portion of the remote command message and forwards the remaining portion 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 may be represented by parameters such as the RCT storage space margin, the RCT storage space usage, the RCT storage space occupancy, the RCT storage space usage rate, or the RCT storage space utilization rate.

[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 a remote command processing strategy based on the storage space usage of the first RCT, including: the first host determines a remote command processing strategy based on 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 remote command is processed using the first processing strategy; if the used storage space of the first RCT does not exceed the first threshold, the remote command is processed using the second processing strategy. The first processing strategy and the second processing strategy are different. For example, the first processing strategy is to determine whether to accept or discard the remote command based on the type of the remote command, while the second processing strategy is to accept the remote command.

[0138] Exemplarily, the message header of the remote command may carry a first identifier, which 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 prioritize receiving remote commands with retransmissions based on the storage space usage of the first RCT.

[0139] As a possible implementation, 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. This first TANAK instructs the second host to retransmit the remote command after a first timeout. For example, the first TANAK carries instruction #1, which instructs the second host to retransmit the remote command after the first timeout period following receipt of the first TANAK. After the first host confirms receipt of the remote command, if the remote command is executed, the first host sends a response message to the second host.

[0142] Furthermore, a second threshold value can be set in the first RCT, where the second threshold value is greater than the first threshold value. As shown in FIG6 , FIG6 is a schematic diagram of setting threshold values ​​in the first RCT according to 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. The drop_new watermark is the first threshold value, and the delay_rty watermark is the second threshold value.

[0143] When a first threshold and a second threshold are set in a first RCT, the first host determines a remote command processing strategy based on the storage space usage of the first RCT, including: determining the remote command processing strategy based on 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, the remote command is processed by determining whether the used storage space of the first RCT exceeds the first threshold, and the first processing strategy and the second processing strategy are referred to based on 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. This second TANAK instructs the second host to retransmit the remote command after a second time period. For example, the second TANAK carries instruction #2, which instructs the second host to retransmit the remote command after a second time period following receipt of the second TANAK. After the first host determines to receive the remote command, if 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, if the used storage space of the first RCT exceeds the second threshold, the first RCT has stored a large number of pending remote commands and is experiencing severe congestion. Therefore, the first host can instruct the second host, through the second TANAK, to increase the retransmission interval and thereby reduce the remote command sending rate.

[0148] Exemplarily, the first host determines a remote command processing strategy based on usage of the first RCT, further comprising: if the first RCT is full, determining to discard the remote command. Furthermore, the first host sends a third TANAK to the second host, the third TANAK being used to instruct the retransmission of the remote command. For an initially transmitted remote command, the third TANAK instructs the second host to retransmit the remote command a second time period after receiving the third TANAK. For a retransmitted remote command, the third TANAK instructs the second host to retransmit the remote command a first time period after receiving the third TANAK. This ensures that the retransmitted remote command is transmitted more frequently than the initially retransmitted remote command, thereby increasing the probability of the retransmitted remote command being received compared to the initially retransmitted remote command.

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

[0150] As can be seen from step S530 above, the first host may send back a TANAK (such as the first TANAK, the second TANAK, or the third TANAK shown above) to the second host. The TANAK reaches the second host via the network, informing the second host that it will retransmit the remote command after a certain time interval (e.g., 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 reaches the second host through the network.

[0152] In the embodiment shown in FIG5 , 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 for the remote command can be determined based on the storage space usage of the first RCT. In this communication method, the first host can set up an RCT for multiple processes of at least one second host. These multiple processes share the same RCT, eliminating the need to set up a separate RCT for each process. This allows resource sharing and saves resource overhead. Furthermore, in this solution, multiple processes share the same RCT, and the storage space of the RCT can be set larger, ensuring 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 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 a 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 on the network, a transport layer selective acknowledgment (TPSACK) is returned. The TPSACK carries the PSN of the lost packet. The TPSACK is used to notify the source device side that the packet has been received correctly, but there is packet loss. The packet corresponding to the lost PSN needs to be retransmitted.

[0160] Step 5: The target device's transport layer parses the packet and determines that the packet is destined for a VM. For example, it uses a DEID lookup table to determine the packet's destination. The target device's transport layer strips the packet of the TPH and preceding sections, and passes the remaining portion to the VM.

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

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

[0163] If the RCT is full (i.e., there is no available storage space), the destination device discards the 'Read' and returns a TANAK to the source device, instructing the source device to retransmit. If the 'Read' is an initial transmission, the indication information carried in the TANAK indicates that the transmission should be retransmitted after the second time period after receiving the TANAK; if the 'Read' is a retransmission, the indication information carried in the TANAK indicates that the transmission should be retransmitted 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, instructing 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, instructing the source device to retransmit after the first 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.

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

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

[0168] As can be seen from Figure 7, 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 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. In the scenario shown in Figure 7, 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, informing 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] FIG8 is a schematic diagram of another remote command transmission provided in an embodiment of the present application.

[0170] As shown in Figure 8, there is no TP connection between the first and second hosts, and the remote command is a read request. The second host sends a read request to the first host. The first host determines the read request processing strategy based on the storage space usage of the RCT. In the scenario shown in Figure 8, 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, notifying the source device that the read request has been successfully executed.

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

[0172] As shown in Figure 9, a TPG is established between the first and second hosts, and the remote command is a read request. The second host sends a read request to the first host via the TPG. After receiving the message carrying the read request, the first host's transport layer returns a TPACK, notifying the second host that the read request has been successfully received. The first host determines the read request processing strategy based on the storage space usage of the RCT. In the scenario shown in Figure 9, the first host decides to discard the read request and sends a TANAK to the second host, instructing the source device to retransmit. After receiving the TANAK, the second host can return a TPACK, notifying the first host that the TANAK has been received.

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

[0174] As shown in Figure 10, there is no TP connection between the first and second hosts, and the remote command is a read request. The second host sends a read request to the first host. The first host determines the read request processing strategy based on the storage space usage of the RCT. In the scenario shown in Figure 10, the first host decides to discard the read request and sends a TANAK to the second host, instructing the source device to retransmit.

[0175] It should be understood that the specific examples shown in Figures 5 to 10 of the embodiments of the present application are intended only to help those skilled in the art better understand the embodiments of the present application, and do not limit the scope of the embodiments of the present application. It should also be understood that the order of the sequence numbers of the above-mentioned processes does not necessarily indicate the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[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 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 appreciate 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 a hardware or computer software driven hardware manner 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 be beyond the scope of this application.

[0178] The communication device provided in the embodiment of the present application is described in detail below with reference to Figures 11 to 13. It should be understood that the description of the device embodiment corresponds to the description of the method embodiment. Therefore, for matters not described in detail, reference can be made to the method embodiment above. For the sake of brevity, some contents are not repeated here.

[0179] In the embodiment of the present application, the functional modules of the first host or the second host can be divided according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules 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 according to each function.

[0180] FIG11 shows a schematic structural diagram of a communication device 1000 provided in an embodiment of the present application.

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

[0182] Processing unit 1120 is configured to set a first remote command table (RCT) in the first host. The first RCT is configured to store remote commands corresponding to multiple processes belonging to at least one second host. Transceiver unit 1010 is configured to receive a remote command message from any of the at least one second host. Processing unit 1120 is configured to determine a remote command processing strategy based on storage space usage of the first RCT.

[0183] As an example, in conjunction with FIG5 , the transceiver unit 1010 may be configured to execute S520 and S540 , and the processing unit 1020 may be configured to execute S510 and S530 .

[0184] It should be noted that the device shown in FIG. 11 can also be used to execute the method steps involved in the embodiment variations shown in the aforementioned 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-mentioned communication method, for example, to execute the method shown in FIG5 .

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

[0187] As an example, in conjunction with FIG5 , the transceiver unit 1010 may be configured to execute S520 and S540 .

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

[0189] The embodiment of the present application further provides a chip system 1200, as shown in FIG12 , which includes at least one processor and at least one interface circuit. As an example, when the chip system 1200 includes one processor and one interface circuit, the one processor may be the processor 1210 shown in the solid-line box in FIG12 (or the processor 1210 shown in the dashed-line box), and the one interface circuit may be the interface circuit 1220 shown in the solid-line box in FIG12 (or the interface circuit 1220 shown in the dashed-line box).

[0190] When the chip system 1200 includes two processors and two interface circuits, the two processors include the processor 1210 shown in the solid line frame and the processor 1210 shown in the dotted line frame in Figure 12, and the two interface circuits include the interface circuit 1220 shown in the solid line frame and the interface circuit 1220 shown in the dotted line frame in Figure 12. This is not limited. The processor 1210 and the interface circuit 1220 can be interconnected via a line. For example, the interface circuit 1220 can be used to receive signals (such as instructions stored in a memory, etc.). For another example, the interface circuit 1220 can be used to send signals to other devices (such as the processor 1210).

[0191] For example, the interface circuit 1220 can read instructions stored in the memory and send the instructions to the processor 1210. When the instructions are executed by the processor 1210, the communication device can perform the various steps in the above embodiment. Of course, the chip system 1200 can also include other discrete components, which are not specifically limited in this embodiment of the application.

[0192] Another embodiment of the present application further provides a computer-readable storage medium having instructions stored therein. When the instructions are executed on a communication device, the communication device executes the steps 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 on other non-transitory media or articles.

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

[0194] In one embodiment, a computer program product is provided using a signal-bearing medium 1300. The signal-bearing medium 1300 may include one or more program instructions that, when executed by one or more processors, may provide the functionality or portions of the functionality described above with respect to FIG. 5 . Thus, for example, one or more features of S510-S540 in FIG. 5 may be provided by one or more instructions associated with the signal-bearing medium 1300. Furthermore, the program instructions in FIG. 13 also depict 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, signal bearing medium 1300 may include computer recordable medium 1302 such as, but not limited to, memory, read / write (R / W) CD, R / W DVD, and 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., fiber optic cable, waveguide, wired communication link, 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 communication media 1303 .

[0199] Should be understood that the arrangement described here is only for the purpose of example. Thus, those skilled in the art will understand that other arrangements and other elements (such as, machines, interfaces, functions, sequences, and functional groups, etc.) can be used instead, and some elements can be omitted altogether 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 in conjunction with the functional entities implemented by other components.

[0200] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using a software program, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the instructions are executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[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. A computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. 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 description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A communication method, characterized in that: 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

Patent Citations

  • Communication method and communication device

    CN119544633A

  • Multi-protocol support for transactions

    CN112115090A

  • Data retransmission method and device based on optical fiber communication system, controller and medium

    CN112311502A

  • Network interface card, storage device, message receiving method and message sending method

    CN114090274A

  • Network interface card, message transmitting and receiving method and storage device

    CN115033521A