Network card test method, device, equipment and medium

Read the target status register and error counter of the network card through the substrate management controller, analyze the link connection situation, and conduct signal transmission quality tests, solving the problem of long test time of intelligent network card, realizing a fast and efficient testing process, and reducing resource consumption .

CN119172278APending Publication Date: 2024-12-20INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411537199.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The test time of smart network cards is long and the efficiency is low, which leads to high resource consumption during development and debugging. How to shorten the test time and improve the testing efficiency has become an urgent problem.

Method used

Through the substrate management controller, determine the link status of the network card, and read the target status register and the target status error counter, analyze the link connection status, conduct signal transmission quality tests, and realize fast network card link status testing to avoid going up and down the server. and access to the operating system.

Benefits of technology

It realizes the rapid completion of network card link status testing without entering the operating system, shortening the test time, improving testing efficiency, and reducing resource usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172278A_ABST
    Figure CN119172278A_ABST
Patent Text Reader

Abstract

The invention discloses a network card testing method, device and equipment and a medium, and relates to the technical field of network card testing, the method is applied to a substrate management controller, and the method comprises the following steps: determining a link state of a network card; reading a target state register and a target state error counter in the network card in response to the condition that the link state of the network card is link connection; the target state register is used for recording the link connection state in the operation process of the network card, and the target state error counter is used for recording the number of times of abnormal link connection in the operation process of the network card; and according to the read value of the target state register and the value of the target state error counter, determining the link connection condition in the operation process of the network card. The method can shorten the test time, improve the test efficiency and reduce resource occupation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network card testing, and in particular to a network card testing method, device, equipment and medium. Background Art

[0002] As the requirements for network performance and stability increase, the central processing unit (CPU) responsible for computing power in the server is under tremendous pressure. In order to reduce the burden on the CPU, the smart network card developed based on the field programmable gate array (FPGA) transfers the packet processing load from the CPU to the field programmable gate array in the network card. Although the customizability and programmability of the smart network card enable users to flexibly adapt to changing network needs, the customizability and programmability of the smart network card also lead to the consumption of a large amount of resources during the development and debugging process. At present, the test plan for the smart network card has a long test time and low efficiency. Therefore, how to shorten the test time and improve the test efficiency has become a technical problem that needs to be solved urgently by technicians in this field. Summary of the invention

[0003] The purpose of the present invention is to provide a network card testing method, device, equipment and medium, which can shorten the testing time, improve the testing efficiency and reduce the resource occupation.

[0004] In order to solve the above technical problems, the present invention provides a network card testing method, which is applied to a baseboard management controller, comprising:

[0005] Determine the link status of the network card;

[0006] In response to the link state of the network card being link connection, reading a target state register and a target state error counter in the network card; the target state register is used to record the link connection state during the operation of the network card, and the target state error counter is used to record the number of link connection anomalies that occur during the operation of the network card;

[0007] The link connection status during the operation of the network card is determined according to the read value of the target status register and the value of the target status error counter.

[0008] In some embodiments, determining the link connection status during operation of the network card according to the read value of the target status register and the value of the target status error counter includes:

[0009] If the value of the target status register read is abnormal, it is determined that a link connection abnormality occurs during the operation of the network card;

[0010] If the read value of the target status register is normal and the corresponding value of the target status error counter changes, it is determined that a flash disconnection occurs during the operation of the network card; wherein, if the network card has a link connection abnormality, the value of the target status error count changes.

[0011] In some embodiments, it also includes:

[0012] A signal transmission quality test is performed on a port of a data exchange device to which the network card is connected to determine the link quality of the network card.

[0013] In some embodiments, performing a signal transmission quality test on a port of a data exchange device to which the network card is connected to determine the link quality of the network card includes:

[0014] In response to no link connection abnormality or flash disconnection occurring during the operation of the network card, a signal transmission quality test is performed on a port of a data exchange device connected to the network card to determine the link quality of the network card.

[0015] In some embodiments, it also includes:

[0016] In response to the link quality of the network card not meeting a preset condition, ending the test;

[0017] In response to the link quality of the network card meeting a preset condition, increasing the test number count by one;

[0018] Compare the test number count value with a preset value;

[0019] In response to the test number count value reaching the preset value, determining that the network card passes the link status test;

