Communication method and communication apparatus

By setting a shared Remote Command Table (RCT) on the target device to store process commands from multiple source devices and optimizing processing strategies, the problems of low Read and Atomic message rates and wasted storage resources in a single QP are solved, achieving more efficient network communication.

CN120710949BActive Publication Date: 2026-04-17HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2023-08-28
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In IB and RoCE networks, the Read and Atomic message rates of a single QP are low, and storage resources are wasted, especially when the round-trip time is long.

Method used

By setting a remote command table (RCT) for shared resources on the target device, process commands from multiple source devices are stored, enabling resource sharing, optimizing storage space usage, and determining processing strategies based on storage space usage, including discarding or retransmitting remote commands.

Benefits of technology

It improves the transmission rate of remote commands, saves storage resources, avoids redundant processing and congestion, and optimizes network communication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120710949B_ABST
    Figure CN120710949B_ABST
Patent Text Reader

Abstract

A communication method and a communication apparatus are disclosed. The communication method is applied to a first host and 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 of at least one second host. The first host receives messages of remote commands from any of the at least one second host and determines a processing strategy for the remote commands based on the storage space usage of the first RCT. In this communication method, the first host can set up one RCT for multiple processes of at least one second host, and the multiple processes share one RCT, eliminating the need to set up an RCT for each process separately, thereby achieving resource sharing and saving resource overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In enterprise data centers or supercomputing centers, the network architecture used for business computing clusters is typically infinite bandwidth (IB) networks or Remote Direct Memory Access (RDMA) overconverged Ethernet (RoCE) networks. IB and RoCE networks allow the use of Remote Direct Memory Access (RDMA) technology over traditional Ethernet. Based on the mature ecosystem of traditional Ethernet, they offer significant cost advantages and their version evolution speed is much faster than other network types, making them the mainstream network choice for the future.

[0003] 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 allocated dedicated queue resources to store read and atomic commands. The larger the number of QPs, the more storage resources are available.

[0004] Currently, the number of outstanding read and atomic values ​​negotiated by the source and destination devices for a single QP is often small, for example, 128. Because the number of outstanding read and atomic values ​​per QP is limited, the read and atomic message rates of a single QP are low when the round-trip time (RTT) is large. Therefore, how to save storage resources while ensuring the read and atomic message rates of a single QP has become an urgent problem to be solved. Summary of the Invention

[0005] This application provides a communication method and apparatus that allows a target device to receive remote commands from multiple source devices using shared resources, thereby saving storage resources.

[0006] Firstly, a communication method is provided, applied to a first host. This method can be executed by the first host, or by a circuit or chip configured in the first host; this application does not limit this. For ease of description, the following explanation uses execution by the first host as an example.

[0007] 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 message of a remote command from any 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.

[0008] Based on the above technical solution, the first host acts as the target device, and the second host acts as the source device. For the first host, it is the local end, and the second host is the remote end. Commands sent by the second host are called remote commands. Specifically, in this solution, the first host is equipped with a first Remote Control Center (RCT), which 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 for the remote command based on the storage space usage of the first RCT. In this communication method, the first host can set up one RCT for multiple processes of at least one second host, and these multiple processes share one RCT, eliminating the need to set up a separate RCT for each process, thus achieving resource sharing and saving resource overhead. Furthermore, in this solution, multiple processes share one RCT, and the RCT's storage space can be set to be larger, ensuring the remote command transmission rate.

[0009] In conjunction with the first aspect, in some implementations of the first aspect, the header of the remote command includes a first identifier, which is used to identify whether the remote command is an initial remote command or a retransmitted remote command.

[0010] Based on the above technical solution, the header of the remote command sent by the second host includes a first identifier, which indicates whether the remote command is an initial 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 the remote command.

[0011] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: setting a first threshold in the first RCT; the step of 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.

[0012] In conjunction with the first aspect, in some implementations of the first aspect, determining the processing strategy for the remote command based on the first threshold and the storage space usage of the first RCT includes: if the used storage space of the first RCT exceeds the first threshold, processing the remote command using a first processing strategy; if the used storage space of the first RCT does not exceed the first threshold, processing the remote command using a second processing strategy.

