Method and apparatus for detecting peripheral device switcher, electronic device and storage medium

CN115905052BActive Publication Date: 2026-08-21INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211307824.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-25
Publication Date
2026-08-21
Estimated Expiration
2042-10-25

AI Technical Summary

Technical Problem

[0003]在一条PCIE链路中,发送设备与接收设备的端口带宽链路一样,并且一条PCIE链路只能连接一个发送设备和一个接收设备,随着服务器性能要求的不断提高,主板上越来越多的设备都挂载到PCIE总线下面,为了满足服务器性能不断提高的要求,可以通过外设设备交换器(PCIE Switch)扩展PCIE链路,连接多个终端设备,然而新链路下行口的终端设备并不是可以无限扩展的,扩展到一定数量后,外设设备交换器会产生性能瓶颈,会影响终端设备的性能

Benefits of technology

[0037]本发明实施例包括以下优点:通过获取上行口的插槽信息,并将上行口的插槽信息保存至存储模块,基于上行口的插槽信息选择终端设备,检测终端设备的性能,生成终端设备的性能数据,通过判断模块判断性能数据是否满足预设条件,当性能数据满足预设条件时,报警模块进行提示,选择下一个终端设备进行检测,当多个终端设备检测完成后,确定外设设备交换器收敛比,生成检测报告,并在显示模块上显示检测报告,从而实现通过检测装置自动进行测试,使外设设备交换器瓶颈检测变得更加简单,能快速发现外设设备交换器瓶颈,通过显示模块让测试结果可以直接性显示,有效地提高外设设备交换器瓶颈的测试效率,同时还让人们可以更加清晰地得知各项数据,便于测试使用。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115905052B_ABST
    Figure CN115905052B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a peripheral device switch detection method and device, electronic equipment and storage medium, by obtaining the slot information of the uplink port, selecting the terminal device based on the slot information of the uplink port, detecting the performance of the terminal device, generating the performance data of the terminal device, judging whether the performance data meets the preset condition, when the performance data meets the preset condition, selecting the next terminal device for detection, when the detection of multiple terminal devices is completed, determining the convergence ratio of the peripheral device switch, generating the detection report, and displaying the detection report on the display module, thereby realizing automatic testing through the detection device, making the peripheral device switch bottleneck detection simpler, enabling the peripheral device switch bottleneck to be quickly found, enabling the test results to be directly displayed through the display module, effectively improving the test efficiency of the peripheral device switch bottleneck, and enabling people to more clearly know various data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method for detecting peripheral device switches, and an apparatus, electronic device, and storage medium for detecting peripheral device switches. Background Technology

[0002] PCI-Express (Peripheral Component Interconnect Express, PCIE) is a high-speed serial computer expansion bus standard. PCIE is a high-speed serial point-to-point dual-channel high-bandwidth transmission. Each connected device is allocated its own dedicated channel bandwidth and does not share the bus bandwidth. It mainly supports active power management, error reporting, end-to-end reliable transmission, hot-plugging, and Quality of Service (QoS) functions.

[0003] In a PCIe link, the port bandwidth of the sending and receiving devices is the same, and a PCIe link can only connect one sending device and one receiving device. As server performance requirements continue to increase, more and more devices are being mounted on the PCIe bus on the motherboard. To meet the ever-increasing performance requirements of servers, PCIe links can be expanded using peripheral device switches (PCIe switches) to connect multiple terminal devices. However, the number of terminal devices on the downlink port of a new link cannot be expanded indefinitely. After expanding to a certain number, the peripheral device switch will create a performance bottleneck, which will affect the performance of the terminal devices. Summary of the Invention

[0004] In view of the above problems, embodiments of the present invention are proposed to provide a method for detecting peripheral device switches and a corresponding apparatus, electronic device and storage medium for detecting peripheral device switches to overcome or at least partially solve the above problems.

[0005] To address the aforementioned problems, this invention discloses a method for detecting peripheral device switches, comprising: a processor, a detection device, a peripheral device switch, and terminal devices; the peripheral device switch has multiple ports, including one uplink port and at least two downlink ports, the uplink port being connected to the processor via a root component, and the detection device being connected to the downlink ports of the peripheral device switch and multiple terminal devices respectively; the method is applied to the detection device, which includes: a storage module, a judgment module, a display module, and an alarm module; the method includes:

[0006] Obtain the slot information of the uplink port and save the slot information of the uplink port to the storage module;

[0007] The terminal device is selected based on the slot information of the uplink port;

[0008] Detect the performance of the terminal device and generate performance data for the terminal device;

