WO2021196904A1 - 一种设备管理方法、装置及计算机系统 - Google Patents

一种设备管理方法、装置及计算机系统 Download PDF

Info

Publication number
WO2021196904A1
WO2021196904A1 PCT/CN2021/076422 CN2021076422W WO2021196904A1 WO 2021196904 A1 WO2021196904 A1 WO 2021196904A1 CN 2021076422 W CN2021076422 W CN 2021076422W WO 2021196904 A1 WO2021196904 A1 WO 2021196904A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
switching device
information
response
multiple ports
Prior art date
Application number
PCT/CN2021/076422
Other languages
English (en)
French (fr)
Inventor
胡天驰
兰可嘉
凌文凯
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021196904A1 publication Critical patent/WO2021196904A1/zh
Priority to US17/935,940 priority Critical patent/US20230018349A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to the field of computer technology, in particular to an equipment management method, device and computer system.
  • the high-speed serial computer bus standard peripheral component interconnect express, PCIe
  • PCIe peripheral component interconnect express
  • the tree topological structure is a hierarchical structure, which is formed by the vertical connection of multiple levels of star structures, and there is no loop between any two devices that make up the tree topological structure.
  • the current computer system using the PCIe bus only supports a tree topology, and the standard PCIe topology discovery process is based on the tree topology, and uses a deep traversal method for device enumeration, thereby realizing the management of PCIe devices in the computer system.
  • the tree topology has the problem of too long paths and too large diameter of the entire network.
  • AI artificial intelligence
  • autonomous driving the computing performance of a single-core chip is limited by the physical packaging of the chip and cannot meet the requirements. Therefore, a high-performance computing system composed of multi-chip interconnection Become a trend. For a system composed of multi-chip interconnection, the data transmission performance of the inter-chip interconnection will directly affect the computing performance of the entire system.
  • the embodiment of the present application provides a device management method that can shield loops in a non-tree topology structure, so that a non-tree topology system can also use a standard PCIe topology discovery process.
  • the first aspect of the present application provides a device management method applied to a computer system.
  • the computer system includes a switching device and a device connected to the switching device.
  • the device connected to the switching device may include a processor, other switching devices or acceleration devices,
  • the device management method includes: a first switching device acquires information about devices connected to multiple ports, the first switching device may be any switching device in the computer system, and the multiple ports are part or all of the ports of the first switching device.
  • the first switching device determines the response port of the first switching device according to the information of the devices connected to the multiple ports, where different response ports of the first switching device are connected For different devices, each response port is used to receive the management message or response to the management message sent by the device connected to each response port during the device enumeration process.
  • the first switching device is connected to multiple devices, and each device Both are connected to one or more ports of the first switching device, and a response port corresponds to only one device.
  • the response port is one of the one or more ports that the first switching device is connected to the device.
  • the response port can receive and The management message sent by the connected device during the device enumeration process or the response to the management message, the response port can be any one of the multiple ports connected to the same device, and the first switching device can determine the response port. It is determined randomly, or it can be determined by a certain rule.
  • the first switching device obtains the information of the devices connected to multiple ports, and determines the response port of the first switching device according to the information of the device connected to each port, and different response ports are connected to different devices.
  • the response port is used to receive the management message sent by the device connected to each response port during the device enumeration process or the response to the management message, thereby shielding the loop in the non-tree topology structure, making the non-tree topology system
  • the standard PCIe topology discovery process can also be used.
  • the first switching device acquires information about devices connected to multiple ports, including: the first switching device receives the device connected to each of the multiple ports The first message sent, the first message includes the information of the device connected to each port.
  • the first switching device can receive the first switching device sent by the device connected to each of the multiple ports.
  • One message to obtain the information of the device connected to each port can ensure the accuracy of information acquisition.
  • each port of the first switching device corresponds to a port register, and the port register is used to record each The information of the device connected to each port, for example, the type of the device and the identifier of the device.
  • the first switching device obtains the information of the devices connected to multiple ports, it also includes: the first switching device updates the record in the port register corresponding to each port Information.
  • the first switching device obtains the information of the devices connected to multiple ports, it updates the information recorded in the port register corresponding to each port in a timely manner, and determines which port is connected to each port.
  • the device information connected to the port can be directly obtained by reading the port register of the corresponding port, which can increase the rate of information acquisition and ensure the accuracy of information acquisition.
  • the method further includes: the first switching device sends each The device connected to the port sends a second message, and the second message includes information about the first switching device.
  • the first switching device is based on the performance of devices connected to multiple ports.
  • Information, determining the response port of the first switching device including: the first switching device traverses the information of the devices connected to multiple ports, and determines the response port corresponding to each device connected to the multiple ports.
  • the target device determines that one of the at least two ports is the response port corresponding to the target device, and process the non-responsive port so that the non-responsive port does not return a response during the device enumeration process or returns that the port does not exist.
  • the way of processing non-responsive ports can be to perform port setting operations on non-responsive ports.
  • Port setting operations specifically refer to specific processing of one or more ports connected to the same device based on the responding port, such as combining with the responding port
  • the flag of one or more ports connected to the same device is set.
  • the response port corresponding to each device connected to the first switching device by determining the response port corresponding to each device connected to the first switching device, one or more non-responsive ports connected to the same device with each response port are processed. , So that only the responding port can receive the management message or response to the management message sent by the device connected to it during the device enumeration process, and the non-responding device does not return a response during the device enumeration process or returns that the port does not exist. Therefore, the loop in the non-tree topology structure can be well shielded, and the non-tree topology system can also use the standard PCIE topology discovery process.
  • the response port of the first switching device includes an uplink port
  • the first switching device determines the response port of the first switching device according to the information of the devices connected to the multiple ports, including: the first switching device determines the uplink port according to the information of the devices connected to the multiple ports, and the uplink port is used to receive the processor Management messages sent during device enumeration.
  • the response ports of the first switching device except for the uplink port are used to receive the response of the device connected to the management message during the device enumeration process.
  • the first switching device determines the uplink port according to the information of the devices connected to the multiple ports, including: the first switching device determines A processor exists in devices connected to multiple ports; the first switching device determines that one port connected to the processor is an uplink port.
  • the first switching device may directly set the response port connected to the processor as an uplink port.
  • the first switching device determines the uplink port according to the information of the multiple port connection devices, including: the first switching device determines the multiple There is no processor in the device connected to the two ports; the first switching device receives the third message sent by the second switching device, and determines the uplink port according to the third message.
  • the first switching device obtains the information of devices connected to multiple ports. After the information, it also includes: the first switching device determines the acceleration device connected to the first switching device according to the information of the devices connected to the multiple ports; the first switching device accesses the acceleration device, and maps the configuration space of the acceleration device to the first Exchange equipment.
  • the first switching device can directly obtain its information.
  • the configuration space of the connected acceleration device does not need to be explored one by one for each acceleration device, thereby shortening the time of the entire device enumeration process.
  • the device information includes the type of the device and the identification of the device,
  • the type of the device may include a processor, a switching device, or an acceleration device.
  • the device identifier is a unique identifier used to indicate a device, for example, it may be a device ID.
  • a second aspect of the present application provides a first switching device.
  • the first switching device is applied to a computer system.
  • the computer system further includes a device connected to the first switching device.
  • the first switching device includes: an acquiring unit configured to acquire a plurality of ports Information of the connected device; a determining unit for determining the response port of the first switching device according to the information of the devices connected to the multiple ports acquired by the acquiring unit, wherein different response ports of the first switching device are connected to different devices, each The response port is used to receive the management message or the response to the management message sent by the device connected to each response port during the device enumeration process.
  • the first switching device obtains the information of the devices connected to multiple ports, and determines the response port of the first switching device according to the information of the devices connected to each port, and different response ports are connected to different devices.
  • the response port is used to receive the management message sent by the device connected to each response port during the device enumeration process or the response to the management message, thereby shielding the loop in the non-tree topology structure, making the non-tree topology system
  • the standard PCIe topology discovery process can also be used.
  • the acquiring unit is configured to receive a first packet sent by a device connected to each port among the multiple ports, and the first packet includes each port Information about the connected device.
  • each port of the first switching device corresponds to a port register
  • the port register is used to record each
  • the first switching device further includes: an update unit configured to update the information recorded in the port register corresponding to each port after the obtaining unit obtains the information of the devices connected to the multiple ports.
  • the first switching device further includes: a sending unit for A second message is sent to the device connected to each port, where the second message includes the information of the first switching device.
  • the determining unit is used to traverse devices connected to multiple ports To determine the response port corresponding to each device connected to multiple ports. When there are at least two ports connected to the same target device, determine that one of the at least two ports is the response port corresponding to the target device. The port is processed so that the non-responsive port does not return a response during the device enumeration process or returns that the port does not exist.
  • the response port of the first switching device includes an uplink port
  • the determining unit is configured to determine the uplink port according to the information of the devices connected to the multiple ports obtained by the obtaining unit, and the uplink port is used to receive the management message sent by the processor during the device enumeration process.
  • the determining unit is configured to determine that a processor exists in a device connected to multiple ports; and determine a port connected to the processor It is an upstream port.
  • the determining unit is configured to determine that there is no processor in the device connected to multiple ports; According to the third message, the uplink port is determined according to the third message.
  • the determining unit is further configured to acquire the After the information of the devices connected to the multiple ports, the acceleration device connected to the first switching device is determined according to the information of the devices connected to the multiple ports; the acceleration device is accessed, and the configuration space of the acceleration device is mapped to the first switching device.
  • the device information includes the type of the device and the identifier of the device.
  • a third aspect of the present application provides a switch chip, which is used to execute the method in any one of the first aspect and the first to ninth possible implementation manners of the first aspect.
  • a fourth aspect of the present application provides a computer system.
  • the computer system includes a first switching device and a device connected to the first switching device.
  • the device connected to the first switching device is used to send device information to the first switching device.
  • the first switching device is configured to execute the method in any one of the possible implementation manners of the first aspect and the first to the ninth aspect of the first aspect.
  • the fifth aspect of the present application provides a computer storage medium, which may be non-volatile.
  • the computer storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the first aspect or the method in any possible implementation manner of the first aspect is implemented.
  • the embodiment of the application adopts a device management method.
  • the first switching device obtains information of devices connected to multiple ports, and determines the response port of the first switching device according to the information of the device connected to each port, and different response ports are connected For different devices, each response port is used to receive the response of the device connected to each response port to the management message during the device enumeration process, thereby shielding the loop in the non-tree topology structure, so that the non-tree topology system is also Able to use standard PCIE topology discovery process.
  • FIG. 1 is a schematic structural diagram of a computer system provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of the connection of the Internet provided by an embodiment of the present application.
  • Figure 3(a) is a schematic diagram of a topological loop structure of an internetwork provided by an embodiment of the present application.
  • FIG. 3(b) is a schematic diagram of another topology loop structure of the internetwork provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of an embodiment of a device management method provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of two devices provided in an embodiment of the present application for link-layer link building
  • FIG. 6 is a schematic diagram of an embodiment of a method for a first switching device to determine a response port according to an embodiment of the present application
  • FIG. 7 is a schematic diagram of an embodiment of a method for determining an uplink port provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of mapping the configuration space of an acceleration device to a first switching device according to an embodiment of the present application
  • FIG. 9 is a schematic structural diagram of a first switching device provided by an embodiment of the present application.
  • the naming or numbering of steps appearing in this application does not mean that the steps in the method flow must be executed in the time/logical sequence indicated by the naming or numbering.
  • the named or numbered process steps can be implemented according to the The technical purpose changes the execution order, as long as the same or similar technical effects can be achieved.
  • the division of modules presented in this application is a logical division. In actual applications, there may be other divisions. For example, multiple modules can be combined or integrated in another system, or some features can be ignored
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection between the modules may be electrical or other similar forms. There are no restrictions in the application.
  • modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed to multiple circuit modules, and some or all of them may be selected according to actual needs. Module to achieve the purpose of this application program.
  • FIG. 1 is a schematic diagram of the architecture of a computer system provided by an embodiment of this application.
  • the computer system provided in the embodiment of the present application may include one or more processors 101, an internetwork 102 and one or more acceleration devices 103.
  • the processor 101 in the embodiment of the present application may be a central processing unit (CPU), and the acceleration device 103 may be a graphics processing unit (GPU), a field programmable logic gate array, FPGA) or artificial intelligence (AI) chips, etc.
  • the interconnection network 102 includes one or more switching devices 1021 for connecting the processor 101 and the acceleration device 103.
  • the switching device in the embodiment of the present application may be a PCIe switch chip.
  • the embodiment of the present application does not limit the number of the processor 101, the switching device 1021 and the acceleration device 103 included in the Internet 102.
  • the interconnection network 102 uses a high-speed memory bus protocol for interconnection, and uses a non-tree topology to reduce the end-to-end delay between the processor 101 and the acceleration device 103, while adding features such as multipath and dynamic routing.
  • FIG. 2 is a schematic diagram of the connection of the Internet 102 provided by an embodiment of the application.
  • FIG. 2 shows a non-tree topology in which one processor 101 is connected to ten acceleration devices through four switching devices 1021. It should be noted that FIG. 2 is only an example, and should not be construed as a limitation on the structure of the Internet 102.
  • the non-tree topology of the interconnection network 102 may include two types of topological loop structures as shown in 3(a)-3(b).
  • the loop structure of the first type of topology shown in FIG. 3(a) there are multiple physical links between two switching devices 1021.
  • the second-type topology loop structure shown in FIG. 3(b) multiple switching devices 1021 form a loop.
  • FIG. 3(a) and FIG. 3(b) are exemplary illustrations of two types of topological loop structures in the non-tree topology structure of the interconnection network 102 provided in the embodiments of the present application, and should not be construed as Restrictions on this application.
  • an embodiment of the present application provides a device management method, as shown in FIG. 4.
  • a schematic diagram of an embodiment of a device management method provided by an embodiment of the present application may include:
  • the first switching device acquires information about devices connected to multiple ports.
  • the first switching device may be any one of one or more switching devices 1021 included in the Internet 102.
  • the first switching device after the multiple ports included in the first switching device successfully establish a link with other devices at the link layer, the first switching device first obtains information about the device connected to each port in the multiple ports.
  • the multiple ports refer to some or all of all ports included in the first switching device.
  • the first switching device may obtain information about devices connected to multiple ports by receiving a first packet sent by a device connected to each port in the multiple ports, and the first switching device may obtain information according to The first message sent by the device connected to each port can determine the information of the device connected to each port.
  • the first switching device can also carry the information of the local device in the second message and send it to the device connected to each port through each of the multiple ports, thereby achieving the purpose of point-to-point information exchange.
  • the device information may include the type of the device and the identification of the device.
  • the type of the device may be a switching device, a processor, or an acceleration device.
  • the identification of the device refers to the ID of the device, and the same type The device has its unique ID.
  • each device may include two global registers, one is used to indicate the type of the device TYPE, and the other is used to indicate the identification of the device, such as a GUID.
  • Each port of each device can correspond to a port register, which is used to record the information of the device connected to the port, such as the type of the device and the identification of the device.
  • the first switching device determines the response port of the first switching device according to the information of the devices connected to the multiple ports, wherein different response ports of the first switching device are connected to different devices, and each response port is used to receive and communicate with each other.
  • the management message sent by the device connected to the response port during the device enumeration process or the response to the management message.
  • the first switching device determines the response port of the first switching device according to the information of the devices connected to each port.
  • the first switching device is connected to multiple devices, and each device is connected to one or more ports of the first switching device.
  • the first switching device determines which ports are connected according to the information of the devices connected to the multiple ports The same device is connected.
  • different response ports are connected to different devices, and the response port of the first switching device is used to receive the management message sent by the device connected to the response port during the device enumeration process or to receive the response The response of the device connected to the port to the management message during the device enumeration process.
  • a response port corresponds to only one device.
  • the response port is one of the one or more ports that the first switching device connects to the device.
  • Other ports can be regarded as non-response ports. Only the response port will receive the device in the device.
  • the management message sent during the enumeration process or the response of the device to the management message received during the device enumeration process is received.
  • the non-response port will not receive the management message sent by the device during the device enumeration process or the device is in the device
  • the non-response port can also return information that the port does not exist, thereby preventing the discovery loop.
  • the response port may be any one of multiple ports connected to the same device.
  • the method for determining the response port by the first switching device may be determined randomly or determined by a certain rule. The embodiment does not limit this.
  • the embodiment of the present application provides a specific implementation manner in which the first switching device determines the response port of the first switching device according to the information of the devices connected to the multiple ports after acquiring the information of the devices connected to the multiple ports, such as Shown in Figure 6.
  • an embodiment of the method for the first switching device to determine the response port may include:
  • the first switching device sets a port as a starting port.
  • the information recorded in the port register of each port is updated to record the information of the connected device, such as the type and identification of the device.
  • the first switching device can know the information of the device connected to the port by reading the content recorded in the port register.
  • the first switching device first sets a starting port from the multiple ports, and the starting port may be any one of the multiple ports.
  • the number of multiple ports included in the first switching device is 50, and the numbers are 0, 1, 2...47, 48, and 49 in sequence.
  • the first switching device may set port 0 as the starting port, and the port register of the starting port records that the device connected to the starting port is device A.
  • the first switching device sequentially traverses the port registers of each port, so as to determine whether the device connected to each port is the same as the device connected to the initial port.
  • the first switching device sequentially traverses the port registers of each other port, and judges the device information recorded by the port register of each port and the port register of the start port. Whether the information of the device is the same. If they are the same, it means that the port and the start port are connected to the same device A, if they are not the same, it means that the port and the start port are connected to different devices.
  • the first switching device performs a port setting operation on each port connected to the same device as the initial port.
  • the first switching device performs port setting on each of the one or more ports operate.
  • the port setting operation specifically refers to performing specific processing on one or more ports connected to the same device based on the initial port.
  • a specific processing method may be to set the flags of one or more ports of the same device connected to the initial port. For example, assuming that the flag bit of a normal port is 0, the flag bit of each port is 0 after multiple ports of the first switching device are successfully established at the link layer. After setting port 0 as the starting port, the first switching device determines that ports 5 and 6 are the same as the devices connected to port 0 during the traversal process, and the first switching device sets the flag bits of port 5 and port 6 to 1. In this way, the port setting operation of port 5 and port 6 is realized.
  • Port 0 is used as a normal port, which is the response port of the connected device A. During the PCIe device enumeration process, if the flag of a certain port is set, the port will not receive the management message or response to the management message sent during the enumeration process of the device connected to the port.
  • the first switching device selects the next port as the starting port and performs the port setting operation until all port processing is completed.
  • the first switching device selects the next port as the new starting port , And repeat the operations in step 602-step 603 to complete a new round of port setting operations until all ports are processed, and each start port set by the first switching device is the response port of the first switching device.
  • next port is a port whose flag bit is not set, and the port whose flag bit has been set will not participate in a new round of port setting operations.
  • step 601-step 602 port 0 is set as the starting port.
  • the first A switching device can set port 1 as the new starting port, and the device connected to port 1 is device B.
  • the first switching device will use the same method as in step 602-step 603 to determine one of the same devices connected to port 1 Or multiple ports, and set one or more ports connected to the same device as port 1, so as to complete a new round of port setting operations.
  • the first switching device determines all response ports.
  • the ports that are not set, that is, each start port set by the first switching device is the response of the first switching device. port.
  • the method for the first switching device to determine the response port shown in FIG. 6 is only a preferred embodiment for the first switching device to determine the response port in the embodiment of the present application.
  • the first switching device The response port of the first switching device may also be determined by other rules or methods, which are not limited in the embodiment of the present application.
  • the first switching device obtains the information of the devices connected to multiple ports, and determines the response port of the first switching device according to the information of the device connected to each port. Different response ports are connected to different devices, and each response The port is used to receive the management message sent by the device connected to each response port or the response to the management message during the device enumeration process, thereby shielding the loop in the non-tree topology structure, so that the non-tree topology system is also Able to use standard PCIE topology discovery process.
  • the response port of the first switching device includes an uplink port, and the uplink port is used by the first switching device to receive the device connected to the uplink port during the device enumeration process.
  • Management messages sent.
  • none of the response ports of the first switching device other than the uplink port can receive management messages in the device enumeration process.
  • Each response port in the other ports is used to receive The connected device's response to the management message during the device enumeration process.
  • the determination of the uplink port is related to whether the multiple devices connected to the first switching device include a processor. Therefore, in the embodiment of the present application, when the first switching device determines the multiple response devices of the first switching device, it will first base on the information of the device connected to each port, for example, by reading the port register of each port, Determine whether multiple connected devices contain processors. When there is a processor, the first switching device may directly set the response port connected to the processor as an uplink port. When the multiple devices connected to the first switching device do not contain a processor, the uplink port setting is not performed first, but to wait for other switching devices connected to the first switching device, such as the second switching device sent by the second switching device through the target interface.
  • the three messages are configuration messages used to set the uplink port, and the first switching device sets the uplink port according to the third message.
  • the embodiment of the present application provides a schematic diagram of an embodiment of a method for determining an uplink port, please refer to FIG. 7.
  • an embodiment of a method for determining an uplink port may include:
  • the first switching device determines whether there is a port connected to the processor according to the information of the devices connected to the multiple ports.
  • step 402 in FIG. 4 when the first switching device determines the response port of the first switching device according to the information of the devices connected to multiple ports, the first switching device will also connect according to the multiple ports. The information of the device to determine whether there is a port connected to the processor.
  • the first switching device sets the response port connected to the processor as an uplink port.
  • the response port connected to the processor is set as an uplink port.
  • the first switching device may send a fourth message to the one or more third switching devices, where the first message is used to instruct the one or more third switching devices to determine the uplink port.
  • the first switching device determines whether there is an uplink port.
  • the first switching device if the multiple devices connected to the first switching device do not include a processor, and the first switching device receives the third packet sent by the second switching device through the target port, it will first determine whether it has been set Uplink port.
  • the first switching device determines that the uplink port has not been set, it sets the target port as the uplink port. It should be noted that if the first switching device receives the fourth packet sent by multiple third switching devices when the uplink port has not been set, the first port that receives the third packet can be set as the uplink port .
  • the uplink port can also be configured by receiving the configuration information issued by the processor. Setting, this embodiment of the application does not limit this.
  • the first switching device after the first switching device obtains information about devices connected to multiple ports and determines the response port of the first switching device, it will also determine the response port of the first switching device according to the number of ports connected
  • the device information determines the acceleration device connected to the first switching device, and then accesses the acceleration device through the response port connected to the acceleration device, and then maps the PCIe configuration space of these acceleration devices to the first switching device.
  • FIG. 8 it is a schematic flowchart of mapping the configuration space of the acceleration device to the first switching device according to an embodiment of this application.
  • the INIT module in the switching device obtains the device information of the device connected to each of the multiple ports, initiates access to the acceleration device, and then maps the PCIe configuration space of all the acceleration devices to the local In the enhanced configuration access mechanism (ECAM), when device enumeration is performed, the processor scans to the first switching device, and can directly perform one-by-one operation on the acceleration devices connected to it in the first switching device. Scanning instead of scanning each acceleration device separately, thus shortening the PCIe enumeration time of the entire system.
  • ECAM enhanced configuration access mechanism
  • the device management method in the embodiment of the present application is described above. Next, the structure of the first switching device in the embodiment of the present application is specifically introduced, please refer to FIG. 9.
  • FIG. 9 is a schematic structural diagram of a first switching device provided by an embodiment of the application.
  • the first switching device 90 provided by the embodiment of the present application is applied to a computer system.
  • the computer system also includes devices connected to the first switching device 90.
  • the first switching device 90 may include:
  • the obtaining unit 901 is configured to obtain information of devices connected to multiple ports;
  • the determining unit 902 is configured to determine the response port of the first switching device according to the information of the devices connected to the multiple ports acquired by the acquiring unit 901, where different response ports of the first switching device have different connections For devices, each response port is used to receive the management message sent by the device connected to each response port during the device enumeration process or a response to the management message.
  • the first switching device 90 obtains the information of the devices connected to multiple ports, and determines the response port of the first switching device according to the information of the device connected to each port, and different response ports are connected to different devices.
  • the response port is used to receive the management message sent by the device connected to each response port during the device enumeration process or the response to the management message, thereby shielding the loop in the non-tree topology structure, making the non-tree topology system
  • the standard PCIE topology discovery process can also be used.
  • the acquiring unit 901 is configured to receive a first packet sent by a device connected to each port in the multiple ports, where the first packet includes the device connected to each port Information.
  • each port of the first switching device corresponds to a port register
  • the port register is used to record information about the device connected to each port
  • the first switching device further includes :
  • the updating unit 903 is configured to update the information recorded in the port register corresponding to each port after the obtaining unit 901 obtains the information of the devices connected to the multiple ports.
  • the first switching device 90 further includes: a sending unit 904, configured to send a second packet to the device connected to each port, where the second packet includes the first packet 1. Information about exchange equipment.
  • the determining unit 902 is configured to traverse the information of the devices connected to the multiple ports, and determine the response port corresponding to each device connected to the multiple ports, when there are at least two When a port is connected to the same target device, it is determined that one of the at least two ports is the response port corresponding to the target device, and the non-responsive port is processed so that the non-responsive port is not in the device enumeration process. Return a response or return that the port does not exist.
  • the response port of the first switching device includes an uplink port
  • the determining unit 902 is configured to determine according to the information of the devices connected to the multiple ports obtained by the obtaining unit 901
  • the uplink port is used to receive the management message sent by the processor during the device enumeration process.
  • the determining unit 902 is configured to determine that a processor exists in the devices connected to the multiple ports; and determine that one port connected to the processor is the uplink port.
  • the determining unit 902 is configured to determine that there is no processor in the devices connected to the multiple ports; to receive a third packet sent by the second switching device, according to the third packet The text determines the uplink port.
  • the determining unit 902 is further configured to, after the acquiring unit 901 acquires information about devices connected to multiple ports, determine the An acceleration device connected to the first switching device; accessing the acceleration device, and mapping the configuration space of the acceleration device to the first switching device.
  • the information of the device includes the type of the device and the identifier of the device.
  • each of the above modules or units can be implemented by software, hardware, or a combination of software and hardware.
  • the switching device may include one or more processors, and include one or more embedded or external memories.
  • “Implemented by software” means that the processor implements the functions corresponding to the above-mentioned modules or units by reading and executing program instructions stored in the memory.
  • the processor included in the switching device in the embodiment of the present application refers to a processing circuit that has the function of executing program instructions, and specifically refers to a microprocessor or microcontroller (microcontroller unit, MCU) that can run program instructions.
  • MCU microcontroller unit
  • Processing circuits may include one or more cores for executing program instructions to perform data operations or processing. For example: ARM soft core.
  • the switching device may be an independently packaged semiconductor chip.
  • the hardware processing circuits can be implemented by discrete hardware components.
  • the composition can also be an integrated circuit. In order to reduce power consumption and size, it is usually implemented in the form of integrated circuits.
  • the hardware processing circuit can include ASIC (application-specific integrated circuit), or PLD (programmable logic device, programmable logic device); among them, PLD can also include FPGA (field programmable gate array, field programmable gate array) , CPLD (complex programmable logic device, complex programmable logic device) and so on. These hardware processing circuits may be a single semiconductor chip packaged separately.
  • the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • the disclosed system, device, and method can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center. Transmission to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.).
  • wired such as coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless such as infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
  • the program can be stored in a computer-readable storage medium, and the storage medium can include: ROM, RAM, magnetic disk or CD, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