[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 can be considered. Different processing strategies are adopted depending on whether the used storage space of the first RCT exceeds the first threshold. Therefore, different processing strategies of the remote command can be accurately determined based on the used storage space of the first RCT.

[0014] In conjunction with the first aspect, in some implementations of the first aspect, if the used storage space of the first RCT exceeds the first threshold, the remote command is processed using a first processing strategy, including: if the remote command is an initial remote command, then the remote command is determined to be discarded; if the remote command is a retransmitted remote command, then the remote command is determined to be received and stored 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 prioritize the processing of retransmitted remote commands, thereby avoiding the repeated discarding of a certain remote command to a certain extent.

[0016] In conjunction with the first aspect, in some implementations of the first aspect, if it is determined that the remote command will be discarded, the method further includes: sending a first transaction negative acknowledgment (TANAK), wherein the first TANAK is used to instruct the remote command to be retransmitted after a first duration.

[0017] In conjunction with the first aspect, in some 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; the step of 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 second threshold and the storage space usage of the first RCT.

[0018] In conjunction with the first aspect, in some implementations of the first aspect, determining the processing strategy for the remote command based on the second threshold and the storage space usage of the first RCT includes: if the used storage space of the first RCT exceeds the second threshold, and the remote command is an initial remote command, then determining to discard the remote command; the method further includes: sending a second transaction negation acknowledgment (TANAK), the second TANAK being used to indicate that the remote command will be retransmitted after a second duration, the second duration being longer than the first duration.

[0019] Based on the above technical solution, different thresholds can be set in the first RCT. Upon receiving a remote command, the usage level of the first RCT can be determined based on the relationship between its used storage space and the different thresholds. When the used storage space of the first RCT exceeds a second threshold, the initially transmitted remote command is discarded. Furthermore, compared to the case where the used storage space of the first RCT exceeds the first threshold, the first host instructs a longer interval for retransmitting the remote command to avoid congestion in the first RCT. For example, when the used storage space of the first RCT exceeds the second threshold, the first RCT has already stored a large number of pending remote commands, resulting in heavy congestion. Therefore, the first host can instruct the second host to increase the retransmission interval and reduce the remote command transmission rate through the second TANAK.

[0020] In conjunction with the first aspect, in some implementations of the first aspect, determining the processing strategy for the remote command based on the usage of the RCT includes: if the first RCT is full, determining to discard the remote command; the method further includes: sending a third transaction negation acknowledgment (TANAK), the third TANAK being used to indicate retransmission of the remote command; if the remote command is a retransmitted remote command, the third TANAK being used to indicate retransmission of the remote command after a first duration.

[0021] Based on the above technical solution, if the first host receives a message containing a remote command and the first RCT is full, then regardless of whether the remote command is an initial transmission or a retransmission, the first host will discard the remote command and instruct the source device to retransmit it. For an initial transmission of a remote command, the second host retransmits the remote command after a second duration following the third TANAK. For a retransmitted remote command, the third TANAK instructs the second host to retransmit the remote command after a first duration following the third TANAK, so that the transmission frequency of the 'retransmitted remote command' is higher than that of the 'initial retransmission of the remote command', thereby making the 'retransmitted remote command' more likely to be received than the 'initial retransmission of the remote command'.

[0022] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: setting a second RCT in the first host, wherein remote commands stored in the first RCT and remote commands stored in the second RCT are 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 be configured with multiple RCTs. For example, RCTs can be configured for different processes, with each RCT corresponding to multiple processes. Alternatively, multiple RCTs can be configured for remote commands of different priorities.

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

[0025] In conjunction with the first aspect, in some implementations of the first aspect, the remote command includes a Read request or an Atomic request.

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

[0027] Secondly, a communication method is provided, applied to a second host. This method can be executed by the second host, or by a circuit or chip configured in the second host; this application does not limit this. For ease of description, the following explanation uses execution by the second host as an example.

[0028] The communication method includes: generating a message of a remote command, wherein the header of the message of the remote command includes a first identifier, the first identifier being used to identify whether the remote command is an initial remote command or a retransmitted remote command; and sending the message of the remote command to a first host.

[0029] In conjunction 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 duration; 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 duration, the second duration being longer than the first duration.

[0030] The technical effects of the methods shown in the second aspect and its possible designs above can be referred to the technical effects in the first aspect and its possible designs.

[0031] Thirdly, a communication device is provided, comprising: a storage module for storing a program; and a processing module for executing the program stored in the storage module. When the program stored in the storage module is executed, the processing module executes the methods provided in the above aspects.

[0032] Fourthly, a computer-readable storage medium is provided that stores program code for execution by a device, the program code including methods for performing the methods provided in the above aspects.

[0033] Fifthly, a computer program product containing instructions is provided, which, when run on a computer, causes the computer to perform the methods provided in the above aspects.

[0034] In a sixth aspect, a chip is provided, the chip including a processing module and a communication interface, the processing module reading instructions stored in a memory through the communication interface for executing the methods provided in the above aspects.

[0035] Optionally, as one implementation, the chip may further include a storage module storing instructions, and the processing module is used to execute the instructions stored in the storage module. When the instructions are executed, the processing module is used to perform the methods provided in the above aspects.

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

[0037] Eighthly, a computer system is provided, the computer system including the chip shown in the seventh aspect.

[0038] Ninthly, a terminal device is provided, which includes 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 performing the methods provided in the first aspect and a second host for performing the methods provided in the second aspect. Attached Figure Description

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

[0041] Figure 2 This is a schematic diagram of a data center provided in an embodiment of this application.

[0042] Figure 3 This is a schematic diagram of a general bus protocol message format provided in an embodiment of this application.

[0043] Figure 4 This is a schematic diagram of the structure of a host provided in an embodiment of this application.

[0044] Figure 5 This is a schematic flowchart of a communication method provided in this application.

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

[0046] Figure 7 This is a schematic diagram of a remote command transmission provided in an embodiment of this application.

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

[0048] Figure 9 This is a schematic diagram of another remote command transmission provided in the embodiments of this application.

[0049] Figure 10 This is a schematic diagram of another remote command transmission provided in the embodiments of this application.

[0050] Figure 11 A schematic diagram of the structure of a communication device 1100 provided in an embodiment of this application is shown.

[0051] Figure 12 A schematic diagram of the structure of a chip system 1200 provided in an embodiment of this application is shown.

[0052] Figure 13 A conceptual partial view of a computer program product provided in an embodiment of this application is shown schematically. Detailed Implementation

[0053] To facilitate understanding of the embodiments of this application, the following points are provided.

[0054] First, in this application, "at least one" refers to one or more, and "more than one" refers to two or more. Furthermore, in the embodiments of this application, "first," "second," and various numerical designations (e.g., "#1," "#2," etc.) are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application. The sequence numbers of the processes below do not imply an order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. It should be understood that the objects described in this way can be interchanged where appropriate to describe solutions other than those in the embodiments of this application. Moreover, in the embodiments of this application, terms such as "S510" are merely identifiers for descriptive convenience and do not limit the order of execution steps.

[0055] Second, in the embodiments of this application, the words "exemplary" or "for example" are used to indicate that they are examples, illustrations, or descriptions. Any embodiment or design that is described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design options. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0056] Third, the term "storage" in the embodiments of this application can refer to storage in one or more memories. These memories can be separate installations or integrated into an encoder, decoder, processor, or communication device. Alternatively, some memories can be separately installed, while others are integrated into the decoder, processor, or communication device. The type of memory can be any form of storage medium, and this application does not limit this.

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