[0009] The judgment module determines whether the performance data meets the preset conditions. When the performance data meets the preset conditions, the alarm module provides a prompt and selects the next terminal device for testing.

[0010] After the multiple terminal devices have completed the detection, the convergence ratio of the peripheral device switch is determined, a detection report is generated, and the detection report is displayed on the display module.

[0011] Optionally, the step of selecting the terminal device based on the slot information of the uplink port includes:

[0012] The processor allocates resources based on the slot information of the uplink port of the peripheral device switch;

[0013] The terminal devices are determined according to the order in which they occupy resources.

[0014] Optionally, the testing device includes multiple testing tools, the multiple terminal devices include multiple device types, and the step of testing the performance of the terminal devices and generating performance data of the terminal devices includes:

[0015] Determine the device type of the terminal device;

[0016] Select the testing tool based on the device type of the terminal device;

[0017] The performance of the terminal device is detected by the testing tool, and performance data corresponding to the device type of the terminal device is generated.

[0018] Optionally, the method for determining whether the performance data meets preset conditions includes:

[0019] The judgment module determines whether the performance data exceeds a preset percentage of the standard performance data of the terminal device.

[0020] When the performance data is lower than a preset percentage of the standard performance data of the terminal device, it is determined that the performance data meets the preset conditions.

[0021] Optionally, the step of determining whether the performance data meets preset conditions through the judgment module, and when the performance data meets the preset conditions, the alarm module provides a prompt and selects the next terminal device for testing, includes:

[0022] When the judgment module determines that the performance data exceeds a preset percentage of the standard performance data of the terminal device, it determines that the performance data does not meet the preset conditions and replaces the current terminal device;

[0023] When the judgment module determines that the performance data is lower than a preset percentage of the standard performance data of the terminal device, it determines that the performance data meets the preset conditions, the alarm module provides a prompt, and the next terminal device is selected for testing.

[0024] Optionally, the step of determining the convergence ratio of the peripheral device switch, generating a test report, and displaying the test report on the display module after the multiple terminal devices have completed their testing includes:

[0025] Based on the slot information of the uplink port and the device types of the multiple terminal devices, the convergence ratio of the peripheral device switch is determined;

[0026] Based on the convergence ratio, the performance data, and the slot information of the uplink and downlink ports of the peripheral device switch, a test report is generated and displayed on the display module.

[0027] Optionally, the step prior to obtaining the slot information of the uplink port and saving the slot information of the uplink port to the storage module includes:

[0028] According to preset rules, the peripheral device switch is connected to the port via cable, so that the peripheral device switch enters the test state.

[0029] This invention also discloses a device for detecting peripheral device switches, comprising: a processor, a detection device, a peripheral device switch, and terminal devices; the peripheral device switch has multiple ports, including one uplink port and at least two downlink ports, the uplink port being connected to the processor via a root component, and the detection device being connected to the downlink ports of the peripheral device switch and multiple terminal devices respectively; the method is applied to the detection device, which includes: a storage module, a judgment module, a display module, and an alarm module; the device includes:

[0030] An acquisition module is used to acquire the slot information of the uplink port and save the slot information of the uplink port to the storage module;

[0031] The selection module is used to select the terminal device based on the slot information of the uplink port;

[0032] The detection module is used to detect the performance of the terminal device and generate performance data of the terminal device.

[0033] The performance judgment module is used to determine whether the performance data meets preset conditions. When the performance data meets the preset conditions, the alarm module will issue a prompt and select the next terminal device for testing.

[0034] The convergence ratio module determines the convergence ratio of the peripheral device switch after the multiple terminal devices have completed the detection, generates a detection report, and displays the detection report on the display module.

[0035] This invention also discloses an electronic device, characterized in that it includes: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the peripheral device switch detection method as described above.

[0036] This invention also discloses a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the steps of the peripheral device switch detection method as described above.

[0037] The embodiments of the present invention include the following advantages: by acquiring the slot information of the uplink port and saving the uplink port slot information to the storage module, selecting a terminal device based on the uplink port slot information, detecting the performance of the terminal device, generating performance data of the terminal device, judging whether the performance data meets preset conditions through the judgment module, when the performance data meets the preset conditions, the alarm module provides a prompt, selecting the next terminal device for testing, and after multiple terminal devices have been tested, determining the convergence ratio of the peripheral device switch, generating a test report, and displaying the test report on the display module, thereby realizing automatic testing through the testing device, making peripheral device switch bottleneck detection simpler, quickly identifying peripheral device switch bottlenecks, and allowing the test results to be displayed directly through the display module, effectively improving the testing efficiency of peripheral device switch bottlenecks, while also allowing people to more clearly understand various data, facilitating testing and use. Attached Figure Description