本申请公开一种设备管理方法,应用于一种包括交换设备和与之连接的设备的计算机系统,包括:第一交换设备获取多个端口连接的设备的信息;根据该多个端口连接的设备的信息,确定第一交换设备的响应接口,第一交换设备的不同响应端口连接不同设备,每个响应端口用于接收与每个响应端口连接的设备在设备枚举过程中发送的管理报文或对管理报文的响应。本申请技术方案中交换设备通过从多个端口中确定响应端口,该每个响应端口用于接收与之连接的每个设备在设备枚举过程中发送的管理报文或对管理报文的响应的响应端口,从而屏蔽非树形拓扑结构中的环路,使得非树形拓扑系统也能使用标准的PCIe拓扑发现流程。

Description

一种设备管理方法、装置及计算机系统
本申请要求于2020年03月31日提交中国知识产权局、申请号为202010247688.9、申请名称为“一种设备管理方法、装置及计算机系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机技术领域,具体涉及一种设备管理方法、装置及计算机系统。
背景技术
高速串行计算机总线标准(peripheral component interconnect express,PCIe)总线作为一种高速串行计算机扩展总线被广泛应用在诸多领域。目前业界管理设备的方法,最通用的就是基于PCIe设备进行管理,使用标准的PCIe拓扑发现流程进行设备管理。树形拓扑结构是一种分级结构,由多个层次的星型结构纵向连接而成,组成树形拓扑结构的任意两个设备之间不产生回路。当前使用PCIe总线的计算机系统只支持树形拓扑结构,且标准的PCIe拓扑发现流程是基于树形拓扑结构,采用深度遍历的方式进行设备枚举,从而实现对计算机系统中PCIe设备的管理。树形拓扑结构存在路径过长,整个网络直径过大的问题。随着人工智能(artificial intelligence,AI)和自动驾驶等高性能计算场景的发展,由于单核芯片的计算性能受限于芯片物理封装已无法满足要求,因此,多芯片互联组成的高性能计算系统成为一种趋势。对于多芯片互联组成的系统,片间互联的数据传输性能将直接影响整个系统的计算性能,若使用采用树形拓扑结构的方式进行互联,则时延和带宽都无法满足需求,并且无法实现动态路由特性。因此,为了使时延和带宽能够满足需求,多芯片互联组成的高性能计算系统一般需要使用非树形拓扑的组网结构。
然而,非树形拓扑的组网结构中,经常会出现两个设备之间通过多条物理链路进行连接产生回路,以及多个设备之间组成环路的情况,使得当前标准的PCIe拓扑发现流程和设备管理流程无法适用。因此,如何解决非树形拓扑结构中的环路问题,使得非树形拓扑结构的高性能计算系统也能够采用标准的PCIe拓扑发现流程是一个亟待解决的问题。
发明内容
本申请实施例提供一种设备管理方法,能够屏蔽非树形拓扑结构中的环路,使得非树形拓扑系统也能够使用标准的PCIe拓扑发现流程。
为了达到上述目的,本申请提供如下技术方案:
本申请第一方面提供一种设备管理方法,应用于计算机系统,该计算机系统包括交换设备和与交换设备连接的设备,与交换设备连接的设备可以包括处理器、其他的交换设备或加速设备,设备管理方法包括:第一交换设备获取多个端口连接的设备的信息,第一交换设备可以是计算机系统中的任意一个交换设备,该多个端口是第一交换设备的所有端口 中的部分或者全部,该多个端口均在数据链路层建链成功;第一交换设备根据多个端口连接的设备的信息,确定第一交换设备的响应端口,其中,第一交换设备的不同响应端口连接不同设备,每个响应端口用于接收与每个响应端口连接的设备在设备枚举过程中发送的管理报文或者对管理报文的响应,第一交换设备与多个设备连接,每个设备都与第一交换设备的一个或多个端口连接,一个响应端口只对应一个设备,该响应端口是第一交换设备与该设备连接的一个或多个端口中的一个,只有响应端口能够接收与之连接的设备在设备枚举过程中发送的管理报文或者对管理报文的响应,响应端口可以是连接同一个设备的多个端口中的任意一个,第一交换设备确定响应端口的方式可以是随机确定的,也可以是通过某种规则确定的。
由上述第一方面可知,第一交换设备通过获取多个端口连接的设备的信息,并根据每个端口连接的设备的信息确定第一交换设备的响应端口,不同响应端口连接不同设备,每个响应端口用于接收与每个响应端口连接的设备在设备枚举过程中发送的管理报文或者对管理报文的响应,从而屏蔽非树形拓扑结构中的环路,使得非树形拓扑系统也能够使用标准的PCIe拓扑发现流程。
结合上述第一方面,在第一方面第一种可能的实现方式中,第一交换设备获取多个端口连接的设备的信息,包括:第一交换设备接收多个端口中每个端口连接的设备发送的第一报文,第一报文包括每个端口连接的设备的信息。
由以上第一方面第一种可能的实现方式可知,计算机系统中的各个设备在链路层建链成功之后,第一交换设备可以通过接收该多个端口中每个端口连接的设备发送的第一报文获取该每个端口连接的设备的信息,能够保证信息获取的准确性。
结合上述第一方面或第一方面第一种可能的实现方式,在第一方面第二种可能的实现方式中,第一交换设备的每个端口对应一个端口寄存器,该端口寄存器用于记录每个端口连接的设备的信息,例如,设备的类型和设备的标识,第一交换设备获取多个端口连接的设备的信息之后,还包括:第一交换设备更新每个端口对应的端口寄存器中记录的信息。
由以上第一方面第二种可能的实现方式可知,第一交换设备获取多个端口连接的设备的信息后,及时更新每个端口对应的端口寄存器记录的信息,在需要确定每个端口连接的设备的信息时,能够直接通过读取对应端口的端口寄存器的方式获取端口连接的设备信息,能够提升信息获取的速率,保证信息获取的准确性。
结合上述第一方面、第一方面第一种至第二种中任意一种可能的实现方式,在第一方面第三种可能的实现方式中,该方法还包括:第一交换设备向每个端口连接的设备发送第二报文,第二报文包括第一交换设备的信息。
结合上述第一方面、第一方面第一种至第三种中任意一种可能的实现方式,在第一方面第四种可能的实现方式中,第一交换设备根据多个端口连接的设备的信息,确定第一交换设备的响应端口,包括:第一交换设备遍历多个端口连接的设备的信息,确定多个端口连接的每个设备对应的响应端口,当存在至少两个端口连接同一个目标设备时,确定至少两个端口中的一个端口为目标设备对应的响应端口,对非响应端口进行处理,以使得非响应端口在设备枚举过程中不返回响应或者返回该端口不存在,对非响应端口进行处理的方式可以是对非响应端口执行端口设置操作,端口设置操作具体是指基于响应端口,对与其 相连接相同设备的一个或多个端口进行特定的处理,如将与响应端口连接相同设备的一个或多个端口的标志位置位。
由以上第一方面第四种可能的实现方式可知,通过确定与第一交换设备连接的每个设备对应的响应端口,对于与每个响应端口连接相同设备的一个或多个非响应端口进行处理,使得只有响应端口能够接收与之连接的设备在设备枚举过程中发送的管理报文或者对管理报文的响应,非响应设备在设备枚举过程中不返回响应或者返回该端口不存在,从而能够很好的屏蔽非树形拓扑结构中的环路,保证非树形拓扑系统也能够使用标准的PCIE拓扑发现流程。
结合上述第一方面、第一方面第一种至第四种中任意一种可能的实现方式,在第一方面第五种可能的实现方式中,第一交换设备的响应端口中包括上行端口,第一交换设备根据多个端口连接的设备的信息,确定第一交换设备的响应端口,包括:第一交换设备根据多个端口连接的设备的信息确定上行端口,上行端口用于接收处理器在设备枚举过程中发送的管理报文。第一交换设备的响应端口中除了上行端口的其他端口,用于接收与其所连接的设备在设备枚举过程中对管理报文的响应。
结合上述第一方面第五种可能的实现方式,在第一方面第六种可能的实现方式中,第一交换设备根据多个端口连接的设备的信息确定上行端口,包括:第一交换设备确定多个端口连接的设备中存在处理器;第一交换设备确定连接处理器的一个端口为上行端口。当第一交换设备根据多个端口连接的设备的信息确定其所连接的设备中存在处理器时,第一交换设备可以直接设置连接该处理器的响应端口为上行端口。
结合上述第一方面第五种可能的实现方式,在第一方面第七种可能的实现方式中,第一交换设备根据多个端口连接设备的信息确定上行端口,包括:第一交换设备确定多个端口连接的设备中不存在处理器;第一交换设备接收第二交换设备发送的第三报文,根据第三报文确定上行端口。
结合上述第一方面、第一方面第一种至第七种中任意一种可能的实现方式,在第一方面第八种可能的实现方式中,第一交换设备获取多个端口连接的设备的信息之后,还包括:第一交换设备根据多个端口连接的设备的信息,确定第一交换设备连接的加速设备;第一交换设备对加速设备进行访问,将加速设备的配置空间映射至第一交换设备。
由以上第一方面第八种可能的实现方式可知,通过将其所连接的加速设备的配置空间映射到第一交换设备中,在设备枚举过程中,能够直接通过第一交换设备获取其所连接的加速设备的配置空间,无需再针对该每个加速设备进行一一探索,从而缩短整个设备枚举过程的时间。
结合上述第一方面、第一方面第一种至第八种中任意一种可能的实现方式,在第一方面第九种可能的实现方式中,设备的信息包括设备的类型和设备的标识,设备的类型可以包括处理器、交换设备或加速设备,设备的标识是用于指示一个设备的唯一标识,例如可以是设备ID。
本申请第二方面提供一种第一交换设备,第一交换设备应用于计算机系统,计算机系统还包括与第一交换设备连接的设备,第一交换设备包括:获取单元,用于获取多个端口连接的设备的信息;确定单元,用于根据获取单元获取的多个端口连接的设备的信息,确 定第一交换设备的响应端口,其中,第一交换设备的不同响应端口连接不同设备,每个响应端口用于接收与每个响应端口连接的设备在设备枚举过程中发送的管理报文或者对管理报文的响应。
由上述第二方面可知,第一交换设备通过获取多个端口连接的设备的信息,并根据每个端口连接的设备的信息确定第一交换设备的响应端口,不同响应端口连接不同设备,每个响应端口用于接收与每个响应端口连接的设备在设备枚举过程中发送的管理报文或者对管理报文的响应,从而屏蔽非树形拓扑结构中的环路,使得非树形拓扑系统也能够使用标准的PCIe拓扑发现流程。
结合上述第二方面,在第二方面第一种可能的实现方式中,获取单元,用于接收多个端口中每个端口连接的设备发送的第一报文,第一报文包括每个端口连接的设备的信息。
结合上述第二方面或第二方面第一种可能的实现方式,在第二方面第二种可能的实现方式中,第一交换设备的每个端口对应一个端口寄存器,端口寄存器用于记录每个端口连接的设备的信息,第一交换设备还包括:更新单元,用于在获取单元获取多个端口连接的设备的信息之后,更新每个端口对应的端口寄存器中记录的信息。
结合上述第二方面、第二方面第一种至第二种中任意一种可能的实现方式,在第二方面第三种可能的实现方式中,第一交换设备还包括:发送单元,用于向每个端口连接的设备发送第二报文,第二报文包括第一交换设备的信息。
结合上述第二方面、第二方面第一种至第三种中任意一种可能的实现方式,在第二方面第四种可能的实现方式中,确定单元,用于遍历多个端口连接的设备的信息,确定多个端口连接的每个设备对应的响应端口,当存在至少两个端口连接同一个目标设备时,确定至少两个端口中的一个端口为目标设备对应的响应端口,对非响应端口进行处理,以使得非响应端口在设备枚举过程中不返回响应或者返回该端口不存在。
结合上述第二方面、第二方面第一种至第四种中任意一种可能的实现方式,在第二方面第五种可能的实现方式中,第一交换设备的响应端口中包括上行端口,确定单元,用于根据获取单元获取的多个端口连接的设备的信息确定上行端口,上行端口用于接收处理器在设备枚举过程中发送的管理报文。
结合上述第二方面第五种可能的实现方式,在第二方面第六种可能的实现方式中,确定单元,用于确定多个端口连接的设备中存在处理器;确定连接处理器的一个端口为上行端口。
结合上述第二方面第五种可能的实现方式,在第二方面第七种可能的实现方式中,确定单元,用于确定多个端口连接的设备中不存在处理器;接收第二交换设备发送的第三报文,根据第三报文确定所述上行端口。
结合上述第二方面、第二方面第一种至第七种中任意一种可能的实现方式,在第二方面第八种可能的实现方式中,确定单元,还用于在获取单元获取所述多个端口连接的设备的信息之后,根据多个端口连接的设备的信息,确定第一交换设备连接的加速设备;对加速设备进行访问,将加速设备的配置空间映射至第一交换设备。
结合上述第二方面、第二方面第一种至第八种中任意一种可能的实现方式,在第二方面第九种可能的实现方式中,设备的信息包括设备的类型和设备的标识。
本申请第三方面提供一种交换芯片,该交换芯片用于执行上述第一方面和第一方面第一种至第九种中任意一种可能的实现方式中的方法。
本申请第四方面提供一种计算机系统,该计算机系统包括第一交换设备和与该第一交换设备连接的设备,与第一交换设备连接的设备,用于向第一交换设备发送设备的信息,第一交换设备用于执行上述第一方面和第一方面第一种至第九种中任意一种可能的实现方式中的方法。
本申请第五方面提供一种计算机存储介质,该计算机存储介质可以是非易失性的。该计算机存储介质中存储有计算机可读指令,当该计算机可读指令被处理器执行时实现第一方面或第一方面的任一可能的实现方式中的方法。
本申请实施例采用一种设备管理的方法,第一交换设备通过获取多个端口连接的设备的信息,并根据每个端口连接的设备的信息确定第一交换设备的响应端口,不同响应端口连接不同设备,每个响应端口用于接收与每个响应端口连接的设备在设备枚举过程中对管理报文的响应,从而屏蔽非树形拓扑结构中的环路,使得非树形拓扑系统也能够使用标准的PCIE拓扑发现流程。
附图说明
图1是本申请实施例提供计算机系统的结构示意图;
图2是本申请实施例提供的互联网络的连接示意图;
图3(a)是本申请实施例提供的互联网络的一种拓扑环路结构的示意图;
图3(b)是本申请实施例提供的互联网络的另一种拓扑环路结构的示意图;
图4是本申请实施例提供的设备管理方法的一个实施例示意图;
图5是本申请实施例提供的两个设备进行链路层建链的结构示意图;
图6是本申请实施例提供的第一交换设备确定响应端口的方法的一个实施例示意图;
图7是本申请实施例提供的上行端口的确定方法的一个实施例示意图;
图8是本申请实施例提供的将加速设备的配置空间映射到第一交换设备的流程示意图;
图9是本申请实施例提供的第一交换设备的结构示意图。
具体实施方式
为了使本发明的目的、技术方案及优点更加清楚明白,下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着新应用场景的出现,本发明实施例提供的技术方案对于类似的技术问题,同样适用。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它 步骤或模块。在本申请中出现的对步骤进行的命名或者编号,并不意味着必须按照命名或者编号所指示的时间/逻辑先后顺序执行方法流程中的步骤,已经命名或者编号的流程步骤可以根据要实现的技术目的变更执行次序,只要能达到相同或者相类似的技术效果即可。本申请中所出现的模块的划分,是一种逻辑上的划分,实际应用中实现时可以有另外的划分方式,例如多个模块可以结合成或集成在另一个系统中,或一些特征可以忽略,或不执行,另外,所显示的或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块之间的间接耦合或通信连接可以是电性或其他类似的形式,本申请中均不作限定。并且,作为分离部件说明的模块或子模块可以是也可以不是物理上的分离,可以是也可以不是物理模块,或者可以分布到多个电路模块中,可以根据实际的需要选择其中的部分或全部模块来实现本申请方案的目的。
本申请实施例的方法可以应用于各种服务器的计算机系统中,例如X86服务器、高级精简集机器(advanced RISC machine,ARM)服务器、性能优化增强的RISC(performance optimized with enchanted RISC,POWER)服务器等。图1为本申请实施例提供的一种计算机系统的架构示意图。
参阅图1,本申请实施例提供的计算机系统,可以包括一个或多个处理器101、互联网络102和一个或多个加速设备103。本申请实施例中的处理器101可以是中央处理单元(central processing unit,CPU),加速设备103可以是图形处理器(graphics processing unit,GPU)、现场可编程逻辑门阵列(field programmable gate array,FPGA)或人工智能(artificial intelligence,AI)芯片等。互联网络102部分包含一个或多个交换设备1021,用于连接处理器101和加速设备103。本申请实施例中的交换设备可以是PCIe转换(switch)芯片。本申请实施例对处理器101、互联网络102中包含的交换设备1021以及加速设备103的数量不做限定。互联网络102部分使用高速内存总线协议互联,采用非树形的拓扑,用于减少处理器101和加速设备103之间的端到端时延,同时增加多路径和动态路由等特性。
如图2为本申请实施例提供的互联网络102的连接示意图。
图2示出了一个处理器101通过四个交换设备1021与10个加速设备连接的非树形拓扑结构。需要说明的是,图2仅仅是一个示例,不应理解为对互联网络102的结构的限制。
参考图2可以看出,互联网络102的非树形拓扑可以包含如3(a)-3(b)所示的两类拓扑环路结构。图3(a)所示的第一类拓扑环路结构中,两个交换设备1021之间存在多条物理链路。图3(b)所示的第二类拓扑环路结构中,多个交换设备1021之间组成环路。需要说明的是,图3(a)和图3(b)是本申请实施例中提供的互联网络102的非树形拓扑结构中的两类拓扑环路结构的示例性说明,不应理解为对本申请的限制。由于非树形拓扑结构中多种拓扑环路结构的出现,在初始化阶段进行网络内的设备枚举的过程(即:PCIe扫描过程、或称为PCIe拓扑发现流程)中,会出现探索回路,无法快速、有效地获得设备的拓扑结构。
基于上述的计算机系统和非树形拓扑的互联网络的结构,本申请实施例提供一种设备管理的方法,如图4所示。
参阅图4,本申请实施例提供的设备管理方法的一个实施例示意图,可以包括:
401、第一交换设备获取多个端口连接的设备的信息。
本申请实施例中,第一交换设备可以是互联网络102中包含的一个或多个交换设备1021中的任意一个。本申请实施例中,当第一交换设备所包含的多个端口与其他设备在链路层建链成功之后,第一交换设备首先获取该多个端口中每个端口连接的设备的信息。本申请实施例中,该多个端口是指第一交换设备包含的全部端口中的部分或者全部。
需要说明的是,本申请实施例中,计算机系统中的各个设备在链路层建链成功之后,每个设备均会发送一个携带本端设备的信息的报文至各个端口连接的设备。因此,本申请实施例中,第一交换设备获取多个端口连接的设备的信息可以是通过接收该多个端口中每个端口连接的设备发送的第一报文获取的,第一交换设备根据每个端口连接的设备发送的第一报文,便可以确定每个端口连接的设备的信息。与此同时,第一交换设备也可以将本端设备的信息携带在第二报文中通过多个端口中的每个端口发送给该每个端口连接的设备,从而实现点对点信息交换的目的。
可选地,本申请实施例中,设备的信息可以包括设备的类型和设备的标识,例如:设备的类型可以是交换设备、处理器或者加速设备,设备的标识是指设备的ID,同一类型的设备具有其唯一的ID。
可选地,本申请实施例中,每个设备均可以包含两个全局寄存器,一个用于表示该设备的类型TYPE,另一个用于表示该设备的标识,如GUID。每个设备的每个端口均可以对应一个端口寄存器,该端口寄存器用于记录端口所连接的设备的信息,如设备的类型和设备的标识。当两个设备,如设备1和设备2之间在链路层建链成功后,在进行上述的点对点信息交换过程后,会更新本端的端口的端口寄存器中记录的信息,从而标识每个端口连接的设备的信息。如图5所示,为本申请实施例提供的两个设备进行链路层建链的结构示意图。
402、第一交换设备根据该多个端口连接的设备的信息,确定第一交换设备的响应端口,其中,第一交换设备的不同响应端口连接不同设备,每个响应端口用于接收与每个响应端口连接的设备在设备枚举过程中发送的管理报文或者对管理报文的响应。
本申请实施例中,第一交换设备在获取多个端口连接的设备的信息之后,根据每个端口连接的设备的信息,确定第一交换设备的响应端口。本申请实施例中,第一交换设备与多个设备连接,每个设备都与第一交换设备的一个或多个端口连接,第一交换设备根据多个端口连接的设备的信息,确定哪些端口连接了同一个设备。本申请实施例中,不同的响应端口连接不同的设备,第一交换设备的响应端口用于接收与该响应端口连接的设备在设备枚举过程中发送的管理报文或者用于接收与该响应端口连接的设备在设备枚举过程中对管理报文的响应。即一个响应端口只对应一个设备,该响应端口是第一交换设备与该设备连接的一个或多个端口中的一个,其他端口可以被视为非响应端口,只有响应端口会接收该设备在设备枚举过程中发送的管理报文或接收该设备在设备枚举过程中对管理报文的响应,非响应端口不会接收该设备在设备枚举过程中发送的管理报文或者该设备在设备枚举过程中对管理报文的响应,可选地非响应端口还可以返回该端口不存在的信息,从而防止出现探索回路。
本申请实施例中,响应端口可以是连接同一个设备的多个端口中的任意一个,第一交换设备确定响应端口的方式可以是随机确定的,也可以是通过某种规则确定的,本申请实施例对此不做限定。优选地,本申请实施例提供一种第一交换设备在获取多个端口连接的 设备的信息之后,根据该多个端口连接的设备的信息确定第一交换设备的响应端口的具体实现方式,如图6所示。
参阅图6,本申请实施例提供的第一交换设备确定响应端口的方法的一个实施例,可以包括:
601、第一交换设备设置一个端口为起始端口。
本申请实施例中,第一交换设备在获取多个端口连接的设备的信息之后,每个端口的端口寄存器记录的信息均被更新,记录所连接的设备的信息,如设备的类型和标识,第一交换设备通过读取端口寄存器记录的内容便可以知道该端口所连接的设备的信息。
第一交换设备首先从多个端口中设置一个起始端口,该起始端口可以是多个端口中的任意一个端口。例如,第一交换设备包含的多个端口的数目为50,编号依次为0、1、2...47、48、49。第一交换设备可以设置端口0为起始端口,起始端口的端口寄存器记录该起始端口连接的设备为设备A。
602、第一交换设备对每个端口的端口寄存器进行依次遍历,从而判断每个端口所连接的设备与起始端口连接的设备是否相同。
本申请实施例中,在设置起始端口之后,第一交换设备依次遍历其他的每个端口的端口寄存器,判断每个端口的端口寄存器所记录的设备的信息与起始端口的端口寄存器记录的设备的信息是否相同。若相同,则代表该端口与起始端口连接了相同的设备A,若不相同,则代表该端口与起始端口连接的设备不同。
603、第一交换设备对与起始端口连接相同设备的每个端口执行端口设置操作。
本申请实施例中,若在遍历过程中,一个或多个端口所连接的设备与起始端口连接的设备相同,则第一交换设备对该一个或多个端口中的每个端口执行端口设置操作。
本申请实施例中,端口设置操作具体是指基于起始端口,对与其相连接相同设备的一个或多个端口进行特定的处理。优先地,一种具体的处理方式可以是将与起始端口连接相同设备的一个或多个端口的标志位置位。例如,假设正常端口的标志位为0,第一交换设备的多个端口在链路层建链成功后,每个端口的标志位均为0。在设置端口0为起始端口后,第一交换设备在遍历过程中确定端口5和端口6与端口0连接的设备相同,则第一交换设备将端口5和端口6的标志位置位为1,从而实现对端口5和端口6的端口设置操作。端口0作为正常端口,即为连接设备A的响应端口。在PCIe设备枚举过程中,如果某个端口的标志位置位,则该端口不会接收与该端口连接的设备枚举过程中发送的管理报文或者对管理报文的响应。
604、第一交换设备选择下一个端口为起始端口并执行端口设置操作,直至所有端口处理完成。
本申请实施例中,在完成步骤601-步骤603中对与第一个起始端口连接相同设备的每个端口执行端口设置操作之后,第一交换设备选择选择下一个端口作为新的起始端口,并重复步骤602-步骤603中的操作,完成新一轮的端口设置操作,直至所有的端口均处理完成,第一交换设备设置的每个起始端口即为第一交换设备的响应端口。
需要说明的是,本申请实施例中,该下一个端口为标志位没有置位的端口,且标志位已经置位的端口将不参与新一轮的端口设置操作。
例如,步骤601-步骤602中将端口0设置为起始端口,在完成了与端口0连接的设备相同的一个或多个端口的端口设置操作之后,当端口1标志位未置位,则第一交换设备可以设置端口1为新的起始端口,端口1所连接的设备为设备B,第一交换设备将采用与步骤602-步骤603中相同的方法,确定与端口1连接相同设备的一个或多个端口,并将与端口1连接相同设备的一个或多个端口进行置位,从而完成新一轮的端口设置操作。直到最后一个端口处理完成,第一交换设备确定出所有的响应端口,本申请实施例中没有被置位的端口,即第一交换设备设置的每个起始端口即为第一交换设备的响应端口。
需要说明的是,图6所示的第一交换设备确定响应端口的方法仅仅是本申请实施例中第一交换设备确定响应端口的一种优选实施例,本申请实施例中,第一交换设备也可以通过其他的规则或方式确定第一交换设备的响应端口,本申请实施例对此均不做限定。
本申请实施例中,第一交换设备通过获取多个端口连接的设备的信息,并根据每个端口连接的设备的信息确定第一交换设备的响应端口,不同响应端口连接不同设备,每个响应端口用于接收与每个响应端口连接的设备在设备枚举过程中发送的管理报文或者对管理报文的响应,从而屏蔽非树形拓扑结构中的环路,使得非树形拓扑系统也能够使用标准的PCIE拓扑发现流程。
可选地,图4中的设备管理方法中,第一交换设备的响应端口中包括一个上行端口,该上行端口用于第一交换设备接收与该上行端口连接的设备在在设备枚举过程中发送的管理报文。在设备枚举过程中,第一交换设备的响应端口中不是上行端口的其他端口,均不能接收设备枚举过程中的管理报文,该其他端口中的每个响应端口,用于接收与其所连接的设备在设备枚举过程中对管理报文的响应。
本申请实施例中,上行端口的确定与第一交换设备连接的多个设备中是否包含处理器有关。因此,本申请实施例中,第一交换设备在确定第一交换设备的多个响应设备时,首先会根据每个端口连接的设备的信息,例如可以是通过读取每个端口的端口寄存器,判断所连接的多个设备中是否包含处理器。当存在处理器时,第一交换设备可以直接设置连接该处理器的响应端口为上行端口。当第一交换设备连接的多个设备中不包含处理器时,先不进行上行端口的设置,而是等待第一交换设备所连接的其他交换设备,如第二交换设备通过目标接口发送的第三报文,该三报文是用于设置上行端口的配置报文,第一交换设备根据第三报文进行上行端口的设置。具体的,本申请实施例中提供一种上行端口的确定方法的一个实施例示意图,请参阅图7。
如图7所示,本申请实施例提供的上行端口的确定方法的一个实施例,可以包括:
701、第一交换设备根据多个端口连接的设备的信息,判断是否存在连接处理器的端口。
本申请实施例中,在图4中的步骤402中,第一交换设备在根据多个端口连接的设备的信息确定第一交换设备的响应端口时,第一交换设备还会根据多个端口连接的设备的信息,判断是否存在连接处理器的端口。
702、若存在,则第一交换设备设置连接该处理器的响应端口为上行端口。
本申请实施例中,若第一交换设备连接的多个设备中包含处理器,则设置连接该处理器的响应端口为上行端口。
可选地,本申请实施例中,当第一交换设备设置连接处理器的响应端口为上行端口之后,若第一交换设备所连接的多个设备中还包含一个或多个第三交换设备,则第一交换设备可以向该一个或多个第三交换设备发送第四报文,该第思报文用于指示该一个或多个第三交换设备确定上行端口。
703、若不存在,且第一交换设备接收到第二交换设备通过目标端口发送的第三报文,第一交换设备判断是否存在上行端口。
本申请实施例中,若第一交换设备连接的多个设备中不包含处理器,且第一交换设备通过目标端口接收到第二交换设备发送的第三报文,则首先判断是否已经设置了上行端口。
704、若没有设置上行端口,则设置该目标端口为上行端口。
当第一交换设备确定上行端口还未设置时,设置该目标端口为上行端口。需要说明的是,若第一交换设备在还未设置上行端口时,接收到多个第三交换设备发送的第四报文,则可以设置第一个接收到第三报文的端口为上行端口。
上述对本申请实施例中上行端口的设置方法进行了介绍,可选地,本申请实施例中,若第一交换设备没有连接处理器,也可以通过接收处理器下发的配置信息进行上行端口的设置,本申请实施例对此不做限定。
可选地,基于上述的实施例,本申请实施例中,第一交换设备在获取多个端口连接的设备的信息,并确定第一交换设备的响应端口之后,还会根据多个端口连接的设备的信息,确定与第一交换设备连接的加速设备,然后通过连接加速设备的响应端口对加速设备进行访问,然后将这些加速设备的PCIe配置空间映射到第一交换设备中。如图8所示,即为本申请实施例提供的将加速设备的配置空间映射到第一交换设备中的流程示意图。参阅图8,交换设备中的INIT模块在获取多个端口中每个端口连接的设备的设备信息之后,发起对加速设备的访问,然后将所有的加速设备的PCIe配置空间映射到本端中的增强的配置存取机制(enhanced configuration access mechanism,ECAM)中,当进行设备枚举时,处理器扫描到第一交换设备,可以直接在第一交换设备中把与其相连的加速设备直接进行一一扫描,而不需要再单独的扫描每个加速设备,从而缩短整个系统的PCIe枚举时间。
上述对本申请实施例中的设备管理方法进行了介绍,接下来对本申请实施例中的第一交换设备的结构进行具体的介绍,请参阅图9。
图9为本申请实施例提供的第一交换设备的结构示意图。
参阅图9,本申请实施例提供的第一交换设备90应用于计算机系统,计算机系统中还包括与第一交换设备90连接的设备,第一交换设备90可以包括:
获取单元901,用于获取多个端口连接的设备的信息;
确定单元902,用于根据所述获取单元901获取的所述多个端口连接的设备的信息,确定所述第一交换设备的响应端口,其中,所述第一交换设备的不同响应端口连接不同设备,每个响应端口用于接收与每个响应端口连接的设备在设备枚举过程中发送的管理报文或者对所述管理报文的响应。
本申请实施例中,第一交换设备90通过获取多个端口连接的设备的信息,并根据每个端口连接的设备的信息确定第一交换设备的响应端口,不同响应端口连接不同设备,每个响应端口用于接收与每个响应端口连接的设备在设备枚举过程中发送的管理报文或者对管 理报文的响应,从而屏蔽非树形拓扑结构中的环路,使得非树形拓扑系统也能够使用标准的PCIE拓扑发现流程。
可选地,作为一个实施例,所述获取单元901,用于接收所述多个端口中每个端口连接的设备发送的第一报文,所述第一报文包括每个端口连接的设备的信息。
可选地,作为一个实施例,所述第一交换设备的每个端口对应一个端口寄存器,所述端口寄存器用于记录所述每个端口连接的设备的信息,所述第一交换设备还包括:更新单元903,用于在所述获取单元901获取所述多个端口连接的设备的信息之后,更新每个端口对应的端口寄存器中记录的信息。
可选地,作为一个实施例,所述第一交换设备90还包括:发送单元904,用于向所述每个端口连接的设备发送第二报文,所述第二报文包括所述第一交换设备的信息。
可选地,作为一个实施例,所述确定单元902,用于遍历所述多个端口连接的设备的信息,确定所述多个端口连接的每个设备对应的响应端口,当存在至少两个端口连接同一个目标设备时,确定所述至少两个端口中的一个端口为所述目标设备对应的响应端口,对非响应端口进行处理,以使得所述非响应端口在设备枚举过程中不返回响应或者返回该端口不存在。
可选地,作为一个实施例,所述第一交换设备的响应端口中包括上行端口,所述确定单元902,用于根据所述获取单元901获取的所述多个端口连接的设备的信息确定所述上行端口,所述上行端口用于接收处理器在设备枚举过程中发送的管理报文。
可选地,作为一个实施例,所述确定单元902,用于确定所述多个端口连接的设备中存在处理器;确定连接所述处理器的一个端口为所述上行端口。
可选地,作为一个实施例,所述确定单元902,用于确定所述多个端口连接的设备中不存在处理器;接收第二交换设备发送的第三报文,根据所述第三报文确定所述上行端口。
可选地,作为一个实施例,所述确定单元902,还用于在所述获取单元901获取多个端口连接的设备的信息之后,根据所述多个端口连接的设备的信息,确定所述第一交换设备连接的加速设备;对所述加速设备进行访问,将所述加速设备的配置空间映射至所述第一交换设备。
可选地,作为一个实施例,所述设备的信息包括设备的类型和设备的标识。
需要说明的是,以上各个模块或单元都可以通过软件、硬件或软件硬件结合的方式来实现。
本申请中,交换设备中可以包含一个或多个处理器,以及包含一个或多个内嵌或者外挂的存储器。“通过软件实现”是指处理器通过读取并执行存储在存储器中的程序指令来实现上述模块或单元所对应的功能。其中,本申请实施例中交换设备所包含的处理器是指具有执行程序指令功能的处理电路,具体是指一种微处理器或微控制器(microcontroller unit,MCU)这类能够运行程序指令的处理电路,这些处理电路可以包括一个或多个用于执行程序指令以进行数据运算或处理的核。例如:ARM软核。本申请中,交换设备可以是个独立封装的半导体芯片。
本申请中,“通过硬件实现”是指通过在交换设备的各个物理端口设置不具有程序指令处理功能的硬件处理电路来实现上述模块或者单元的功能,该硬件处理电路可以通过分立 的硬件元器件组成,也可以是集成电路。为了减少功耗、降低尺寸,通常会采用集成电路的形式来实现。硬件处理电路可以包括ASIC(application-specific integrated circuit,专用集成电路),或者PLD(programmable logic device,可编程逻辑器件);其中,PLD又可包括FPGA(field programmable gate array,现场可编程门阵列)、CPLD(complex programmable logic device,复杂可编程逻辑器件)等等。这些硬件处理电路可以是单独封装的一块半导体芯片。
需要说明的是,本申请在通过软件、硬件或者软件硬件结合的方式实现时,可以使用不同的软件、硬件,并不限定只使用一种软件或者硬件。例如,其中,其中一个模块或者单元可以使用一种处理器来实现,另一个模块或者单元可以使用另一个处理器来实现。同理,当使用硬件实现时,其中一个模块或者单元可以使用ASIC来实现,另一个模块或者单元可以使用FPGA实现。当然,也不限定部分或者所有的模块或者单元使用同一种软件或者同一种硬件来实现。此外,对于本领域技术人员,可以知道,软件通常来说灵活性更好,但性能不如硬件,而硬件正好相反,因此,本领域技术人员可以结合实际需求来选择软件或者硬件或者两者结合的形式来实现。本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以硬件、软件、或者软件和硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
应注意,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机 软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:ROM、RAM、磁盘或光盘等。
以上对本申请实施例所提供的设备管理方法、装置及计算机系统进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (22)

  1. 一种设备管理方法,其特征在于,所述方法应用于计算机系统,所述计算机系统包括交换设备和与所述交换设备连接的设备,所述方法包括:
    第一交换设备获取多个端口连接的设备的信息;
    所述第一交换设备根据所述多个端口连接的设备的信息,确定所述第一交换设备的响应端口,其中,所述第一交换设备的不同响应端口连接不同设备,每个响应端口用于接收与每个响应端口连接的设备在设备枚举过程中发送的管理报文或者对所述管理报文的响应。
  2. 根据权利要求1所述的方法,其特征在于,所述第一交换设备获取多个端口连接的设备的信息,包括:
    所述第一交换设备接收所述多个端口中每个端口连接的设备发送的第一报文,所述第一报文包括每个端口连接的设备的信息。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一交换设备的每个端口对应一个端口寄存器,所述端口寄存器用于记录所述每个端口连接的设备的信息,所述第一交换设备获取所述多个端口连接的设备的信息之后,还包括:
    所述第一交换设备更新每个端口对应的端口寄存器中记录的信息。
  4. 根据权利要求1-3任一所述的方法,其特征在于,所述方法还包括:
    所述第一交换设备向所述每个端口连接的设备发送第二报文,所述第二报文包括所述第一交换设备的信息。
  5. 根据权利要求1-4任一所述的方法,其特征在于,所述第一交换设备根据所述多个端口连接的设备的信息,确定所述第一交换设备的响应端口,包括:
    所述第一交换设备遍历所述多个端口连接的设备的信息,确定所述多个端口连接的每个设备对应的响应端口,当存在至少两个端口连接同一个目标设备时,确定所述至少两个端口中的一个端口为所述目标设备对应的响应端口,对非响应端口进行处理,以使得所述非响应端口在设备枚举过程中不返回响应或者返回该端口不存在。
  6. 根据权利要求1-5任一所述的方法,其特征在于,所述第一交换设备的响应端口中包括上行端口,所述第一交换设备根据所述多个端口连接的设备的信息,确定所述第一交换设备的响应端口,包括:
    所述第一交换设备根据所述多个端口连接的设备的信息确定所述上行端口,所述上行端口用于接收处理器在设备枚举过程中发送的管理报文。
  7. 根据权利要求6所述的方法,其特征在于,所述第一交换设备根据所述多个端口连接的设备的信息确定所述上行端口,包括:
    所述第一交换设备确定所述多个端口连接的设备中存在处理器;
    所述第一交换设备确定连接所述处理器的一个端口为所述上行端口。
  8. 根据权利要求6所述的方法,其特征在于,所述第一交换设备根据所述多个端口连接设备的信息确定所述上行端口,包括:
    所述第一交换设备确定所述多个端口连接的设备中不存在处理器;
    所述第一交换设备接收第二交换设备发送的第三报文,根据所述第三报文确定所述上行端口。
  9. 根据权利要求1-8任一所述的方法,其特征在于,所述第一交换设备获取多个端口连接的设备的信息之后,所述方法还包括:
    所述第一交换设备根据所述多个端口连接的设备的信息,确定所述第一交换设备连接的加速设备;
    所述第一交换设备对所述加速设备进行访问,将所述加速设备的配置空间映射至所述第一交换设备。
  10. 根据权利要求1-9任一所述的方法,其特征在于,所述设备的信息包括设备的类型和设备的标识。
  11. 一种第一交换设备,其特征在于,所述第一交换设备应用于计算机系统,所述计算机系统还包括与所述第一交换设备连接的设备,所述第一交换设备包括:
    获取单元,用于获取多个端口连接的设备的信息;
    确定单元,用于根据所述获取单元获取的所述多个端口连接的设备的信息,确定所述第一交换设备的响应端口,其中,所述第一交换设备的不同响应端口连接不同设备,每个响应端口用于接收与每个响应端口连接的设备在设备枚举过程中发送的管理报文或者对所述管理报文的响应。
  12. 根据权利要求11所述的第一交换设备,其特征在于,
    所述获取单元,用于接收所述多个端口中每个端口连接的设备发送的第一报文,所述第一报文包括每个端口连接的设备的信息。
  13. 根据权利要求11或12所述的第一交换设备,其特征在于,所述第一交换设备的每个端口对应一个端口寄存器,所述端口寄存器用于记录所述每个端口连接的设备的信息,所述第一交换设备还包括:
    更新单元,用于在所述获取单元获取所述多个端口连接的设备的信息之后,更新每个端口对应的端口寄存器中记录的信息。
  14. 根据权利要求11-13任一所述的第一交换设备,其特征在于,所述第一交换设备还包括:
    发送单元,用于向所述每个端口连接的设备发送第二报文,所述第二报文包括所述第一交换设备的信息。
  15. 根据权利要求11-14任一所述的第一交换设备,其特征在于,
    所述确定单元,用于遍历所述多个端口连接的设备的信息,确定所述多个端口连接的每个设备对应的响应端口,当存在至少两个端口连接同一个目标设备时,确定所述至少两个端口中的一个端口为所述目标设备对应的响应端口,对非响应端口进行处理,以使得所述非响应端口在设备枚举过程中不返回响应或者返回该端口不存在。
  16. 根据权利要求11-15任一所述的第一交换设备,其特征在于,所述第一交换设备的响应端口中包括上行端口,
    所述确定单元,用于根据所述获取单元获取的所述多个端口连接的设备的信息确定所述上行端口,所述上行端口用于接收处理器在设备枚举过程中发送的管理报文。
  17. 根据权利要求16所述的第一交换设备,其特征在于,
    所述确定单元,用于确定所述多个端口连接的设备中存在处理器;确定连接所述处理器的一个端口为所述上行端口。
  18. 根据权利要求16所述的第一交换设备,其特征在于,
    所述确定单元,用于确定所述多个端口连接的设备中不存在处理器;接收第二交换设备发送的第三报文,根据所述第三报文确定所述上行端口。
  19. 根据权利要求11-18任一所述的第一交换设备,其特征在于,
    所述确定单元,还用于在所述获取单元获取所述多个端口连接的设备的信息之后,根据所述多个端口连接的设备的信息,确定所述第一交换设备连接的加速设备;对所述加速设备进行访问,将所述加速设备的配置空间映射至所述第一交换设备。
  20. 根据权利要求11-19任一所述的第一交换设备,其特征在于,所述设备的信息包括设备的类型和设备的标识。
  21. 一种交换芯片,其特征在于,所述交换芯片用于执行如前述权利要求1-10任一项所述的方法。
  22. 一种计算机系统,其特征在于,所述计算机系统包括第一交换设备和与所述第一交换设备连接的设备,
    所述与第一交换设备连接的设备,用于向所述第一交换设备发送设备的信息;
    所述第一交换设备,用于执行如前述权利要求1-10任一项所述的方法。
