Port fault switching method, device, and storage medium

By prestoring link information in the DPU of the backup port and quickly activate the backup port, the data transmission interruption caused by the main port failure in the DPU device is solved, and the continuity of data links and service data transmission is quickly restored, improving network reliability.

WO2025139833A1PCT designated stage expired Publication Date: 2025-07-03HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/138917
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-29
Filing Date
2024-12-12
Publication Date
2025-07-03

AI Technical Summary

Technical Problem

In devices using DPUs, when the main port is located on different DPUs, the main port failure causes the backup port to lack link information, resulting in data transmission interruption. The prior art requires a complex re-selecting process, which takes a long time.

Method used

By pre-storing link information in the DPU to which the backup port belongs, and quickly activate the backup port when the main port fails, the pre-stored link information continues to transmit data, and direct communication using DOORBELL messages is used to reduce CPU participation and improve switching efficiency.

Benefits of technology

It realizes rapid recovery of data links in the event of port failure, ensures continuity of service data transmission, avoids long-term interruptions, and improves network reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024138917_03072025_PF_FP_ABST
    Figure CN2024138917_03072025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to the technical field of computers, and provide a port fault switching method, a device, and a storage medium. In the embodiments of the present disclosure, DPUs respectively corresponding to a main port and a standby port in a port bonding group can simultaneously maintain link information of a data link. When the main port fails, link information stored in a second DPU where the standby port is located can be configured for use by the standby port, so that a first device can continue to use the data link to communicate with a second device via the standby port. Moreover, the process of the second DPU configuring the link information to the standby port can be completed in a very short time, and once the configuration is completed, service data transmission over the data link can proceed, so that the continuity of service data transmission can be well ensured. In contrast, if the original data link cannot be maintained, a longer time will be needed to reselect a data link, which will cause a long interruption in service data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Port failure switching method, device and storage medium

[0001] This disclosure claims priority to Chinese patent application number 202311868251.7, filed on December 29, 2023, entitled “Method, device and storage medium for port fault switching,” the entire contents of which are incorporated by reference into this disclosure. Technical Field

[0002] The present disclosure relates to the field of computer technology, and in particular to a method, device, and storage medium for port fault switching. Background Art

[0003] Bonding technology establishes multiple physical connections between the server and the switch (that is, connecting multiple ports of the server to multiple ports of the switch in a one-to-one correspondence), combined with a variety of optional working modes, to achieve multiple links simultaneously to expand bandwidth, or port fault switching to improve network reliability.

[0004] In addition, data processing units (DPUs) are widely used, and many DPUs can support transmission control protocol (TCP) offload engine (TOE) technology. TOE technology transfers the protocol stack of the network layer and transport layer to the DPU, which can effectively reduce the occupancy of the central processing unit (CPU) and better free up CPU processing resources.

[0005] However, in devices using this type of DPU, when multiple bound ports are located on different DPUs, since the protocol stacks of the network layer and transport layer are on the DPU, when the primary port establishes a data link with the peer device, the link information is maintained by the DPU to which the primary port belongs. When the primary port fails, the DPU to which the backup port belongs does not have the corresponding link information, resulting in data transmission interruption. Summary of the Invention

[0006] The present disclosure provides a port fault switching method, device, and storage medium, which can ensure the continuous availability of a data link and the continuity of data transmission in the event of a port failure.

[0007] In a first aspect, a method for port failover is provided, which is applied to a first device, wherein the first device includes a first data processing unit (DPU) and a second DPU, the first DPU including a first port, and the second DPU including a second port. The processing process of the method may include: a first data processor (DPU) uses the first port to communicate with the second device via a data link, and then the first data processor (DPU) notifies the second DPU of link information of the first port for storage, the first port and the second port belong to the same port binding group, the first port is the primary port of the port binding group and is in an active state, and the second port is the backup port of the port binding group and is in a silent state. Further, when the first port of the first DPU fails, the second DPU sets the second port to an active state, and continues to communicate with the second device using the data link through the second port based on the link information.

[0008] In the embodiment of the present disclosure, the first device establishes a data link with the second device through the main port (first port) in the port binding group for communication. At the same time, the first DPU to which the main port belongs notifies the second DPU to which the backup port (second port) belongs of the link information of the data link for storage. In this way, the DPUs corresponding to the main port and the backup port in the port binding group can simultaneously maintain the link information of the data link. When the main port fails, the backup port can be activated, and the link information stored in the second DPU where the backup port is located can be configured for use by the backup port. In this way, the first device can continue to use the data link to communicate with the second device through the backup port. In this way, the continuous availability of the data link can be guaranteed in the event of port failure. Moreover, because the link information has been stored in the second DPU, the process of the second DPU configuring the link information to the backup port can be completed in a very short time. As long as the configuration is completed, the business data transmission of the data link can continue, which can better ensure the continuity of business data transmission. In contrast, if a port fails and there is no method to maintain the data link, a new data link must be selected to transmit the corresponding business data. However, reselecting the data link requires a series of complex calculations and configuration processes, which is time-consuming and will result in a prolonged interruption of business data transmission.

[0009] In one possible implementation, the first device also includes a CPU, and the CPU communicates with the first DPU and the second DPU through a computer bus. The processing of notifying the link information may include: first, the first DPU sends the link information of the first port to the CPU, and then the CPU stores the link information in the memory, and then the second DPU sends a read request to the CPU, and finally the CPU reads the link information in the memory and sends the link information to the second DPU for storage.

[0010] In this way, the second DPU can directly obtain the link information from its own DPU memory and configure it to the second port, thereby increasing the efficiency of activating the second port.

[0011] In a possible implementation, before the second DPU sends a read request to the CPU, the first DPU may send an instruction message for reading link information to the second DPU, where the instruction message is a doorbell DOORBELL message.

[0012] DOORBELL messages are messages used for direct communication between different expansion cards on the motherboard.

[0013] In this way, the instruction message for reading the link information does not need to be transmitted through the CPU, which has greater flexibility.