[0038] Figure 1 This is a flowchart illustrating the steps of an embodiment of the method for detecting peripheral device switches according to the present invention;

[0039] Figure 2 This is a schematic diagram of a PCIE link structure after the peripheral device switch is expanded according to the present invention;

[0040] Figure 3 This is a flowchart illustrating the steps of another embodiment of the method for detecting peripheral device switches according to the present invention;

[0041] Figure 4This is a flowchart of an embodiment of a method for detecting peripheral device switches according to the present invention;

[0042] Figure 5 This is a schematic diagram of the detection device structure in a method for detecting peripheral device switches according to the present invention;

[0043] Figure 6 This is a structural block diagram of an embodiment of a peripheral device switch detection device according to the present invention. Detailed Implementation

[0044] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0045] One of the core concepts of this invention is that by acquiring the uplink port slot information and saving it to a storage module, a terminal device is selected based on the uplink port slot information, the performance of the terminal device is detected, and performance data of the terminal device is generated. A judgment module determines whether the performance data meets preset conditions. When the performance data meets the preset conditions, an alarm module provides a prompt, and the next terminal device is selected for detection. After multiple terminal devices have been detected, the convergence ratio of the peripheral device switch is determined, a test report is generated, and the test report is displayed on a display module. This enables automatic testing through a detection device, making peripheral device switch bottleneck detection simpler and faster. The test results can be directly displayed through the display module, effectively improving the testing efficiency of peripheral device switch bottlenecks. At the same time, it allows people to understand the various data more clearly, facilitating testing and use.

[0046] Reference Figure 1 This document illustrates a flowchart of an embodiment of a method for detecting peripheral device switches according to the present invention, comprising: a processor, a detection device, a peripheral device switch, and terminal devices; the peripheral device switch has multiple ports, including one uplink port and at least two downlink ports, the uplink port being connected to the processor via a root component, and the detection device being connected to the downlink ports of the peripheral device switch and multiple terminal devices respectively; the method is applied to the detection device, which includes: a storage module, a judgment module, a display module, and an alarm module; specifically, it may include the following steps:

[0047] Step 101: Obtain the slot information of the uplink port and save the slot information of the uplink port to the storage module;

[0048] PCIe comes in various sizes, from PCIe x1 to PCIe x32, to meet the needs of both low-speed and high-speed devices for a certain period. In a single PCIe link, the port bandwidth of the sending and receiving devices is the same, and a single PCIe link can only connect one sending and one receiving device. To meet the ever-increasing performance requirements of servers, PCIe links can be extended using peripheral switches to connect multiple terminal devices. Peripheral switches provide expansion or aggregation capabilities, allowing more devices to connect to a single PCIe port. A peripheral switch acts as a packet router, identifying the path a given packet should take based on its address or other routing information. It is a PCIe-to-PCIe bridge.

[0049] Reference Figure 2 This diagram illustrates a PCIe link structure with an expanded peripheral device switch. The peripheral device switch has multiple ports, including one uplink port and at least two downlink ports. There is only one root complex (RC) in the link, used to connect the processor (CPU, Central Processing Unit) to the uplink port of the peripheral device switch. The processor allocates resources such as memory through the root complex. One processor can connect to multiple peripheral device switches through the root complex. The uplink ports of multiple peripheral device switches can include various slot information. A detection device can be placed between the peripheral device switch and the terminal device, connecting to both the downlink port of the peripheral device switch and the terminal device. When detecting the peripheral device switch, the slot information of the uplink port of the peripheral device switch must first be obtained. The slot information of the downlink port, FW (Firewall), Driver, Slot ID, etc., can also be obtained, and the obtained peripheral device switch information is saved to a storage module. In one example, the slot information of the uplink port of the peripheral device switch can be x16, PCIe 4.0. It will be understood by those skilled in the art that the above slot information is merely an example and the present invention does not limit it.

[0050] Step 102: Select the terminal device based on the slot information of the uplink port;

[0051] In one example, if the uplink port slot information of the peripheral device switch is x16, PCIe 4.0, then its throughput (available bandwidth) is approximately 256Gb / s. A terminal device with the same uplink port bandwidth as the peripheral device switch can be selected for testing. In this case, a 100G GEN4 (fourth-generation solid-state drive) network card is initially determined for testing. Those skilled in the art will understand that the selected slot information and terminal device described above are merely examples, and this invention does not limit the scope of the invention.

[0052] Step 103: Detect the performance of the terminal device and generate performance data of the terminal device;