[0020] In response to the test number count value not reaching the preset value, executing the test process again, the test process includes: controlling the network card to power on and off and controlling the network card to initialize the network port and re-establish the link connection;

[0021] Read the link status of the network card;

[0022] In response to reading the network card presence information, determining the link state of the network card;

[0023] In response to the link state of the network card being link unconnected, ending the test;

[0024] In response to the link state of the network card being link connected, reading a target state register and a target state error counter in the network card;

[0025] Determining the link connection status during the operation of the network card according to the read value of the target status register and the value of the target status error counter;

[0026] A signal transmission quality test is performed on a port of a data exchange device to which the network card is connected to determine the link quality of the network card.

[0027] In some embodiments, controlling the network card to power on and off and controlling the network card to initialize the network port and reestablish the link connection includes:

[0028] A command is sent to the network card to enable the first target component of the network card to perform power on and off control of the network card, and to reload the second target component of the network card to enable the second target component of the network card to initialize the network port and re-establish the link connection.

[0029] In some embodiments, reading the target status register and the target status error counter in the network card includes:

[0030] Reading registers in the network card for recording states of different layers of the network card link and registers for recording remote fault states;

[0031] The counter in the network card for recording the number of abnormalities occurring at different levels of the network card link and the counter for recording the number of remote failures occurring are read.

[0032] In order to solve the above technical problems, the present invention also provides a network card testing device, comprising:

[0033] A first determination module is used to analyze the read link status of the network card;

[0034] a reading module, configured to read a target status register and a target status error counter in the network card in response to the link status of the network card being link connection; the target status register is configured to record the link connection status during the operation of the network card, and the target status error counter is configured to record the number of times link connection anomalies occur during the operation of the network card;

[0035] The second determination module is used to determine the link connection status during the operation of the network card according to the read value of the target status register and the value of the target status error counter.

[0036] In order to solve the above technical problems, the present invention also provides a network card testing device, comprising:

[0037] Memory for storing computer programs;

[0038] The processor is used to implement the steps of the network card testing method as described above when executing the computer program.

[0039] To solve the above technical problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the network card testing method described above are implemented.

[0040] In order to solve the above technical problem, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the network card testing method described above when executed by a processor.

[0041] The network card testing method provided by the present invention is applied to a baseboard management controller, and includes: determining the link status of the network card; in response to the link status of the network card being a link connection, reading a target status register and a target status error counter in the network card; the target status register is used to record the link connection status during the operation of the network card, and the target status error counter is used to record the number of link connection anomalies that occur during the operation of the network card; and determining the link connection status during the operation of the network card according to the read value of the target status register and the value of the target status error counter.

[0042] It can be seen that the network card testing method provided by the present invention determines the link connection status of the network card by reading and analyzing the value of the register used to record the link connection status during the operation of the network card and the value of the counter used to record the number of link connection anomalies during the operation of the network card in the network card. In this way, the baseboard management controller executes the above process to test the network card, and there is no need to power on and off the server, and there is no need for the server to enter the operating system. The network card link status test can be completed quickly without entering the operating system, and the stability of the network card link status can be verified, which can greatly shorten the test time, improve the test efficiency, and reduce the occupation of resources.

[0043] The network card testing device, equipment, computer-readable storage medium and computer program product provided by the present invention all have the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the prior art and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0045] Figure 1 A schematic diagram of a flow chart of a network card testing method provided by an embodiment of the present invention;

[0046] Figure 2 A schematic diagram of a test architecture provided by an embodiment of the present invention;

[0047] Figure 3 A flowchart of a specific network card testing method provided by an embodiment of the present invention;

[0048] Figure 4 A schematic diagram of a network card testing device provided by an embodiment of the present invention;

[0049] Figure 5 A schematic diagram of a network card testing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The core of the present invention is to provide a network card testing method, device, equipment and medium, which can shorten the testing time, improve the testing efficiency and reduce resource occupation.

[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] Please refer to Figure 1 , Figure 1 A schematic diagram of a network card testing method provided by an embodiment of the present invention, the method is applied to a baseboard management controller, and reference is made to Figure 1 As shown, the method includes:

[0053] S101: Determine the link status of the network card.

[0054] After the component in the network card responsible for initializing the network port and establishing the link connection completes the network port initialization and link connection establishment operations, the network card in-place information is generated. The baseboard management controller continuously reads the link status of the network card. After the baseboard management controller reads the network card in-place information, the link status of the network card is determined based on the read link status of the network card. The link status of the network card includes two situations, one is link down, that is, the link is not connected, and the other is link up, that is, the link is connected.

