Intelligent Network Card Testing Method, Device, and Computer Equipment
By conducting comprehensive testing of each interface and link of the smart network card, the problem of single test content in the existing technology is solved, and a comprehensive evaluation of the stability of the smart network card link is achieved, providing a more detailed basis for the improvement of the smart network card.
Patent Information
- Application Number
- CN202211681425.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2042-12-27
AI Technical Summary
When testing smart network cards, the existing technology only focuses on functional testing, and fails to comprehensively test the structure of the smart network card and the collaboration between various devices, resulting in a single test content and the inability to fully evaluate the stability of the smart network card.
By traversing the various interfaces of the smart network card, determining the corresponding links of each interface, and querying the target link test strategy based on the link identification of the link, testing each link, obtaining the link test results, and finally determining the test results of the smart network card.
A comprehensive test of the links related to the smart network card was realized, and the stability of each link of the smart network card was evaluated, making the test more comprehensive, which can reflect the link stability of the smart network card in actual use, and provides a more detailed basis for subsequent improvements.
Smart Images

Figure CN116094956B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a method and device for testing an intelligent network card, a computer device, a storage medium, and a computer program product. Background Art
[0002] With the development of technology, intelligent network cards have emerged. Compared with ordinary network cards, intelligent network cards can not only forward packets like ordinary network cards, but also deploy different forwarding strategies. Compared with the fixed forwarding strategies of ordinary network cards, they have more application scenarios.
[0003] In related technologies, when testing an intelligent network card, generally, forwarding tests are carried out in the same way as testing an ordinary network card to determine whether its forwarding function can operate normally. On this basis, since the intelligent network card undertakes some functions of the central processing unit, different network configurations are deployed on the intelligent network card to test whether the intelligent network card can operate normally.
[0004] However, compared with ordinary network cards, intelligent network cards not only have functional upgrades, but also have different structures. An intelligent network card is composed of multiple devices and its functions are realized through the cooperation of multiple devices. Therefore, simply testing the functions of the intelligent network card is not comprehensive enough and the test content is single. There is a need for a method for testing an intelligent network card that can test the intelligent network card more comprehensively. Summary of the Invention
[0005] Based on this, in view of the above technical problems, it is necessary to provide an intelligent network card testing method, device, computer device, computer-readable storage medium, and computer program product that can test the intelligent network card more comprehensively.
[0006] In a first aspect, this application provides a method for testing an intelligent network card. The method includes:
[0007] Traverse each interface of the intelligent network card to determine the link corresponding to each interface of the intelligent network card;
[0008] For each link, when it is determined that the link is in an operating state, query the target link test strategy corresponding to the link in the correspondence between the link identifier and the link test strategy according to the link identifier of the link;
[0009] Test the link based on the target link test strategy to obtain the link test result corresponding to the link;
[0010] Determine the test result of the intelligent network card according to the link test results corresponding to each link.
[0011] Through the intelligent network card testing method of this application, all the links related to the intelligent network card are tested. On the basis of testing the functions of the intelligent network card in the related technology, the stability of each link corresponding to the intelligent network card is tested, making the testing of the intelligent network card more comprehensive and providing a further basis for the subsequent improvement of the intelligent network card.
[0012] In one embodiment, testing the link based on the target link testing strategy to obtain the link test result corresponding to the link includes:
[0013] Determine the interaction devices at both ends of the link and determine the access address information of the interaction devices;
[0014] According to the address information of the interaction devices, use the driving device to perform data interaction between the interaction devices at both ends of the link;
[0015] When performing data interaction between the interaction devices at both ends of the link, obtain the current state information of the link between the interaction devices;
[0016] In the case where it is determined that the current state information does not meet the state information conditions corresponding to the interaction devices, output the link test result corresponding to the interaction devices, and the link test result is used to characterize that the link between the interaction devices is unstable.
[0017] When testing the internal link of the intelligent network card, make the devices at both ends of the link perform frequent data interaction. During the frequent data interaction process of the devices at both ends of the link, monitor whether the state information of the link meets the preset state information conditions, so as to test whether the internal link of the intelligent network card is stable during operation.
[0018] In one embodiment, obtaining the current state information of the link between the interaction devices includes:
[0019] Access the advanced error reporting register, link speed register, and link bandwidth register corresponding to the link between the interaction devices, obtain the advanced error reporting information, link speed information, and link bandwidth information corresponding to the link between the interaction devices, and use the advanced error reporting information, the link speed information, and the link bandwidth information as the current state information of the link between the interaction devices.
[0020] Obtain the state information of the link by accessing the register corresponding to the link.
[0021] In one embodiment, when the link is the link between the central processing unit and the intelligent network card, testing the link based on the target link testing strategy to obtain the link test result corresponding to the link includes:
[0022] Traverse each interface of the central processing unit to determine the target interface and target link connected to the smart network card;
[0023] Determine the signal index information corresponding to the target link based on the signal received through the target interface;
[0024] When it is determined that the signal index information does not meet the preset signal index information conditions, output the test result corresponding to the target link, and the link test result is used to indicate that the target link is unstable.
[0025] When testing the link between the smart network card and the central processing unit, the central processing unit determines whether the link between the central processing unit and the smart network card is stable by judging the stability of the signal transmitted through the link connected to the smart network card.
[0026] In one embodiment, when the link is the link between the smart network card and the network controller or network port
[0027] in this case, testing the link based on the target link test strategy to obtain the link test result corresponding to the link, including:
[0028] Transmit and receive packets using the smart network card according to the transceiver parameters;
[0029] When transmitting and receiving packets using the smart network card, obtain the current status information of the link;
[0030] Determine whether the link meets the preset working status conditions according to the current status information and the transceiver parameters;
[0031] When it is determined that the link does not meet the preset working status conditions, output the test result corresponding to the link, and the link test result is used to indicate that the link is unstable.
[0032] When testing the link between the smart network card and the network card or network controller, transmit and receive packets using the smart network card according to different set transceiver parameters. During this period, monitor whether the status information of the link between the smart network card and the network card or network controller meets the preset status information conditions, so as to test whether the link between the smart network card and the network card or network controller is stable.
[0033] In one embodiment, the method further includes:
[0034] During the process of testing the link based on the target link test strategy, access the temperature register of the smart network card to determine the smart network card temperature information;
[0035] When the temperature corresponding to the temperature information is higher than the preset temperature threshold, output the abnormal test result corresponding to the intelligent network card.
[0036] While testing the link, monitor whether the temperature of the intelligent network card is within the threshold range of safe operation.
[0037] In a second aspect, the present application also provides an intelligent network card testing device. The device includes:
[0038] A traversal module, configured to traverse each interface of the intelligent network card to determine the links corresponding to each interface of the intelligent network card;
[0039] A query module, configured to, for each link, when it is determined that the link is in an operating state, query the target link test policy corresponding to the link in the correspondence between the link identifier and the link test policy according to the link identifier of the link;
[0040] A test module, configured to test the link based on the target link test policy to obtain the link test result corresponding to the link;
[0041] A result module, configured to determine the test result of the intelligent network card according to the link test results corresponding to each link.
[0042] In one embodiment, the above test module specifically includes:
[0043] A determination unit, configured to determine the interaction devices at both ends of the link and determine the access address information of the interaction devices;
[0044] An interaction unit, configured to perform data interaction on the interaction devices at both ends of the link by using a driving device according to the address information of the interaction devices;
[0045] A first acquisition unit, configured to acquire the current state information of the link between the interaction devices when data interaction is performed on the interaction devices at both ends of the link;
[0046] A first output unit, configured to output the link test result corresponding to the interaction device when it is determined that the current state information does not meet the state information condition corresponding to the interaction device, and the link test result is used to characterize that the link between the interaction devices is unstable.
[0047] In one embodiment, the above first acquisition unit is specifically configured to:
[0048] When data is exchanged between the interaction devices at both ends of the link, access the advanced error report register, link speed register, and link bandwidth register corresponding to the link between the interaction devices, obtain the advanced error report information, link speed information, and link bandwidth information corresponding to the link between the interaction devices, and use the advanced error report information, the link speed information, and the link bandwidth information as the current status information of the link between the interaction devices.
[0049] In one embodiment, when the link is the link between the central processing unit and the smart network card, the above test module specifically includes:
[0050] A traversal unit for traversing each interface of the central processing unit to determine the target interface and the target link connected to the smart network card;
[0051] A first determination unit for determining the signal index information corresponding to the target link through the signal received by the target interface;
[0052] A second output unit for outputting the test result corresponding to the target link when it is determined that the signal index information does not meet the preset signal index information condition, and the link test result is used to indicate that the target link is unstable.
[0053] In one embodiment, when the link is the link between the smart network card and the network controller or network port, the above test module specifically includes:
[0054] A transceiver unit for transmitting and receiving packets using the smart network card according to the transceiver parameters;
[0055] A second acquisition unit for acquiring the current status information of the link when transmitting and receiving packets using the smart network card;
[0056] A second determination unit for determining whether the link meets the preset working status condition according to the current status information and the transceiver parameters;
[0057] A third output unit for outputting the test result corresponding to the link when it is determined that the link does not meet the preset working status condition, and the link test result is used to indicate that the link is unstable.
[0058] In one of the embodiments, the above device further includes:
[0059] An access module for accessing the temperature register of the smart network card to determine the smart network card temperature information during the process of testing the link based on the target link test strategy;
[0060] An output module, configured to output an abnormal test result corresponding to the smart network card when the temperature corresponding to the temperature information is higher than a preset temperature threshold.
[0061] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0062] Traverse each interface of the smart network card to determine the links corresponding to each interface of the smart network card;
[0063] For each link, when it is determined that the link is in an operating state, according to the link identifier of the link, query the target link test policy corresponding to the link in the correspondence between the link identifier and the link test policy;
[0064] Test the link based on the target link test policy to obtain a link test result corresponding to the link;
[0065] Determine the test result of the smart network card according to the link test results corresponding to each link.
[0066] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0067] Traverse each interface of the smart network card to determine the links corresponding to each interface of the smart network card;
[0068] For each link, when it is determined that the link is in an operating state, according to the link identifier of the link, query the target link test policy corresponding to the link in the correspondence between the link identifier and the link test policy;
[0069] Test the link based on the target link test policy to obtain a link test result corresponding to the link;
[0070] Determine the test result of the smart network card according to the link test results corresponding to each link.
[0071] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0072] Traverse each interface of the smart network card to determine the links corresponding to each interface of the smart network card;
[0073] For each of the above-mentioned links, when it is determined that the link is in an operating state, according to the link identifier of the link, query the target link test policy corresponding to the link in the correspondence between the link identifier and the link test policy;
[0074] Test the link based on the target link test policy to obtain the link test result corresponding to the link;
[0075] Determine the test result of the smart network card according to the link test results corresponding to each of the above-mentioned links.
[0076] In the above-mentioned smart network card test method, device, computer device, storage medium and computer program product, the link stability of each link of the smart network card is tested according to different link test policies, and the link stability of the smart network card in actual use is determined according to the test results. Description of the Drawings
[0077] Figure 1 It is an application environment diagram of the smart network card test method in an embodiment;
[0078] Figure 2 It is a schematic flowchart of the smart network card test method in an embodiment;
[0079] Figure 3 It is a schematic flowchart of the smart network card test method in another embodiment;
[0080] Figure 4 It is a structural block diagram of the smart network card test device in an embodiment;
[0081] Figure 5 It is an internal structure diagram of a computer device in an embodiment. Detailed Embodiments
[0082] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to 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.
[0083] In the related art, when testing a smart network card, generally, a forwarding test is performed in the same way as testing an ordinary network card to determine whether its forwarding function can operate normally. On this basis, since the smart network card undertakes part of the functions of the central processing unit, different network configurations are deployed for the smart network card to test whether the smart network card can operate normally.
[0084] However, compared with ordinary network cards, smart network cards not only have upgraded functions, but also have different structures. A smart network card is composed of multiple devices and its functions are realized through the cooperation of multiple devices. Therefore, only testing the functions of a smart network card is not comprehensive enough. The stability of the link related to the smart network card is also a necessary condition for the normal operation of the smart network card. Therefore, the stability of the link related to the smart network card also needs to be tested.
[0085] Related technologies only test the basic transceiver functions and upgrade / downgrade functions of smart network cards, and cannot comprehensively test smart network cards. In other words, only testing the basic transceiver functions and upgrade / downgrade functions of smart network cards cannot reflect the stability of the links related to smart network cards.
[0086] Based on this, the present application provides a smart network card testing method, which traverses each interface of the smart network card to determine each corresponding link of the smart network card. For each link, when it is determined that the link is in an operating state, according to the link identifier of the link, the target link test policy corresponding to the link is queried in the correspondence between the link identifier and the link test policy. The link is tested based on the target link test policy to obtain the link test result corresponding to the link. Finally, according to the link test results corresponding to each link, the test result of the smart network card is determined.
[0087] The smart network card testing method of the present application provides a testing method for the link stability of the link related to the smart network card, enabling the testing of the link stability of the link related to the smart network card in addition to the basic forwarding function and upgrade / downgrade of the smart network card. The testing of the smart network card is more comprehensive, and more possible situations that may occur in the smart network card can be detected.
[0088] The smart network card testing method of the present application can be applied to devices containing smart network cards, which can be terminals, servers, or other devices containing smart network cards, such as personal computers, laptop computers, smartphones, tablets, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. For example Figure 1As shown in the figure, it is a schematic diagram of a device including a smart network card according to the present application. The smart network card includes an integrated chip and a field programmable gate array (FPGA). The smart network card is connected to the central processor of the device through a peripheral component interconnect express (PCIe) link, connected to the network card through an Ethernet link, and connected to the network controller through a network controller sideband interface (NCSI). In Figure 1 In the shown schematic diagram of the device, the links related to the smart network card include the PCIe link between the integrated chip and the field programmable gate array, the PCIe link and I2C (Inter-Integrated Circuit) link between the smart network card and the central processor of the device, the NCSI link between the smart network card and the network controller, and the Ethernet link between the smart network card and the network card.
[0089] In one embodiment, as Figure 2 shown, a smart network card testing method is provided. In this embodiment, the method includes the following steps:
[0090] Step 201, traverse each interface of the smart network card to determine the links corresponding to each interface of the smart network card.
[0091] Specifically, each interface of the smart network card can be connected to the interface of other devices through a link. By traversing each interface of the smart network card, the central processor of the device can determine whether each interface is connected to the interface of other devices through a link, such as whether the interface status is on or off, so as to determine the respective links corresponding to the smart network card.
[0092] Step 203, for each link, when it is determined that the link is in an operating state, query the target link test policy corresponding to the link in the correspondence between the link identifier and the link test policy according to the link identifier of the link.
[0093] Specifically, the device can pre-store multiple link test policies and the corresponding relationship between link identifiers and link test policies. The links that each link test policy can test can be one or multiple. The link test policy corresponding to each link can be one or multiple. For each link, the central processing unit of the device can control the devices at both ends of the link to perform data interaction to determine whether the link is in an operating state, or directly access the working status register corresponding to the link to determine whether the link is in an operating state. When the central processing unit of the device determines that the link is in an operating state, it queries at least one target link test policy corresponding to the link in the corresponding relationship between the link identifier and the link test policy according to the link identifier of the link.
[0094] Step 205: Test the link based on the target link test policy to obtain the link test result corresponding to the link.
[0095] Specifically, the central processing unit of the device determines the target link test policy corresponding to the link and tests the link based on the target link test policy. For example, it runs the program corresponding to the target link test policy to enable the program to test the link, or tests the link according to the various parameter information in the target link test policy, and then obtains the link test result corresponding to the link. The test result can indicate that the link is stable or that the link is unstable.
[0096] Step 207: Determine the test result of the smart network card according to the link test results corresponding to each link.
[0097] Specifically, after the central processing unit of the device tests each link corresponding to the smart network card, it will obtain the test result of that link. The test result corresponding to each test link can indicate that the link is unstable or that the link is unstable. The central processing unit of the device determines whether each link corresponding to the smart network card is stable through the link test results corresponding to each link. If any link corresponding to the smart network card is unstable, it obtains the test result that the link corresponding to the smart network card is unstable. If all the links corresponding to the smart network card are stable, it obtains the test result that the links corresponding to the smart network card are stable.
[0098] Through the smart network card test method of the present application, the links related to the smart network card are all tested. On the basis of testing the functions of the smart network card in the related technology, the stability of each link corresponding to the smart network card is tested, making the test of the smart network card more comprehensive and providing a further basis for the subsequent improvement of the smart network card.
[0099] In one embodiment, the above step 203 specifically includes:
[0100] Step A1: Determine the interaction devices at both ends of the link and determine the access address information of the interaction devices.
[0101] Specifically, there are multiple devices on some links. In other words, data interaction is carried out between multiple devices through the same link. At this time, for the link to be tested, the central processor of the device first determines the interacting devices at both ends of the link, and then determines the access address information of the interacting devices. For example, the central device processor pre-stores the device information of each device on the link. By traversing the device information of each device on the link, it searches for devices related to the smart network card, such as devices with a specific identifier in the device information, and then determines the interacting devices at both ends of the link to be tested. According to the identification information of the determined interacting devices, it queries the access address information of the interacting devices, so as to perform data interaction based on the access address information of the interacting devices in the follow-up.
[0102] Step A2: According to the address information of the interacting devices, use the driving device to perform data interaction on the interacting devices at both ends of the link.
[0103] Among them, the driving device can be a Direct Memory Access (DMA) driving device. The driving device is used to copy data from one address space to another address space, so as to realize data interaction.
[0104] Specifically, the central processor of the device can send interaction instructions to the interacting devices, and send the access address information of the peer interacting device to the two interacting devices respectively. Each interacting device sends the access address information of the peer interacting device and the data to be sent to the driving device. The driving device writes the data to be sent into the specified address of the peer interacting device according to the access address information, so as to realize data interaction between the interacting devices at both ends of the link.
[0105] Step A3: When data interaction is carried out between the interacting devices at both ends of the link, obtain the current state information of the link between the interacting devices.
[0106] Specifically, when data interaction is carried out between the interacting devices at both ends of the link, the link is in a working state. At this time, the central processor of the device can obtain the current state information of the link between the interacting devices, such as the current bandwidth information of the link, the current link speed information of the link, the current alarm information of the link, etc.
[0107] In one embodiment, when data interaction is carried out between the interacting devices at both ends of the link, the current state information of the link between the interacting devices is obtained periodically, such as every 1S, or every 0.5S, until the test duration of the link reaches the preset duration, or the number of times of data interaction between the interacting devices at both ends of the link reaches the preset number of times, and stop obtaining the current state information of the link between the interacting devices.
[0108] Step A4: When it is determined that the current status information does not meet the status information conditions corresponding to the interaction device, output the link test result corresponding to the interaction device, where the link test result is used to characterize that the link between the interaction devices is unstable.
[0109] Specifically, when the link is in a normal working state, its status information should meet the status information conditions corresponding to the interaction device. For example, the link speed should be within a certain speed range, the link bandwidth should be within a certain bandwidth range, the number of alarm messages should be less than a certain number, or a certain alarm message should not appear, etc. After the central processing unit of the device obtains the current status information of the link, it compares the current link status information with the status information conditions corresponding to the interaction device to determine whether the current status information meets the status information conditions corresponding to the interaction device. If the current status information meets the status information conditions corresponding to the interaction device, the central processing unit of the device does not need to output any information and waits for the next acquisition of the current status information or waits for the end of the test of this link. If it is determined that the current status information does not meet the status information conditions corresponding to the interaction device, the central processing unit of the device outputs the link test result corresponding to the interaction device, where the link test result is used to characterize that the link between the interaction devices is unstable, and the test of this link ends.
[0110] In one embodiment, after the central processing unit of the device uses the driving device to perform data interaction between the interaction devices at both ends of the link according to the address information of the interaction device for a preset duration, such as after 10 hours or 1 day, etc., if the central processing unit of the device does not output a test result indicating that the link between the interaction devices is unstable, it means that during the data interaction process between the interaction devices at both ends of the link, the current status information of the link between the interaction devices always meets the status information conditions corresponding to the interaction device, and the link test result corresponding to the interaction device is output, where the link test result is used to characterize that the link between the interaction devices is stable.
[0111] In this embodiment, when testing the internal link of the intelligent network card, such as when testing the link Figure 1 between the integrated chip and the programmable logic device in, make the devices at both ends of the link perform frequent data interaction. During the frequent data interaction process of the devices at both ends of the link, monitor whether the status information of the link meets the preset status information conditions, so as to test whether the internal link of the intelligent network card is stable during operation.
[0112] In one embodiment, the above step A3 specifically includes:
[0113] Access the advanced error report register, link speed register, and link bandwidth register corresponding to the link between the access interaction devices, obtain the advanced error report information, link speed information, and link bandwidth information corresponding to the link between the interaction devices, and use the advanced error report information, link speed information, and link bandwidth information as the current status information of the link between the interaction devices.
[0114] Among them, the advanced error report register is used to store the error report information that occurs on the link, the link speed register is used to store the speed information of the link, and the link bandwidth register is used to store the bandwidth information of the link.
[0115] Specifically, each link will have a corresponding advanced error report register, link speed register, and link bandwidth register. The central processing unit of the device accesses the advanced error report register, link speed register, and link bandwidth register corresponding to the link between the access interaction devices to obtain the advanced error report information, link speed information, and link bandwidth information corresponding to the link between the access interaction devices, and then uses the advanced error report information, link speed information, and link bandwidth information as the current status information of the link between the access interaction devices. Through the advanced error report information, link speed information, and link bandwidth information corresponding to the link between the access interaction devices, the current status of the link is reflected.
[0116] In this embodiment, the status information of the link is obtained by accessing the register corresponding to the link.
[0117] In one embodiment, when the link is the link between the central processing unit and the smart network card, such as Figure 1 the PCIe link between the central processing unit and the smart network card in
[0118] Step B1: Traverse each interface of the central processing unit to determine the target interface and target link connected to the smart network card.
[0119] Specifically, the central processing of the device is connected to many devices, and the smart network card is only one of them. By traversing each interface of the central processing unit, the target interface and target link connected to the smart network card can be determined.
[0120] Step B2: Determine the signal metric information corresponding to the target link through the signal received by the target interface.
[0121] Specifically, the central processing unit of the device sends data through the target interface and transmits it to the smart network card via the target link. Similarly for the smart network card. Therefore, the data interaction between the central processing unit and the smart network card will pass through the target link. When the central processing unit and the smart network card perform data interaction through the target link, the target interface of the central processing unit will continuously receive signals. Based on the signals received through the target interface, the signal metric information corresponding to the target link is determined, such as eye width, eye height, eye area, etc.
[0122] Step B3: In the case where it is determined that the signal metric information does not meet the preset signal metric information conditions, output the test result corresponding to the target link. The link test result is used to indicate that the target link is unstable.
[0123] Specifically, when the link is in a normal working state, its signal metric information should meet the preset signal metric information conditions, such as the eye width, eye height, eye area of the signal information, and the optimal Preset EQ value, etc. After the central processing unit of the device obtains the signal metric information corresponding to the target link, it compares the current signal metric information with the preset signal metric information conditions to determine whether the current signal metric information meets the preset signal metric information conditions. If the current signal metric signal information meets the preset signal metric information conditions, the central processing unit of the device does not need to output any information, and waits for the next acquisition of signal metric information or waits for the end of the test of this link. If it is determined that the current signal metric information does not meet the preset signal metric information conditions, the central processing unit of the device outputs the link test result corresponding to the target link. The link test result is used to indicate that the target link is unstable, and the test of this link is ended.
[0124] In one embodiment, when the monitoring duration of the signal metric information of the target link by the central processing unit of the device reaches the preset duration, such as 6 hours, or 12 hours, etc., and the signal metric information of the target link has always met the signal metric information conditions and no test result indicating that the target link is unstable has been output, it indicates that the signal metric information has always met the signal metric information conditions during the monitoring duration, and the target link test result is output. The link test result is used for the target link to be stable.
[0125] In this embodiment, when it comes to the link between the smart network card and the central processing unit, the central processing unit determines whether the link between the central processing unit and the smart network card is stable by judging the stability of the signals transmitted through the link connected to the smart network card.
[0126] In one embodiment, in the case where the link is the link between the smart network card and the network controller or network port, such as Figure 1 the NCSI link, ETH link in, the above step 203 specifically includes:
[0127] Step C1: Transmit and receive packets using the intelligent network card according to the transceiver parameters.
[0128] Specifically, simulate the actual packets of the intelligent network card, set the transceiver parameters of the intelligent network card, such as delay, throughput, bandwidth, speed, etc. The central processing unit of the device transmits and receives packets using the intelligent network card according to the transceiver parameters to simulate the scenario when the intelligent network card actually transmits and receives packets.
[0129] In one embodiment, the l3fwd program can be started using the DPDK tool at the intelligent network card end to perform a three-layer two-queue forwarding test. Select the RFC2544 tool on the Spirent TestCenter program and set the parameters on the test option page. Select Frame Loss Test, Latency Test, and Throughput_Test to transmit and receive packets at traffic sizes of 64B, 512B, 1024B, and 1518B respectively.
[0130] In one embodiment, install the dpdk tool and pktgen tool on the intelligent network card and the central processing unit of the device, start the l3fwd program to perform a three-layer eight-queue forwarding test. Open pkgen on the central processing unit of the device and send packets through instructions, mapping the IP and MAC to the source and destination ends of the pktgen packet sending tool.
[0131] Step C2: When using the intelligent network card to transmit and receive packets, obtain the current status information of the link.
[0132] Specifically, during the process of the central processing unit of the device using the intelligent network card to transmit and receive packets, it can periodically obtain the current status information of the link, such as link speed information, link bandwidth information, link high-information, etc.
[0133] Step C3: Determine whether the link meets the preset working state conditions according to the current status information and the transceiver parameters.
[0134] Specifically, the working state conditions corresponding to different transceiver parameters are different. When the link is in a normal working state, its status information should meet the preset status information conditions under the transceiver parameters. For example, the link speed should be the same as or close to the speed in the transceiver parameters, the link bandwidth should be the same as or close to the bandwidth in the transceiver parameters, the alarm information should be less than a certain number, or a certain alarm information should not appear, etc. After the central processing unit of the device obtains the current status information of the link, it compares the current status information of the link with the preset status information conditions under the current transceiver parameters to determine whether the current status information meets the status information conditions under the current transceiver parameters.
[0135] Step C4: When it is determined that the link does not meet the preset working state conditions, output the test result corresponding to the link. The link test result is used to indicate that the link is unstable.
[0136] Specifically, if the current status information meets the status information conditions corresponding to the current transceiver parameters, the central processing unit of the device does not need to output any information, and waits for the next acquisition of the current status information or waits for the end of the test of this link. If it is determined that the current status information does not meet the status information conditions under the current transceiver parameters, the central processing unit of the device outputs the link test result corresponding to this link. The link test result is used to indicate that this link is unstable, and the test of this link is ended.
[0137] In one embodiment, after the central processing unit of the device uses the intelligent network card to send and receive packets according to the transceiver parameters for a preset duration, such as after 15 hours, or after 2 days, etc., and the central processing unit of the device has not output a test result indicating that the link is unstable, it means that during the process of using the intelligent network card to send and receive packets according to the transceiver parameters, the current status information of the link has always met the preset status information conditions. Output the link test result corresponding to the interaction device. The link test result is used to indicate that the link between the interaction devices is stable.
[0138] In this embodiment, when testing the link between the intelligent network card and the network card or network controller, by using the intelligent network card to send and receive packets according to different set transceiver parameters, during this period, monitor whether the status information of the link between the intelligent network card and the network card or network controller meets the preset status information conditions, so as to test whether the link between the intelligent network card and the network card or network controller is stable.
[0139] In one embodiment, the above method further includes:
[0140] Step 209: During the process of testing the link based on the target link test strategy, access the temperature register of the intelligent network card to determine the temperature information of the intelligent network card.
[0141] Among them, the intelligent network card can be connected with a temperature sensor, and the temperature detected by the temperature sensor is stored in the temperature register of the intelligent network card.
[0142] Specifically, during the process of testing the link by the central processing unit of the device based on the target link test strategy, it can periodically access the temperature register of the intelligent network card to read out the current temperature information of the intelligent network card.
[0143] Step 211: When the temperature corresponding to the temperature information is higher than the preset temperature threshold, output the abnormal test result corresponding to the intelligent network card.
[0144] Among them, the preset temperature threshold is the temperature at which the smart network card works normally. When the temperature is higher than the preset temperature threshold, the smart network card may send a fault. When the temperature is lower than the preset temperature threshold, the smart network card can work normally.
[0145] Specifically, as an electronic device, the smart network card has a normal operating temperature. When the temperature of the smart network card is too high, it may cause the smart network card to send a fault. Therefore, after the central processing unit of the device obtains the temperature information of the smart network card, it determines whether the temperature corresponding to the temperature information of the smart network card is higher than the preset temperature threshold. If the temperature corresponding to the temperature information of the smart network card is higher than the preset temperature threshold, the test of the smart network card is ended, and the abnormal test result corresponding to the smart network card is output. If the central processing unit of the device determines that the temperature corresponding to the temperature information of the smart network card is not higher than the preset temperature threshold, no information is output and the temperature information obtained next time is waited for.
[0146] In this embodiment, while testing the link, it is monitored whether the temperature of the smart network card is within the threshold range of safe operation.
[0147] In one embodiment, the upper computer can also be used to perform a flash interruption simulation on the device including the smart network card. For example, the upper computer is used to simulate the state of abnormal flash interruption of the device, and the working stability of the smart network card link is set at the time lengths of 0.1s, 0.25s, 0.5s, 1s, etc. for powering off and then powering on. During the flash interruption simulation of the device, the link states corresponding to each link of the smart network card are obtained, and it is determined whether the obtained link states corresponding to each link meet the preset link state requirements. After the preset number of flash interruption simulations, the link states corresponding to each link meet the preset link state requirements, and the test result indicating the stability of each link corresponding to the smart network card is output. In any flash interruption simulation process, if the link state corresponding to any link does not meet the preset link state requirements, the flash interruption simulation is ended, and the test result indicating the instability of the link is output.
[0148] Next, a specific embodiment of the smart network card test method provided by the present application will be described in detail. As Figure 3 shown, it is a flow schematic diagram of another smart network card test method shown in the present application.
[0149] Step 1: Power on the device to turn on the device.
[0150] Step 2: Detect whether the link between the smart network card and the central processing unit of the device is in an operating state. If it is in an operating state, execute Step 4; if it is in a non-operating state, execute Step 3.
[0151] Step 3: Restart the link between the smart network card and the central processing unit of the device, and return to Step 2 after restarting.
[0152] Step 4: Detect whether the internal link of the smart network card is in the running state. If it is in the running state, execute Steps 6, 7, and 8 in parallel, or execute Steps 6, 7, and 8 in a random order; if it is not in the running state, execute Step 5.
[0153] Step 5: Restart the internal link of the smart network card, and return to Step 4 after the restart.
[0154] Step 6: Test the link between the smart network card and the central processing unit of the device according to the preset link test strategy, and obtain the test result corresponding to the link between the smart network card and the central processing unit of the device.
[0155] Step 7: Test the internal link of the smart network card according to the preset link test strategy, and obtain the test result corresponding to the internal link of the smart network card.
[0156] Step 8: Test the link between the smart network card and the network controller or network interface according to the preset link test strategy, and obtain the test result corresponding to the link between the smart network card and the network controller or network interface.
[0157] Step 9: After Steps 6, 7, and 8 are executed, generate the test result of the smart network card according to the test results corresponding to the respective links obtained in Steps 6, 7, and 8.
[0158] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0159] Based on the same inventive concept, the embodiments of the present application also provide a smart network card test device for implementing the smart network card test method described above. The implementation solutions provided by this device to solve problems are similar to the implementation solutions described in the above method. Therefore, the specific limitations in one or more embodiments of the smart network card test device provided below can refer to the limitations on the smart network card test method in the above text, and will not be repeated here.
[0160] In one embodiment, as Figure 4 shown, a smart network card test device is provided, including:
[0161] A traversal module 401, configured to traverse each interface of the intelligent network card and determine the links corresponding to each interface of the intelligent network card;
[0162] A query module 403, configured to, for each of the links, when it is determined that the link is in an operating state, query, according to the link identifier of the link, the target link test policy corresponding to the link in the correspondence between the link identifier and the link test policy;
[0163] A test module 405, configured to test the link based on the target link test policy to obtain a link test result corresponding to the link;
[0164] A result module 407, configured to determine a test result of the intelligent network card according to the link test results corresponding to each of the links.
[0165] In one embodiment, the above test module 405 specifically includes:
[0166] A determination unit A1 (not shown in the figure), configured to determine the interaction devices at both ends of the link and determine the access address information of the interaction devices;
[0167] An interaction unit A2 (not shown in the figure), configured to perform data interaction on the interaction devices at both ends of the link by using a driving device according to the address information of the interaction devices;
[0168] A first acquisition unit A3 (not shown in the figure), configured to, when data interaction is performed between the interaction devices at both ends of the link, acquire the current state information of the link between the interaction devices;
[0169] A first output unit A4 (not shown in the figure), configured to, when it is determined that the current state information does not meet the state information condition corresponding to the interaction device, output the link test result corresponding to the interaction device, where the link test result is used to characterize that the link between the interaction devices is unstable.
[0170] In one embodiment, the above first acquisition unit A3 is specifically configured to:
[0171] When data interaction is performed between the interaction devices at both ends of the link, access the advanced error report register, link speed register, and link bandwidth register corresponding to the link between the interaction devices, acquire the advanced error report information, link speed information, and link bandwidth information corresponding to the link between the interaction devices, and use the advanced error report information, the link speed information, and the link bandwidth information as the current state information of the link between the interaction devices.
[0172] In one embodiment, when the link is the link between the central processing unit and the smart network card, the test module 405 specifically includes:
[0173] A traversal unit B1 (not shown in the figure), configured to traverse each interface of the central processing unit to determine a target interface and a target link connected to the smart network card;
[0174] A first determination unit B2 (not shown in the figure), configured to determine signal index information corresponding to the target link through a signal received through the target interface;
[0175] A second output unit B3 (not shown in the figure), configured to output a test result corresponding to the target link when it is determined that the signal index information does not meet a preset signal index information condition, where the link test result is used to indicate that the target link is unstable.
[0176] In one embodiment, when the link is the link between the smart network card and a network controller or a network port, the test module 405 specifically includes:
[0177] A transceiver unit C1 (not shown in the figure), configured to transmit and receive packets using the smart network card according to transceiver parameters;
[0178] A second acquisition unit C2 (not shown in the figure), configured to acquire current state information of the link when transmitting and receiving packets using the smart network card;
[0179] A second determination unit C3 (not shown in the figure), configured to determine whether the link meets a preset working state condition according to the current state information and the transceiver parameters;
[0180] A third output unit C4 (not shown in the figure), configured to output a test result corresponding to the link when it is determined that the link does not meet a preset working state condition, where the link test result is used to indicate that the link is unstable.
[0181] In one of the embodiments, the above device further includes:
[0182] An access module 409 (not shown in the figure), configured to access a temperature register of the smart network card to determine smart network card temperature information during the process of testing the link based on the target link test policy;
[0183] An output module 411 (not shown in the figure), configured to output an abnormal test result corresponding to the smart network card when the temperature corresponding to the temperature information is higher than a preset temperature threshold.
[0184] Each module in the above intelligent network card testing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0185] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an intelligent network card method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0186] Those skilled in the art can understand that Figure 5 the structure shown in
[0187] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0188] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps in each of the above method embodiments.
[0189] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, it implements the steps in each of the above method embodiments.
[0190] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0191] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., and are not limited thereto.
[0192] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered to be within the scope described in this specification.
[0193] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. An intelligent network card testing method, characterized in that, The method includes: Traverse each interface of the smart network card to determine the links corresponding to each interface of the smart network card; For each link, control the devices at both ends of the link to perform data interaction or access the working status register corresponding to the link to determine whether the link is in an operating state; When it is determined that the link is in an operating state, query the target link test policy corresponding to the link in the correspondence between the link identifier and the link test policy according to the link identifier of the link; Test the link based on the target link test policy to obtain the link test result corresponding to the link; the link test result is used to characterize whether the link between the interacting devices is stable; Determine the test result of the smart network card according to the link test results corresponding to each link; The testing the link based on the target link test policy to obtain the link test result corresponding to the link includes: Traverse each device on the link, find the interacting devices related to the smart network card, and query the access address information of the interacting devices according to the identification information of the interacting devices; According to the address information of the interacting devices, use the driving device to perform data interaction between the interacting devices at both ends of the link; When the interacting devices at both ends of the link perform data interaction, periodically obtain the current status information of the link between the interacting devices until the test duration of the link reaches the preset duration or the number of times of data interaction between the interacting devices at both ends of the link reaches the preset number of times; When it is determined that the current status information does not meet the status information conditions corresponding to the interacting devices, output the link test result corresponding to the interacting devices.
2. The method according to claim 1, characterized in that, After obtaining the current status information of the link between the interacting devices when the interacting devices at both ends of the link perform data interaction, the method further includes: Compare the current status information with the status information conditions corresponding to the interacting devices to determine whether the current status information meets the status information conditions corresponding to the interacting devices.
3. The method according to claim 1, characterized in that, The obtaining the current status information of the link between the interacting devices includes: Access the advanced error report register, link speed register, and link bandwidth register corresponding to the link between the interacting devices, obtain the advanced error report information, link speed information, and link bandwidth information corresponding to the link between the interacting devices, and use the advanced error report information, the link speed information, and the link bandwidth information as the current status information of the link between the interacting devices.
4. The method according to claim 1, characterized in that, When the link is the link between the central processing unit and the smart network card, the testing the link based on the target link test policy to obtain the link test result corresponding to the link includes: Traverse each interface of the central processing unit to determine the target interface and the target link connected to the smart network card; Determine the signal index information corresponding to the target link through the signal received by the target interface; When it is determined that the signal index information does not meet the preset signal index information conditions, output the test result corresponding to the target link, and the link test result is used to characterize that the target link is unstable.
5. The method according to claim 1, characterized in that, When the link is the link between the intelligent network card and the network controller or network port, the testing of the link based on the target link test strategy to obtain the link test result corresponding to the link includes: Transmit and receive packets using the intelligent network card according to the transceiver parameters; When transmitting and receiving packets using the intelligent network card, obtain the current status information of the link; According to the current status information and the transceiver parameters, determine whether the link meets the preset working status conditions; When it is determined that the link does not meet the preset working status conditions, output the test result corresponding to the link, and the link test result is used to characterize that the link is unstable.
6. The method according to claim 1, characterized in that, The method further includes: During the process of testing the link based on the target link test strategy, access the temperature register of the intelligent network card to determine the temperature information of the intelligent network card; When the temperature corresponding to the temperature information is higher than the preset temperature threshold, output the abnormal test result corresponding to the intelligent network card.
7. An intelligent network card testing device, characterized in that, The device includes: A traversal module, configured to traverse each interface of the intelligent network card to determine the links corresponding to each interface of the intelligent network card; A query module, configured to, for each link, control the devices at both ends of the link to perform data interaction or access the working status register corresponding to the link to determine whether the link is in an operating state; when it is determined that the link is in an operating state, query the target link test strategy corresponding to the link in the correspondence between the link identifier and the link test strategy according to the link identifier of the link; A test module, configured to test the link based on the target link test strategy to obtain the link test result corresponding to the link; the link test result is used to characterize whether the link between the interaction devices is stable; A result module, configured to determine the test result of the intelligent network card according to the link test results corresponding to each link; The test module is specifically configured to traverse each device on the link, find the interaction devices related to the intelligent network card, and query the access address information of the interaction devices according to the identifier information of the interaction devices; according to the address information of the interaction devices, use the driving device to perform data interaction on the interaction devices at both ends of the link; when performing data interaction on the interaction devices at both ends of the link, periodically obtain the current status information of the link between the interaction devices until the test duration of the link reaches the preset duration or the number of times of data interaction between the interaction devices at both ends of the link reaches the preset number of times; when it is determined that the current status information does not meet the status information conditions corresponding to the interaction devices, output the link test result corresponding to the interaction devices.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Production test method, system and device of intelligent network card and readable storage medium
CN113608940A
Fault diagnosis method, device and equipment for intelligent network card and readable medium
CN113852502A