PCT/CN2021/076422 2020-03-31 2021-02-10 一种设备管理方法、装置及计算机系统 WO2021196904A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/935,940 US20230018349A1 (en) 2020-03-31 2022-09-28 Device management method, apparatus, and computer system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010247688.9A CN113472562B (zh) 2020-03-31 2020-03-31 一种设备管理方法、装置及计算机系统
CN202010247688.9 2020-03-31

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/935,940 Continuation US20230018349A1 (en) 2020-03-31 2022-09-28 Device management method, apparatus, and computer system

Publications (1)

Publication Number Publication Date
WO2021196904A1 true WO2021196904A1 (zh) 2021-10-07

Family

ID=77865803

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/076422 WO2021196904A1 (zh) 2020-03-31 2021-02-10 一种设备管理方法、装置及计算机系统

Country Status (3)

Country Link
US (1) US20230018349A1 (zh)
CN (1) CN113472562B (zh)
WO (1) WO2021196904A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003063422A1 (en) * 2002-01-20 2003-07-31 General Instrument Corporation Method and apparatus for priority-based load balancing for use in an extended local area network
CN1848815A (zh) * 2005-04-12 2006-10-18 富士通株式会社 基于网络的择路方案
US20140362859A1 (en) * 2013-06-10 2014-12-11 Brocade Communications Systems, Inc. Scalable and segregated network virtualization
CN107045486A (zh) * 2017-04-12 2017-08-15 福州瑞芯微电子股份有限公司 一种PCIe安全域广播方法以及系统
CN110162296A (zh) * 2019-04-15 2019-08-23 平安科技(深圳)有限公司 应用程序编程接口文档的生成方法、装置及终端设备
CN110545194A (zh) * 2018-05-28 2019-12-06 华为技术有限公司 网络拓扑的生成方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101820355B (zh) * 2010-01-20 2012-03-28 瑞斯康达科技发展股份有限公司 一种获取网络拓扑的方法和网元
CN105897515A (zh) * 2016-06-12 2016-08-24 烽火通信科技股份有限公司 基于ipran设备的以太网环路检测及处理方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003063422A1 (en) * 2002-01-20 2003-07-31 General Instrument Corporation Method and apparatus for priority-based load balancing for use in an extended local area network
CN1848815A (zh) * 2005-04-12 2006-10-18 富士通株式会社 基于网络的择路方案
US20140362859A1 (en) * 2013-06-10 2014-12-11 Brocade Communications Systems, Inc. Scalable and segregated network virtualization
CN107045486A (zh) * 2017-04-12 2017-08-15 福州瑞芯微电子股份有限公司 一种PCIe安全域广播方法以及系统
CN110545194A (zh) * 2018-05-28 2019-12-06 华为技术有限公司 网络拓扑的生成方法及装置
CN110162296A (zh) * 2019-04-15 2019-08-23 平安科技(深圳)有限公司 应用程序编程接口文档的生成方法、装置及终端设备