[0055] S102: In response to the link state of the network card being link connection, read a target state register and a target state error counter in the network card; the target state register is used to record the link connection state during the operation of the network card, and the target state error counter is used to record the number of link connection anomalies that occur during the operation of the network card.

[0056] If the link status of the network card is link not connected, the test can be ended. When the link status of the network card is link connected, the target status register and the target status error counter in the network card are further read. The target status register is used to record the link connection status during the operation of the network card, and the target status error counter is used to record the number of link connection exceptions during the operation of the network card. One or more registers can be selected from the registers used to record the link connection status during the operation of the network card as the target status registers, and one or more counters can be selected from the counters used to record the number of link connection exceptions during the operation of the network card as the target status error counters.

[0057] In some embodiments, reading the target status register and the target status error counter in the network card includes:

[0058] Reading registers in the network card for recording states of different layers of the network card link and registers for recording remote fault states;

[0059] The counter in the network card for recording the number of abnormalities occurring at different levels of the network card link and the counter for recording the number of remote failures occurring are read.

[0060] This embodiment selects registers for recording states of different layers of the network card link and registers for recording remote fault states as target state registers. It selects counters for recording the number of abnormalities at different layers of the network card link and counters for recording the number of remote faults.

[0061] Exemplarily, the target status registers include: rx_pcs_ready status register, cdr_lock_status status register, and remote_fault_status status register. The rx_pcs_ready status register and the cdr_lock_status status register are used to record the status of different layers of the network card side link. For example, the rx_pcs_ready status register is used to record the status of the pcs layer, i.e., the physical coding sublayer, of the network card side link. The remote_fault_status status register is the remote fault status register.

[0062] Correspondingly, the target status error counters include: rx_pcs_ready_err_cnt status error counter, cdr_lock_err_cnt status error counter, and remote_fault_status_err_cnt status error counter. The rx_pcs_ready_err_cnt status error counter and the cdr_lock_err_cnt status error counter are used to record the number of link connection anomalies at different levels of the NIC side link. The remote_fault_status_err_cnt status error counter is used to record the number of remote faults.

[0063] The baseboard management controller can read the target status register through I2C (Inter-Integrated Circuit) commands.

[0064] Exemplarily, the baseboard management controller can read the target status register through the following I2C command:

[0065] i2ctransfer -y -f $busNum w1@0x11 0x05 r6;

[0066] i2ctransfer -y -f $busNum w1@0x11 0x10 r11;

[0067] i2ctransfer -y -f $busNum w1@0x11 0x20 r8;

[0068] i2ctransfer -y -f $busNum w1@0x11 0x30 r11.

[0069] This embodiment reads registers for recording states of different layers of the network card link and registers for recording remote fault states; reads counters for recording the number of abnormalities at different layers of the network card link and counters for recording the number of remote faults. According to the values ​​of the target state register and the target state error counter, the link connection status during the operation of the network card can be determined more comprehensively and accurately.

[0070] S103: Determine the link connection status during the operation of the network card according to the read value of the target status register and the value of the target status error counter.

[0071] The link connection status during the operation of the network card is determined by combining the read target status register value and the target status error counter value.

[0072] In some embodiments, determining the link connection status during operation of the network card according to the read value of the target status register and the value of the target status error counter includes:

[0073] If the value of the target status register read is abnormal, it is determined that a link connection abnormality occurs during the operation of the network card;

[0074] If the read value of the target status register is normal and the corresponding value of the target status error counter changes, it is determined that a flash disconnection occurs during the operation of the network card; wherein, if the network card has a link connection abnormality, the value of the target status error count changes.

[0075] If the value of the target status register is abnormal, it may be due to a high PRBS (Pseudo-Random Binary Sequence) bit error rate or AOC (Active Optical Cables) module compatibility and other issues that cause the link connection status to be abnormal. If a link connection abnormality occurs on the network card, the value of the target status error counter will change. For example, if a link connection abnormality occurs on the network card, the value of the target status error counter increases. If the value of the target status register is normal, but the value of the corresponding target status error counter increases, it means that the link connection abnormality occurred and then returned to normal, the link connection is unstable, and there has been a flash disconnection.