[0014] In one possible implementation, before the first DPU notifies the second DPU where the second port is located of the link information of the first port for storage, the CPU negotiates with the second device and establishes a data link. The corresponding processing flow is as follows: First, the CPU negotiates with the second device to obtain the configuration information of the port binding group. The configuration information includes first sub-information and second sub-information. The first sub-information is used to indicate that the first port is the primary port of the port binding group, and the second sub-information is used to indicate that the second port is the backup port of the port binding group. The CPU then sends the first sub-information to the first DPU and the second sub-information to the second DPU. The first DPU then sets the first port to an active state, establishes a data link between the first port and the second device, and generates link information for the first port. Finally, the second DPU sets the second port to a silent state.

[0015] In this way, the primary port is determined through negotiation, and subsequently only the primary port is required to perform the link establishment process and generate link information for subsequent distribution, which can reduce resource waste.

[0016] In one possible implementation, the link information includes the Internet Protocol (IP) address and the Media Access Control (MAC) address of the first device and the IP address and MAC address of the second device. The link information may also include routing-related information and service-related information of the network layer and transport layer.

[0017] In a possible implementation, when the port binding group includes multiple backup ports, the first DPU may notify the DPUs where the other backup ports, except the second port, are located of the link information of the first port for storage.

[0018] In this way, the link information is notified to the DPUs where all backup ports are located. When the first port fails, more backup ports can be selected for switching, thereby improving network reliability. Moreover, if the switched port fails subsequently, other backup ports can be selected for continued switching, which can also well ensure network reliability.

[0019] In a possible implementation, the CPU may select the second port from the multiple standby ports as the port to be activated, and notify the second DPU of the second port.

[0020] In this way, because the ports of the port binding group are on different DPUs, the CPU can more easily obtain the configuration information of the port binding group than the DPU, while the DPU needs to perform less efficient inter-card data exchange to obtain the complete configuration information. Therefore, port selection by the CPU can improve the efficiency of port switching.

[0021] In a possible implementation, when the port binding group includes multiple master ports, the first DPU notifies the DPUs where other master ports other than the first port are located of the link information of the first port, so that the link information is configured for the other master ports.

[0022] In this way, only one master port is needed to establish a link, generate link information, and then distribute the link information, which can reduce resource waste.

[0023] In one possible implementation, when the CPU receives a fault message of the first port sent by the first DPU, it sends an activation notification of the second port to the second DPU, and then the second DPU sets the second port to an activated state and configures the stored link information to the second port.

[0024] The DPU can detect port faults by directly detecting level changes on designated pins or by using communication messages.

[0025] In this way, the DPU can detect the port failure more quickly, and the CPU can notify the second DPU, so that the data transmission service can be switched to the second port in a shorter time.

[0026] In one possible implementation, when the first DPU fails, the CPU of the first device sends an activation notification of the second port to the second DPU, and then the second DPU sets the second port to an activated state and configures the stored link information to the second port.

[0027] In this way, when the first port fails due to a failure of the first DPU, the first device can continue to communicate with the second device using the data link through the second port.

[0028] In a second aspect, a first device is provided, which includes a first DPU and a second DPU, wherein the first DPU and the second DPU are used to implement the method provided by the first aspect and its possible implementation manner.

[0029] In a third aspect, a computer-readable storage medium is provided, which stores computer program code. When the computer program code is executed by a computer device, the computer device executes the method provided by the first aspect and its possible implementation methods.

[0030] In a fourth aspect, a computer program product is provided. The computer program product includes computer program code. When the computer program code is executed by a computer device, the computer device executes the method provided by the first aspect and its possible implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] FIG1 is a schematic structural diagram of a computer device provided by an embodiment of the present disclosure;

[0032] FIG2 is a flow chart of a method for port fault switching provided by an embodiment of the present disclosure;

[0033] FIG3 is a flow chart of a method for establishing a data link provided by an embodiment of the present disclosure;

[0034] FIG4 is a flow chart of a method for notifying link information provided by an embodiment of the present disclosure;

[0035] FIG5 is a flow chart of a configuration method before a port failure occurs according to an embodiment of the present disclosure combined with an application scenario;

[0036] FIG6 is a flow chart of a method for port fault switching according to an embodiment of the present disclosure in combination with an application scenario;

[0037] FIG7 is a flow chart of a method for port fault switching according to an embodiment of the present disclosure in combination with an application scenario;

[0038] FIG8 is a flow chart of a link information distribution method combined with an application scenario provided by an embodiment of the present disclosure;

[0039] FIG9 is a schematic structural diagram of a first device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0040] First, some terms involved in the embodiments of the present disclosure are explained.

[0041] DPU

[0042] The DPU can offload some complex processing tasks from the CPU, including those related to networking, virtualization, storage, and security. In the disclosed embodiments, the DPU is primarily responsible for networking and exists as a network card within the computer device. The DPU can connect to the motherboard via an expansion slot, such as a peripheral component interconnect express (PCIE) slot, to enable communication with the CPU. The DPU card can be configured with dedicated memory, referred to as DPU memory.

[0043] In the disclosed embodiments, the DPU can support the offloading of stateful services, for example, supporting direct TCP offload engine (DTOE) technology and TOE technology. DTOE technology and TOE technology offload (or migrate) the protocol stacks of the network layer and transport layer from the operating system kernel to the DPU, allowing the DPU to share a large amount of network data packet processing work with the CPU, helping the CPU to free up a large amount of processing resources. The DPU can also support remote direct memory access (RDMA) technology, as well as remote memory access over converged Ethernet (ROCE) technology based on this technology. The combination of these two technologies can enable direct memory access between devices via Ethernet.

[0044] bonding unit

[0045] A bonding unit, also known as a kernel bonding unit, exists within the operating system kernel. The operating system kernel contains a bonding component (think of it as a set of executable code). Running the bonding component creates a bonding unit, which performs bonding-related processing. In bonding, multiple physical connections are established between two devices. This means that one device has multiple ports connected to the other. These connections improve bandwidth and network reliability between devices.

