Internal loopback test method, device, computer equipment and medium for IB network card
By conducting internal loopback testing on the IB network card to verify the performance of its ports, the problem of quality and performance verification of the IB network card is solved, and fast and efficient detection efficiency is achieved.
Patent Information
- Application Number
- CN202211357267.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-01
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-11-01
AI Technical Summary
Before installing or using an IB network card, its quality and performance cannot be quickly and effectively verified, especially the performance of each port.
By obtaining the target port identification information of the IB network card, controlling its connection with the Ethernet network to close, performing an internal loopback test, extracting the test attribute parameters, and comparing them with the maximum supported attribute parameters to determine the availability of the port.
It realizes the automatic verification of the performance of each port of the IB network card quickly and efficiently before installation or use, and improves the efficiency of IB network card quality inspection.
Smart Images

Figure CN115801648B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an internal loopback test method, device, computer equipment and storage medium for an IB network card. Background Art
[0002] With the development of computer technology, IB (InfiniBand) technology has emerged. IB technology is a computer network communication standard technology used for high-performance computing. With the emergence of this technology, IB network cards have emerged. IB network cards are a piece of computer hardware designed to allow computers to communicate on a computer network.
[0003] In traditional technology, when an IB network card is inserted into a server, a corresponding IB driver installation package can be configured for installation. However, before installation or use, the quality and performance of the IB network card cannot be known, and the performance of each port of the IB network card cannot be quickly verified. Summary of the invention
[0004] Based on this, it is necessary to provide an internal loopback test method, device, computer equipment and medium method, device, computer equipment and storage medium for an IB network card that can improve the efficiency of IB network card quality verification in response to the above technical problems.
[0005] An internal loopback test method for an IB network card, the method comprising:
[0006] Obtain identification information of a target port of a target IB network card inserted into the server;
[0007] The target IB network card is controlled to be in a closed state with respect to the Ethernet network;
[0008] Control the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port;
[0009] Extract the test attribute parameters of the target port from the test result of the internal loopback test;
[0010] Obtain the maximum supported attribute parameter configured for the target port; and
[0011] The test attribute parameter is compared with the maximum supportable attribute parameter, and in response to the test attribute parameter being consistent with the maximum supportable attribute parameter, the target port is determined to be an available port.
[0012] In one or more embodiments, the test attribute parameter includes a test bandwidth and a test network speed, the maximum supportable attribute parameter includes a maximum supportable bandwidth and a maximum supportable network speed, the test attribute parameter is compared with the maximum supportable attribute parameter, and in response to the test attribute parameter being consistent with the maximum supportable attribute parameter, the target port is determined as an available port, including:
[0013] Compare the test bandwidth to the maximum supported bandwidth;
[0014] Compare the tested network speed to the maximum supported network speed; and
[0015] In response to the test bandwidth being equal to the maximum supportable bandwidth and the test network speed being equal to the maximum supportable network speed, the target port is determined to be an available port.
[0016] In one or more embodiments, obtaining identification information of a target port of a target IB network card inserted into a server includes:
[0017] In response to the device information reading instruction, a device information list is acquired; wherein the device information list includes identification information of at least one port of at least one IB network card inserted into the server;
[0018] Determine a network card to be tested from among the multiple IB network cards as a target IB network card, and determine a port to be tested from among the ports of the target IB network card as a target port; and
[0019] Extract identification information corresponding to the target port from the device information list.
[0020] In one or more embodiments, controlling the target IB network card to be in a closed state with respect to the Ethernet network includes:
[0021] The first firmware parameter value and the second firmware parameter value of the target IB network card are modified from 1 to 0; wherein the first firmware parameter value and the second firmware parameter value are parameter values used to indicate the connection status between the target IB network card and the Ethernet network.
[0022] In one or more embodiments, controlling the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port includes:
[0023] Transmitting a first instruction to the target IB network card according to the identification information of the target port, the first instruction being an instruction instructing the target IB network card to perform an internal loopback test on the target port; and
[0024] A second instruction is transmitted to the target IB network card, where the second instruction is used to enable the first instruction.
[0025] In one or more embodiments, before comparing the test attribute parameter with the maximum supported attribute parameter, the method further includes:
[0026] extracting a first state parameter and a second state parameter from the test result; and
[0027] In response to the first state parameter being activated and the second state parameter being connected, a step of comparing the test attribute parameter with the maximum supportable attribute parameter is entered.
[0028] In one or more embodiments, before obtaining identification information of a target port of a target IB network card inserted into the server, the method further includes:
[0029] Install the Linux operating system on the server; and
[0030] Load the management configuration software package tool corresponding to the target IB network card based on the Linux operating system.
[0031] An internal loopback test device for an IB network card, the device comprising:
[0032] An identification information acquisition module, used to acquire identification information of a target port of a target IB network card inserted into a server;
[0033] The network connection closing module is used to control the target IB network card to be in a closed state with respect to the Ethernet network;
[0034] An internal loopback test module, used to control the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port;
[0035] A test attribute extraction module, used for extracting the test attribute parameters of the target port from the test result of the internal loopback test;
[0036] A fixed attribute extraction module, used to obtain the maximum supported attribute parameter configured for the target port; and
[0037] The port performance determination module is used to compare the test attribute parameter with the maximum supportable attribute parameter, and in response to the test attribute parameter being consistent with the maximum supportable attribute parameter, determine the target port as an available port.
[0038] A computer device comprises a memory, a processor and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the processor implements any one of the steps of the internal loopback test method of the IB network card.
[0039] A computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement any one of the steps of the internal loopback test method of an IB network card.
[0040] The above-mentioned internal loopback test method, device, computer equipment and storage medium of the IB network card obtain the identification information of the target port of the target IB network card inserted into the server, instruct the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port, and verify the availability of the target port of the target IB network card by comparing the test attribute parameters of the target port with the maximum supported attribute parameters, thereby realizing automatic verification of the performance of each port of the IB network card quickly and efficiently before installation or use, thereby improving the efficiency of IB network card quality detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of a flow chart of an internal loopback test method of an IB network card in one embodiment;
[0042] Figure 2 is a structural block diagram of an internal loopback test device of an IB network card in one embodiment;
[0043] Figure 3 is an internal structure diagram of a computer device in one embodiment;
[0044] Figure 4 Schematic diagram of the structure of a computer-readable storage medium in one embodiment. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] The internal loopback test method of the IB network card provided in the present application can be applied to a computer device, wherein the computer device can be a terminal or a server device, the terminal can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server can be implemented with an independent server or a server cluster consisting of multiple servers.
[0047] In one or more embodiments, the computer device may be a server. Specifically, the server obtains identification information of a target port of a target IB network card inserted into the server; controls the target IB network card to be in a closed state with respect to the Ethernet network; controls the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port; extracts test attribute parameters of the target port from the test results of the internal loopback test; obtains the maximum supportable attribute parameters configured for the target port; and compares the test attribute parameters with the maximum supportable attribute parameters, and in response to the test attribute parameters being consistent with the maximum supportable attribute parameters, determines the target port as an available port.
[0048] In one or more embodiments, the internal loopback test method of the IB network card can be implemented based on the Linux operating system, and the specific Linux operating system is not limited here. Exemplarily, before implementing the internal loopback test method of the IB network card, the implementation environment can be deployed on the server as needed, for example, the Linux operating system is installed on the server, and the management configuration software package tool corresponding to the IB network card to be tested is loaded based on the Linux operating system.
[0049] In one or more embodiments, Figure 1 As shown, an internal loopback test method for an IB network card is provided, and the method is applied to a server as an example for description, including the following steps:
[0050] Step S102: Acquire identification information of a target port of a target IB network card inserted into the server.
[0051] Among them, an IB (InfiniBand) network card is a piece of computer hardware designed to allow computers to communicate on a computer network. The target IB network card can be any one or more of all the IB network cards inserted into the server. Each IB network card can include multiple ports, for example, two ports, and the target port can be any one or more ports corresponding to the target IB network card. The identification information refers to the unique identification information of the PCI (Peripheral Component Interconnect) corresponding to the IB network card, for example, it can be the PCI-BDF (Bus, Device, Function) number.
[0052] Specifically, after detecting that the IB network card is inserted into the server, the server can read the PCI-BDF numbers of all IB network cards inserted into the server based on the Linux operating system, and the server extracts the PCI-BDF number of the target port of the target IB network card specified by the user from all the read PCI-BDF numbers, or, in turn, takes each port of each IB network card as a target port and extracts the PCI-BDF number of each target port.
[0053] More specifically, the target IB network card may be one or more IB network cards corresponding to the instruction determined from the IB network cards inserted into the server in response to the user instruction, or may be all IB network cards inserted into the server. The target port may be all ports of the target IB network card or a port corresponding to the instruction determined in response to the user instruction.
[0054] In one or more embodiments, obtaining identification information of a target port of a target IB network card inserted into a server includes: obtaining a device information list in response to a device information reading instruction; wherein the device information list includes identification information of at least one port of at least one IB network card inserted into the server; determining a network card to be tested from multiple IB network cards as a target IB network card, and determining a port to be tested from the ports of the target IB network card as a target port; and extracting identification information corresponding to the target port from the device information list. In this embodiment, the server can determine one or more IB network cards and ports to be tested according to the user's selection instruction, which can improve the flexibility of testing and performance verification.
[0055] Step S104: controlling the target IB network card to be in a closed state with respect to the Ethernet network.
[0056] After the IB network card is inserted into the server, the default setting of the firmware parameters of the IB network card is: the connection with the Ethernet network is turned on. If the IB network card is in the state of being connected to the Ethernet network, its test parameters and results may be affected by the network, and the IB network card cannot be accurately tested and verified. Therefore, it is necessary to control the target IB network card to be in the state of being closed from the Ethernet network to improve the accuracy of the internal loopback test.
[0057] Specifically, under the Linux operating system, based on the configuration management software package tool corresponding to the IB network card, for example, the MFT (Mellanox Firemare Tools) software package tool, parameter modification instructions can be transmitted to the firmware of the target IB network card to modify the firmware parameters of the IB network card to a state in which the Ethernet network connection is closed.
[0058] In one or more embodiments, controlling the target IB network card to be in a closed state with respect to the Ethernet network includes: modifying the first firmware parameter value and the second firmware parameter value of the target IB network card from 1 to 0; wherein the first firmware parameter value and the second firmware parameter value are parameter values used to indicate the connection status of the target IB network card with the Ethernet network.
[0059] In this embodiment, the first firmware parameter may be KEEP_ETH_LINK_UP_P1, and the second firmware parameter may be KEEP_ETH_LINK_UP_P2. When the IB network card leaves the factory, the default values of the KEEP_ETH_LINK_UP_P1 parameter and the KEEP_ETH_LINK_UP_P2 parameter configured in the firmware of the IB network card are 1, that is, the default connection with the Ethernet network is in the open state in the initial state. Modifying the values of the KEEP_ETH_LINK_UP_P1 parameter and the KEEP_ETH_LINK_UP_P2 parameter in the firmware parameters of the target IB network card from 1 to 0 can make the connection state between the target IB network card and the Ethernet network closed.
[0060] Step S106: controlling the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port.
[0061] Specifically, based on the configuration management software package tool corresponding to the IB network card, an internal loopback test instruction can be generated according to the identification information of the target port, and the generated internal loopback test instruction can be transmitted to the target IB network card, so that the target IB network card performs an internal loopback test on the target port according to the internal loopback test instruction.
[0062] In one or more embodiments, it includes: transmitting a first instruction to the target IB network card according to the identification information of the target port, the first instruction is an instruction instructing the target IB network card to perform an internal loopback test on the target port; and transmitting a second instruction to the target IB network card, the second instruction is used to enable the first instruction.
[0063] Exemplarily, the management configuration software package tool corresponding to the target IB network card installed under the Linux operating system can be called to send an internal loopback test instruction (first instruction) to the firmware of the target IB network card. The first instruction can be used to instruct the target IB network card to perform an internal loopback test on the target port according to the identification information carried in the instruction. After the target IB network card receives the first instruction, the first instruction is in a non-enabled state. At this time, the first instruction can be enabled by transmitting the second instruction to the target IB network card, so that the target IB network card starts the internal loopback test process. Furthermore, after the target IB network card completes the internal loopback test on the target port, the corresponding test result can also be retrieved through the test result query instruction.
[0064] Step S108: extracting the test attribute parameters of the target port from the test result of the internal loopback test.
[0065] The test attribute parameters are attribute parameters of the target port obtained through an internal loopback test, and the test attribute parameters may include: test network speed, test bandwidth, and the like.
[0066] Specifically, the server may obtain a test result list in response to a test result query instruction of the internal loopback test, and identify and extract parameters characterizing properties of the target port such as the test network speed and the test bandwidth from the test result list as test property parameters.
[0067] Step S110: Acquire the maximum supported attribute parameter configured for the target port.
[0068] The maximum supportable attribute parameters are attribute parameters such as the maximum supportable network speed and bandwidth of each port configured by the target IB network card when it leaves the factory.
[0069] Specifically, the server may retrieve the factory setting information of the target IB network card, thereby identifying and extracting attribute parameters such as the maximum supported network speed and the maximum supported bandwidth correspondingly configured for the target port of the target IB network card.
[0070] Step S112: Compare the test attribute parameter with the maximum supportable attribute parameter, and in response to the test attribute parameter being consistent with the maximum supportable attribute parameter, determine the target port as an available port.
[0071] Specifically, the server can compare the test attribute parameters extracted from the test results of the internal loopback test with the maximum supportable attribute parameters configured at the factory. If the values of the corresponding parameters in the two are consistent, the target end can be determined to be an available port, that is, the performance of the target port of the target IB network card is verified to be valid.
[0072] Furthermore, in response to the inconsistency between the test attribute parameter and the maximum supported attribute parameter, the target port is determined to be an unavailable port, that is, if the values of the corresponding parameters in the two are inconsistent, the target port can be determined to be an unavailable port. When it is detected that an unavailable port exists in the IB network card, a prompt message can be further generated so that the user can promptly discover the defective IB network card.
[0073] In one or more embodiments, the test attribute parameters include test bandwidth and test network speed, the maximum supportable attribute parameters include maximum supportable bandwidth and maximum supportable network speed, the test attribute parameters are compared with the maximum supportable attribute parameters, and in response to the test attribute parameters being consistent with the maximum supportable attribute parameters, the target port is determined as an available port, including: comparing the test bandwidth with the maximum supportable bandwidth; comparing the test network speed with the maximum supportable network speed; and in response to the test bandwidth being equal to the maximum supportable bandwidth and the test network speed being equal to the maximum supportable network speed, determining the target port as an available port.
[0074] In one or more embodiments, the method may further include: in response to the test bandwidth not being equal to the maximum supportable bandwidth and / or the test network speed not being equal to the maximum supportable network speed, determining the target port as an unavailable port.
[0075] In one or more embodiments, before comparing the test attribute parameters with the maximum supportable attribute parameters, the method also includes: extracting a first state parameter and a second state parameter from the test result; and in response to the first state parameter being activated and the second state parameter being connected, entering the step of comparing the test attribute parameters with the maximum supportable attribute parameters.
[0076] In this embodiment, the test result of the internal loop test may also include parameters characterizing whether the test is performed normally, for example, a first state parameter (state parameter) and a second state parameter (physical state parameter). The first state parameter is used to indicate the activation state of the internal loop test, and the second state parameter is used to indicate the physical connection state between the IB network card and the server. In response to the first state parameter being activated and the second state parameter being connected, it can be determined that the internal loop test is performed normally, and the test result at this time is a valid result. At this time, entering the step of comparing the test attribute parameters with the maximum supported attribute parameters can improve the accuracy of the IB network card performance verification.
[0077] In one or more embodiments, the method further includes: after the performance verification of the port of the IB network card is completed, the first firmware parameter value and the second firmware parameter value of the target IB network card can be modified from 0 back to 1 to ensure the normal connection between the target IB network card and the Ethernet.
[0078] The above-mentioned internal loopback test method of the IB network card obtains the identification information of the target port of the target IB network card inserted into the server, instructs the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port, and verifies the availability of the target port of the target IB network card by comparing the test attribute parameters of the target port with the maximum supported attribute parameters, thereby realizing fast and efficient automatic verification of the performance of each port of the IB network card before installation or use, thereby improving the efficiency of IB network card quality detection.
[0079] Next, in conjunction with an application example, the internal loopback test method of the IB network card involved in the present application is further described in detail, which may include the following steps:
[0080] 1. Deploy the environment, install the Linux operating system on the server, and install the management configuration software package tool corresponding to the IB network card based on the Linux operating system.
[0081] 2. Extract the PCI-BDF number of the IB network card inserted into the server under the Linux operating system.
[0082] For example, get the following device information:
[0083] 65:00.0Ethernet controller: Mellanox Technologies MT28908 Family[ConnectX-6];
[0084] 65:00.1Ethernet controller: Mellanox Technologies MT28908 Family[ConnectX-6];
[0085] b1:00.0Ethernet controller: Mellanox Technologies MT28908 Family[ConnectX-6];
[0086] b1:00.1Ethernet controller: Mellanox Technologies MT28908 Family[ConnectX-6];
[0087] Among them, it can be seen that IB network card 65 and IB network card b1 are inserted into the server. For example, IB network card 65 is determined as the target IB network card. IB network card 65 includes two ports, namely Port65:00.0 and Port65:00.1. Port65:00.0 is determined as the target port, and the identification information (65:00.0) corresponding to Port65:00.0 is obtained. In other embodiments, batch verification can also be performed, that is, the identification information of multiple ports of multiple IB network cards is obtained, and internal loopback tests and attribute parameter verifications are performed respectively according to the identification information of each port.
[0088] 3. Take Port 65:00.0 as an example to perform an internal loopback test, including:
[0089] 3.1. Based on the MFT software package tool, change the values of the firmware parameters KEEP_ETH_LINK_UP_P1 and KEEP_ETH_LINK_UP_P2 of IB network card 65 from 1 to 0.
[0090] 3.2. Based on the MFT software package tool, send an internal loopback test command for Port 65:00.0 to IB network card 65.
[0091] 3.3. Based on the MFT software package tool, send an instruction to enable the internal loopback test instruction to the IB network card 65.
[0092] 3.4. Use the MFT software package tool to retrieve the test result list of the internal loopback test for Port 65:00.0.
[0093] 4. Read "State" (first state parameter), "Physical state" (second state parameter), "Speed" (test network speed), and "Width" (test bandwidth) from the "Operational Info" section of the test result list; read "Enabled Link Speed (Ext.)" (maximum supported attribute parameter) from the "Supported Info" section of the test result list.
[0094] 5. Verify the read parameters. For example,
[0095] State:Active
[0096] Physical state:LinkUp
[0097] Speed: 100G
[0098] Width: 2x
[0099] Enabled Link Speed(Ext.):……(100G_2x,……)
[0100] In response to the first state being the activated state and the second state being the connected state, a step of comparing the test attribute parameter with the maximum supported attribute parameter is entered.
[0101] In response to the test bandwidth being equal to the maximum supportable bandwidth (which is 100G), and the test network speed being equal to the maximum supportable network speed (which is 2x), Port 65:00.0 may be determined as an available port.
[0102] 6. After the internal loopback test and attribute parameter verification are completed, restore the parameter values of KEEP_ETH_LINK_UP_P1 and KEEP_ETH_LINK_UP_P2 to 1.
[0103] The internal loopback test method of the IB network card provided by the above application example can be applied to the scene of laboratory IB network card quality test or factory IB network card quality diagnosis test. Through the computer executable instructions that can implement the internal loopback test method of the IB network card involved in this application, it can be further packaged to generate program products and promoted to various projects.
[0104] For example, on the factory production line of the IB network card, the factory performance and quality of the IB network card can be verified more comprehensively and effectively, the efficiency of the whole machine diagnosis can be improved, and the competitiveness of the product can be enhanced; on the user side, the effectiveness of the installed and used IB network card can be ensured.
[0105] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0106] In one or more embodiments, Figure 2 As shown, an internal loopback test device of an IB network card is provided, comprising: an identification information acquisition module 202, a network connection closing module 204, an internal loopback test module 206, a test attribute extraction module 208, a fixed attribute extraction module 210 and a port performance determination module 212, wherein:
[0107] The identification information acquisition module 202 is used to acquire the identification information of the target port of the target IB network card inserted into the server;
[0108] The network connection closing module 204 is used to control the target IB network card to be in a closed state with respect to the Ethernet network;
[0109] An internal loopback test module 206, used to control the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port;
[0110] A test attribute extraction module 208, used to extract the test attribute parameters of the target port from the test results of the internal loopback test;
[0111] A fixed attribute extraction module 210 is used to obtain the maximum supported attribute parameter configured for the target port; and
[0112] The port performance determination module 212 is used to compare the test attribute parameter with the maximum supportable attribute parameter, and in response to the test attribute parameter being consistent with the maximum supportable attribute parameter, determine the target port as an available port.
[0113] In one or more embodiments, the port performance determination module 212 compares the test bandwidth with the maximum supportable bandwidth; compares the test network speed with the maximum supportable network speed; and in response to the test bandwidth being equal to the maximum supportable bandwidth and the test network speed being equal to the maximum supportable network speed, determines the target port as an available port.
[0114] In one or more embodiments, the identification information acquisition module 202 obtains a device information list in response to a device information reading instruction; wherein the device information list includes identification information of at least one port of at least one IB network card inserted into the server; determines a network card to be tested as a target IB network card from multiple IB network cards, and determines a port to be tested from the ports of the target IB network card as a target port; and extracts identification information corresponding to the target port from the device information list.
[0115] In one or more embodiments, the network connection closing module 204 modifies the first firmware parameter value and the second firmware parameter value of the target IB network card from 1 to 0; wherein the first firmware parameter value and the second firmware parameter value are parameter values used to indicate the connection status between the target IB network card and the Ethernet network.
[0116] In one or more embodiments, the internal loopback test module 206 transmits a first instruction to the target IB network card according to the identification information of the target port, wherein the first instruction is an instruction instructing the target IB network card to perform an internal loopback test on the target port; and transmits a second instruction to the target IB network card, wherein the second instruction is used to enable the first instruction.
[0117] In one or more embodiments, the port performance determination module 212 extracts a first state parameter and a second state parameter from the test result; and in response to the first state parameter being activated and the second state parameter being connected, enters a step of comparing the test attribute parameter with the maximum supported attribute parameter.
[0118] In one or more embodiments, the identification information acquisition module 202 is further used to install a Linux operating system on the server; and to load a management configuration software package tool corresponding to the target IB network card based on the Linux operating system.
[0119] For the specific definition of the internal loopback test device of the IB network card, please refer to the definition of the internal loopback test method of the IB network card in the above text, which will not be repeated here. Each module in the internal loopback test device of the above-mentioned IB network card can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0120] In one or more embodiments, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer-readable instructions and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, an internal loopback test method of an IB network card is implemented.
[0121] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0122] In one or more embodiments, a computer device is provided, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer-readable instructions: obtaining identification information of a target port of a target IB network card inserted into a server; controlling the target IB network card to be in a closed state with respect to an Ethernet network; controlling the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port; extracting a test attribute parameter of the target port from a test result of the internal loopback test; obtaining a maximum supportable attribute parameter configured for the target port; and comparing the test attribute parameter with the maximum supportable attribute parameter, and determining the target port as an available port in response to the test attribute parameter being consistent with the maximum supportable attribute parameter.
[0123] In one or more embodiments, the processor executes computer-readable instructions to compare the test attribute parameters with the maximum supportable attribute parameters, and in response to the test attribute parameters being consistent with the maximum supportable attribute parameters, determines the target port as an available port, and specifically implements the following steps: compares the test bandwidth with the maximum supportable bandwidth; compares the test network speed with the maximum supportable network speed; and in response to the test bandwidth being equal to the maximum supportable bandwidth and the test network speed being equal to the maximum supportable network speed, determines the target port as an available port.
[0124] In one or more embodiments, when the processor executes computer-readable instructions to obtain identification information of a target port of a target IB network card inserted into a server, the following steps are specifically implemented: in response to a device information reading instruction, a device information list is obtained; wherein the device information list includes identification information of at least one port of at least one IB network card inserted into the server; a network card to be tested is determined from multiple IB network cards as a target IB network card, and a port to be tested is determined from the ports of the target IB network card as a target port; and identification information corresponding to the target port is extracted from the device information list.
[0125] In one or more embodiments, when the processor executes computer-readable instructions to control the target IB network card to be in a closed state with respect to the Ethernet network, the following steps are specifically implemented: the first firmware parameter value and the second firmware parameter value of the target IB network card are modified from 1 to 0; wherein the first firmware parameter value and the second firmware parameter value are parameter values used to indicate the connection status of the target IB network card with the Ethernet network.
[0126] In one or more embodiments, when the processor executes computer-readable instructions to control the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port, the following steps are specifically implemented: a first instruction is transmitted to the target IB network card according to the identification information of the target port, and the first instruction is an instruction instructing the target IB network card to perform an internal loopback test on the target port; and a second instruction is transmitted to the target IB network card, and the second instruction is used to enable the first instruction.
[0127] In one or more embodiments, before the processor executes computer-readable instructions to compare the test attribute parameters with the maximum supportable attribute parameters, it also implements the following steps: extracting the first state parameter and the second state parameter from the test results; and in response to the first state parameter being activated and the second state parameter being connected, entering the step of comparing the test attribute parameters with the maximum supportable attribute parameters.
[0128] In one or more embodiments, before the processor executes computer-readable instructions to obtain identification information of the target port of the target IB network card inserted into the server, the following steps are also implemented: installing a Linux operating system on the server; and loading a management configuration software package tool corresponding to the target IB network card based on the Linux operating system.
[0129] In one or more embodiments, a computer-readable storage medium 400 is provided, on which computer-readable instructions 402 are stored. When the computer-readable instructions 402 are executed by a processor, the following steps are implemented: controlling the target IB network card to be in a closed state with respect to the Ethernet network; controlling the target IB network card to perform an internal loopback test on the target port according to identification information of the target port; extracting a test attribute parameter of the target port from the test result of the internal loopback test; obtaining a maximum supportable attribute parameter configured for the target port; and comparing the test attribute parameter with the maximum supportable attribute parameter, and in response to the test attribute parameter being consistent with the maximum supportable attribute parameter, determining the target port as an available port.
[0130] In one or more embodiments, the computer-readable instructions 402 are executed by the processor to compare the test attribute parameters with the maximum supportable attribute parameters. In response to the test attribute parameters being consistent with the maximum supportable attribute parameters, the target port is determined to be an available port. The following steps are specifically implemented: comparing the test bandwidth with the maximum supportable bandwidth; comparing the test network speed with the maximum supportable network speed; and in response to the test bandwidth being equal to the maximum supportable bandwidth and the test network speed being equal to the maximum supportable network speed, the target port is determined to be an available port.
[0131] In one or more embodiments, when the computer-readable instructions 402 are executed by the processor to obtain the identification information of the target port of the target IB network card inserted into the server, the following steps are specifically implemented: in response to the device information reading instruction, a device information list is obtained; wherein the device information list includes the identification information of at least one port of at least one IB network card inserted into the server; a network card to be tested is determined from multiple IB network cards as the target IB network card, and a port to be tested is determined from the ports of the target IB network card as the target port; and identification information corresponding to the target port is extracted from the device information list.
[0132] In one or more embodiments, when the computer-readable instructions 402 are executed by the processor to control the target IB network card to be in a closed state with respect to the Ethernet network, the following steps are specifically implemented: the first firmware parameter value and the second firmware parameter value of the target IB network card are changed from 1 to 0; wherein the first firmware parameter value and the second firmware parameter value are parameter values used to indicate the connection state of the target IB network card with the Ethernet network.
[0133] In one or more embodiments, when the computer-readable instructions 402 are executed by the processor to control the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port, the following steps are specifically implemented: a first instruction is transmitted to the target IB network card according to the identification information of the target port, and the first instruction is an instruction instructing the target IB network card to perform an internal loopback test on the target port; and a second instruction is transmitted to the target IB network card, and the second instruction is used to enable the first instruction.
[0134] In one or more embodiments, the computer-readable instructions 402 are executed by the processor to implement the following steps before comparing the test attribute parameters with the maximum supportable attribute parameters: extracting the first state parameter and the second state parameter from the test results; and in response to the first state parameter being activated and the second state parameter being connected, entering the step of comparing the test attribute parameters with the maximum supportable attribute parameters.
[0135] In one or more embodiments, before the computer readable instructions 402 are executed by the processor to obtain the identification information of the target port of the target IB network card inserted into the server, the following steps are also implemented: installing the Linux operating system on the server; and loading the management configuration software package tool corresponding to the target IB network card based on the Linux operating system.
[0136] Those of ordinary skill in the art can understand that all or part of the processes in the methods for implementing the above embodiments can be completed by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile computer-readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0137] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0138] In addition, the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the characters in this article generally indicate that the associated objects before and after are in an "or" relationship.
[0139] It should be noted that, in the present invention, the words "first", "second", etc. are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order; the terms "S102", "S104", "S106", etc. are used to distinguish steps, and do not have to be understood as performing method steps in a specific order or sequential order; when the following description involves drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The term "a plurality" in the present invention includes two or more, unless otherwise indicated.
[0140] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. An internal loopback test method for an IB network card, the method include: Obtain identification information of a target port of a target IB network card inserted into the server; Controlling the target IB network card to be in a closed state with respect to the Ethernet network; Controlling the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port; Extracting the test attribute parameters of the target port from the test result of the internal loopback test; Obtaining the maximum supported attribute parameter configured for the target port; as well as comparing the test attribute parameter with the maximum supportable attribute parameter, and in response to the test attribute parameter being consistent with the maximum supportable attribute parameter, determining the target port as an available port; The test attribute parameter includes a test bandwidth and a test network speed, the maximum supportable attribute parameter includes a maximum supportable bandwidth and a maximum supportable network speed, and the comparing the test attribute parameter with the maximum supportable attribute parameter, and in response to the test attribute parameter being consistent with the maximum supportable attribute parameter, determining the target port as an available port, comprises: Comparing the test bandwidth with the maximum supportable bandwidth; Comparing the tested network speed with the maximum supported network speed; and In response to the test bandwidth being equal to the maximum supportable bandwidth and the test network speed being equal to the maximum supportable network speed, the target port is determined as an available port.
2. The method according to claim 1, It is characterized in that The step of obtaining identification information of a target port of a target IB network card inserted into the server includes: In response to the device information reading instruction, a device information list is acquired; wherein the device information list includes identification information of at least one port of at least one IB network card inserted into the server; Determine a network card to be tested from the multiple IB network cards as the target IB network card, and determine a port to be tested from the ports of the target IB network card as the target port; and Extract identification information corresponding to the target port from the device information list.
3. The method according to claim 1, It is characterized in that The controlling the target IB network card to be in a closed state with respect to the Ethernet network includes: The first firmware parameter value and the second firmware parameter value of the target IB network card are modified from 1 to 0; wherein the first firmware parameter value and the second firmware parameter value are parameter values used to indicate the connection status between the target IB network card and the Ethernet network.
4. The method according to claim 1, It is characterized in that The step of controlling the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port includes: Transmitting a first instruction to the target IB network card according to the identification information of the target port, wherein the first instruction is an instruction instructing the target IB network card to perform an internal loopback test on the target port; and A second instruction is transmitted to the target IB network card, where the second instruction is used to enable the first instruction.
5. The method according to claim 1, It is characterized in that Before comparing the test attribute parameter with the maximum supported attribute parameter, the method further includes: Extracting a first state parameter and a second state parameter from the test result; and In response to the first state parameter being activated and the second state parameter being connected, the step of comparing the test attribute parameter with the maximum supportable attribute parameter is entered.
6. The method according to any one of claims 1 to 5, It is characterized in that Before obtaining identification information of a target port of a target IB network card inserted into the server, the method further includes: Installing a Linux operating system on the server; and A management configuration software package tool corresponding to the target IB network card is loaded based on the Linux operating system.
7. An internal loopback test device for an IB network card, It is characterized in that The device comprises: An identification information acquisition module, used to acquire identification information of a target port of a target IB network card inserted into a server; A network connection closing module, used for controlling the target IB network card to be in a closed state with respect to the Ethernet network; An internal loopback test module, used for controlling the target IB network card to perform an internal loopback test on the target port according to the identification information of the target port; A test attribute extraction module, used to extract the test attribute parameters of the target port from the test result of the internal loopback test; A fixed attribute extraction module, used to obtain the maximum supported attribute parameter configured for the target port; and a port performance determination module, configured to compare the test attribute parameter with the maximum supportable attribute parameter, and in response to the test attribute parameter being consistent with the maximum supportable attribute parameter, determine the target port as an available port; The test attribute parameter includes a test bandwidth and a test network speed, the maximum supportable attribute parameter includes a maximum supportable bandwidth and a maximum supportable network speed, and the comparing the test attribute parameter with the maximum supportable attribute parameter, and in response to the test attribute parameter being consistent with the maximum supportable attribute parameter, determining the target port as an available port, comprises: comparing the test bandwidth with the maximum supportable bandwidth; Comparing the tested network speed with the maximum supported network speed; and In response to the test bandwidth being equal to the maximum supportable bandwidth and the test network speed being equal to the maximum supportable network speed, the target port is determined as an available port.
8. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer-readable instructions, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having computer-readable instructions stored thereon, It is characterized in that When the computer readable instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
