Search

CN-120743825-B - Communication method and communication device

CN120743825BCN 120743825 BCN120743825 BCN 120743825BCN-120743825-B

Abstract

A communication method and a communication device are applied to a first host, a plurality of transmission paths for transmitting messages exist between the first host and a second host, the method comprises the steps that the first host obtains information of a first resource space in the second host, and the information of the first resource space comprises a starting address of the first resource space, length information of the first resource space and order-preserving attribute information corresponding to the first resource space. The first host stores order-preserving attribute information and first path information corresponding to a first resource space, wherein the first path information is used for indicating a transmission path corresponding to a first access message for accessing the first resource space. Under the condition that the first host sends the access message to the second host to access the first resource space, the first host can acquire the order-preserving requirement of the access message according to the stored information, and order-preserving transmission of the message under the scene of multipath transmission is realized.

Inventors

  • LIU RONGGUO
  • CHENG CHUANNING
  • KUANG XIAOBO

Assignees

  • 华为技术有限公司

Dates

Publication Date
20260508
Application Date
20231127

Claims (14)

  1. 1.A method of communication, the method comprising: The method comprises the steps that a first host acquires information of a first resource space in a second host, wherein the information of the first resource space comprises order-preserving attribute information corresponding to the first resource space, and the order-preserving attribute information corresponding to the first resource space is used for indicating order-preserving requirements corresponding to a first access message for accessing the first resource space; the first host saves the order-preserving attribute information and the first path information corresponding to the first resource space, the first path information is used for indicating a transmission path corresponding to a first access message accessing the first resource space, The transmission path indicated by the first path information is one of a plurality of transmission paths between the first host and the second host, the first host stores order-preserving attribute information and first path information corresponding to the first resource space, and the method comprises the following steps: The first host configures information of the first resource space into a decoder table entry, wherein the decoder table entry comprises a first entry, and the first entry comprises the first path information and order-preserving attribute information corresponding to the first resource space.
  2. 2. The method of claim 1, wherein when the first host determines to send a first access message to the second host to access the first resource space, the method comprises: the first host queries the decoder table entry to determine the first path information and the order-preserving requirement corresponding to the first access message; The first host determines an output port and a first transmission path corresponding to the first access message according to the first path information; The first transmission path is a transmission path used for transmitting the first access message in the plurality of transmission paths, and the first transmission path is used for transmitting the access message corresponding to the same path information.
  3. 3. The method according to claim 2, wherein the method further comprises: The first host generates the first access message according to the first transmission path and the order-preserving requirement corresponding to the first access message, The order-preserving field of the first access message carries information indicating an order-preserving 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.
  4. 4. The method of claim 3, wherein the routing indication field of the first access message is set to 0, The routing indication field is set to 0 and is used for indicating that a hash routing mechanism is adopted to determine a transmission path of the first access message.
  5. 5. The method according to any one of claims 1 to 4, wherein the first host obtaining order-preserving attribute information corresponding to the first resource space includes: the first host receives the order-preserving attribute information corresponding to the first resource space from the second host, or And the first host determines order-preserving attribute information corresponding to the resource space according to the purpose of the first resource space.
  6. 6. The method according to any one of claims 1 to 4, further comprising: The first host acquires information of a second resource space in the second host, wherein the information of the second resource space comprises order-preserving attribute information corresponding to the second resource space, and the order-preserving attribute information corresponding to the second resource space is used for indicating order-preserving requirements corresponding to a second access message for accessing the second resource space; The first host saves the order-preserving attribute information and the second path information corresponding to the second resource space, the second path information is used for indicating a transmission path corresponding to a second access message accessing the second resource space, The second path information is different from the first path information, and the order-preserving attribute information corresponding to the second resource space is different from the order-preserving attribute information corresponding to the first resource space.
  7. 7. The method of claim 6, wherein the first host stores order-preserving attribute information and second path information corresponding to the second resource space, comprising: the first host configures information of the second resource space into a decoder table entry, wherein the decoder table entry comprises a second entry, and the second entry comprises the second path information and order-preserving attribute information corresponding to the second resource space.
  8. 8. The method according to any one of claims 1 to 4, wherein the order-preserving requirement corresponding to the first access message includes any one of the following: Strong order-preserving SO, NO need order-preserving NO, or flexible order-preserving RO.
  9. 9. A method of communication, the method comprising: a second host receives a first access message from a first host, wherein the first access message is used for accessing a first resource space in the second host, the order-preserving field of the first access message carries information indicating an order-preserving 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 order-preserving requirement of the first access message according to the order-preserving domain of the first access message; The physical ports of the second host 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.
  10. 10. A method of communication, comprising: The method comprises the steps that a first host acquires information of a first resource space in a second host, wherein the information of the first resource space comprises order-preserving attribute information corresponding to the first resource space, and the order-preserving attribute information corresponding to the first resource space is used for indicating order-preserving requirements corresponding to a first access message for accessing the first resource space; the first host saves the order-preserving attribute information and the first path information corresponding to the first resource space, the first path information is used for indicating a transmission path corresponding to a first access message accessing the first resource space, The second host receives a first access message from the first host, wherein the first access message is used for accessing a first resource space in the second host, the order-preserving field of the first access message carries information indicating an order-preserving 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 order-preserving requirement of the first access message according to the order-preserving domain of the first access message; The physical ports of the second host 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.
  11. 11. A communication system comprising a first host and at least one second host, The first host is configured to obtain information of a first resource space in the second host, where the information of the first resource space includes order-preserving attribute information corresponding to the first resource space, and the order-preserving attribute information corresponding to the first resource space is used to indicate an order-preserving requirement corresponding to a first access message that accesses the first resource space; the first host is configured to store order-preserving attribute information and first path information corresponding to the first resource space, the first path information is configured to indicate a transmission path corresponding to a first access message for accessing the first resource space, The second host is configured to receive a first access packet from the first host, where the first access packet is used to access a first resource space in the second host, an order-preserving field of the first access packet carries information indicating an order-preserving requirement corresponding to the first access packet, and a load sharing factor field of the access packet carries information indicating a first transmission path; The second host determines the order-preserving requirement of the first access message according to the order-preserving domain of the first access message; The physical ports of the second host 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.
  12. 12. A communication device comprising a processor for reading instructions stored in a memory, which when executed by the processor, 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. 13. A computer program product, characterized in that it comprises a computer program code for performing the method according to any one of claims 1 to 8 when the computer program code is run on a computer, or for performing the method according to claim 9 when the computer program code is run on a computer.
  14. 14. A computer readable storage medium comprising a computer program which, when run on a computer system, causes a processing module in the computer system to perform the method of any one of claims 1 to 8, or which, when run on a computer system, causes the processing module in the computer system to perform the method of claim 9.