[0046] Port Binding Group

[0047] In bonding technology, multiple ports of a device connected to the same peer device can be configured into a port binding group. The multiple ports in a port binding group can belong to different network cards of the device, or they can belong to the same network card of the device. The embodiments of this disclosure are described using the case where multiple ports belong to different network cards, and other cases are not described in detail. The multiple ports in a port binding group correspond to a data link. Generally speaking, a data link actually refers to a logical link. In other words, no matter which of these multiple ports a device uses to communicate with the peer, it uses this data link.

[0048] Through bonding negotiation between the device and the peer device, a primary port and a backup port are determined among the multiple ports in the port binding group. The device can initially use the primary port to communicate with the peer device over a data link. If the primary port fails, the backup port can continue to communicate with the peer device over the data link.

[0049] Configuration information of the port binding group

[0050] The configuration information may be used to record the port identifier of the primary port of the port binding group and the port identifier of the backup port of the port binding group.

[0051] Active state / Silent state

[0052] In a port binding group, the currently used port is set to the active state, and the currently unused port is set to the silent state. For example, after the bonding negotiation process, the primary port can be set to the active state and the backup port can be set to the silent state.

[0053] Link information

[0054] Link information includes the basic information required for Ethernet data transmission between devices. Link information may include connection-related information, routing-related information, and service-related information. Connection-related information may include the Internet Protocol (IP) address and Media Access Control (MAC) address of the devices at both ends of the data link. Routing-related information may include routing tables, label forwarding tables, and other related information used for message forwarding. Service-related information includes information about services at the network layer and transport layer, such as information about the RDMA service being executed, which may specifically include the memory address for reading data and the destination device address for sending the read data. When the above information changes, the link information will be updated.

[0055] The link information may be information such as queue pair context (QPC).

[0056] Doorbell (DOORBELL) message

[0057] Messages that communicate directly between different expansion cards on the motherboard do not need to be transmitted through the CPU, have strong flexibility, and generally do not carry a large amount of data.

[0058] The present disclosure provides a method for port failover. This method can be applied to any computer device with network communication capabilities, such as a server, switch, or terminal. The computer device can be configured with multiple DPUs that support technologies such as TOE (or DTOE), ROCE, etc. The computer device is connected to a peer device via multiple ports. The server can be a database system server, a network service server, a cloud computing server, etc.

[0059] From a software perspective, the computer device may be installed with an operating system and a link management application. The operating system may have a bonding component (a set of executable code in the operating system that can establish a bonding unit when executed). The link management application can be a standalone application or a functional component attached to other applications. For example, it can be a functional component attached to a network card driver, which can establish a link management unit when running the link management application. In the embodiments of the present disclosure, the port fault switching method can be implemented by the link management unit and the bonding unit in combination, or the functions of the link management unit and the bonding unit can be integrated into a single execution unit to implement the method.

[0060] From a hardware perspective, as shown in FIG1 , the computer device may include a processor 110, a memory 120, and multiple DPUs 130. In the disclosed embodiment, the port failover method may be implemented by the processor 110 in conjunction with the memory 120 and the DPU 130. These components are described in detail below:

[0061] Processor 110 may include any one or more processors such as a CPU, a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP). The processor may be used to negotiate with a peer device to obtain configuration information, obtain and send link information, receive and process fault messages sent by a DPU, and so on. The embodiments of this disclosure use a CPU as an example to provide a detailed description of the solution.

[0062] The memory 120 may include a volatile memory, such as a random access memory (RAM). The memory may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD). The memory used in the embodiment of the present disclosure may be a double data rate synchronous dynamic random access memory (DDR SDRAM) in RAM, also referred to as DDR. DDR can be used to store pre-stored data, intermediate data, and result data related to the processing process, such as link information, etc.

[0063] The DPU 130 may be a network card used to enable communication between the computer device where the DPU is located and other devices or communication networks. The DPU may also communicate with the processor via a bus. The DPU may also detect whether it is operating normally through certain signals. When a port failure is detected on the network card, the DPU may notify the CPU of the port failure message. The DPU may include a measurement processing unit (MPU) and a neural network processing unit (NPU). The MPU is responsible for control-plane processing, and the NPU is responsible for data-plane processing.

[0064] An embodiment of the present disclosure provides a method for port failover, which is applied to a first device. The first device has at least a first port and a second port, and the first port and the second port are both connected to the second device, that is, there are at least two physical connections between the first device and the second device. These ports connected to the second device are configured as a port binding group. These ports connected to the second device may belong to different DPUs, or some or all of the ports may belong to the same DPU. In the embodiment of the present disclosure, the case where these ports belong to different DPUs is taken as an example to provide a detailed description of the solution, and other cases will not be repeated.

[0065] The processing flow of the port failover method provided by the embodiment of the present disclosure may be shown in FIG2 , including the following steps:

[0066] 201. A first DPU communicates with a second device via a data link using a first port.

[0067] The first port is the primary port of the port binding group and belongs to the first DPU.

[0068] After the first device is powered on, it performs a bonding negotiation process to determine the primary and backup ports in the port binding group. It then sets the primary port (i.e., the first port) to active and the backup port to silent. A data link is established with the second device via the primary port to generate link information, which is then assigned to the first port. This process is described in detail later.

[0069] At this time, the first device configures the link information to the first port, and the first device can use the first port to communicate with the second device through the data link.

[0070] 202. The first DPU notifies the second DPU where the second port is located of the link information of the first port for storage.

[0071] The second port is a backup port of the port binding group and belongs to the second DPU. The link information is used for the first device to communicate with the second device through the data link using the first port.

[0072] There are several possible notification methods. The following describes several feasible methods: Method 1: The CPU sends the link information of the first port of the first DPU to the second DPU; Method 2: Other components outside the CPU (such as another chip) send the link information of the first port of the first DPU to the second DPU; Method 3: The first DPU directly sends the link information of the first port to the second DPU. These methods will be further described in the following content.