[0076] Furthermore, it is also possible to determine whether to perform further analysis based on the target state error counter to determine at which level the unstable point is located.

[0077] In some embodiments, it also includes:

[0078] A signal transmission quality test is performed on a port of a data exchange device to which the network card is connected to determine the link quality of the network card.

[0079] In this embodiment, the baseboard management controller also performs a signal transmission quality test on the port of the data exchange device connected to the network card to determine the link quality of the network card, thereby achieving a more comprehensive test of the network card link. Among them, the data exchange device can be a switch. The signal transmission quality test can be an eye diagram analysis. That is, the eye diagram analysis can be performed on the port of the switch connected to the network card to determine the link quality of the network card.

[0080] Performing eye diagram analysis on the switch port connected to the network card may specifically include:

[0081] Analyze the eye width and eye height in the eye diagram;

[0082] If the eye width in the eye diagram reaches a preset eye width threshold and the eye height in the eye diagram reaches a preset eye height threshold, it is determined that the link quality of the network card meets a preset condition;

[0083] If the eye width in the eye diagram does not reach a preset eye width threshold and / or the eye height in the eye diagram does not reach a preset eye height threshold, it is determined that the link quality of the network card does not meet a preset condition.

[0084] The larger the eye height (the minimum height of the open part of the eye in the eye diagram), the stronger the signal's ability to resist noise and interference during transmission. The larger the eye width (the time width of the open part of the eye in the eye diagram), the better the stability of the signal in the time domain. If the eye width of the eye diagram reaches the preset eye width threshold and the eye height of the eye diagram reaches the preset eye height threshold, it is considered that the link quality of the network card meets the preset conditions; if the eye width of the eye diagram does not reach the preset eye width threshold and / or the eye height of the eye diagram does not reach the preset eye height threshold, it is determined that the link quality of the network card does not meet the preset conditions. By comparing the eye height and eye width of the eye diagram with the corresponding thresholds, the link quality of the network card can be quickly determined.

[0085] In some embodiments, performing a signal transmission quality test on a port of a data exchange device to which the network card is connected to determine the link quality of the network card includes:

[0086] In response to no link connection abnormality or flash disconnection occurring during the operation of the network card, a signal transmission quality test is performed on a port of a data exchange device connected to the network card to determine the link quality of the network card.

[0087] In this embodiment, the signal transmission quality test is performed on the port of the data exchange device connected to the network card, and the operation of determining the link quality of the network card is performed when no link connection abnormality or flash disconnection occurs, that is, if it is determined that no link connection abnormality and flash disconnection have occurred in the network card according to the value of the read target status register and the value of the target status error counter, the signal transmission quality test is further performed on the port of the data exchange device connected to the network card. If it is determined that a link connection abnormality or flash disconnection has occurred in the network card according to the value of the read target status register and the value of the target status error counter, the signal transmission quality test is not performed on the data exchange device connected to the network card, thereby reducing the amount of operations and reducing resource usage.

[0088] In some embodiments, it also includes:

[0089] In response to the link quality of the network card not meeting a preset condition, ending the test;

[0090] In response to the link quality of the network card meeting a preset condition, increasing the test number count by one;

[0091] Compare the test number count value with a preset value;

[0092] In response to the test number count value reaching the preset value, determining that the network card passes the link status test;

[0093] In response to the test number count value not reaching the preset value, executing the test process again, the test process includes: controlling the network card to power on and off and controlling the network card to initialize the network port and re-establish the link connection;

[0094] Read the link status of the network card;

[0095] In response to reading the network card presence information, determining the link state of the network card;

[0096] In response to the link state of the network card being link unconnected, ending the test;

[0097] In response to the link state of the network card being link connected, reading a target state register and a target state error counter in the network card;

[0098] Determining the link connection status during the operation of the network card according to the read value of the target status register and the value of the target status error counter;

[0099] A signal transmission quality test is performed on a port of a data exchange device to which the network card is connected to determine the link quality of the network card.