[0053] When the number of terminal devices is expanded to a certain extent through the peripheral device switch, the peripheral device switch will create a performance bottleneck, which will affect the performance of the terminal devices. When the performance bottleneck of the peripheral device switch is reached, the performance of the terminal devices may not meet the test requirements. Therefore, after initially determining the terminal devices, it is necessary to test the performance of the terminal devices through a testing device to generate performance data of the terminal devices.

[0054] Step 104: The judgment module determines whether the performance data meets the preset conditions. When the performance data meets the preset conditions, the alarm module provides a prompt and selects the next terminal device for testing.

[0055] After generating the performance data of the terminal device, the judgment module can determine whether the performance data meets the preset conditions. When the performance data meets the preset conditions, it means that the performance bottleneck of the peripheral device switch is affecting the performance of the terminal device. The alarm module of the peripheral device switch will issue a prompt, and then the next terminal device will be selected for testing.

[0056] Step 105: After the multiple terminal devices have been detected, determine the convergence ratio of the peripheral device switch, generate a detection report, and display the detection report on the display module.

[0057] After multiple terminal devices have completed their testing, the slot information of the uplink port of the peripheral device switch and the information of the terminal devices are obtained to determine the convergence ratio of the peripheral device switch. Based on the obtained peripheral device switch information and terminal device information, a test report is generated and displayed on the display module.

[0058] This invention acquires uplink port slot information and saves it to a storage module. Based on this information, it selects a terminal device, tests its performance, and generates performance data. A judgment module determines whether the performance data meets preset conditions. When the data meets these conditions, an alarm module alerts the user, and the next terminal device is selected for testing. After multiple terminal devices have been tested, the peripheral device switch convergence ratio is determined, a test report is generated, and displayed on a display module. This enables automated testing via a detection device, simplifying peripheral device switch bottleneck detection and allowing for rapid identification of bottlenecks. The display module provides direct access to test results, effectively improving the efficiency of peripheral device switch bottleneck testing. Furthermore, it allows users to clearly understand the various data points, facilitating testing and use.

[0059] Reference Figure 3 This document illustrates a flowchart of another embodiment of a method for detecting peripheral device switches according to the present invention, comprising: a processor, a detection device, a peripheral device switch, and terminal devices; the peripheral device switch has multiple ports, including one uplink port and at least two downlink ports, the uplink port being connected to the processor via a root component, and the detection device being connected to the downlink ports of the peripheral device switch and multiple terminal devices respectively; the method is applied to the detection device, which includes: a storage module, a judgment module, a display module, and an alarm module; specifically, it may include the following steps:

[0060] Step 301: According to preset rules, connect the port of the peripheral device switch via cable to put the peripheral device switch into test state.

[0061] Before testing the peripheral device switch, according to the design requirements of the server to which the processor belongs, the uplink port is connected to the processor, the downlink port is connected to the testing device, and the testing device is connected to the terminal device to form a link, so that the peripheral device switch enters the test state.

[0062] Step 302: Obtain the slot information of the uplink port and save the slot information of the uplink port to the storage module;

[0063] When testing a peripheral device switch, it is necessary to first obtain the slot information of the switch's uplink port. It is also possible to obtain the slot information, FW, Driver, Slot ID, etc., of the downlink port, and save the obtained peripheral device switch information to the storage module. In one example, the slot information of the peripheral device switch's uplink port can be x16, PCIe 4.0. Those skilled in the art will understand that the above slot information is merely an example, and the present invention does not limit its scope.

[0064] Step 303: The processor allocates resources based on the slot information of the uplink port of the peripheral device switch;

[0065] The processor is the core of a computer's computation and control. Its main functions are interpreting computer instructions and processing data in computer software. Computer memory temporarily stores the processor's computational data, providing read and write capabilities. Each processor has a fixed number of PCIe lanes; some processors support 32, while others support 48. Processors can connect to peripheral device switches via a root component, which allocates resources based on the peripheral device switch's uplink slot information.

[0066] Step 304: Determine the terminal devices according to the order of resource usage by the terminal devices.

[0067] When the uplink bandwidth of the peripheral device switch is the same as that of the terminal device, the terminal device will occupy the most resources. Therefore, a terminal device with the same uplink bandwidth as the peripheral device switch can be selected for testing.

[0068] In one example, if the uplink port slot information of the peripheral device switch is x16, PCIe 4.0, then its throughput (available bandwidth) is approximately 256Gb / s. In this case, it is initially determined that a 100G GEN4 network card will be used for testing. Those skilled in the art will understand that the slot information and terminal device selected above are merely examples, and this invention does not limit the scope of the invention.

[0069] Step 305: Detect the performance of the terminal device and generate performance data of the terminal device;