[0073] After receiving the link information, the second DPU may store the link information in the DPU memory of the current DPU, so that the link information can be quickly acquired when the second port is in an activated state.

[0074] Subsequently, after each link data update, the first DPU may use the same processing method to notify the second DPU of the updated link information.

[0075] 203. When it is determined that the first port of the first DPU fails, the second DPU sets the second port to an activated state and configures the stored link information to the second port, and continues to communicate with the second device using the above data link through the second port based on the link information.

[0076] After the CPU determines that the first port has failed, it sends a notification to the second DPU to set the second port to an activated state. After receiving the notification, the second DPU sets the second port to an activated state and configures the link information pre-stored in its DPU memory to the second port. Specifically, the port identifier of the first port in certain information included in the link information can be modified to the port identifier of the second port, including: for the routing table entry containing the port identifier of the first port, the port identifier of the first port is changed to the port identifier of the second port. At this time, the first device uses the second port to continue communicating with the second device through the above-mentioned data link. The link information used by the second port and the first port is the same, that is, they use the same data link, that is, although the port is switched, the data link is continuously available. In this way, the business data transmission can be guaranteed to have good continuity during the port switching process.

[0077] When the first port fails, if the first port is transmitting business data (network layer, transport layer business, such as RDMA business), then when the corresponding business starts, the link information will be updated once, and the updated link information will also be notified to the second DPU. That is to say, when the first port fails, the link information stored by the second DPU contains business-related information of the business being carried out by the first port (for example, the relevant information of the executing RDMA business may include the memory address for reading data and the destination device address for sending the read data to the outside, etc.). Using this business-related information, the second DPU can continue to execute the unfinished business of the first port.

[0078] Here are some methods to determine if the first port is invalid:

[0079] Method 1: The first DPU performs fault detection on the first port.

[0080] A port's designated pin can reflect the network cable connection status of that port. When a fault occurs on the first port of the first DPU (for example, if the network cable connected to the first port is damaged, broken, or disconnected), the MPU in the first DPU can detect an abnormal change in the signal on that pin (for example, from a high level to a low level), thereby determining that a connection fault has occurred on the first port. The first DPU then sends a fault message about the first port to the bonding unit. This fault message can include the port identifier of the first port.

[0081] The bonding unit searches for the port identifier of the first port in the configuration information of each port binding group stored in it, and finds that the port identifier of the first port is included in the configuration information of a certain port binding group, and then determines the port identifier of the backup port recorded in the configuration information. If there is only one port identifier of a backup port in the configuration information, it is further determined that the backup port is in a silent state, and then the port identifier can be directly determined as the port identifier of the port to be activated. If there are multiple port identifiers of backup ports in the configuration information, a backup port in a silent state can be selected from the multiple backup ports based on a preset selection mechanism as the port to be activated, and the port identifier of the port to be activated is obtained. The selection mechanism can be based on priority selection, polling selection, random selection, etc. This port to be activated is the above-mentioned second port. Further, the bonding unit can send a notification to activate the second port to the link control unit, and the notification can carry the port identifier of the second port.

[0082] After receiving the notification, the link control unit determines, based on the port identifier of the second port, that the DPU to which the second port belongs is the second DPU, and then sends a notification to the second DPU to activate the second port. The second DPU then searches its records for the second port's status based on the port identifier of the second port, discovers that the second port is currently in a silent state, and then switches the silent state to an active state. The stored link information is then configured for the second port.

[0083] Method 2: The network card driver performs fault detection on the first DPU.

[0084] During operation, the first DPU periodically sends heartbeat messages to the network interface card driver. The network interface card driver can monitor the operating status of the first DPU through this heartbeat information. If the first DPU fails and stops operating, the network interface card driver will not receive heartbeat messages from the first DPU within a certain period of time, thereby determining that the first DPU has failed. The network interface card driver then sends a fault message to the bonding unit. This fault message may carry the identification information of the first DPU.

[0085] The bonding unit determines the port identifiers of all ports in the first DPU and then searches for these port identifiers in the configuration information of each port binding group stored in the unit. It finds a port binding group whose configuration information includes the port identifier of the first port. Subsequent processing is similar to that in Method 1 and is not further described here.

[0086] In the embodiment of the present disclosure, the first device establishes a data link with the second device through the main port (first port) in the port binding group for communication. At the same time, the first DPU to which the main port belongs notifies the second DPU to which the backup port (second port) belongs of the link information of the data link for storage. In this way, the DPUs corresponding to the main port and the backup port in the port binding group can simultaneously maintain the link information of the data link. When the main port fails, the backup port can be activated, and the link information stored in the second DPU where the backup port is located can be configured for use by the backup port. In this way, the first device can continue to use the data link to communicate with the second device through the backup port. In this way, the continuous availability of the data link can be guaranteed in the event of port failure. Moreover, because the link information has been stored in the second DPU, the process of the second DPU configuring the link information to the backup port can be completed in a very short time. As long as the configuration is completed, the business data transmission of the data link can continue, which can better ensure the continuity of business data transmission. In contrast, if a port fails and there is no method to maintain the data link, a new data link must be selected to transmit the corresponding business data. However, reselecting the data link requires a series of complex calculations and configuration processes, which is time-consuming and will result in a prolonged interruption of business data transmission.

[0087] The present disclosure provides a preliminary configuration process for performing bonding configuration and generating link information. The process may be performed before step 101. The corresponding process may be shown in FIG3 and may include the following steps:

[0088] 301. The processor negotiates with the second device through a bonding unit to obtain configuration information of a port binding group.

[0089] The ports included in a port binding group can be pre-configured and recorded in the bonding unit, manually configured, or automatically configured by the device through a certain detection mechanism. The negotiation process can determine the primary port and backup port among the ports included in the port binding group.