[0058] Fifth, the word "if" in the embodiments of this application can be interpreted as meaning "when" or "upon" or "in response to determination" or "in response to detection". Similarly, depending on the context, the phrase "if it is determined..." or "if [the stated condition or event] is detected" can be interpreted as meaning "when it is determined..." or "in response to determination..." or "when [the stated condition or event] is detected" or "in response to detection of [the stated condition or event]".

[0059] Sixth, the terminology used in the description of the various examples in the embodiments of this application is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and in the appended claims, the numerical forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0060] Seventh, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0061] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0062] This application relates to the configuration space of a processor in a computer system accessing 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 structure of a computer system is described below.

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

[0064] Processor 101 includes at least one core. This core is also called a computing engine. Each core can execute tasks independently. When processor 101 includes multiple cores, tasks from applications can be divided, allowing applications to fully utilize multiple cores and execute more tasks within a given time. In this embodiment, processor 101 can be a main processor, such as a Central Processing Unit (CPU).

[0065] Input / output device 102 refers to a hardware device capable of inputting and / or outputting data. Input / output device 102 can be divided into 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 monitor and speakers.

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

[0067] 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 memory 103. See also Figure 1 In the pyramid-shaped memory architecture, cache 104 is located in the second layer from the top, second only to the registers of processor 101. Figure 1 (Not shown in the image), above memory 103 (memory 103 is located in the third layer from top to bottom). 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.

[0068] The memory management unit 105 is a type of computer hardware used to process data access requests. Specifically, the memory management unit 105 maps virtual addresses (VAs) in data access requests. Specifically, the memory management unit 105 can intercept data access requests issued by the processor 101's core and map (or translate) the virtual addresses in the data access requests into physical addresses (PAs), so that memory 103 can be accessed based on those physical addresses.

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

[0070] Secondary storage 107, also known as external memory or secondary storage, is typically used for persistent data storage. For example, secondary storage 107 can persistently store computational data from processor 101. Even in the event of a power failure, data already written to secondary storage 107 can still be preserved, preventing data loss. In specific implementations, secondary storage 107 includes at least one non-volatile memory 1071. When secondary storage includes multiple non-volatile memories, these memories can be of the same type or different types. For example, in... Figure 1In the example, external storage 107 may include two types of non-volatile memory, such as storage class memory (SCM) and solid state drive (SSD).

[0071] Bus 108 is used to connect the various functional components of a computer system. Bus 108 is the common communication trunk for transmitting information between the various functional components of the computer system. Bus 108 can be a transmission line bundle formed by wires. Depending on the objects being connected, bus 108 can also be divided into internal bus and 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 computer system's memory space. The external bus uses an external bus protocol to transmit information. The external bus protocol includes a bus protocol for accessing the computer system's external storage space. Here, memory space refers to the address space of main memory, and external storage space refers to the address space of secondary storage.

[0073] In some embodiments, the internal bus protocol includes, but is not limited to, the Peripheral Component Interconnect (PCI) bus, the PCI Express (PCIe) protocol, the Intel™ 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 using external memory 107 as a remote external memory. Figure 1 As shown, external storage 107 includes a network interface card (NIC) 1072. This NIC 1072 can be, for example, a smart NIC (network interface card) (i.e., a network adapter card). External storage 107 accesses the network through this NIC 1072, and then connects to other components of the computer system 101 via the network. The network can be a wired communication network, such as a fiber optic 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 computer system's external storage 107 can also be local external storage, and other components of the computer system, such as the processor 101, can be connected to the aforementioned local external storage via bus 108. In other possible implementations, the computer system can include both remote external storage and local external storage. Furthermore, the embodiments of this application can be applied to centralized storage or distributed storage scenarios, and this embodiment does not limit them.

[0076] For example, the method of accessing the configuration space register of a bus device provided in this application embodiment can also be applied to Figure 2 The server cluster shown represents cross-network communication, such as... Figure 2 The data center shown. Among them, Figure 2 The internal structure of the switch or server shown above is as described. Figure 1 As shown in the image.

[0077] Furthermore, the internal bus protocols supported by the computer systems involved in this application include general-purpose bus protocols, enabling the establishment of transport layer connections between computer systems. These general-purpose bus protocols can also be referred to as Lingqu bus protocols or unified bus protocols; they are a type of bus protocol standard, and this application does not limit the name of this general-purpose bus protocol.

[0078] The Universal Bus Protocol breaks down existing protocol barriers and eliminates unnecessary intermediate conversion overhead, thereby achieving extremely low latency. The Universal Bus Protocol defines independent Transaction (TA) and Transport (TP) layers. There are connections between transport layers, but no connections between transaction layers. For a host, there is no connection between the transaction layers of two hosts, but there is a connection between the transport layers. Therefore, all transactions of either host are transmitted at the transport layer. The Universal Bus Protocol includes a transport layer and a transaction layer. The transport layer is responsible for retransmitting lost packets and ensuring reliable transmission, while the transaction layer handles its respective transactions. The transport layer receives packets from the network, removes the transport layer header, and forwards them to the transaction layer.

[0079] The general bus protocol message format is as follows: Figure 3 As shown in Table 1 below, the specific field definitions in the general bus protocol message format are as follows:

[0080] Table 1

[0081]

[0082]

[0083] Specifically, the interaction interface between the transaction layer and the application in the general bus protocol is called a Jetty. Application messages can be sent to any destination through a single Jetty, and messages can be received from any source through a single 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 This is a schematic diagram of the structure of a host provided in an embodiment of this application. The host (e.g.) Figure 4 The hosts A, B, and C shown can be applied to Figure 2 In the cross-network communication application scenario shown, host A and host C can be understood as source devices, and host B can be understood as the target device. The source device sends remote commands to the target device.

[0085] like Figure 4 As shown, host B contains several Virtual Machines (VMs). Each VM contains several processes and several Remote Command Tables (RCTs) for receiving remote commands (e.g., the Read command). Each process corresponds to several communication interfaces (e.g., Jetty), send-only communication interfaces (e.g., JFS), and send-only communication interfaces (e.g., JFR). Process-related messages can be transmitted through their corresponding communication interfaces. Jetty is bidirectional, capable of both sending and receiving; JFS is unidirectional, capable of sending only; and JFR is unidirectional, capable of receiving only.

[0086] Jetty, JFS, JFR, and RCT each have their own context (CXT). Several TP connections are established between two hosts (e.g., ...). Figure 4 The diagram shows TP connections #0 to #7 (a total of 8 TP connections). These 8 TP connections form a Transport Group (TPG), through which all traffic between the two hosts passes. These 8 TP connections can be distributed across different physical ports, allowing traffic to be evenly distributed among them, achieving multi-port multi-pathing. TP connections and TPGs belong to the transport layer. Since traffic between the two hosts traverses a network, packet loss may occur. TP connections are responsible for retransmitting lost packets, ensuring end-to-end reliability. TP connections are also responsible for end-to-end congestion control.

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

[0088] The above text combines Figures 1 to 4This paper briefly introduces the application scenarios and the internal logic units of the host involved. In order to facilitate understanding of the embodiments of this application, some basic concepts involved in this application are briefly explained.

[0089] 1. Packet Sequence Number (PSN): When the sending transport layer sends a packet, it assigns a PSN to each packet to identify it. The PSN increments with each packet. When the receiving side receives a packet, it returns a TPACK (carrying the PSN of the received packet) to inform the sending transport layer that the packet has been correctly received. If the receiving side receives a packet and finds that a packet with a smaller PSN has not been received, it determines that the 'packet with a smaller PSN' was lost in the network and returns a TPSACK (carrying the PSN of the received packet and the PSN of the lost packet). Upon receiving the TPSACK, the sending transport layer retransmits the lost packet.

[0090] 2. Segment Sequence Number (SSN): Messages from the transaction layer may be large, such as 16MB. In the UB protocol, multiple transaction layers share a single transport layer. To prevent a message from a single transaction layer from occupying the transport layer connection for an extended period, the transaction layer divides the message into multiple segments when sending it to the transport layer, assigning each segment an SSN to identify it. The SSN increments with each segment; for example, if a segment is 64KB, a transaction layer sends only one segment 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 (e.g., correctly reads or writes memory), it returns TAACK to inform the sending side's transaction layer that the segment has been executed correctly. Alternatively, the receiving side can return TAACK to inform the sending side's transaction layer that the message has been successfully received if it successfully receives the message from the sending side.