Also Published As

Publication number Publication date
CN113472562B (zh) 2023-09-01
US20230018349A1 (en) 2023-01-19
CN113472562A (zh) 2021-10-01

Similar Documents

Publication Publication Date Title
KR101642086B1 (ko) 고성능 인터커넥트 링크 계층
US7210000B2 (en) Transmitting peer-to-peer transactions through a coherent interface
JP5280135B2 (ja) データ転送装置
US9009350B2 (en) Determining a path for network traffic between nodes in a parallel computer
US20090327444A1 (en) Dynamic Network Link Selection For Transmitting A Message Between Compute Nodes Of A Parallel Comput
CN107430572B (zh) 用于通信中封装信息的方法、装置和系统
US10817448B1 (en) Reducing read transactions to peripheral devices
US10621124B2 (en) Method, device and computer program product for enabling SR-IOV functions in endpoint device
CN115102780B (zh) 数据传输方法、相关装置、系统及计算机可读存储介质
US11321179B1 (en) Powering-down or rebooting a device in a system fabric
US9246792B2 (en) Providing point to point communications among compute nodes in a global combining network of a parallel computer
CN112367279A (zh) 一种基于二维mesh结构多核芯片组的路由方法及系统
US20220114132A1 (en) Data Switch Chip and Server
US20080263248A1 (en) Multi-drop extension for a communication protocol
WO2020259269A1 (zh) 转发报文的方法、中间设备和计算机设备
WO2021196904A1 (zh) 一种设备管理方法、装置及计算机系统
CN116915708A (zh) 路由数据包的方法、处理器及可读存储介质
CN114915499B (zh) 数据传输方法、相关装置、系统及计算机可读存储介质
CN114445260B (zh) 基于fpga的分布式gpu通信的方法及装置
KR20050080704A (ko) 프로세서간 데이터 전송 장치 및 방법
JP2020087238A (ja) 通信装置、情報処理システム、および通信方法
CN116821044B (zh) 处理系统、访存方法及计算机可读存储介质
JP5756990B2 (ja) 通信システム、通信方法
CN117135103B (zh) 片上网络的路由方法、装置、计算机设备及存储介质
WO2024001549A9 (zh) 地址配置方法和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21780925

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21780925

Country of ref document: EP

Kind code of ref document: A1