[0100] If the link quality does not meet the preset conditions, the test is terminated. If the link quality meets the preset conditions, the test count value is increased by one, and the test count value at this time is compared with the preset value. If the test count value reaches the preset value, it is determined that the network card passes the link status test and the network card link status stability passes the test. If the test count value does not reach the preset value, the test is performed again, and the test process includes: controlling the power on and off of the network card and controlling the network card to initialize the network port and re-establish the link connection; reading the link status of the network card. After reading the in-place information of the network card, the link status of the network card is determined based on the read link status of the network card. If the link status of the network card is that the link is not connected, the test is terminated. If the link status of the network card is that the link is connected, the target status register and the target status error counter in the network card are read, and the link connection status during the operation of the network card is determined according to the read value of the target status register and the value of the target status error counter, and the link quality of the network card is determined by performing a signal transmission quality test on the port of the data exchange device connected to the network card.

[0101] In some embodiments, controlling the network card to power on and off and controlling the network card to initialize the network port and reestablish the link connection includes:

[0102] A command is sent to the network card to enable the first target component of the network card to perform power on and off control of the network card, and to reload the second target component of the network card to enable the second target component of the network card to initialize the network port and re-establish the link connection.

[0103] refer to Figure 2 As shown, when the first target component of the network card is a CPLD (Complex Programmable Logic Device) and the second target component is an FPGA (Field Programmable Gate Array), the baseboard management controller sends a command to the network card to control the CPLD in the network card to power on and off the network card, reload the FPGA in the network card, and make the FPGA in the network card re-initialize the network port and establish a link connection.

[0104] For example, after obtaining the link port xx of the network card on the server side and logging into the baseboard management controller of the server through SSH (Secure Shell), the baseboard management controller sends an I2C command to control the CPLD in the network card to power on and off the network card, reload the FPGA in the network card, and make the FPGA in the network card re-initialize the network port and establish a link connection. The I2C command is as follows:

[0105] i2ctransfer -f -y xx(bus) w3@0x10 0x91 0x59 0x7B;

[0106] i2ctransfer -f -y xx(bus) w3@0x10 0x91 0x59 0xfB.

[0107] refer to Figure 3 As shown, a specific implementation is described below:

[0108] The baseboard management controller controls the CPLD of the network card to control the power on and off of the network card and reload the FPGA of the network card. The baseboard management controller reads the link status of the network card through MCTP (Management Component Transport Protocol). Determine whether the link status of the network card is link disconnected. If the link status of the network card is link disconnected, the test is terminated. If the link status of the network card is not link disconnected, the target status register and target status error counter in the FPGA of the network card are read through the I2C command. According to the values ​​read from the target status register and the target status error counter, determine whether the link is disconnected or disconnected. If the link is disconnected or disconnected, the test is terminated. If the link is not disconnected or disconnected, read the register on the switch side, and determine whether the link is disconnected and whether the eye diagram is abnormal according to the values ​​read from the register on the switch side. If the link is not disconnected or the eye diagram is abnormal, the test is terminated. If the link is not disconnected and the eye diagram is normal, determine whether the number of tests reaches the set number. If the number of tests reaches the set number, the test is terminated. If the number of test times is not reached, the process returns to the step where the baseboard management controller controls the CPLD of the network card to perform power on and off control of the network card, and the test is performed here.

[0109] In summary, the network card testing method provided by the present invention determines the link connection status of the network card by reading and analyzing the value of the register in the network card used to record the link connection status during the operation of the network card and the value of the counter used to record the number of link connection anomalies during the operation of the network card. In this way, the baseboard management controller executes the above process to test the network card, and there is no need to power on and off the server, and there is no need for the server to enter the operating system. The network card link status test can be completed quickly without entering the operating system, and the stability of the network card link status can be verified, which can greatly shorten the test time, improve the test efficiency, and reduce the occupation of resources.

[0110] The present invention also provides a network card testing device, and the device described below can be referred to in correspondence with the method described above. Figure 4 , Figure 4 A schematic diagram of a network card testing device provided by an embodiment of the present invention, combined with Figure 4 As shown, the device comprises:

[0111] A first determination module 10 is used to analyze the read link status of the network card;

[0112] The reading module 20 is used for reading a target status register and a target status error counter in the network card in response to the link status of the network card being link connection; the target status register is used for recording the link connection status during the operation of the network card, and the target status error counter is used for recording the number of link connection anomalies during the operation of the network card;

[0113] The second determination module 30 is used to determine the link connection status during the operation of the network card according to the read value of the target status register and the value of the target status error counter.

[0114] Based on the above embodiment, as a specific implementation, the second determining module 30 includes:

[0115] A first determining unit, configured to determine that a link connection abnormality occurs during operation of the network card if the value of the target status register read is abnormal;