[0092] 4. Transaction No OK ACK (TANAK): If the receiving side receives a segment and an error occurs (e.g., 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 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 allows data to be directly transferred from one computer to another's memory over a network, enabling rapid data movement from one system to a remote system without the need for the operating systems or kernels of both computers to intervene. RDMA eliminates the overhead of external memory copying and context switching, thus freeing up memory bandwidth and CPU cycles to improve application performance.

[0094] 6. Queue Pair (QP): One QP is connected to another QP. For example, a message in the send queue of one QP is transmitted to the receive queue of another QP.

[0095] Specifically, before establishing a connection, RDMA first creates a context and a Protection Domain (PD) to associate queue pairs (QPs) with memory regions (MRs). Then, both parties create QPs, each containing two first-in-first-out (FIFO) work queues: a send queue (SQ) for sending requests and a receive queue (RQ) for receiving requests, each associated with a completion queue (CQ). To allow the RDMA network card access to memory, the memory needs to be registered. This type of memory, accessible to both parties, is called RDMA-enabled memory, and the remote address is the starting virtual address of this memory region. After creating MRs, both parties generate an 8-byte key, which they exchange with the virtual address 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 using the native RDMA communication library RDMA_CM. On average, it takes between 1ms and 5ms to create each connection. With a payload of 32 bytes, RDMA has a delay of about 4us per connection. Therefore, in order to create a connection, it is necessary to delay the sending of hundreds of network data packets.

[0096] 7. Outstanding Count: Outstanding refers to the host's ability to initiate multiple read and write transactions without receiving a response. Suppose N instructions have been sent. If no write response is returned during this period, the host must wait for the write response to return before it can continue to send commands through the address channel. If a write response is returned, the number of write responses returned determines the number of instructions that can be sent.

[0097] 8. Queue Resources: The maximum number of outstanding read and atomic operations that can be sent is negotiated between hosts. Each QP has its own dedicated queue resource to store read and atomic commands, and queue resources are not shared between QPs. The larger the number of QPs, the more storage resources are required. For example, if 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 corresponding read and atomic commands transmitted by the QPs; similarly, host B needs to set up queue resources for QP#1 and QP#2 respectively to store the corresponding read and atomic commands transmitted by the QPs.

[0098] 9. Process: A process is an instance of a program running on a specific set of data in a computer. It is the basic unit for resource allocation in a system and the foundation of the operating system structure. In early process-oriented computer architectures, a process was the basic execution entity of a program; in contemporary thread-oriented computer architectures, a process is a container for threads. A program is a description of instructions, data, and their organization; a process is the entity within a program.

[0099] The above text combined Figure 2 This paper briefly introduces the scenarios in which the communication method provided in this application is applicable, as well as the basic concepts involved in this application. The basic concepts include QP and queue resources; the larger the network scale, the more QP connections are required, and the greater the consumption of queue storage resources.

[0100] To conserve storage resources, the number of outstanding Read and Atomic values ​​negotiated between hosts (e.g., source and target devices) for a single QP is often small, such as 128. However, if the number of outstanding Read and Atomic values ​​for a single QP is small, the Read and Atomic message rate of a single QP will be low when the RTT is large.

[0101] To address the issue of low Read and Atomic message rates in current resource utilization methods, this application proposes a communication method and apparatus that allows a target device to receive Read and Atomic requests from multiple source devices using shared resources, thereby saving storage resources. The communication method provided in 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 this application can be applied to computer systems, for example, Figure 2 The cross-network communication system shown.

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

[0104] Figure 5 This is a schematic flowchart illustrating a communication method provided in this application. It is applied to scenarios where communication occurs between a first host and at least one second host, such as... Figure 2 In the scene shown.

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

[0106] For example, the first host can be a physical machine or a virtual machine. If the first host is a virtual machine, the steps performed by the first host can be performed 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 performed by the second host can be performed by the virtual machine.

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

[0108] S510, the first host sets the first RCT.

[0109] In this embodiment, the first host can be understood as the target device, receiving remote commands sent from at least one second host. For example, the first host can be one of the following: Figure 4 The host shown is B. The second host can be understood as the source device; for example, the second host could be the one mentioned above. Figure 4 Host A and / or host C are shown in the diagram.

[0110] As one possible implementation, a TP connection is established between the first host and each second host, through which remote command messages from the second hosts are received. (As mentioned above...) 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, when the link has a retransmission mechanism to ensure reliable transmission, it is not necessary 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. The message of the remote command from the second host can be received through the link layer connection.

[0112] It should be noted that the specific form of the first host and the second host is 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] For example, the remote commands involved in this embodiment include, but are not limited to, Read and / or Atomic requests. This application does not limit the format and content of remote commands; please refer to the descriptions of 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, which belong to at least one second host.

[0115] For example, a first host communicates with a second host #1 and a 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 the remote commands corresponding to process #1, process #2, process #3 and process #4.

[0116] It should be understood that in this embodiment, the remote commands of multiple processes can be understood as remote commands received by the first host through Jetty. 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 from multiple processes on at least one second host, this avoids the need to set up a separate RCT for each process, enabling multiple processes to share the RCT, thus achieving shared storage resources. Furthermore, since multiple processes share a single RCT in this scheme, the RCT's storage space can be set to be larger, ensuring a high remote command transmission rate.

[0118] For example, setting a first RCT by the first host includes setting at least one RCT, wherein the first RCT is any one of the at least one RCTs.

[0119] If the first host has multiple Remote Command Transmission Centers (RCTs), the remote commands stored in these RCTs are processed with different priorities. For example, if the first host has RCT#1, RCT#2, and RCT#3, and the remote commands stored in these three RCTs are processed with the following priority: remote commands stored in RCT#1 have a higher priority than those stored in RCT#2, and remote commands stored in RCT#2 have a higher priority than those stored in RCT#3, then when the first host receives a message containing a remote command, it can determine the priority of the remote command based on the priority indication information carried in the message, and forward the received remote command to the RCT with the matching priority according to the order of priority among the multiple RCTs.

[0120] If the first host sets up multiple Remote Command Transmission Tables (RCTs), these RCTs can correspond to different processes, and these different processes can belong to different or the same second host. For example, when establishing connections between the first host and second hosts #1, #2, and #3, processes in second host #1 include process #1, processes in second host #2 include process #2, and 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 processes #2 and #3.

[0121] It should be understood that the specific number of RCTs set by the first host is not limited in this embodiment. For example, if the first host receives remote commands corresponding to P processes from N second hosts, 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 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, when the RCT is full, the first host is forced to discard the received remote commands. There may be a situation where remote commands issued by a process in a certain second host are continuously discarded.

[0124] For example, suppose a remote command sent by Jetty X of second host #1 arrives at first host, but the RCT (Redirect Transmission Check) on first host is full, so the command is dropped, and first host notifies second host #1 to retransmit. When the RCT is not full, it receives a remote command sent by Jetty X of second host #2. When it receives another remote command from Jetty X of second host #1, the RCT is full again, and the remote command from second host #1 is dropped again. Therefore, it is possible for remote commands sent by Jetty X of second host #1 to be continuously dropped (or starved).

[0125] To reduce the risk that remote commands from processes on a second host will be continuously dropped, 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 message of a remote command from the second host.

[0128] The second host can be any one of the above-mentioned second hosts.

[0129] As one possible implementation, the second host can send remote command messages to the first host via 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 a 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 packet loss is found in the network, a transport selective ACK (TPSACK) is returned. The TPSACK carries the PSN and 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 should be retransmitted'.

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

[0132] It should be understood that this embodiment does not impose any limitations on the message transmission method between the second host and the first host. This embodiment mainly involves how to determine the processing strategy of the remote command based on the storage space usage of the first RCT, assuming that 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 these VMs. After receiving the remote command message from the network, the first host verifies it through the LINK layer, IP layer, and transport layer (e.g., determining whether packet loss exists based on PSN, SSN, etc.), and looks up the destination entity ID (DEID) to find that the destination of the remote command is VM#1. The transport layer strips the TPH and preceding parts of the remote command message, and forwards the remaining part to VM#1.