[0070] When the number of terminal devices is expanded to a certain extent through a peripheral device switch, the peripheral device switch will create a performance bottleneck, which will affect the performance of the terminal devices. When the performance bottleneck of the peripheral device switch is reached, it may affect the performance of the terminal devices. Therefore, after initially determining the terminal devices, it is necessary to use a testing device to test the performance of the terminal devices and generate performance data of the terminal devices.

[0071] In an optional embodiment of the present invention, the detection device includes multiple testing tools, and the multiple terminal devices include multiple device types. Step 305 includes:

[0072] Sub-step S11: Determine the device type of the terminal device;

[0073] Terminal devices can be of different types, such as network interface cards (NICs), GPUs (Graphics Processing Units), and NVMe (Non-Volatile Memory Express) hard drives. Therefore, the device type of the terminal device must be determined during testing.

[0074] Sub-step S12: Select a testing tool based on the device type of the terminal device;

[0075] Those skilled in the art will understand that different types of terminal devices require different testing tools. When the terminal device is a network card, netperf (a network performance measurement tool) is used to test its performance; when the terminal device is a GPU, nvqual (a performance testing tool) is used; and when the terminal device is an NVMe hard drive, fio (a flexible I / O tester) is used. Once the type of terminal device is determined during testing, the appropriate testing tool can be selected accordingly.

[0076] Sub-step S13: The performance of the terminal device is detected by the testing tool, and performance data corresponding to the device type of the terminal device is generated.

[0077] Those skilled in the art will understand that the performance data required for testing differs for different types of terminal devices. When the terminal device is a network card, netperf detects the performance data of the terminal device as bandwidth. When the terminal device is a GPU, nvqual detects the performance data of the terminal device as P2P (Peer to Peer) bandwidth. When the terminal device is an NVMe hard drive, fio detects the performance data of the terminal device as 4K random read, 4K random write, etc.

[0078] In an optional embodiment of the present invention, the method for determining whether the performance data meets preset conditions includes:

[0079] The judgment module determines whether the performance data exceeds a preset percentage of the standard performance data of the terminal device.

[0080] When the performance data is lower than a preset percentage of the standard performance data of the terminal device, it is determined that the performance data meets the preset conditions.

[0081] In this embodiment, the test performance data detected by the testing tool can be compared with a preset percentage of the standard performance data of the terminal device. In one example, it can be compared with 90% of the standard performance data of the terminal device. If the terminal device is a 100G GEN4 network card and the test performance data detected by the testing tool is lower than 90G, the judgment module can determine that the performance data of the terminal device is lower than 90% of the standard performance data, and determine that the performance data meets the preset condition. Those skilled in the art will understand that the terminal device selected above and the value of the preset percentage are only examples, and the present invention does not limit them.

[0082] Step 306: When the judgment module determines that the performance data exceeds a preset percentage of the standard performance data of the terminal device, it determines that the performance data does not meet the preset conditions and replaces the current terminal device.

[0083] When the judgment module determines that the performance data exceeds the preset percentage of the standard performance data of the terminal device, it determines that the performance data does not meet the preset conditions, indicating that the peripheral device switch performance bottleneck has not been reached and the current terminal device needs to be replaced.

[0084] In one example, if the terminal device is a 100G Gen4 network card and the test performance data detected by the testing tool exceeds 90G, the judgment module can determine that the terminal device's performance data is below 90% of the standard performance data, and has not reached the performance bottleneck of the peripheral device switch. A higher-level terminal device, such as a single-port 200G Gen4 network card, can then be replaced. Those skilled in the art will understand that the terminal device selected above, and the preset percentage values, are merely examples, and this invention does not impose limitations.

[0085] Step 307: When the judgment module determines that the performance data is lower than the preset percentage of the standard performance data of the terminal device, it determines that the performance data meets the preset conditions, the alarm module provides a prompt, and the next terminal device is selected for testing.

[0086] When the judgment module determines that the performance data is lower than the preset percentage of the standard performance data of the terminal device, it determines that the performance data meets the preset conditions, indicating that the peripheral device switch performance bottleneck has been reached and the test requirements are met. The alarm module will then issue a prompt and select the next terminal device for testing.

[0087] In one example, if the terminal device is a 100G Gen4 network card and the test performance data detected by the testing tool exceeds 90G, the judgment module can determine that the terminal device's performance data is below 90% of the standard performance data, and has not reached the peripheral device switch performance bottleneck. A higher-level terminal device can be replaced, such as a single-port 200G Gen4 network card. If the peripheral device switch performance bottleneck is still not reached after replacing the terminal device, a dual-port 200G Gen4 network card can be replaced until the peripheral device switch performance bottleneck is reached. At this point, the alarm module will issue a prompt, and the next terminal device can be tested. Those skilled in the art will understand that the terminal devices selected above, and the preset percentage values, are merely examples, and this invention does not limit the scope of the invention.