[0090] A first port and a second port belong to the same port binding group. The configuration information negotiated for the port binding group may include: the primary port includes the first port of the first DPU, and the backup port includes the second port of the second DPU. This configuration information may be divided into first sub-information and second sub-information based on the DPU to which the ports belong. The first sub-information includes the port identifier of the first port (e.g., the port identifier of the first port is A1) and flag information indicating the primary port (e.g., the flag information may be 1). Specifically, the first sub-information indicates that the first port is the primary port of the port binding group. Furthermore, the first sub-information may include identification information of the first DPU. The second sub-information includes the port identifier of the second port (e.g., the port identifier of the second port is B1) and flag information indicating the backup port (e.g., the flag information may be 0). Specifically, the second sub-information indicates that the second port is the backup port of the port binding group. Furthermore, the second sub-information may include identification information of the second DPU. The bonding unit may store the configuration information in a configuration information table in correspondence with the group identifier of the port binding group (e.g., the group identifier of the port binding group is bond1), as shown in Table 1.

[0091] Table 1

[0092] The bonding unit also runs and maintains a status information table for each port. The status information table is used to record whether each port in the port binding group is in a silent state, an active state, or a disabled state.

[0093] 302. The processor sends the first sub-information to the first DPU and sends the second sub-information to the second DPU.

[0094] The bonding unit in the processor sends the configuration information and group identifier of the port binding group to the link control unit in the processor. The link control unit can store the configuration information and group identifier in correspondence. For each sub-information in the configuration information, different sub-information is sent to the corresponding DPU based on the DPU identification information in the sub-information, that is, the link control unit sends the first sub-information to the first DPU, and sends the second sub-information to the second DPU. At the same time, the link control unit can also notify the DPU where the primary port is located of the identification information of all DPUs corresponding to the ports in the port binding group, that is, the notification sent by the link control unit to the first DPU can carry the first sub-information and the identification information of the second DPU. In addition, the notification sent by the link control unit to each DPU can also carry the group identifier.

[0095] 303. The first DPU sets the first port to an activated state, establishes a data link between the first port and the second device, and generates link information of the first port.

[0096] After receiving the first sub-message, the first DPU activates the first port, performs a handshake process with the second device through the first port to establish a data link, and generates link information for the first port. The first DPU assigns this link information to the first port, enabling the first device to communicate with the second device through the data link using the first port.

[0097] 304. The second DPU sets the second port to a silent state.

[0098] In terms of timing, there is no necessary sequence relationship between steps 303 and 304.

[0099] The present disclosure provides a method for processing a first DPU notifying a second DPU of link information. The corresponding process may be shown in FIG4 , including the following steps:

[0100] 401. A first DPU sends link information of a first port to a processor.

[0101] The first DPU first backs up the link information corresponding to the first port, and then sends the backed-up link information and the group identifier of the port binding group to which the first port belongs to the link control unit.

[0102] 402. The processor stores the link information in the memory.

[0103] The link control unit can apply for a certain amount of memory space when it starts up. When it receives link information and group IDs, it can store the link information and group IDs in the memory space. This memory space can store the link information corresponding to all port binding groups.

[0104] 403. The first DPU sends an instruction message for reading link information to the second DPU.

[0105] The first DPU and the second DPU can be connected to the motherboard through the PCIE slot, and the circuit inside the motherboard can transmit a DOORBELL message, that is, an instruction message for reading link information. The DOORBELL message can carry the group identifier of the port binding group.

[0106] 404. The second DPU sends a read request to the processor.

[0107] The second DPU sends a link information read request to the link control unit in the processor, where the read request carries the group identifier of the port binding group.

[0108] 405 : The processor reads the link information of the first port from the memory, and sends the link information to the second DPU for storage.

[0109] The link control unit reads the corresponding link information from the memory based on the group identifier and sends the link information to the second DPU. After receiving the link information, the second DPU stores the link information in its own DPU memory.

[0110] In the disclosed embodiments, a port binding group may include more than one backup port, i.e., more than one backup port, the second port, and more than one primary port, i.e., more than one primary port, the first port. A corresponding operating mode may be such that all primary ports are initially set to an active state, with all primary ports performing data transmission. If any primary port fails, a backup port is selected, set to an active state, and also participates in data transmission.

[0111] Case 1: The port binding group includes multiple backup ports.

[0112] The bonding unit in the processor negotiates with the other end to obtain configuration information, and divides the configuration information into several sub-information, each of which is used to indicate whether a port in the port binding group is a primary port or a backup port. The bonding unit then sends the configuration information and the group identifier of the port binding group to the link control unit, which then sends each sub-information to the corresponding DPU. For all DPUs corresponding to the ports in the port binding group, the link control unit can determine the identification information of other DPUs in these DPUs except the first DPU, and notify the first DPU (also known as the primary DPU) of the identification information of other DPUs. In addition, the notification sent by the link control unit to each DPU may also carry a group identifier. The first DPU activates the first port, establishes a data link between the first port and the second device, generates corresponding link information, and then configures the link information to the first port. The DPUs where all backup ports are located (also known as backup DPUs) set their respective backup ports to a silent state.

[0113] The first DPU notifies all backup DPUs of the link information for the first port for storage. Specifically, the first DPU sends a link information read instruction message to each backup DPU. The instruction message carries the group identifier of the port binding group. Each backup DPU then sends a read request carrying the group identifier to the link control unit. The link control unit reads the corresponding link information from its memory based on the group identifier and sends the link information to each backup DPU. After receiving the link information, each backup DPU stores it in its own DPU memory.

[0114] In case 2, the port binding group includes multiple primary ports.

[0115] The case of multiple primary ports is handled similarly to the case of multiple backup ports. The first DPU activates the first port, establishes a data link between the first port and the second device, generates corresponding link information, and then configures this link information for the first port. This link information is then notified to all DPUs where the primary ports reside, using the same process as in case 1. The DPUs that receive the link information can configure it for the primary ports within the DPU.

