Communication method and communication apparatus
By acquiring and storing the resource space information of PCIe devices and using decoder entries to record path information, the problem of sequential message transmission under multi-path transmission in the PCIe system is solved, thereby improving communication efficiency and bandwidth.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2023-11-27
- Publication Date
- 2026-05-08
AI Technical Summary
The existing PCIe system's message ordering method only supports single-path transmission and cannot achieve sequential transmission of messages in multi-path transmission scenarios.
The resource space information of the second host is obtained by the first host, including the starting address, length and order-keeping attribute information, and the path information is saved. This information is recorded using decoder entries so as to achieve order-keeping transmission of messages in multipath transmission.
In multipath transmission scenarios, sequential transmission of messages is achieved, improving communication efficiency and bandwidth.
Smart Images

Figure CN120743825B_ABST
Abstract
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] Peripheral Component Interconnect Express (PCIe) is a high-speed serial computer expansion bus standard used to connect processors and external devices, which are called PCIe devices or simply devices.
[0003] In the current PCIe system, communication between any two devices can only be a single-path communication between the two interfaces. If the two communicating devices need to achieve message ordering, a point-to-point ordering mechanism can be used to ensure the order of messages on the transmission path, thereby achieving end-to-end ordering.
[0004] However, the current PCIe architecture only supports single-path message ordering. Therefore, designing a scheme that can achieve message ordering in multi-path transmission scenarios has become an urgent problem to be solved. Summary of the Invention
[0005] This application provides a communication method to achieve message order preservation in multipath transmission scenarios.
[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: a first host acquiring information about a first resource space in a second host, the information about the first resource space including the starting address of the first resource space, the length information of the first resource space, and the order preservation attribute information corresponding to the first resource space, the order preservation attribute information corresponding to the first resource space being used to indicate the order preservation requirement corresponding to a first access message accessing the first resource space; the first host storing the order preservation attribute information and first path information corresponding to the first resource space, the first path information being used to indicate the transmission path corresponding to the first access message accessing the first resource space, wherein the transmission path indicated by the first path information is one of multiple transmission paths between the first host and the second host.
[0008] Based on the above technical solution, the first host acts as the source device, and the second host acts as the target device. In a general-purpose bus system, when the source device and the target device transmit messages, the messages can be transmitted through multiple transmission paths. Specifically, in this technical solution, the first resource space (e.g., memory segment and / or function entity) on the second host can be provided to the first host for use through registration. When the first host obtains information related to the first resource space of the second host, in addition to obtaining the size and address of the first resource space (e.g., the starting address and length of the first resource space), it also obtains the ordering attribute information corresponding to the first resource space and saves the information corresponding to the first resource space (e.g., the ordering attribute information and the first path information). This allows the first host to know the ordering requirements and transmission path of the access message when it needs to send an access message to the second host to access the first resource space, based on the saved information. That is, access messages with the same ordering requirements can be transmitted through a certain transmission path, while access messages with different ordering requirements are transmitted through different paths, thus achieving ordered transmission of messages in multi-path transmission scenarios.
[0009] In conjunction with the first aspect, in some implementations of the first aspect, the first host stores the order-preserving attribute information and the first path information corresponding to the first resource space, including: the first host configures the information of the first resource space into a decoder table entry, the decoder table entry including a first entry, the first entry including the first path information and the order-preserving attribute information corresponding to the first resource space.
[0010] Based on the above technical solution, the first host can configure the information of the first resource space into the decoder table entry and record the information of the first resource space based on the first entry in the decoder table entry, which simplifies the way the first host saves the information of the first resource space.
[0011] In conjunction with the first aspect, in some implementations of the first aspect, when the first host determines to send a first access message to the second host to access the first resource space, the method includes: the first host querying the decoder table entry to determine the first path information and the order-keeping requirement corresponding to the first access message; the first host determining the output port and the first transmission path corresponding to the first access message based on the first path information; wherein, the first transmission path is the transmission path among the plurality of transmission paths used to transmit the first access message, and the first transmission path is used to transmit access messages corresponding to the same path information.
[0012] Based on the above technical solution, when the first host determines to send a first access message to the second host to access the first resource space, the first host can obtain the sequence attribute information corresponding to the first access message by looking up the decoder table entry, so as to ensure that the first access message is transmitted under the premise of meeting the order preservation requirements of the first access message.
[0013] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the first host generating the first access message according to the first transmission path and the ordering requirement corresponding to the first access message, wherein the ordering field of the first access message carries information indicating the ordering requirement corresponding to the first access message, and the load sharing factor field of the first access message carries information indicating the first transmission path.
[0014] Based on the above technical solution, when the first host generates the first access message, it fills the relevant field end of the message with the sequence attribute information and the first path information corresponding to the first access message obtained by querying the decoder table entry, so that the generated first access message carries information indicating the sequence attribute and the transmission path information.
[0015] In conjunction with the first aspect, in some implementations of the first aspect, the routing indication field of the first access message is set to 0, wherein setting the routing indication field to 0 is used to indicate that a hash routing mechanism is used to determine the transmission path of the first access message.
[0016] In conjunction with the first aspect, in some implementations of the first aspect, the first host obtaining the order preservation attribute information corresponding to the first resource space includes: the first host receiving the order preservation attribute information corresponding to the first resource space from the second host; or, the first host determining the order preservation attribute information corresponding to the resource space based on the purpose of the first resource space.
[0017] Based on the above technical solution, the first host can obtain the order preservation attribute information corresponding to the first resource space in the following ways: it receives it from the second host. For example, during the process of the second host providing the first resource space to the first host through registration, different order preservation requirements can be set according to the functions of different resource spaces, and the corresponding order preservation attribute information can be provided to the first host. Alternatively, the first host can determine different order preservation requirements according to the purpose of different resource spaces, thereby improving the flexibility of the solution.
[0018] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the first host obtaining information about a second resource space in the second host, the information about the second resource space including the starting address of the second resource space, the length information of the second resource space, and the order preservation attribute information corresponding to the second resource space, the order preservation attribute information corresponding to the second resource space being used to indicate the order preservation requirement corresponding to a second access message accessing the second resource space; the first host storing the order preservation attribute information and second path information corresponding to the second resource space, the second path information being used to indicate the transmission path corresponding to the second access message accessing the second resource space, wherein the second path information is different from the first path information, and the order preservation attribute information corresponding to the second resource space is different from the order preservation attribute information corresponding to the first resource space.
[0019] Based on the above technical solution, the first host can obtain information about different resource spaces on the second host. In addition, access packets corresponding to resource spaces with different order preservation requirements can be transmitted through different paths, thereby achieving packet order preservation transmission while ensuring multi-path transmission.
[0020] In conjunction with the first aspect, in some implementations of the first aspect, the first host stores the order-preserving attribute information and the second path information corresponding to the second resource space, including: the first host configures the information of the second resource space into the decoder table entry, the decoder table entry includes a second entry, the second entry includes the second path information and the order-preserving attribute information corresponding to the second resource space.
[0021] In conjunction with the first aspect, in certain implementations of the first aspect, the ordering requirement corresponding to the first access message includes any one of the following: strongly ordered (SO), non-ordered (NO), or relaxed ordering (RO). Strongly ordered indicates that the first access message is an ordered message and needs to be transmitted according to the ordering method, relying on the transmission results of other messages for transmission. For example, the first access message has an ordering requirement with the previous message marked RO. Non-ordered indicates that the first access message has no ordering requirement and does not need to rely on the transmission results of other messages for transmission. Relaxed ordering indicates that there is an ordering requirement between the subsequent messages marked SO, such as the message marked SO cannot be transmitted before the message marked RO.
[0022] 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.
[0023] The communication method includes: a second host receiving a first access message from a first host, the first access message being used to access a first resource space in the second host, the first access message carrying information indicating a sequence requirement corresponding to the first access message in a sequence field, and the access message carrying information indicating a first transmission path in a load sharing factor field; the second host determining the sequence requirement of the first access message based on the sequence field of the first access message; wherein the second host receives at least one access message transmitted on the first transmission path via the same physical port, and the first access message is one of the at least one access message.
[0024] 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.
[0025] 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, wherein when the program stored in the storage module is executed, the processing module executes the methods provided in the above aspects.
[0026] 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.
[0027] 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.
[0028] 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.
[0029] 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.
[0030] In a seventh aspect, a chip is provided, the chip including a first host for performing the method provided in the first aspect and a second host for performing the method provided in the second aspect.
[0031] Eighthly, a computer system is provided, the computer system including the chip shown in the seventh aspect.
[0032] 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.
[0033] In a tenth aspect, a communication system is provided, comprising a first host for performing the method provided in the first aspect and a second host for performing the method provided in the second aspect. Attached Figure Description
[0034] Figure 1 A schematic diagram of the structure of a computer device provided in an embodiment of this application.
[0035] Figure 2 This is a schematic diagram of a data center provided in an embodiment of this application.
[0036] Figure 3 This is a schematic diagram of a general bus protocol message format provided in an embodiment of this application.
[0037] Figure 4 This is a schematic diagram illustrating multipath transmission in a general bus protocol system provided in this application embodiment.
[0038] Figure 5 This is a schematic diagram of the PCIe system provided in the embodiments of this application.
[0039] Figure 6 This is a schematic flowchart of a communication method provided in this application.
[0040] Figure 7 This is a schematic diagram of a resource registration method provided in this application.
[0041] Figure 8 This is a schematic diagram of a method for determining the order preservation attribute of resource space provided in this application.
[0042] Figure 9 This is a schematic diagram of the data structure of an entry provided in this application.
[0043] Figure 10 This is a schematic diagram of a message format provided in this application.
[0044] Figure 11 A schematic diagram of the structure of a communication device 1100 provided in an embodiment of this application is shown.
[0045] Figure 12 A schematic diagram of the structure of a chip system 1200 provided in an embodiment of this application is shown.
[0046] Figure 13 A conceptual partial view of a computer program product provided in an embodiment of this application is shown schematically. Detailed Implementation
[0047] To facilitate understanding of the embodiments of this application, the following points are provided.
[0048] 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 "S610" are merely identifiers for descriptive convenience and do not limit the order of execution steps.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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]".
[0053] 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.
[0054] 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.
[0055] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0056] 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.
[0057] 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.
[0058] 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).
[0059] 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.
[0060] 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).
[0061] 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.
[0062] 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.
[0063] 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.
[0064] 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 1 In the example, external storage 107 may include two types of non-volatile memory, such as storage class memory (SCM) and solid state drive (SSD).
[0065] 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.
[0066] 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.
[0067] 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 Unified 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.
[0068] 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.
[0069] 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.
[0070] 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.
[0071] 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.
[0072] 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 carried and 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.
[0073] 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:
[0074] Table 1
[0075]
[0076]
[0077] 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 Jetty, and messages can be received from any source through a Jetty. A Jetty that can only send is defined as a Jetty for send (JFS); a Jetty that can only receive is defined as a Jetty for receive (JFR).
[0078] Figure 4 This is a schematic diagram illustrating multipath transmission in a general bus protocol system provided in this application embodiment.
[0079] like Figure 4 As shown, the general-purpose bus protocol system involved in this application supports multi-path, including source multi-port (e.g., Figure 4 The host A shown in the diagram has ports #0, #1, #2, and #3, and the destination multi-port (e.g., ...). Figure 4 Ports #0, #1, #2, and #3 in host B shown) and network multipath (such as...) Figure 4 The paths shown are #1, #2, ..., #n. Host A can be understood as the source device, and host B can be understood as the destination device. Host A can send messages to host B through multiple paths.
[0080] Optionally, host A and / or host B may also include a processor (PU) (e.g., a central processing unit (CPU)), a controller, and a system on chip (NOC). This application does not impose any limitations on the hardware or software systems included in the host. You can refer to the description of the host in the current related technology. This application will not elaborate on this.
[0081] For example, in Figure 4 In the general bus protocol system shown, two devices can transmit messages through source multi-port or destination multi-port, as well as network multi-path, in order to improve communication bandwidth.
[0082] The above text combines Figures 1 to 4 This 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.
[0083] 1. Message ordering: Sending and / or receiving messages in a specific order to ensure message ordering. For example, in the current PCIe architecture, when the CPU accesses memory of different attributes of a peripheral device through access messages (such as store instructions, load instructions, etc.), different ordering methods can be used to ensure message ordering.
[0084] For example, memory attributes are divided into two categories:
[0085] Device memory: Includes the input / output (I / O) memory space of device registers.
[0086] Normal memory includes memory spaces such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0087] When accessing device-type memory space, packet ordering is typically implemented using endpoint order; when accessing normal-type memory, packet ordering is typically implemented using request order. Endpoint ordering ensures the order of multiple packets destined for the same endpoint; request ordering ensures the order of multiple packets destined for the same address.
[0088] For ease of understanding, combined with Figure 5This section briefly explains how message order preservation is achieved during communication between two devices in the current PCIe architecture.
[0089] like Figure 5 As shown, the PCIe network has a tree structure, including, for example, Figure 5 The diagram shows a PCIe root complex (RC), a switch device, and a PCIe endpoint (EP). The PCIe RC manages communication between the CPU and other devices, the switch device expands a single PCIe interface into multiple PCIe interfaces, and the PCIe EP is a device without data forwarding capabilities.
[0090] It should be understood that Figure 5 This is merely an example and does not constitute any limitation on the scope of protection of this application. It only illustrates how to achieve message order preservation in a scenario where different devices communicate with each other in a PCIe network. For example, in Figure 5 In the scenario shown, the CPU issues three store requests, and there is no ordering relationship between these three store requests. However, after the PCIe RC receives the first store request, it will reply with a Comp response, indicating that the current request has arrived and that the execution order of the commands must be consistent with the receiving order. Therefore, these three messages need to be marked as SO, that is, strong order execution is required.
[0091] In the current PCIe architecture, message order preservation has the following characteristics:
[0092] 1) Only single path is supported. In the current PCIe system's ordering mechanism, a point-to-point ordering mechanism is used to ensure the order of the entire message transmission path, thereby achieving end-to-end ordering.
[0093] 2) Even if there are multiple Bar spaces on the PCIe EP side for PCIe RC to use, the input / output memory map I / O (MMIO) space access still follows the same path and adheres to the same set of order preservation mechanisms.
[0094] 3) In the current PCIe system design, the logic implementation is all strict. When the load / store instructions issued by the xPU are connected to the PCIe link, the default order attribute is "SO".
[0095] 2. Order-Preserving Messages: As mentioned above, message order preservation refers to messages that require order preservation. In this application, messages with order preservation requirements are called order-preserving messages, and messages without order preservation requirements are called non-order-preserving messages. For example, messages with order preservation requirements include, but are not limited to: messages that depend on the reception status of other messages. For instance, if message #1 can only be sent if message #2 is successfully received, then message #1 is an order-preserving message. Similarly, messages without order preservation requirements include, but are not limited to: messages that do not depend on the reception status of other messages.
[0096] 3. Transport Group (TPG): At least one TPG can be established between the source (initiator) device and the target (target) device at the transport layer. Each TPG contains multiple transport ports (TPs). When the source device sends a message to the target device, load balancing can be achieved among the multiple TPs within the TPG. Different messages can be transmitted through different network paths.
[0097] 4. Resource Registration: In a general-purpose bus system, memory segments and / or function entities (FEs) on a target device can be registered and made available to the source device. A memory segment and / or function entity is a unit of resource allocation by the target device, representing device resources with a certain degree of isolation. For example, a memory segment is a contiguous virtual address (VA) space, with each segment corresponding to a segment of physical memory. The target device creates and registers memory segments, and the source device requests to use the target device's memory segments.
[0098] For example, after the source device obtains the memory segment information, it maps the unified bus address (UBA) of the memory segment to the VA space of the local process to obtain the mapped address (mVA).
[0099] It should be understood that this application does not limit the resource registration process for the target device. For example, the source device and the target device can complete the resource application and registration through an in-band exchange mechanism or an out-of-band exchange mechanism.
[0100] The above text combined Figure 2 This paper briefly introduces the applicable scenarios for the communication method provided in this application, as well as the basic concepts involved. Within the basic concepts, it describes the current message ordering methods in PCIe system design. As mentioned earlier, current PCIe system message ordering only supports single-path communication and lacks multi-path capabilities, thus failing to provide greater interaction bandwidth. In other words, this message ordering method is not suitable for… Figure 4 In the general bus protocol system shown, because Figure 4 The general-purpose bus protocol system shown supports multipath transmission.
[0101] Furthermore, as can be seen from the message ordering characteristics in the PCIe system design described above, Load / store commands are fixed to "SO" for ordering when accessing the network, resulting in low execution efficiency on the receiving side. Also, for flows that do not have an order relationship, the use of the same physical link introduces order association, which reduces the interaction efficiency.
[0102] This application provides a communication method to achieve message order preservation in multipath transmission scenarios. These multipath transmission scenarios include, but are not limited to, those described above. Figure 4 The multipath transmission supported by the general bus protocol system shown can also be other multipath transmission systems (e.g., PCIe systems that can support multipath transmission).
[0103] 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.
[0104] 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.
[0105] Figure 6 This is a schematic flowchart illustrating a communication method provided in this application. It is applied to scenarios involving communication between a first host and a second host, such as... Figure 2 In the scene shown.
[0106] exist Figure 6 In the illustrated embodiment, the first host can act as a sender (or source device), and the second host can act as a receiver (or target device). For the receiver, the receiver is the local device, and the sender is the remote device. For the sender, the sender is the local device, and the receiver is the remote device.
[0107] 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.
[0108] Specifically, Figure 6 The method shown includes the following steps:
[0109] S610, the first host obtains information about the first resource space in the second host.
[0110] In this embodiment, the first host is the sender of the message, such as a device that sends load and / or store commands. The second host is the receiver of the message, such as a device that receives load and / or store commands.
[0111] For example, in this embodiment, the first host can be understood as a device using resource space, and the second host can be a device that provides resource space to the first host. For instance, the first host can be a user host in a general-purpose bus system, and the second host can be a home device in the same system; alternatively, the first and second hosts can be home devices in the same system, or they can be user hosts in the same system; furthermore, the first and second hosts can be other devices in the same system, and this embodiment does not limit this. The second host can provide its own resources to the first host, for example, the second host can provide FE or memory segment-level resources to the first host, enabling the first host to use the resources of other devices in the general-purpose bus system.
[0112] To facilitate understanding, the following will be combined with... Figure 7 This embodiment details how the second host provides its resources to the first host, and how the first host enables the use of the second host's resources.
[0113] from Figure 7 As can be seen, the general-purpose bus system includes a first host (i.e., the user host), a second host (i.e., the base device), and a function management (FM) device. The first host is a device that uses the resources of the second host, the second host is a device that provides available resources to the first host, and the FM device is a device that implements management functions in the system. For example, an FM device can acquire at least one base device in the system through scanning.
[0114] For example, after the FM device discovers the second host through scanning, it includes the second host in its management. The FM device can register the resources of the second host (e.g., FE resources or memory segments) with the first host, and the first host can create a driver for the second host (e.g., ...). Figure 7 The device driver of the first host shown in the figure enables the first host to use the resources of the second host.
[0115] It should be understood that the above Figure 7 The method shown where the second host provides its own resources to the first host is merely an example and does not constitute any limitation on the scope of protection of this application. The second host may also register its own resources with the first host in other ways so that the first host can use the resources of the second host. This embodiment does not limit this.
[0116] For example, in this embodiment, the first host can obtain information about the resource space in the second host based on the communication address of the second host specified by the FM device and the description information of the second host.
[0117] Specifically, the information of the first resource space includes the starting address of the first resource space, the length information of the first resource space, and the order preservation attribute information corresponding to the first resource space. The order preservation attribute information corresponding to the first resource space is used to indicate the order preservation requirement of the first access message that accesses the first resource space.
[0118] It should be understood that the first host can obtain information about at least one resource space in the second host. The first resource space can be any one of these at least one resource spaces. The information of the first resource space includes its starting address and its length. The ordering requirement corresponding to the first resource space is indicated by the ordering attribute information corresponding to that first resource space. This ordering requirement can be understood as the ordering requirement for access packets accessing that first resource space. For example, the first host can also obtain information about a second resource space in the second host. The information of the second resource space includes its starting address, its length, and the ordering attribute information corresponding to it. The ordering attribute information is used to indicate the ordering requirement for a second access packet accessing the second resource space.
[0119] As one possible implementation, the order-preserving attribute information corresponding to different resource spaces is provided by the second host. For example, the information of at least one resource space obtained by the first host includes the order-preserving attribute information corresponding to that resource space.
[0120] In this implementation, the order preservation attribute information corresponding to different resource spaces is determined by the second host. For example, the second host can determine the order preservation attribute information corresponding to a resource space based on its function, and provide the corresponding order preservation attribute information to the first host during the resource space registration process.
[0121] For ease of understanding, combined with Figure 8 Explain how the second host determines the order-preserving attribute information for different resource spaces.
[0122] like Figure 8As shown, the second host has multiple FE resources available for use. The resource space corresponding to one or more FEs is designed for different purposes during functional design, such as: some FE resource spaces are used for configuration; some FE resource spaces are used for interrupt information; some FE resource spaces are used for command queues for issuing commands; some FE resource spaces are used as doorbells for command queues; some FE resource spaces are used for data storage, etc.
[0123] Different Functional Providers (FEs) can have different order attributes for their corresponding resource spaces. For example, the resource space corresponding to a command queue used for issuing commands or for data storage can be RO / NO; another example is that the resource space corresponding to a doorbell can be SO. There may or may not be order preservation requirements between the resource spaces corresponding to different FEs; for example, there may be no order requirements between the resource spaces of different FEs.
[0124] As another possible implementation, the order-preserving attribute information corresponding to different resource spaces is determined by the first host.
[0125] In this implementation, when the second host provides different resource spaces for the first host to use, it does not provide the storage attribute information corresponding to the different resource spaces. The first host can determine the order preservation attribute of the different resource spaces according to their actual uses.
[0126] For example, the second host provides the first host with resource space #1 and resource space #2. The first host decides that resource space #1 is used to store data and resource space #2 is used to receive interrupt commands. Then the first host determines that the storage attribute information corresponding to resource space #1 is information that does not need to be saved, and the storage attribute information corresponding to resource space #2 is information that needs to be saved.
[0127] Furthermore, in this embodiment, after the first host obtains the resource space information in the second host and determines the order preservation attribute information corresponding to different resource spaces, it can save the order preservation attribute information and the path information corresponding to the resource space. For example, the information of different resource spaces can be configured into the Universal Bus Decoder (UBdecoder) table entry of the first host, which is used to determine the routing path of the packet; or, for example, the order preservation attribute information and the path information corresponding to the resource space can be saved in the storage space, or recorded in other ways. This embodiment does not impose any limitations on this.
[0128] For ease of understanding, this embodiment uses the example of configuring the order-preserving attribute information and path information corresponding to the resource space into the Universal Bus Decoder (UB decoder) table entry. Figure 6 The method flow shown also includes:
[0129] S620, First host configuration decoder entry.
[0130] For ease of description, the following explanation uses the example of a first host configuring information of a first resource space into a decoder table entry. The first resource space can be any resource space from at least one resource space provided by a second host. The first host configures the information of the first resource space into a decoder table entry, which includes a first entry. The first entry includes path information (which can be simply referred to as first path information) indicating the path of a first access message accessing the first resource space and order-preserving attribute information corresponding to the first resource space.
[0131] For example, the first host obtains information about multiple resource spaces in the second host, where the order preservation attributes corresponding to the multiple resource spaces may be different.
[0132] In this embodiment, the first resource space corresponds to the first entry in the table, wherein the data structure of an entry in the table is as follows: Figure 9 As shown, it includes UBA, transport group number (TPGNumber), path information or order ID, order attribute information or order type, destination entity ID (DstEID), token ID, and token value.
[0133] For example, the meanings of each field in the entry are shown in Table 2 below:
[0134] Table 2
[0135]
[0136] The current access address space flow mentioned in Table 2 includes at least one message in the current access address space. That is, one or more access messages accessing the same address space are called "access address space flow".
[0137] It should be understood that the main function of the decoder described above is to support the first host in querying the UBA of the message and the partial segment translation information of the message based on the message's hard physical address (HPA).
[0138] For example, the first host queries the decoder to obtain the following information:
[0139] TPG: Indicates the TPG that transmits the current message, which maintains multiple path-reachable sending ports / paths between the source and destination.
[0140] Order ID: Used to indicate the current access address space flow Order ID. The Order ID is used to select a unique outgoing port / path from multiple reachable sending ports / paths within the TPG. This Order ID is then used as a load balancing (LB) field to fill the packet. This enables the HASH routing mechanism, thereby ensuring that the packet reaches the receiving side through a unique path.
[0141] Order Type: Indicates the Order type of the stream currently accessing the address space, such as NO, RO, or SO. This field is directly used by the controller to populate the "ODR" field in the message.
[0142] It should be understood that the first host can obtain information about at least one resource space in the second host and configure the information of the at least one resource space in the first host's general-purpose bus decoder. The first resource space can be any one of the at least one resource space. For example, regarding the information of the second resource space in the second host obtained by the first host, the first host configures the information of the second resource space into a decoder table entry. The decoder table entry includes a second entry, which includes path information indicating the path of the second access message accessing the second resource space and the order-keeping attribute information corresponding to the second resource space.
[0143] As an example and not a limitation, the path information corresponding to the second access message (which can be simply referred to as the second path information) is different from the path information corresponding to the first access message, and the order preservation attribute information corresponding to the second resource space is different from the order preservation attribute information corresponding to the first resource space. That is, in this embodiment, access messages with different order preservation requirements can be transmitted through different paths, thereby ensuring that the order preservation transmission of messages is achieved in the scenario of multi-path transmission.
[0144] After the above table configuration is completed, if the first host initiates an access to the second host in order to access the first resource space provided by the second host, the first host can obtain the ordering requirements that the first access message needs to meet by querying the decoder table entries, and generate the first access message based on the information obtained from querying the decoder table entries (such as ordering attribute information, transmission path information, etc.). Figure 6 The method flow shown also includes:
[0145] S630, the first host generates the first access message.
[0146] Specifically, when the first host group sends the first access message, it fills in the relevant fields of the data packet to be sent and selects the sending path according to the query sequence attribute information.
[0147] For example, the format of the first access message is as follows: Figure 10 As shown, this includes, but is not limited to, the routing mode domain and the load balancer domain, where the meanings of RM and LB are shown in Table 3 below:
[0148] Table 3
[0149] RM Message routing mode indicator segment LB The load-sharing factor in the message can participate in the hash calculation when routing multi-path load sharing.
[0150] It should be noted that the first access message also includes other information, mainly the RM field and LB field in this embodiment. Other fields can be found in the relevant descriptions of message formats in current general bus protocols, and will not be repeated here.
[0151] Specifically, the RM field definition in the message header can be shown in Table 4 below:
[0152] Table 4
[0153]
[0154] Optionally, if the RM field indicates that the transmission path selection method for the current first access packet is flow-based hashing, then the first host and intermediate switches can perform hashing based on tuples. For example, in flow-based hashing, the first host and intermediate switches can select one or more fields in the packet header for hashing, such as the five-tuple {srcIP, dstIP, protocol, transport layer source port, transport layer destination port} in IP packet format; for compressed packet format, {srcCNA, dstCNA, LB} can be used for hashing. Hashing can also select parameters of the packet in the network device to participate in the hash calculation (such as the ingress port number of the switch).
[0155] Furthermore, the TAH of the first access message also includes an ODR field, the definition of which can be shown in Table 5 below:
[0156] Table 5
[0157]
[0158]
[0159] For example, after the first host composes the first access message, it can pass through a multipath network (such as...) Figure 4If the network shown sends the first access message to the second host, then Figure 6 The method flow shown also includes:
[0160] S640, the first host sends the first access message to the second host.
[0161] Specifically, the switch determines the path among multiple paths used to transmit the first access message based on the RM field in the first access message. Furthermore, after receiving the first access message, the second host can determine the ordering requirements of the first access message based on the "ODR" field in the first access message.
[0162] Figure 6 In the communication method, during the resource registration phase, it is identified that messages accessing certain resource spaces have no order requirements and can be executed out of order, or that messages accessing certain resource spaces have order-preserving requirements. In other words, the order-preserving requirements between messages accessing different resource spaces can be known in advance. Furthermore, relevant information is configured in the decoder table. When an access request is sent, the corresponding order-preserving attribute can be obtained by querying the relevant information in the decoder table, and the relevant fields of the message can be filled according to the order-preserving attribute. This ensures that multipathing can still be utilized even in order-preserving scenarios.
[0163] To facilitate understanding, specific examples will be used below. Figure 6 In the communication method shown, how to achieve ordered transmission of messages in a multi-path scenario.
[0164] Example 1:
[0165] Step 1: The Load / store operation issued by the xPU of the first host reaches the unified bus controller in the first host via the internal bus;
[0166] Step 2: The general-purpose bus controller determines that this Load / store operation needs to be sent to the second host via the general-purpose bus link;
[0167] Step 3: The general-purpose bus controller initiates a table lookup request to the decoder table entry;
[0168] Step 4: Perform an internal table lookup based on HPA to obtain the corresponding information, which includes information such as UBA, Order ID, and Order Type provided when the second host registered the resource space;
[0169] Step 5: After obtaining the destination communication object information from the decoder table, the general-purpose bus controller queries the internal routing table to obtain multiple reachable "outgoing ports / paths". The general-purpose bus controller uses the "Order ID" as the routing input for multiple reachable "outgoing ports / paths" to route messages with the same "Order ID" to the same "outgoing port / path".
[0170] Step 6: The general-purpose bus controller assembles the packets, filling the "order type" obtained from the decoder table entry into the "ODR" of the message, filling the "Order ID" into the "LB" of the message, setting "RM bit 0" in the message to 0, and filling other information (e.g., UBA, DstEID, TokenID, ...) into the corresponding positions of the message.
[0171] Step 7: When the message is transmitted to the switch, the switch detects that "bit 0 of RM is set to 0" in the message. It adopts the Hash routing mechanism. For compressed message format, {srcCNA,dstCNA,LB} can be used for hashing. Therefore, the same {srcCNA,dstCNA,LB} can reach the second host through a certain path.
[0172] Step 8: For the second host, load / store packets with the same Order ID from the same source device are received from the same physical port, and the second host performs order processing according to the "ODR" in the packet.
[0173] 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.
[0174] 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.
[0175] 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.
[0176] 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.
[0177] 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.
[0178] Figure 11 A schematic diagram of the structure of a communication device 1000 provided in an embodiment of this application is shown.
[0179] 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 6 The method is shown. Specifically, the communication device 1100 may include a transceiver unit 1110 and a processing unit 1120.
[0180] The transceiver unit 1110 is used to acquire information about a first resource space in the second host. The information about the first resource space includes its starting address, length, and corresponding order-keeping attribute information. The order-keeping attribute information indicates the order-keeping requirement for a first access message accessing the first resource space. The processing unit 1120 is used to configure the information about the first resource space into a decoder table entry. The decoder table entry includes a first entry, which includes path information indicating the path of the first access message accessing the first resource space and the corresponding order-keeping attribute information. Multiple transmission paths exist between the first host and the second host.
[0181] As an example, combined Figure 6 The transceiver unit 1010 can be used to execute S610 and S640, and the processing unit 1020 can be used to execute S620 and S630.
[0182] 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.
[0183] 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.
[0184] Transceiver unit 1010 is configured to receive a first access message from a first host, the first access message being used to access a first resource space in the second host, the ordering field of the first access message carrying information indicating the ordering requirement corresponding to the first access message, and the load sharing factor field of the access message carrying information indicating a first transmission path. Processing unit 1120 is configured to determine the ordering requirement of the first access message based on the ordering field of the first access message; wherein the physical ports receiving at least one access message transmitted on the first transmission path are the same, and the first access message is one of the at least one access message.
[0185] As an example, combined Figure 6 The transceiver unit 1010 can be used to execute S610 and S640.
[0186] 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.
[0187] 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).
[0188] 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).
[0189] 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.
[0190] 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.
[0191] Figure 13 A 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.
[0192] 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 6The described function or part of the function. Therefore, for example, refer to... Figure 6 One or more features of S610 to S640 can be implemented 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.
[0193] 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.
[0194] 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.
[0195] 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.
[0196] 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.
[0197] 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.
[0198] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0199] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0200] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0201] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0202] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0203] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0204] 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, The method includes: The first host obtains information about the first resource space in the second host. The information about the first resource space includes the order preservation attribute information corresponding to the first resource space. The order preservation attribute information corresponding to the first resource space is used to indicate the order preservation requirement corresponding to the first access message that accesses the first resource space. The first host stores the order-keeping attribute information and the first path information corresponding to the first resource space. The first path information is used to indicate the transmission path corresponding to the first access message accessing the first resource space. Wherein, the transmission path indicated by the first path information is one of multiple transmission paths between the first host and the second host, and the first host stores the order-preserving attribute information and the first path information corresponding to the first resource space, including: The first host configures the information of the first resource space into the decoder table entry. The decoder table entry includes a first entry, which includes the first path information and the order-preserving attribute information corresponding to the first resource space.
2. The method according to claim 1, characterized in that, When the first host determines to send a first access message to the second host to access the first resource space, the method includes: The first host queries the decoder table entry to determine the first path information and the order preservation requirement corresponding to the first access message; The first host determines the output port and the first transmission path corresponding to the first access message based on the first path information. Wherein, the first transmission path is the transmission path among the plurality of transmission paths used to transmit the first access message, and the first transmission path is used to transmit access messages corresponding to the same path information.
3. The method according to claim 2, characterized in that, The method further includes: The first host generates the first access message according to the first transmission path and the order preservation requirements corresponding to the first access message. The first access message's order preservation field carries information indicating the order preservation requirement corresponding to the first access message, and the first access message's load sharing factor field carries information indicating the first transmission path.
4. The method according to claim 3, characterized in that, The routing indication field of the first access message is set to 0. The routing indication field is set to 0 to indicate that a hash routing mechanism is used to determine the transmission path of the first access message.
5. The method according to any one of claims 1 to 4, characterized in that, The first host obtains the order-preserving attribute information corresponding to the first resource space, including: The first host receives order-preserving attribute information corresponding to the first resource space from the second host; or, The first host determines the order preservation attribute information corresponding to the resource space based on the purpose of the first resource space.
6. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The first host obtains information about the second resource space in the second host. The information about the second resource space includes the order preservation attribute information corresponding to the second resource space. The order preservation attribute information corresponding to the second resource space is used to indicate the order preservation requirement of the second access message that accesses the second resource space. The first host stores the order-keeping attribute information and the second path information corresponding to the second resource space. The second path information is used to indicate the transmission path corresponding to the second access message accessing the second resource space. The second path information is different from the first path information, and the order preservation attribute information corresponding to the second resource space is different from the order preservation attribute information corresponding to the first resource space.
7. The method according to claim 6, characterized in that, The first host stores the order-preserving attribute information and the second path information corresponding to the second resource space, including: The first host configures the information of the second resource space into the decoder table entry. The decoder table entry includes a second entry, which includes the second path information and the order-preserving attribute information corresponding to the second resource space.
8. The method according to any one of claims 1 to 4, characterized in that, The order preservation requirement corresponding to the first access message includes any one of the following: Strongly maintain order (SO), do not need to maintain order (NO), or flexibly maintain order (RO).
9. A communication method, characterized in that, The method includes: The second host receives a first access message from the first host. The first access message is used to access a first resource space in the second host. The order preservation field of the first access message carries information indicating the order preservation requirement corresponding to the first access message. The load sharing factor field of the access message carries information indicating the first transmission path. The second host determines the ordering requirement of the first access message based on the ordering field of the first access message; Wherein, the physical port on which the second host receives at least one access message transmitted on the first transmission path is the same, and the first access message is one of the at least one access message.
10. A communication method, characterized in that, include: The first host obtains information about the first resource space in the second host. The information about the first resource space includes the order preservation attribute information corresponding to the first resource space. The order preservation attribute information corresponding to the first resource space is used to indicate the order preservation requirement corresponding to the first access message that accesses the first resource space. The first host stores the order-keeping attribute information and the first path information corresponding to the first resource space. The first path information is used to indicate the transmission path corresponding to the first access message accessing the first resource space. The second host receives a first access message from the first host. The first access message is used to access a first resource space in the second host. The order preservation field of the first access message carries information indicating the order preservation requirement corresponding to the first access message, and the load sharing factor field of the access message carries information indicating a first transmission path. The second host determines the ordering requirement of the first access message based on the ordering field of the first access message; Wherein, the physical port on which the second host receives at least one access message transmitted on the first transmission path is the same, and the first access message is one of the at least one access message.
11. A communication system, characterized in that, Includes a first host and at least one second host. The first host is used to obtain information about the first resource space in the second host. The information about the first resource space includes the order preservation attribute information corresponding to the first resource space. The order preservation attribute information corresponding to the first resource space is used to indicate the order preservation requirement corresponding to the first access message that accesses the first resource space. The first host is configured to store the order-keeping attribute information and the first path information corresponding to the first resource space. The first path information is used to indicate the transmission path corresponding to the first access message accessing the first resource space. The second host is configured to receive a first access message from the first host. The first access message is configured to access a first resource space in the second host. The order preservation field of the first access message carries information indicating the order preservation requirement corresponding to the first access message. The load sharing factor field of the access message carries information indicating a first transmission path. The second host determines the ordering requirement of the first access message based on the ordering field of the first access message; Wherein, the physical port on which the second host receives at least one access message transmitted on the first transmission path is the same, and the first access message is one of the at least one access message.
12. A communication device, characterized in that, include: A processor is configured to read instructions stored in a memory, and when the processor executes the instructions, cause the communication device to implement the method of any one of claims 1 to 8; or cause the communication device to implement the method of claim 9.
13. A computer program product, characterized in that, The computer program product includes computer program code, which, when run on a computer, executes the method of any one of claims 1 to 8; or, when run on a computer, executes the method of claim 9.
14. A computer-readable storage medium, characterized in that, This 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 8; or, when run on a computer system, causes a processing module in the computer system to perform the method as described in claim 9.
Citation Information
Patent Citations
Data transmission method and device
CN114189474A