[0088] Step 308: Based on the slot information of the uplink port and the device types of the multiple terminal devices, determine the convergence ratio of the peripheral device switch;

[0089] After all the terminal devices connected to the peripheral device switch have completed the detection, the slot information of the downstream port of the peripheral device switch can be determined by the device type of the multiple terminal devices. Based on the slot information of the upstream port and the slot information of the downstream port of the peripheral device switch, the convergence ratio of the peripheral device switch can be determined.

[0090] Step 309: Based on the convergence ratio, the performance data, and the slot information of the uplink and downlink ports of the peripheral device switch, generate a test report and display the test report on the display module.

[0091] After obtaining the convergence ratio of the peripheral device switch, a test report is generated based on the convergence ratio, performance data, and the slot information of the uplink and downlink ports of the peripheral device switch. The test report is then displayed on the display module, making it easier for testers to understand the various data more clearly.

[0092] In an optional embodiment of the present invention, the terminal device is a host channel adapter (HCA) card.

[0093] HCA (Host Channel Adapter) cards are primarily used to achieve high-performance computing with infinite bandwidth. RDMA (Remote Direct Memory Access) is a new direct memory access technology that allows a computer to directly access the memory of other computers without processor processing. RDMA is essentially a high-speed remote memory access technology with a fully optimized intelligent network card and software architecture. It achieves its high-performance remote direct data access goal by embedding the RDMA protocol on the hardware (i.e., the HCA card) and supporting both zero-copy and kernel bypass methods. HCA cards do not require CPU involvement—applications can access remote host memory without consuming any CPU resources on the remote host. Therefore, using HCA cards reduces the impact of CPU performance during testing, allowing for more accurate testing of peripheral device switch bottleneck performance.

[0094] This invention embodiment acquires uplink port slot information and saves it to a storage module. The processor allocates resources based on the uplink port slot information of the peripheral device switch. It determines the terminal device according to the order of resource usage by the terminal devices, detects the terminal device's performance, and generates performance data. When the judgment module determines that the performance data exceeds a preset percentage of the terminal device's standard performance data, it determines that the performance data does not meet the preset conditions and replaces the current terminal device. When the judgment module determines that the performance data is lower than a preset percentage of the terminal device's standard performance data, it determines that the performance data meets the preset conditions, the alarm module provides a prompt, and the next device is selected. The terminal equipment is tested. Based on the uplink port slot information and the device types of multiple terminal devices, the convergence ratio of the peripheral device switch is determined. Based on the convergence ratio, performance data, and the uplink and downlink port slot information of the peripheral device switch, a test report is generated and displayed on the display module. This enables automatic testing through the testing device, making peripheral device switch bottleneck detection simpler and faster. The test results can be directly displayed through the display module, effectively improving the testing efficiency of peripheral device switch bottlenecks. At the same time, it allows people to understand various data more clearly, facilitating testing and use.

[0095] To enable those skilled in the art to better understand the present invention, reference is made to... Figure 4 The flowchart illustrates an embodiment of a method for detecting peripheral device switches according to the present invention:

[0096] Step 401, peripheral device switch information collection;

[0097] It can collect information such as the slot information of the uplink port, the slot information of the downlink port, FW, Driver, and Slot ID of the peripheral device switch.

[0098] Step 402: Obtain the slot information of the uplink port of the peripheral device switch;

[0099] Obtain the slot information of the uplink port of the peripheral device switch from the collected peripheral device switch information.

[0100] Step 403: Select a terminal device based on the slot information of the uplink port;

[0101] You can select a terminal device with the same uplink bandwidth as the peripheral device switch for testing.

[0102] Step 404: Detect the performance of the terminal device and generate performance data of the terminal device;

[0103] After initially identifying the terminal equipment, its performance needs to be tested using a testing device to generate performance data.

[0104] Step 405: Determine whether the performance data of the terminal device meets the preset conditions. If yes, proceed to step 406; otherwise, proceed to step 407 and return to step 404.

[0105] Step 406: The peripheral device switch performance bottleneck is reached, proceed to step 408.

[0106] Step 407: Replace the current terminal device.

[0107] When the performance data meets the preset conditions, it indicates that the peripheral device switch has reached its performance bottleneck and the test requirements are met.

[0108] When the performance data does not meet the preset conditions, it means that the peripheral device switch performance bottleneck has not been reached, and the current terminal device needs to be replaced and retested.