[0134] S530: The first host determines the processing strategy for remote commands 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 RCT's remaining storage space, the RCT's used storage space, the RCT's storage space occupancy rate, the RCT's storage space utilization rate, or the RCT's storage space utilization rate.

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

[0137] Specifically, when a first threshold is set in the first RCT, the first host determines the processing strategy for the remote command based on the storage space usage of the first RCT. This includes: the first host determining the processing strategy for the remote command 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 and second processing strategies are different; for example, the first processing strategy determines whether to receive or discard the remote command based on its type, while the second processing strategy is to receive it.

[0138] For example, the header of the remote command packet may carry a first identifier, which is used to identify whether the remote command is an initial remote command or a retransmitted remote command. This first identifier may be called a retransmission flag. The first host may prioritize receiving remote commands with retransmission based on the storage space usage of the first RCT.

[0139] As one possible implementation, if the used storage space of the first RCT exceeds the first threshold, the above-mentioned first processing strategy is related to whether the remote command received by the first host is an initial remote command or a retransmitted remote command.

[0140] For example, if the remote command is an initial remote command, then the remote command is discarded; if the remote command is a retransmitted remote command, then the remote command is received and stored in the first RCT.

[0141] In this implementation, after the first host determines that it will 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 set of time. For example, the first TANAK carries indication information #1, which instructs the second host to retransmit the remote command after a first set of time following the receipt of the first TANAK. After the first host determines that it has received 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 can be set in the first RCT, which is greater than the first threshold. For example... Figure 6 As shown, Figure 6 This is a schematic diagram illustrating the setting of thresholds in the first RCT provided in an embodiment of this application. For example, the first host sets a drop_new watermark and a delay_rty watermark in the first RCT. The drop_new watermark is the first threshold, and the delay_rty watermark is the second threshold.

[0143] When a first threshold and a second threshold are set in the first RCT, the first host determines the processing strategy for remote commands based on the storage space usage of the first RCT. This includes determining the processing strategy for remote commands 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, a third processing strategy is used to process the remote command; 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 first threshold, and the first and second processing strategies are applied based on the determination result.

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

[0145] For example, if the remote command is an initial remote command, then the remote command is discarded; if the remote command is a retransmitted remote command, then the remote command is received and stored in the first RCT.

[0146] In this implementation, after the first host determines that it has discarded 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 set of time. For example, the second TANAK carries indication information #2, which instructs the second host to retransmit the remote command after a second set of time following the receipt of the second TANAK. After the first host determines that it has received 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 longer than the first duration mentioned above; 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 already stored a large number of remote commands to be processed, and the congestion is severe. Therefore, 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] For example, the first host determines the processing strategy for remote commands based on the usage of the first RCT, and further includes: if the first RCT is full, determining to discard the remote command. The first host then sends a third TANAK to the second host. The third TANAK is used to instruct the retransmission of the remote command. For the initially transmitted remote command, the third TANAK instructs the second host to retransmit the remote command after a second time interval following the receipt of the third TANAK. For retransmitted remote commands, the third TANAK instructs the second host to retransmit the remote command after a first time interval following the receipt of the third TANAK, so that the frequency of 'retransmitted remote commands' is higher than that of 'first retransmitted remote commands', thereby making it more likely that 'retransmitted remote commands' will be received than 'first retransmitted remote commands'.