[0116] After each link data update, the first DPU may adopt the same processing method as above to notify the DPUs where all backup ports are located and the DPUs where other primary ports except the first port are located of the updated link information.

[0117] The following describes the configuration process before a port failure occurs, using an example application scenario. As shown in Figure 5, the first device includes a CPU, a first DPU, a second DPU, and memory. The CPU includes a bonding unit and a link control unit, the first DPU includes ports 3 and 4, and the second DPU includes ports 5 and 6. Port 4 is connected to port 1 of the second device, and port 5 is connected to port 2 of the second device. The detailed processing flow is as follows:

[0118] In the first step, the bonding unit negotiates with the second device to obtain configuration information. The configuration information is that port 4 and port 5 belong to the same port binding group, port 4 is the primary port, and port 5 is the backup port.

[0119] In the second step, the bonding unit notifies the link control unit of the configuration information and the group identifier of the port binding group.

[0120] In the third step, the link control unit sends information that port 4 is the primary port to the first DPU, and sends information that port 5 is the backup port to the second DPU.

[0121] In the fourth step, the first DPU sets port 4 to the active state, and the second DPU sets port 5 to the silent state.

[0122] In step 5, the first DPU establishes a data link with the second device through port 4 and generates link information. The first device uses port 4 to communicate with the second device through the data link.

[0123] In the sixth step, the first DPU backs up the link information, and then sends the backed-up link information and the group identifier of the port binding group to the link control unit.

[0124] In the seventh step, the link control unit stores the link information and the group identifier in the memory in correspondence.

[0125] In the eighth step, the first DPU sends a DOORBELL message to the second DPU, instructing the second DPU to read the link information. The DOORBELL message carries the above group identifier.

[0126] In the ninth step, the second DPU sends a read request carrying the group identifier to the link control unit.

[0127] In the tenth step, the link control unit reads the link information in the memory based on the group identifier.

[0128] In the eleventh step, the link control unit sends the link information to the second DPU for storage.

[0129] Continuing with the above application scenario, we'll explain the port failover process in detail. Figures 6 and 7 show the detailed process flow. Figure 6 corresponds to the fault detection method where the first DPU performs fault detection on the first port, while Figure 7 corresponds to the fault detection method where the network card driver performs fault detection on the DPU.

[0130] First, let’s introduce the processing flow shown in Figure 6:

[0131] In the first step, the first DPU detects a failure in port 4.

[0132] In the second step, the first DPU sends a fault message of port 4 to the bonding unit.

[0133] In the third step, the bonding unit determines in the configuration information of the port binding group that the backup port corresponding to port 4 is port 5.

[0134] In the fourth step, the bonding unit sends a notification to activate port 5 to the link control unit.

[0135] In the fifth step, the link control unit notifies the second DPU to activate port 5.

[0136] In step 6, the second DPU switches the state of port 5 from the silent state to the active state.

[0137] In step 7, the second DPU configures the link information stored in its own DPU memory to port 5. The first device uses port 5 to communicate with the second device through the data link.

[0138] The following describes the processing flow shown in FIG7 . This processing flow is different from the first to third steps of the processing flow shown in FIG6 , and is described in detail below:

[0139] In the first step, the network card driver detects that the first DPU has no heartbeat message for a long time.

[0140] In the second step, the network card driver sends a message indicating the failure of the first DPU to the bonding unit.

[0141] In the third step, the bonding unit searches for the ports included in the first DPU in the configuration information of each port binding group, finds that port 4 is the primary port of a port binding group, and then determines that the backup port corresponding to port 4 is port 5.

[0142] In the fourth step, the bonding unit sends a notification to activate port 5 to the link control unit.

[0143] In the fifth step, the link control unit notifies the second DPU to activate port 5.

[0144] In step 6, the second DPU switches the state of port 5 from the silent state to the active state.

[0145] In step 7, the second DPU configures the link information stored in its own DPU memory to port 5. The first device uses port 5 to communicate with the second device through the data link.

[0146] The following describes an application scenario in which a port binding group includes multiple primary ports and multiple backup ports. As shown in Figure 8, in this scenario, the port binding group configuration information indicates that ports 4, 5, 8, and 9 belong to the same port binding group. The primary ports are ports 4 and 8, and the backup ports are ports 5 and 9.

[0147] In this application scenario, during the pre-fault configuration process, the processing flow from steps 1 to 5 is the same as that shown in Figure 5. We will not repeat them here and will directly start with step 6 to describe the link information distribution process in detail.

[0148] Step 6: The first DPU backs up the link information and then sends the backed-up link information and the group identifier of the port binding group to the link control unit.

[0149] In the seventh step, the link control unit stores the link information and the group identifier in the memory in correspondence.

[0150] In the eighth step, the first DPU sends a DOORBELL message to the second DPU, the third DPU and the fourth DPU respectively, instructing the second DPU, the third DPU and the fourth DPU to read the link information. The DOORBELL message may carry a group identifier.

[0151] In the ninth step, the second DPU, the third DPU, and the fourth DPU send a read request carrying the group identifier to the link control unit.

[0152] In the tenth step, the link control unit reads the link information in the memory based on the group identifier.

[0153] In the eleventh step, the link control unit sends the link information to the second DPU, the third DPU, and the fourth DPU for storage.

[0154] Based on the same technical concept, an embodiment of the present disclosure provides a first device, as shown in FIG9 , the first device includes a first DPU 910 and a second DPU 920 , the first DPU 910 includes a first port, and the second DPU 920 includes a second port.

[0155] The first DPU910 is used for:

[0156] The first port is used to communicate with the second device via a data link. Specifically, the processing function of the above step 201 and other implicit steps can be implemented.

[0157] The link information of the first port is notified to the second DPU 920 for storage. The first port and the second port belong to the same port binding group. The first port is the primary port of the port binding group and is in an active state. The second port is the backup port of the port binding group and is in a silent state. Specifically, the processing function of the above step 202 and other implicit steps can be implemented.