[0116] The second determination unit is used to determine that a flash disconnection occurs during the operation of the network card if the value of the target status register read is normal and the value of the corresponding target status error counter changes; wherein, if the network card has a link connection abnormality, the value of the target status error count changes.

[0117] Based on the above embodiment, as a specific implementation method, it also includes:

[0118] The third determination module is used to perform a signal transmission quality test on a port of a data exchange device to which the network card is connected, so as to determine the link quality of the network card.

[0119] Based on the above embodiment, as a specific implementation manner, the third determination module is specifically used to:

[0120] In response to no link connection abnormality or flash disconnection occurring during the operation of the network card, a signal transmission quality test is performed on a port of a data exchange device connected to the network card to determine the link quality of the network card.

[0121] Based on the above embodiment, as a specific implementation method, it also includes:

[0122] An ending module, used for ending the test in response to the link quality of the network card not meeting a preset condition;

[0123] A counting module, configured to increase a test count by one in response to the link quality of the network card meeting a preset condition;

[0124] A comparison module, used for comparing the test number count value with a preset value;

[0125] A fourth determination module, configured to determine that the network card passes the link status test in response to the test number count value reaching the preset value;

[0126] A retest module is used to execute the test process again in response to the test number count value not reaching the preset value, and the test process includes: controlling the network card to power on and off and controlling the network card to initialize the network port and re-establish the link connection; reading the link status of the network card; in response to the read network card in-place information, determining the link status of the network card; in response to the link status of the network card being the link is not connected, ending the test; in response to the link status of the network card being the link is connected, reading the target status register and the target status error counter in the network card; determining the link connection status of the network card during the operation of the network card according to the read value of the target status register and the value of the target status error counter; performing a signal transmission quality test on the port of the data exchange device connected to the network card to determine the link quality of the network card.

[0127] Based on the above embodiment, as a specific implementation method, controlling the network card to power on and off and controlling the network card to initialize the network port and re-establish the link connection includes:

[0128] A command is sent to the network card to enable the first target component of the network card to perform power on and off control of the network card, and to reload the second target component of the network card to enable the second target component of the network card to initialize the network port and re-establish the link connection.

[0129] Based on the above embodiment, as a specific implementation, the reading module 20 includes:

[0130] A first reading unit, used for reading registers in the network card for recording states of different layers of the network card link and a register for recording a remote fault state;

[0131] The second reading unit is used to read the counter in the network card for recording the number of abnormalities occurring at different levels of the network card link and the counter for recording the number of remote failures occurring.

[0132] The present invention also provides a network card testing device, referring to Figure 5 As shown, the device includes a memory 1 and a processor 2 .

[0133] Memory 1, used for storing computer programs;

[0134] Processor 2 is used to execute the computer program to implement the following steps:

[0135] Determine the link status of the network card; in response to the link status of the network card being a link connection, read a target status register and a target status error counter in the network card; the target status register is used to record the link connection status during the operation of the network card, and the target status error counter is used to record the number of link connection anomalies that occur during the operation of the network card; determine the link connection status during the operation of the network card based on the read value of the target status register and the value of the target status error counter.

[0136] For an introduction to the device provided by the present invention, please refer to the above method embodiment, and the present invention will not be elaborated here.

[0137] In some embodiments, the memory 1 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.

[0138] In addition, the memory 1 may include a read-only memory and a random access memory, and provides instructions and data to the processor 2. A portion of the memory 1 may also include an NVRAM. The memory 1 stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.

[0139] The processor 2 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, a microprocessor or any conventional processor, etc. The processor 2 may call a program stored in the memory 1.

[0140] The communication interface is used to connect to other devices or systems. Figure 5 The structure shown does not constitute a limitation on the bandwidth allocation device in the embodiment of the present invention. In actual applications, the bandwidth allocation device may include Figure 5 More or fewer components than shown, or combinations of certain components.

[0141] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps can be implemented:

[0142] Determine the link status of the network card; in response to the link status of the network card being a link connection, read a target status register and a target status error counter in the network card; the target status register is used to record the link connection status during the operation of the network card, and the target status error counter is used to record the number of link connection anomalies that occur during the operation of the network card; determine the link connection status during the operation of the network card based on the read value of the target status register and the value of the target status error counter.

[0143] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0144] For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not elaborate on it here.