[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 a TANAK (such as the first TANAK, second TANAK, or third TANAK shown above) to the second host. The TANAK travels through the network to the second host, informing the second host that it needs to retransmit the remote command after a certain time interval (e.g., a first time interval or a second time interval).

[0151] The first host may send a response message to the second host, and the response message travels through the network to reach the second host.

[0152] Figure 5In the illustrated embodiment, the first host is equipped with a first Remote Command Transmission Center (RCT), which 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 for the remote command based on the storage space usage of the first RCT. In this communication method, the first host can set up one RCT for multiple processes of at least one second host, and these multiple processes share one RCT, eliminating the need to set up a separate RCT for each process, thereby achieving resource sharing and saving resource overhead. Furthermore, in this scheme, multiple processes share one RCT, and the storage space of the RCT can be set to be larger, ensuring the remote command transmission rate.

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

[0154] To facilitate understanding, the communication methods provided in this application are illustrated with specific examples.

[0155] Example 1: This example illustrates a scenario where the remote command is a read request, and a TPG is established between the target and source devices. Example 1 includes the following steps:

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

[0157] Step 2: The source device's JFS sends 'Read' to TPG and encapsulates it into TPH.

[0158] Step 3: The source device's Link layer encapsulates the Link header to obtain a 'Read' message. This '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: When the target device's transport layer receives the packet, if the packet verification passes, it returns a TPACK (Transport Layer Acknowledgment) to the source device. This TPACK is used to notify the source device's transport layer that 'the packet has been received correctly'. If the PSN in the TPH is checked and packet loss is found, a Transport Selective ACK (TPSACK) is returned. This TPSACK carries the PSN of the lost packet and is used to notify the source device 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 target device's transport layer parses the packet to determine its destination as a virtual machine (VM). For example, the destination can be determined by looking up the DEID in a table. The target device's transport layer removes the TPH and preceding portions of the packet, and forwards the remaining portion to the VM.

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

[0162] For example, when the VM on the target device receives a 'Read' message, it checks if 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 the initial transmission, the indication information carried in the TANAK indicates that the transmission should be retransmitted after the second time interval 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 interval after receiving the TANAK.

[0164] If the RCT is not full, but the RCT depth exceeds the delay_rty watermark, if 'Read' is the first transmission, return TANAK to the source device, informing the source device to retransmit after the second time interval following the receipt of TANAK; if 'Read' is a retransmission, receive this 'Read', store it in the RCT, and return a read response when 'Read' is executed.

[0165] If the RCT is not full, but the RCT depth exceeds the drop_new watermark but not the delay_rty watermark, if 'Read' is a new transmission, return TANAK to the source device, informing the source device to retransmit after the first duration following the receipt of TANAK; if 'Read' is a retransmission, receive this 'Read', store it in the RCT, and return a read response (ReadResponse) when 'Read' is executed.

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

[0167] Figure 7 This is a schematic diagram of a remote command transmission provided in an embodiment of this application.

[0168] from Figure 7As can be seen, a TPG is established between the first and second hosts, and the remote command is a read response. The second host sends a read response to the first host via the TPG. After receiving the message carrying the read response, the first host's transport layer returns a TPACK to notify the second host that the read response has been correctly received. The first host determines the processing strategy for the read response based on the RCT's storage space usage. Figure 7 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. 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 This is a schematic diagram of another remote command transmission provided in an embodiment of this application.

[0170] from Figure 8 As can be seen, 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, and the first host determines the processing strategy for 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, informing the source device that the read request has been successfully executed.

[0171] Figure 9 This is a schematic diagram of another remote command transmission provided in the embodiments of this application.

[0172] from Figure 9 As can be seen, 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 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 RCT's storage space usage. Figure 9 In the scenario shown, the first host decides to discard the read request. The first host 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] Figure 10 This is a schematic diagram of another remote command transmission provided in an embodiment of this application.

[0174] from Figure 10As can be seen, 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, and the first host determines the processing strategy for the read request based on the storage space usage of the RCT. Figure 10 In the scenario shown, the first host decides to discard the read request and sends a TANAK to the second host, informing the source device to retransmit.

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

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

[0177] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0178] The following, combined with Figures 11 to 13 This application provides a detailed description of the communication device provided in its embodiments. It should be understood that the descriptions of the device embodiments correspond to the descriptions of the method embodiments; therefore, any content not described in detail can be found in the above method embodiments. For brevity, some content is omitted.

[0179] This application embodiment can divide the first host or the second host into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. The following description uses the division of functional modules according to each function as an example.

[0180] Figure 11 A schematic diagram of the structure of a communication device 1000 provided in an embodiment of this application is shown.

[0181] In one example, communication device 1100 can be applied to a first host, and communication device 1000 can be used to perform the above-described communication method, for example, to perform... Figure 5 The method is shown. 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 being used to store remote commands corresponding to multiple processes, the multiple processes belonging to at least one second host. Transceiver unit 1010 is configured to receive messages of remote commands from any of the at least one second host. Processing unit 1120 is configured to determine a processing strategy for the remote commands based on the storage space usage of the first RCT.

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

[0184] It should be noted that, Figure 11 The device described above can also be used to perform the method steps involved in the variations of the embodiments shown in the foregoing figures, which will not be repeated here.

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

[0186] Processing unit 1120 is configured to generate a message of a remote command, wherein the header of the remote command message includes a first identifier, which is used to identify whether the remote command is an initial remote command or a retransmitted remote command. Transceiver unit 1110 is configured to send the message of the remote command to a first host.

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

[0188] It should be noted that, Figure 11 The device described above can also be used to perform the method steps involved in the variations of the embodiments shown in the foregoing figures, which will not be repeated here.

[0189] This application also provides a chip system 1200, such as... Figure 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 one processor and one interface circuit, the processor can be... Figure 12 The processor 1210 shown in the solid box (or the processor 1210 shown in the dashed box) can be an interface circuit. Figure 12 The interface circuit 1220 is shown in the solid box (or the interface circuit 1220 is shown in the dashed box).

[0190] When the chip system 1200 includes two processors and two interface circuits, then the two processors include Figure 12 The processor 1210 shown in the solid box and the processor 1210 shown in the dashed box, these two interface circuits include Figure 12 Interface circuit 1220 is shown in both solid and dashed boxes. This is not a limitation. Processor 1210 and interface circuit 1220 can be interconnected via lines. For example, interface circuit 1220 can be used to receive signals (e.g., instructions stored in memory). As another example, interface circuit 1220 can be used to send signals to other devices (e.g., processor 1210).

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

[0192] Another embodiment of this application provides a computer-readable storage medium storing instructions that, when executed on a communication device, cause the communication device to perform the various steps of the method flow shown in the above-described method embodiments. 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 of art.

[0193] Figure 13A conceptual partial view of a computer program product provided in an embodiment of this application is shown schematically. The computer program product includes a computer program for executing computer processes on a computer device.

[0194] In one embodiment, a computer program product is provided using a signal bearer medium 1300. The signal bearer medium 1300 may include one or more program instructions that, when executed by one or more processors, can provide the above-mentioned... Figure 5 The described function or part of the function. Therefore, for example, refer to... Figure 5 One or more features of S510 to S540 can be assumed by one or more instructions associated with the signal carrying medium 1300. Furthermore, Figure 13 The program instructions in the document also describe example instructions.

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

[0196] In some implementations, the signal carrying 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, and so on.

[0197] In some implementations, the signal-bearing medium 1300 may include a communication medium 1303, such as, but not limited to, digital and / or analog communication media (e.g., fiber optic cables, waveguides, wired communication links, wireless communication links, etc.). The signal-bearing medium 1300 may be transmitted by a wireless communication medium 1303. One or more program instructions may be, for example, computer-executable instructions or logical implementation instructions.

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