[0158] The second DPU 920 is configured to activate the second port of the first DPU 910 when the first port fails, and continue to communicate with the second device via the second port using the data link based on the link information. Specifically, the processing function of step 203 above and other implicit steps may be implemented.

[0159] In one possible implementation, the first device further includes a CPU 930 , and the CPU 930 communicates with the first DPU 910 and the second DPU 920 via a computer bus.

[0160] The first DPU 910 is configured to send the link information of the first port to the CPU 930. Specifically, the processing function of the above step 401 and other implicit steps can be implemented.

[0161] The CPU 930 is configured to store the link information in the memory, and specifically implement the processing function of the above step 402 and other implicit steps.

[0162] The second DPU 920 is configured to send a read request to the CPU 930. Specifically, the second DPU 920 can implement the processing function of step 404 and other implicit steps.

[0163] The CPU 930 is configured to read the link information from the memory and send the link information to the second DPU 920 for storage. Specifically, the processing function of the above step 405 and other implicit steps can be implemented.

[0164] In one possible implementation, the first DPU 910 is further configured to send an instruction message for reading link information to the second DPU 920, wherein the instruction message is a DOORBELL message. Specifically, the processing function of the above step 403 and other implicit steps can be implemented.

[0165] In one possible implementation, the CPU 930 is configured to:

[0166] Negotiate with the second device to obtain configuration information of the port binding group, the configuration information including first sub-information and second sub-information, the first sub-information indicating that the first port is the primary port of the port binding group, and the second sub-information indicating that the second port is the backup port of the port binding group. Specifically, the processing function of step 301 above and other implicit steps can be implemented.

[0167] The first sub-information is sent to the first DPU 910, and the second sub-information is sent to the second DPU 920. Specifically, the processing function of the above step 302 and other implicit steps can be implemented.

[0168] The first DPU 910 is further configured to set the first port to an active state, establish a data link between the first port and the second device, and generate link information for the first port, specifically implementing the processing functions of step 303 above and other implicit steps.

[0169] The second DPU 920 is further configured to set the second port to a silent state, and specifically implement the processing function of the above step 304 and other implicit steps.

[0170] In a possible implementation, the link information includes an Internet Protocol (IP) address and a Media Access Control (MAC) address of the first device and an IP address and MAC address of the second device.

[0171] In a possible implementation, the port binding group includes multiple backup ports.

[0172] The first DPU 910 is further configured to notify the DPUs where other backup ports, except the second port, are located of the link information of the first port for storage.

[0173] In a possible implementation, the CPU 930 is further configured to:

[0174] A second port is selected from the multiple standby ports as a port to be activated.

[0175] The second DPU 920 is notified of the second port.

[0176] In one possible implementation, the port binding group includes multiple primary ports;

[0177] The first DPU 910 is further configured to notify the DPUs where other primary ports other than the first port are located of the link information of the first port, so as to configure the link information to the other primary ports.

[0178] In one possible implementation, the CPU 930 is configured to send an activation notification of the second port to the second DPU 920 upon receiving a fault message of the first port from the first DPU 910. Specifically, the processing function of the above step 203 and other implicit steps may be implemented.

[0179] The second DPU 920 is configured to set the second port to an active state and configure the stored link information to the second port, and specifically implement the processing function of step 203 above, as well as other implicit steps.

[0180] In one possible implementation, the CPU 930 of the first device is configured to send an activation notification of the second port to the second DPU 920 when the first DPU 910 fails. Specifically, the processing function of the above step 203 and other implicit steps may be implemented.

[0181] The second DPU 920 is configured to set the second port to an active state and configure the stored link information to the second port, and specifically implement the processing function of step 203 above, as well as other implicit steps.

[0182] In the embodiment of the present disclosure, the first device establishes a data link with the second device through the main port (first port) in the port binding group for communication. At the same time, the first DPU to which the main port belongs notifies the second DPU to which the backup port (second port) belongs of the link information of the data link for storage. In this way, the DPUs corresponding to the main port and the backup port in the port binding group can simultaneously maintain the link information of the data link. When the main port fails, the backup port can be activated, and the link information stored in the second DPU where the backup port is located can be configured for use by the backup port. In this way, the first device can continue to use the data link to communicate with the second device through the backup port. In this way, the continuous availability of the data link can be guaranteed in the event of port failure. Moreover, because the link information has been stored in the second DPU, the process of the second DPU configuring the link information to the backup port can be completed in a very short time. As long as the configuration is completed, the business data transmission of the data link can continue, which can better ensure the continuity of business data transmission. In contrast, if a port fails and there is no method to maintain the data link, a new data link must be selected to transmit the corresponding business data. However, reselecting the data link requires a series of complex calculations and configuration processes, which is time-consuming and will result in a prolonged interruption of business data transmission.

[0183] The embodiments of the present disclosure also provide a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device, or a data storage device such as a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disk (DVD)), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct a computing device to perform a port failover method, or instruct a computing device to perform a port failover method.

[0184] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the various embodiments of the present disclosure.

Claims

1. A method for port failover, characterized in that The method is applied to a first device, which includes a first data processor DPU and a second DPU. The first DPU includes a first port, and the second DPU includes a second port. The method includes: the first DPU communicates with a second device through a data link using the first port; The first DPU notifies the second DPU to store the link information of the first port. The first port and the second port belong to the same port binding group. The first port is the primary port of the port binding group and is in an active state, and the second port is the standby port of the port binding group and is in a silent state; When the first port of the first DPU fails, the second DPU sets the second port to an active state and continues to communicate with the second device through the second port based on the link information using the data link.

2. The method according to claim 1, wherein The first device further includes a central processing unit CPU, and the CPU communicates with the first DPU and the second DPU through a computer bus. Among them, the first DPU notifying the second DPU where the second port is located to store the link information of the first port includes: The first DPU sends the link information of the first port to the CPU; The CPU stores the link information in the memory; The second DPU sends a read request to the CPU; The CPU reads the link information in the memory and sends the link information to the second DPU for storage.