[0145] The present invention also provides a computer program product, comprising a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the following steps are implemented:

[0146] Determine the link status of the network card; in response to the link status of the network card being a link connection, read a target status register and a target status error counter in the network card; the target status register is used to record the link connection status during the operation of the network card, and the target status error counter is used to record the number of link connection anomalies that occur during the operation of the network card; determine the link connection status during the operation of the network card based on the read value of the target status register and the value of the target status error counter.

[0147] For an introduction to the computer program product provided by the present invention, please refer to the above method embodiment, and the present invention will not be elaborated here.

[0148] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the devices, equipment, and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0149] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0150] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0151] The network card testing method, device, equipment and medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation method of the present invention. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the protection scope of the present invention.

Claims

1. A network card testing method, characterized in that: Applicable to baseboard management controllers, including: Determine the link status of the network card; In response to the link state of the network card being link connection, reading a target state register and a target state error counter in the network card; the target state register is used to record the link connection state during the operation of the network card, and the target state error counter is used to record the number of link connection anomalies that occur during the operation of the network card; The link connection status during the operation of the network card is determined according to the read value of the target status register and the value of the target status error counter.

2. The network card testing method according to claim 1, characterized in that: Determining the link connection status during the operation of the network card according to the read value of the target status register and the value of the target status error counter includes: If the value of the target status register read is abnormal, it is determined that a link connection abnormality occurs during the operation of the network card; If the read value of the target status register is normal and the corresponding value of the target status error counter changes, it is determined that a flash disconnection occurs during the operation of the network card; wherein, if the network card has a link connection abnormality, the value of the target status error count changes.

3. The network card testing method according to claim 1, characterized in that: Also includes: A signal transmission quality test is performed on a port of a data exchange device to which the network card is connected to determine the link quality of the network card.

4. The network card testing method according to claim 3, characterized in that: Performing a signal transmission quality test on a port of a data exchange device to which the network card is connected to determine the link quality of the network card includes: In response to no link connection abnormality or flash disconnection occurring during the operation of the network card, a signal transmission quality test is performed on a port of a data exchange device connected to the network card to determine the link quality of the network card.

5. The network card testing method according to claim 4, characterized in that: Also includes: In response to the link quality of the network card not meeting a preset condition, ending the test; In response to the link quality of the network card meeting a preset condition, increasing the test number count by one; Compare the test number count value with a preset value; In response to the test number count value reaching the preset value, determining that the network card passes the link status test; In response to the test number count value not reaching the preset value, executing the test process again, the test process includes: controlling the network card to power on and off and controlling the network card to initialize the network port and re-establish the link connection; Read the link status of the network card; In response to reading the network card presence information, determining the link state of the network card; In response to the link state of the network card being link unconnected, ending the test; In response to the link state of the network card being link connected, reading a target state register and a target state error counter in the network card; Determining the link connection status during the operation of the network card according to the read value of the target status register and the value of the target status error counter; A signal transmission quality test is performed on a port of a data exchange device to which the network card is connected to determine the link quality of the network card.

6. The network card testing method according to claim 5, characterized in that: Controlling the network card to power on and off and controlling the network card to initialize the network port and reestablish the link connection includes: A command is sent to the network card to enable the first target component of the network card to perform power on and off control of the network card, and to reload the second target component of the network card to enable the second target component of the network card to initialize the network port and re-establish the link connection.

7. The network card testing method according to claim 1, characterized in that: Reading the target status register and the target status error counter in the network card includes: Reading registers in the network card for recording states of different layers of the network card link and registers for recording remote fault states; The counter in the network card for recording the number of abnormalities occurring at different levels of the network card link and the counter for recording the number of remote failures occurring are read.

8. A network card testing device, characterized in that: include: A first determination module is used to analyze the read link status of the network card; A reading module, configured to read a target status register and a target status error counter in the network card in response to the link status of the network card being link connected; The target status register is used to record the link connection status during the operation of the network card, and the target status error counter is used to record the number of link connection anomalies that occur during the operation of the network card; The second determination module is used to determine the link connection status during the operation of the network card according to the read value of the target status register and the value of the target status error counter.

9. A network card testing device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the network card testing method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the network card testing method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Link state detection method and device, electronic equipment and storage medium

    CN120434154A

  • Link state detection method and device, electronic equipment and storage medium

    CN120434154B