[0199] It should be understood that the arrangements described herein are for illustrative purposes only. Therefore, those skilled in the art will understand that other arrangements and other elements (e.g., machines, interfaces, functions, sequences, and functional groups, etc.) can be used instead, and some elements may be omitted depending on the desired outcome. Furthermore, many of the described elements are functional entities that can be implemented as discrete or distributed components, or in any suitable combination and location with other components.

[0200] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, it can be implemented, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When executed on a computer and when the computer execution instructions are executed, all or part of the processes or functions according to the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0201] Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium can be any available medium that a computer can access, or it can include one or more data storage devices such as servers or data centers that can be integrated with media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic 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 this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A communication method, characterized in that, Applied to a first host, the method includes: A first remote command table (RCT) is set in the first host. The first remote command table (RCT) is used to store remote commands corresponding to multiple processes, and the multiple processes belong to one or more second hosts. Receive a message of a remote command from any of the one or more second hosts, and determine the processing strategy of the remote command based on the storage space usage of the first remote command table (RCT).

2. The method according to claim 1, characterized in that, The header of the remote command includes a first identifier, which is used to identify whether the remote command is an initial remote command or a retransmitted remote command.

3. The method according to claim 2, characterized in that, The method further includes: Set a first threshold in the first remote command table RCT; The step of determining the processing strategy for the remote command based on the storage space usage of the first remote command table (RCT) includes: The processing strategy for the remote command is determined based on the first threshold and the storage space usage of the first remote command table (RCT).

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

5. The method according to claim 4, characterized in that, If the used storage space of the first remote command table (RCT) exceeds the first threshold, the remote command is processed using a first processing strategy, including: If the remote command is an initial remote command, then the remote command is discarded. If the remote command is a retransmitted remote command, then the remote command is received and stored in the first remote command table RCT.

6. The method according to claim 5, characterized in that, If it is determined that the remote command will be discarded, the method further includes: Send a first transaction negation response (TANAK), which indicates that the remote command should be retransmitted after a first duration following receipt of the first transaction negation response (TANAK).

7. The method according to any one of claims 3 to 6, characterized in that, The method further includes: A second threshold is set in the first remote command table (RCT), where the second threshold is greater than the first threshold. The step of determining the processing strategy for the remote command based on the storage space usage of the first remote command table (RCT) includes: The processing strategy for the remote command is determined based on the second threshold and the storage space usage of the first remote command table (RCT).

8. The method according to claim 7, characterized in that, The step of determining the processing strategy for the remote command based on the second threshold and the storage space usage of the first remote command table (RCT) includes: If the used storage space of the first remote command table (RCT) exceeds the second threshold, and the remote command is an initial remote command, then the remote command is determined to be discarded. The method further includes: Send a second transaction negation response (TANAK), which indicates that the remote command should be retransmitted after a second duration longer than the first duration.

9. The method according to any one of claims 2 to 6, characterized in that, The step of determining the processing strategy for the remote command based on the usage of the first remote command table (RCT) includes: If the first remote command table (RCT) is full, determine to discard the remote command; The method further includes: Send a third transaction negative response (TANAK), which is used to indicate the retransmission of the remote command. If the remote command is a retransmitted remote command, the third transaction negative acknowledgment (TANAK) is used to indicate that the remote command should be retransmitted after a first duration following receipt of the third transaction negative acknowledgment (TANAK).

10. The method according to any one of claims 1 to 6, characterized in that, The method further includes: In the first host, a second RCT is set up, where the remote commands stored in the first remote command table RCT and the remote commands stored in the second RCT are processed with different priorities; or, the processes corresponding to the second RCT and the first remote command table RCT are different.

11. The method according to any one of claims 1 to 6, characterized in that, The method further includes: A transport layer connection group (TPG) is established between the first host and the one or more second hosts respectively.

12. The method according to any one of claims 1 to 6, characterized in that, The remote commands include Read requests or Atomic requests.

13. The method according to any one of claims 1 to 6, characterized in that, The message receiving a remote command from any one of the one or more second hosts includes: The communication interface Jetty receives messages of remote commands from any one of the one or more second hosts. The Jetty is used to receive messages of remote commands from the one or more second hosts.

14. A communication method, characterized in that, include: The first host sets up a first remote command table (RCT) in the first host. The first remote command table (RCT) is used to store remote commands corresponding to multiple processes, and the multiple processes belong to one or more second hosts. The second host sends a message of remote command to the first host, wherein the second host is any one of the one or more second hosts; The first host determines the processing strategy for the remote command based on the storage space usage of the first remote command table (RCT).

15. A communication system, characterized in that, Includes a first host and one or more second hosts. The first host is configured to set a first remote command table (RCT) in the first host. The first remote command table (RCT) is used to store remote commands corresponding to multiple processes, and the multiple processes belong to the one or more second hosts. The second host is used to send a message of a remote command to the first host, and the second host is any one of the one or more second hosts; The first host is configured to determine the processing strategy for the remote command based on the storage space usage of the first remote command table (RCT).

16. A communication device, characterized in that, include: A processor for reading instructions stored in a memory, which, when executed, cause the communication device to implement the method of any one of claims 1 to 13.

17. A computer program product, characterized in that, The computer program product includes 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 performed.

18. A computer-readable storage medium, characterized in that, Includes a computer program that, when run on a computer system, causes a processing module in the computer system to perform the method as described in any one of claims 1 to 13.

Citation Information

Patent Citations

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

    CN112311502A

  • Rate limiting commands for shared work queues

    US20230004503A1