3. The method according to claim 2, wherein Before the second DPU sends a read request to the CPU, the method further includes: The first DPU sends an indication message for reading the link information to the second DPU, where the indication message is a doorbell DOORBELL message.

4. The method according to any one of claims 1 to 3, characterized in that, Before the first DPU notifies the second DPU where the second port is located to store the link information of the first port, the method further includes: The CPU of the first device negotiates with the second device to obtain the configuration information of the port binding group. The configuration information includes a first sub-information and a second sub-information. The first sub-information is used to indicate that the first port is the primary port of the port binding group, and the second sub-information is used to indicate that the second port is the standby port of the port binding group; The CPU sends the first sub-information to the first DPU and sends the second sub-information to the second DPU; The first DPU sets the first port to an active state, establishes a data link between the first port and the second device, and generates the link information of the first port; The second DPU sets the second port to a silent state.

5. The method according to any one of claims 1-4, characterized in that, The link information includes the IP address of the network protocol of the first device, the media access control MAC address, and the IP address and MAC address of the second device.

6. The method according to any one of claims 1-5, characterized in that, The port binding group includes multiple standby ports; The method further includes: The first DPU notifies the DPU where other standby ports except the second port are located to store the link information of the first port.

7. The method according to claim 6, characterized in that, Before the second DPU sets the second port to the active state and configures the stored link information to the second port, the method further includes: The CPU of the first device selects the second port as the port to be activated from the multiple standby ports; The CPU notifies the second DPU of the second port.

8. The method according to any one of claims 1-7, characterized in that, The port binding group includes multiple primary ports; The method further includes: The first DPU notifies the link information of the first port to the DPU where other primary ports except the first port are located, so as to configure the link information to the other primary ports.

9. The method according to any one of claims 1 to 8, characterized in that, When it is determined that the first port of the first DPU fails, the second DPU sets the second port to the active state and configures the stored link information to the second port, including: When the CPU of the first device receives the failure message of the first port sent by the first DPU, it sends an activation notification of the second port to the second DPU; The second DPU sets the second port to the active state and configures the stored link information to the second port.

10. The method according to any one of claims 1-8, characterized in that, When it is determined that the first port of the first DPU fails, the second DPU sets the second port to the active state and configures the stored link information to the second port, including: When the first DPU fails, the CPU of the first device sends an activation notification of the second port to the second DPU; The second DPU sets the second port to the active state and configures the stored link information to the second port.

11. A first device for port failover, characterized in that, The first device includes a first DPU and a second DPU. The first DPU includes a first port, and the second DPU includes a second port; The first DPU is used to communicate with the second device through the data link using the first port; Notify the link information of the first port to the second DPU for storage. The first port and the second port belong to the same port binding group. The first port is the primary port of the port binding group and is in the active state, and the second port is the standby port of the port binding group and is in the silent state; The second DPU is used to, when the first port of the first DPU fails, set the second port to the active state, and continue to communicate with the second device through the second port based on the link information.

12. The first device according to claim 11, characterized in that, The first device further includes a central processing unit CPU, and the CPU communicates with the first DPU and the second DPU through a computer bus; The first DPU is used to send the link information of the first port to the CPU; The CPU is used to store the link information in the memory; The second DPU is used to send a read request to the CPU; The CPU is further used to read the link information in the memory and send the link information to the second DPU for storage.

13. The first device according to claim 12, characterized in that, The first DPU is further used to send an indication message for reading the link information to the second DPU, where the indication message is a doorbell DOORBELL message.

14. The first device according to any one of claims 11-13, characterized in that, The CPU of the first device is used to negotiate with the second device to obtain the configuration information of the port binding group. The configuration information includes first sub-information and second sub-information. The first sub-information is used to indicate that the first port is the primary port of the port binding group, and the second sub-information is used to indicate that the second port is the standby port of the port binding group; send the first sub-information to the first DPU and send the second sub-information to the second DPU; The first DPU is further used to set the first port to an active state, establish a data link between the first port and the second device, and generate link information of the first port; The second DPU is further used to set the second port to a silent state.

15. The first device according to any one of claims 11-14, characterized in that, The link information includes the network protocol IP address of the first device, the media access control MAC address, and the IP address and MAC address of the second device.

16. The first device according to any one of claims 11-15, characterized in that, The port binding group includes multiple standby ports; The first DPU is further used to notify the DPU where other standby ports except the second port are located to store the link information of the first port.

17. The first device according to claim 16, wherein The CPU of the first device is further used to: Select the second port as the port to be activated from the multiple standby ports; Notify the second port to the second DPU.

18. The first device according to any one of claims 11-17, characterized in that, The port binding group includes multiple primary ports; The first DPU is further used to notify the DPU where other primary ports except the first port are located of the link information of the first port, so as to configure the link information to the other primary ports.

19. The first device according to any one of claims 11-18, characterized in that, The CPU of the first device is used to send an activation notification of the second port to the second DPU when receiving the fault message of the first port sent by the first DPU; The second DPU is used to set the second port to an active state and configure the stored link information to the second port.

20. The first device according to any one of claims 11-18, characterized in that The CPU of the first device is used to send an activation notification of the second port to the second DPU when the first DPU fails; The second DPU is used to set the second port to an active state and configure the stored link information to the second port.

21. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program code. When the computer program code is executed by a computer device, the computer device executes the method according to any one of claims 1-10 above.

Citation Information

Patent Citations

  • Port failover method and device, and storage medium

    CN120238423A

  • Business link switching method and storage device in storage system

    CN106059791A

  • Fault handling method and device

    CN109327383A

  • Knife box link management method and device, equipment and machine readable storage medium

    CN112383471A

  • Bonding-based multi-WiFi multi-link communication method, device, equipment and medium

    CN117062133A

Cited By

  • Communication link monitoring method and device, electronic equipment, storage medium and product

    CN121000636A