[0109] Step 408: Determine whether all terminal devices have completed the detection. If not, proceed to step 409 and return to step 404. If yes, end the detection.

[0110] Step 409: Select the next terminal device.

[0111] Reference Figure 5 This diagram illustrates the structure of a detection device in a method for detecting peripheral device switches according to the present invention. The detection device includes a storage module 501, a judgment module 502, a display module 503, and an alarm module 504. The storage module 501 is connected to the judgment module 502, and the judgment module 502 is connected to both the display module 503 and the alarm module 504. The storage module 501 stores the slot information of the uplink port of the peripheral device switch. The judgment module 502 determines whether the performance data of the terminal device meets preset conditions. The display module 503 displays the detection report, and the alarm module 504 provides a prompt when the performance data of the terminal device meets the preset conditions.

[0112] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0113] Reference Figure 6This diagram illustrates a structural block diagram of an embodiment of a peripheral device switch detection device according to the present invention, comprising: a processor, a detection device, a peripheral device switch, and terminal devices; the peripheral device switch has multiple ports, including one uplink port and at least two downlink ports, the uplink port being connected to the processor via a root component, and the detection device being connected to the downlink ports of the peripheral device switch and multiple terminal devices respectively; the method is applied to the detection device, which includes: a storage module, a judgment module, a display module, and an alarm module;

[0114] Specifically, it can include the following modules:

[0115] The acquisition module 601 is used to acquire the slot information of the uplink port and save the slot information of the uplink port to the storage module;

[0116] Selection module 602 is used to select the terminal device based on the slot information of the uplink port;

[0117] The detection module 603 is used to detect the performance of the terminal device and generate performance data of the terminal device.

[0118] The performance judgment module 604 is used to determine whether the performance data meets the preset conditions. When the performance data meets the preset conditions, the alarm module provides a prompt and selects the next terminal device for testing.

[0119] The convergence ratio module 605 is used to determine the convergence ratio of the peripheral device switch after the multiple terminal devices have completed the detection, generate a detection report, and display the detection report on the display module.

[0120] In an optional embodiment of the present invention, the selection module 602 includes:

[0121] The resource allocation submodule is used by the processor to allocate resources based on the slot information of the uplink port of the peripheral device switch;

[0122] The terminal device determination submodule is used to determine the terminal device according to the order of the resources occupied by the terminal devices.

[0123] In an optional embodiment of the present invention, the detection device includes multiple testing tools, the multiple terminal devices include multiple device types, and the detection module 603 includes:

[0124] The device type determination submodule is used to determine the device type of the terminal device;

[0125] The test tool selection submodule is used to select a test tool based on the device type of the terminal device.

[0126] The performance data generation submodule is used to detect the performance of the terminal device through the testing tool and generate performance data corresponding to the device type of the terminal device.

[0127] In an optional embodiment of the present invention, the performance determination module 604 includes:

[0128] The terminal device replacement submodule is used to determine that the performance data does not meet the preset conditions when the judgment module determines that the performance data exceeds the preset percentage of the standard performance data of the terminal device, and to replace the current terminal device.

[0129] The terminal device selection submodule is used to determine that the performance data meets the preset conditions when the judgment module determines that the performance data is lower than the preset percentage of the standard performance data of the terminal device, the alarm module provides a prompt, and the next terminal device is selected for testing.

[0130] In an optional embodiment of the present invention, the convergence ratio module 605 includes:

[0131] The convergence ratio determination submodule is used to determine the convergence ratio of the peripheral device switch based on the slot information of the uplink port and the device type of the multiple terminal devices.

[0132] The report display submodule is used to generate a test report based on the convergence ratio, the performance data, and the slot information of the uplink and downlink ports of the peripheral device switch, and to display the test report on the display module.

[0133] As the device embodiment is basically similar to the method embodiment, the description is relatively simple. For relevant details, please refer to the description of the method embodiment.