Description

Communication method and communication device Technical Field The present application relates to the field of computer technologies, and in particular, to a communication method and a communication device. Background Peripheral component interconnect bus (PERIPHERAL COMPONENT INTERCONNECT EXPRESS, PCIe) is a high-speed serial computer expansion bus standard for enabling connection of processors to external devices, referred to as PCIe devices or devices for short. In the current PCIe system, any 2 devices can only communicate with each other through a single path between 2 interfaces, if order-preserving transmission of messages needs to be implemented between two communicating devices, an order-preserving (order) mechanism of point-to-point is used to ensure a sequence of messages on a transmission path, so that order-preserving from end to end is achieved. However, the message order keeping mode in the current PCIe system only supports a single path. Therefore, how to design a scheme for realizing message sequence preservation in a multipath transmission scene becomes a problem to be solved. Disclosure of Invention The application provides a communication method for realizing message order preservation under the scene of multipath transmission. In a first aspect, a communication method is provided, applied to a first host. The method may be performed by the first host, or may be performed by a circuit or a chip configured in the first host, which is not limited in this regard. For convenience of description, a first host execution example will be described hereinafter. The communication method comprises the steps that a first host obtains information of a first resource space in a second host, the information of the first resource space comprises a starting address of the first resource space, length information of the first resource space and order-preserving attribute information corresponding to the first resource space, the order-preserving attribute information corresponding to the first resource space is used for indicating order-preserving requirements corresponding to a first access message for accessing the first resource space, the first host stores the order-preserving attribute information corresponding to the first resource space and first path information, the first path information is used for indicating a transmission path corresponding to a first access message for accessing the first resource space, and the transmission path indicated by the first path information is one of a plurality of transmission paths between the first host and the second host. Based on the technical scheme, the first host is used as a source device, and the second host is used as a target device. In the universal bus system, when a message is transmitted between a source device and a target device, the message can be transmitted through a plurality of transmission paths. Specifically, in this embodiment, the first resource space (e.g., memory segment (memory segment) and/or function entity (function entity)) on the second host may be provided to the first host for use by the first host through a registration manner. When the first host acquires the first resource space related information of the second host, in addition to acquiring the size and address (e.g., the starting address of the first resource space and the length information of the first resource space) information of the first resource space, the first host acquires order-preserving attribute information corresponding to the first resource space, and stores the information corresponding to the first resource space (e.g., stores the order-preserving attribute information and the first path information corresponding to the first resource space), so that the first host can acquire the order-preserving requirement of the access message accessing the first resource space and the transmission path of the access message based on the stored information, namely, the access message with the same order-preserving requirement can be transmitted through a certain transmission path, and the access messages with different order-preserving requirements can be transmitted through different paths, thereby realizing the order-preserving transmission of the message under the condition of multipath transmission. With reference to the first aspect, in some implementation manners of the first aspect, the first host saves order-preserving attribute information and first path information corresponding to the first resource space, which includes that the first host configures the information of the first resource space into a decoder table entry, where the decoder table entry includes a first entry, and the first entry includes the first path information and the order-preserving attribute information corresponding to the first resource space. Based on the technical scheme, the first host can record the information of the first resource space based on the first entry in the decod