[0134] This invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described method embodiment for detecting peripheral devices and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0135] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described method embodiment for detecting peripheral devices and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0136] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0137] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0138] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0139] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0141] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0142] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0143] The present invention has provided a detailed description of a method and apparatus for detecting peripheral device switches. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for detecting peripheral device switches, characterized in that, include: The device includes a processor, a detection device, a peripheral device switch, and terminal devices. The peripheral device switch has multiple ports, including one uplink port and at least two downlink ports. The uplink port is connected to the processor via a root component. The detection device is connected to the downlink port of the peripheral device switch and to multiple terminal devices. The method is applied to a detection device, which includes: a storage module, a judgment module, a display module, and an alarm module; the method includes: Obtain the slot information of the uplink port and save the slot information of the uplink port to the storage module; The terminal device is selected based on the slot information of the uplink port; Detect the performance of the terminal device and generate performance data for the terminal device; The judgment module determines whether the performance data meets the preset conditions. When the performance data meets the preset conditions, the alarm module provides a prompt and selects the next terminal device for testing. After the multiple terminal devices have been detected, the convergence ratio of the peripheral device switch is determined, a detection report is generated, and the detection report is displayed on the display module. The method for determining whether the performance data meets preset conditions includes: The judgment module determines whether the performance data exceeds a preset percentage of the standard performance data of the terminal device. When the performance data is lower than a preset percentage of the standard performance data of the terminal device, it is determined that the performance data meets the preset conditions; The step of determining whether the performance data meets preset conditions through the judgment module, and when the performance data meets the preset conditions, the alarm module provides a prompt and selects the next terminal device for testing, includes: When the judgment module determines that the performance data exceeds a preset percentage of the standard performance data of the terminal device, it determines that the performance data does not meet the preset conditions and replaces the current terminal device; When the judgment module determines that the performance data is lower than a preset percentage of the standard performance data of the terminal device, it determines that the performance data meets the preset conditions, the alarm module provides a prompt, and the next terminal device is selected for testing.

2. The method according to claim 1, characterized in that, The step of selecting the terminal device based on the uplink port slot information includes: The processor allocates resources based on the slot information of the uplink port of the peripheral device switch; The terminal devices are determined according to the order in which they occupy resources.

3. The method according to claim 1, characterized in that, The detection device includes multiple testing tools, and the multiple terminal devices include multiple device types. The step of detecting the performance of the terminal devices and generating performance data of the terminal devices includes: Determine the device type of the terminal device; Select the testing tool based on the device type of the terminal device; The performance of the terminal device is detected by the testing tool, and performance data corresponding to the device type of the terminal device is generated.

4. The method according to claim 1, characterized in that, The steps of determining the convergence ratio of the peripheral device switch, generating a test report, and displaying the test report on the display module after the multiple terminal devices have completed the testing include: Based on the slot information of the uplink port and the device types of the multiple terminal devices, the convergence ratio of the peripheral device switch is determined; Based on the convergence ratio, the performance data, and the slot information of the uplink and downlink ports of the peripheral device switch, a test report is generated and displayed on the display module.

5. The method according to claim 1, characterized in that, The steps prior to obtaining the uplink port slot information and saving the uplink port slot information to the storage module include: According to preset rules, the peripheral device switch is connected to the port via cable, so that the peripheral device switch enters the test state.

6. A device for detecting peripheral device switches, characterized in that, include: The device includes a processor, a detection device, a peripheral device switch, and terminal devices. The peripheral device switch has multiple ports, including one uplink port and at least two downlink ports. The uplink port is connected to the processor via a root component. The detection device is connected to the downlink port of the peripheral device switch and to multiple terminal devices. The detection device includes: a storage module, a judgment module, a display module, and an alarm module; the device for detecting the peripheral device switch includes: An acquisition module is used to acquire the slot information of the uplink port and save the slot information of the uplink port to the storage module; The selection module is used to select the terminal device based on the slot information of the uplink port; The detection module is used to detect the performance of the terminal device and generate performance data of the terminal device. The performance judgment module is used to determine whether the performance data meets preset conditions. When the performance data meets the preset conditions, the alarm module will issue a prompt and select the next terminal device for testing. The convergence ratio module determines the convergence ratio of the peripheral device switch after the multiple terminal devices have completed the detection, generates a detection report, and displays the detection report on the display module. Specifically, the performance judgment module is used to determine whether the performance data exceeds a preset percentage of the standard performance data of the terminal device; when the performance data is lower than the preset percentage of the standard performance data of the terminal device, it is determined that the performance data meets the preset conditions. The performance judgment module includes: The terminal device replacement submodule is used to determine that the performance data does not meet the preset conditions when the judgment module determines that the performance data exceeds the preset percentage of the standard performance data of the terminal device, and to replace the current terminal device. The terminal device selection submodule is used to determine that the performance data meets the preset conditions when the judgment module determines that the performance data is lower than the preset percentage of the standard performance data of the terminal device, the alarm module provides a prompt, and the next terminal device is selected for testing.

7. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the method for detecting a peripheral device switch as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the method for detecting peripheral devices as described in any one of claims 1-5.

Citation Information

Patent Citations

  • PCIE link detection method and system, electronic equipment and storage medium

    CN109558282A

  • Performance bottleneck positioning method and device, storage medium and electronic equipment

    CN111143179A