CN116094956A - Intelligent network card testing method and device and computer equipment - Google Patents

Intelligent network card testing method and device and computer equipment Download PDF

Info

Publication number
CN116094956A
CN116094956A CN202211681425.4A CN202211681425A CN116094956A CN 116094956 A CN116094956 A CN 116094956A CN 202211681425 A CN202211681425 A CN 202211681425A CN 116094956 A CN116094956 A CN 116094956A
Authority
CN
China
Prior art keywords
link
network card
intelligent network
testing
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211681425.4A
Other languages
Chinese (zh)
Inventor
郭习宇
王卫钢
郭庆
丁磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dawning Information Industry Co Ltd
Original Assignee
Dawning Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dawning Information Industry Co Ltd filed Critical Dawning Information Industry Co Ltd
Priority to CN202211681425.4A priority Critical patent/CN116094956A/en
Publication of CN116094956A publication Critical patent/CN116094956A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to an intelligent network card method, an intelligent network card device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: and traversing each interface of the intelligent network card, and determining links corresponding to each interface of the intelligent network card. And under the condition that each link is determined to be in an operation state, inquiring a target link testing strategy corresponding to the link in the corresponding relation between the link identification and the link testing strategy according to the link identification of the link. And testing the links based on the target link testing strategy to obtain link testing results corresponding to the links, and finally determining the testing results of the intelligent network card according to the link testing results corresponding to the links. By adopting the method, the intelligent network card can be tested more comprehensively.

Description

Intelligent network card testing method and device and computer equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for testing an intelligent network card, a computer device, a storage medium, and a computer program product.
Background
With the development of technology, the intelligent network card is developed, compared with the common network card, the intelligent network card not only can forward the message like the common network card, but also can deploy different forwarding strategies, and compared with the common network card, the intelligent network card has a unchanged forwarding strategy and more application scenes.
In the related art, when testing the intelligent network card, the forwarding test is generally performed like the test of the common network card, so as to determine whether the forwarding function of the intelligent network card can normally operate.
However, compared with the common network card, the intelligent network card is not only functionally upgraded but also structurally different, and the intelligent network card is composed of a plurality of devices and the functions of the intelligent network card are realized by the cooperation of the devices, so that the function of only testing the intelligent network card is not comprehensive enough and the testing content is single. What is needed is a method for testing an intelligent network card that can more fully test the intelligent network card.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, apparatus, computer device, computer readable storage medium, and computer program product for testing an intelligent network card that are capable of more fully testing the intelligent network card.
In a first aspect, the present application provides a method for testing an intelligent network card. The method comprises the following steps:
traversing each interface of the intelligent network card, and determining a link corresponding to each interface of the intelligent network card;
For each link, under the condition that the link is determined to be in an operation state, inquiring a target link testing strategy corresponding to the link in the corresponding relation between the link identifier and the link testing strategy according to the link identifier of the link;
testing the link based on the target link testing strategy to obtain a link testing result corresponding to the link;
and determining the test result of the intelligent network card according to the link test result corresponding to each link.
According to the intelligent network card testing method, related links of the intelligent network card are tested, the basis for testing the functions of the intelligent network card in the related technology is long, and the stability of each link corresponding to the intelligent network card is tested, so that the intelligent network card is tested more comprehensively, and further basis is provided for improvement of the follow-up intelligent network card.
In one embodiment, the testing the link based on the target link testing policy to obtain a link testing result corresponding to the link includes:
determining interaction devices at two ends of the link, and determining access address information of the interaction devices;
according to the address information of the interaction device, utilizing a driving device to conduct data interaction on the interaction devices at the two ends of the link;
When the interactive devices at the two ends of the link perform data interaction, acquiring current state information of the link between the interactive devices;
and under the condition that the current state information is not in accordance with the state information condition corresponding to the interaction device, outputting a link test result corresponding to the interaction device, wherein the link test result is used for representing the link instability between the interaction devices.
When testing the internal link of the intelligent network card, the devices at the two ends of the link are subjected to frequent data interaction, and in the process of frequent data interaction, whether the state information of the link accords with the preset state information condition is monitored, so that whether the internal link of the intelligent network card is stable in operation is tested.
In one embodiment, the obtaining the current state information of the link between the interaction devices includes:
accessing a high-level error report register, a link speed register and a link bandwidth register corresponding to links between the interactive devices, acquiring high-level error report information, link speed information and link bandwidth information corresponding to the links between the interactive devices, and taking the high-level error report information, the link speed information and the link bandwidth information as current state information of the links between the interactive devices.
And acquiring the state information of the link by accessing a register corresponding to the link.
In one embodiment, when the link is a link between the central processor and the intelligent network card, the testing the link based on the target link testing policy to obtain a link testing result corresponding to the link includes:
traversing each interface of the central processing unit, and determining a target interface and a target link connected with the intelligent network card;
determining signal index information corresponding to the target link through the signal received by the target interface;
and under the condition that the signal index information is determined not to be in accordance with the preset signal index information condition, outputting 5 a test result corresponding to the target link, wherein the link test result is used for representing the instability of the target link.
When the link between the intelligent network card and the central processing unit is judged, the central processing unit determines whether the link between the central processing unit and the intelligent network card is stable or not by judging the stability of signals transmitted by the link connected with the intelligent network card.
0 in one embodiment, the link is the intelligent network card and a network controller or portal
Under the condition of the inter-link, the testing the link based on the target link testing strategy to obtain a link testing result corresponding to the link comprises the following steps:
receiving and transmitting a message by using the intelligent network card according to the receiving and transmitting parameters;
when the intelligent network card is utilized to receive and transmit a message, the current state information of the link is acquired;
5, determining whether the link accords with a preset working state condition according to the current state information and the receiving and transmitting parameters;
and under the condition that the link does not accord with the preset working state condition, outputting a test result corresponding to the link, wherein the link test result is used for representing the instability of the link.
When testing the link between the intelligent network card and the network card or the network controller, the intelligent network card is utilized to receive and transmit the message according to the set different 0 receiving and transmitting parameters, and during the period, whether the state information of the link between the intelligent network card and the network card or the network controller accords with the preset state information condition is monitored, so that whether the link between the intelligent network card and the network card or the network controller is stable is tested.
In one embodiment, the method further comprises:
accessing a temperature register of the intelligent 5-way network card to determine the temperature information of the intelligent network card in the process of testing the link based on the target link testing strategy;
And outputting an abnormal test result corresponding to the intelligent network card under the condition that the temperature corresponding to the temperature information is higher than a preset temperature threshold value.
And monitoring whether the temperature of the intelligent network card is within the threshold range of safe operation or not while testing the link.
In a second aspect, the present application further provides an intelligent network card testing device. The device comprises:
the traversing module is used for traversing each interface of the intelligent network card and determining a link corresponding to each interface of the intelligent network card;
the query module is used for querying a target link test strategy corresponding to each link in the corresponding relation between the link identification and the link test strategy according to the link identification of the link under the condition that the link is determined to be in an operation state;
the test module is used for testing the link based on the target link test strategy to obtain a link test result corresponding to the link;
and the result module is used for determining the test result of the intelligent network card according to the link test result corresponding to each link.
In one embodiment, the test module specifically includes:
the determining unit is used for determining the interactive devices at the two ends of the link and determining the access address information of the interactive devices;
The interactive unit is used for carrying out data interaction on the interactive devices at the two ends of the link by using the driving device according to the address information of the interactive devices;
the first acquisition unit is used for acquiring current state information of the links between the interactive devices when the interactive devices at the two ends of the links perform data interaction;
the first output unit is used for outputting a link test result corresponding to the interaction device under the condition that the current state information is determined not to be in accordance with the state information condition corresponding to the interaction device, wherein the link test result is used for representing the unstable link between the interaction devices.
In one embodiment, the first obtaining unit is specifically configured to:
when the interactive devices at the two ends of the link perform data interaction, accessing a high-level error report register, a link speed register and a link bandwidth register corresponding to the link between the interactive devices, acquiring high-level error report information, link speed information and link bandwidth information corresponding to the link between the interactive devices, and taking the high-level error report information, the link speed information and the link bandwidth information as current state information of the link between the interactive devices.
In one embodiment, in the case that the link is a link between a central processing unit and the intelligent network card, the test module specifically includes:
the traversing unit is used for traversing each interface of the central processing unit and determining a target interface and a target link which are connected with the intelligent network card;
the first determining unit is used for determining signal index information corresponding to the target link through the signal received by the target interface;
and the second output unit is used for outputting a test result corresponding to the target link under the condition that the signal index information is determined not to accord with the preset signal index information condition, and the link test result is used for representing the instability of the target link.
In one embodiment, in the case that the link is a link between the intelligent network card and a network controller or a network port, the test module specifically includes:
the receiving and transmitting unit is used for receiving and transmitting the message by utilizing the intelligent network card according to the receiving and transmitting parameters;
the second acquisition unit is used for acquiring the current state information of the link when the intelligent network card is used for receiving and transmitting the message;
the second determining unit is used for determining whether the link accords with a preset working state condition according to the current state information and the receiving and transmitting parameters;
And the third output unit is used for outputting a test result corresponding to the link under the condition that the link is determined not to accord with the preset working state condition, and the link test result is used for representing the instability of the link.
In one embodiment, the apparatus further includes:
the access module is used for accessing the temperature register of the intelligent network card and determining the temperature information of the intelligent network card in the process of testing the link based on the target link testing strategy;
and the output module is used for outputting an abnormal test result corresponding to the intelligent network card under the condition that the temperature corresponding to the temperature information is higher than a preset temperature threshold value.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
traversing each interface of the intelligent network card, and determining a link corresponding to each interface of the intelligent network card;
for each link, under the condition that the link is determined to be in an operation state, inquiring a target link testing strategy corresponding to the link in the corresponding relation between the link identifier and the link testing strategy according to the link identifier of the link;
Testing the link based on the target link testing strategy to obtain a link testing result corresponding to the link;
and determining the test result of the intelligent network card according to the link test result corresponding to each link.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
traversing each interface of the intelligent network card, and determining a link corresponding to each interface of the intelligent network card;
for each link, under the condition that the link is determined to be in an operation state, inquiring a target link testing strategy corresponding to the link in the corresponding relation between the link identifier and the link testing strategy according to the link identifier of the link;
testing the link based on the target link testing strategy to obtain a link testing result corresponding to the link;
and determining the test result of the intelligent network card according to the link test result corresponding to each link.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
Traversing each interface of the intelligent network card, and determining a link corresponding to each interface of the intelligent network card;
for each link, under the condition that the link is determined to be in an operation state, inquiring a target link testing strategy corresponding to the link in the corresponding relation between the link identifier and the link testing strategy according to the link identifier of the link;
testing the link based on the target link testing strategy to obtain a link testing result corresponding to the link;
and determining the test result of the intelligent network card according to the link test result corresponding to each link.
The intelligent network card testing method, the intelligent network card testing device, the computer equipment, the storage medium and the computer program product are used for testing the link stability of each link of the intelligent network card according to different link testing strategies, and determining the link stability of the intelligent network card in actual use according to the testing results.
Drawings
FIG. 1 is an application environment diagram of a method for testing a smart network card in one embodiment;
FIG. 2 is a flow chart of a method for testing an intelligent network card according to an embodiment;
FIG. 3 is a flowchart of another embodiment of a method for testing an intelligent network card;
FIG. 4 is a block diagram of an intelligent network card testing apparatus according to an embodiment;
fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In the related art, when testing the intelligent network card, the forwarding test is generally performed like the test of the common network card, so as to determine whether the forwarding function of the intelligent network card can normally operate.
However, compared with the common network card, the intelligent network card is not only functionally upgraded but also structurally different, and the intelligent network card is composed of a plurality of devices and the functions of the intelligent network card are realized by the cooperation of the devices, so that the function of only testing the intelligent network card is not comprehensive enough, the stability of a link related to the intelligent network card is also a necessary condition for the normal operation of the intelligent network card, and the stability of the link related to the intelligent network card also needs to be tested.
The related art only tests the basic transceiving function and the upgrading and downgrading function of the intelligent network card, and cannot fully test the intelligent network card, in other words, only tests the basic transceiving function and the upgrading and downgrading function of the intelligent network card, and cannot reflect the stability of the related links of the intelligent network card.
Based on the above, the application provides an intelligent network card testing method, which traverses all interfaces of the intelligent network card and determines all links corresponding to the intelligent network card. And under the condition that each link is determined to be in an operation state, inquiring a target link testing strategy corresponding to the link in the corresponding relation between the link identification and the link testing strategy according to the link identification of the link. And testing the links based on the target link testing strategy to obtain link testing results corresponding to the links, and finally determining the testing results of the intelligent network card according to the link testing results corresponding to the links.
The intelligent network card testing method provides a testing method for testing the link stability of the link related to the intelligent network card, so that the link stability of the link related to the intelligent network card is tested on the basis of testing the basic forwarding function and the upgrading and downgrading of the intelligent network card, the intelligent network card is tested more comprehensively, and more possible conditions of the intelligent network card can be tested.
The intelligent network card testing method can be applied to equipment containing the intelligent network card, can be a terminal, can also be a server, can also be other equipment containing the intelligent network card, such as a personal computer, a notebook computer, a smart phone, a tablet personal computer, internet of things equipment and portable wearable equipment, and can be an intelligent sound box, an intelligent television, an intelligent air conditioner, intelligent vehicle-mounted equipment and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. As shown in fig. 1, a schematic diagram of a device including an intelligent network card is shown in the present application, where the intelligent network card includes an integrated chip and an editable logic device (Field Programmable Gate Array, FPGA), and the intelligent network card is connected to a central processor of the device through a high-speed serial computer expansion bus standard (peripheral component interconnect express, PCIe) link, is connected to the network card through an ethernet link, and is connected to a network controller through a network controller sideband interface (Network Controller Sideband Interface, NCSI). In the schematic diagram of the device shown in fig. 1, links related to the intelligent network card include PCIe links between the integrated chip and the editable logic device, PCIe links between the device's central processor, I2C (Inter-Integrated Circuit) links, NCSI links between the network controller, and ethernet links between the network cards.
In one embodiment, as shown in fig. 2, there is provided a testing method of an intelligent network card, in this embodiment, the method includes the following steps:
step 201, traversing each interface of the intelligent network card, and determining links corresponding to each interface of the intelligent network card.
Specifically, each interface of the intelligent network card can be connected with interfaces of other devices through links, and a central processor of the device can determine whether each interface is connected with the interfaces of other devices through links by traversing each interface of the intelligent network card, for example, whether the interface state is an on state or an off state, so as to determine each link corresponding to the intelligent network card.
Step 203, for each link, under the condition that the link is determined to be in an operation state, according to the link identifier of the link, inquiring the target link test policy corresponding to the link in the corresponding relation between the link identifier and the link test policy.
Specifically, the device may store a plurality of link test policies in advance, and the correspondence between the link identifier and the link test policy, where each link test policy may test one or more links, and each link may correspond to one or more link test policies. For each link, the central processor of the device can control the devices at two ends of the link to perform data interaction so as to determine whether the link is in an operating state or not, or directly access the working state register corresponding to the link to determine whether the link is in an operating state or not. And under the condition that the central processing unit of the equipment determines that the link is in an operation state, according to the link identification of the link, inquiring at least one target link testing strategy corresponding to the link in the corresponding relation between the link identification and the link testing strategy.
Step 205, testing the link based on the target link testing strategy to obtain the link testing result corresponding to the link.
Specifically, the central processing unit of the device determines a target link test policy corresponding to the link, tests the link based on the target link test policy, for example, runs a program corresponding to the target link test policy, so that the program tests the link, or tests the link according to various parameter information in the target link test policy, and further obtains a link test result corresponding to the link, wherein the test result can represent that the link is stable or unstable.
Step 207, determining a test result of the intelligent network card according to the link test results corresponding to the links.
Specifically, after testing each link corresponding to the intelligent network card, the central processing unit of the device obtains a test result of the link, and the test result corresponding to each test link can represent that the link is unstable or that the link is unstable. And the central processing unit of the equipment determines whether each link corresponding to the intelligent network card is stable or not according to the link test results corresponding to each link, any link corresponding to the intelligent network card is unstable, the test results of the link instability corresponding to the intelligent network card are obtained, all links corresponding to the intelligent network card are stable, and the test results of the link stability corresponding to the intelligent network card are obtained.
According to the intelligent network card testing method, related links of the intelligent network card are tested, the basis for testing the functions of the intelligent network card in the related technology is long, and the stability of each link corresponding to the intelligent network card is tested, so that the intelligent network card is tested more comprehensively, and further basis is provided for improvement of the follow-up intelligent network card.
In one embodiment, the step 203 specifically includes:
and A1, determining interaction devices at two ends of a link, and determining access address information of the interaction devices.
Specifically, a plurality of devices exist on some links, in other words, data interaction is performed between the plurality of devices through the same link, at this time, for the link to be tested, the central processing unit of the device first determines the interaction devices at two ends of the link, then determines access address information of the interaction devices, for example, the central processing unit stores device information of each device on the link in advance, searches devices related to the intelligent network card, such as devices containing specific identifiers in the device information, by traversing the device information of each device on the link, then determines the interaction devices at two ends of the link to be tested, and queries access address information of the interaction devices according to the determined identification information of the interaction devices, so that data interaction is performed according to the access address information of the interaction devices.
And A2, carrying out data interaction on the interaction devices at the two ends of the link by using the driving device according to the address information of the interaction devices.
The drive device may be a direct memory access (Direct Memory Access, DMA) drive device for copying data from one address space to another address space, thereby enabling interaction of the data.
Specifically, the central processing unit of the device can issue an interaction instruction to the interaction devices, and issue access address information of the opposite-end interaction devices to the two interaction devices respectively, each interaction device sends the access address information of the opposite-end interaction device and data to be sent to the driving device, and the driving device writes the data to be sent into a designated address of the opposite-end interaction device according to the access address information, so that data interaction between the interaction devices at two ends of the link is realized.
And A3, acquiring current state information of the links between the interactive devices when the interactive devices at the two ends of the links perform data interaction.
Specifically, when the interactive devices at two ends of the link perform data interaction, the link is in a working state, and at this time, the central processor of the device can acquire current state information of the link between the interactive devices, for example, current bandwidth information of the link, current link speed information of the link, current alarm information of the link, and the like.
In one embodiment, when the interactive devices at two ends of the link perform data interaction, current state information of the link between the interactive devices is periodically acquired, for example, every 1S, or every 0.5S, until the test duration of the link reaches a preset duration, or the number of times of performing data interaction of the interactive devices at two ends of the link reaches a preset number of times, and the acquisition of the current state information of the link between the interactive devices is stopped.
And A4, outputting a link test result corresponding to the interactive devices under the condition that the current state information is determined to be not in accordance with the state information condition corresponding to the interactive devices, wherein the link test result is used for representing the unstable link between the interactive devices.
Specifically, when the link is in a normal working state, the state information of the link should meet the state information condition corresponding to the interaction device, for example, the speed of the link should be within a certain speed range, the bandwidth of the link should be within a certain bandwidth range, the alarm information should be less than a bar, or a certain alarm information should not appear, etc. After the central processing unit of the equipment acquires the current state information of the link, the current link state information is compared with the state information condition corresponding to the interaction device, and whether the current state information accords with the state information condition corresponding to the interaction device is determined. If the current state information accords with the state information condition corresponding to the interaction device, the central processing unit of the equipment does not need to output any information, and waits for obtaining the current state information next time or waits for ending the test of the link. If the current state information is determined not to be in accordance with the state information condition corresponding to the interactive devices, the central processing unit of the equipment outputs a link test result corresponding to the interactive devices, wherein the link test result is used for representing that the links between the interactive devices are unstable, and the test of the links is ended.
In one embodiment, the central processing unit of the device uses the driving device to perform data interaction on the interaction devices at two ends of the link after a preset time period, such as after 10 hours or after 1 day, etc., the central processing unit of the device does not output a test result for representing the link instability between the interaction devices, which indicates that in the process of performing data interaction on the interaction devices at two ends of the link, the current state information of the link between the interaction devices always accords with the state information condition corresponding to the interaction devices, and outputs the link test result corresponding to the interaction devices, wherein the link test result is used for representing the link stability between the interaction devices.
In this embodiment, when testing the internal link of the intelligent network card, for example, when testing the link between the integrated chip and the editable logic device in fig. 1, devices at two ends of the link perform frequent data interaction, and in the process of performing frequent data interaction on the devices at two ends of the link, whether the state information of the link meets the preset state information condition is monitored, so as to test whether the internal link of the intelligent network card is stable in operation.
In one embodiment, the step A3 specifically includes:
Accessing a high-level error report register, a link speed register and a link bandwidth register corresponding to links between interactive devices, acquiring high-level error report information, link speed information and link bandwidth information corresponding to the links between the interactive devices, and taking the high-level error report information, the link speed information and the link bandwidth information as current state information of the links between the interactive devices.
The high-level error report register is used for storing error report information of the link, the link speed register is used for storing speed information of the link, and the link bandwidth register is used for storing bandwidth information of the link.
Specifically, each link has a corresponding advanced error report register, a link speed register and a link bandwidth register, and the central processing unit of the device obtains advanced error report information, link speed information and link bandwidth information corresponding to the links between the interactive devices by accessing the advanced error report register, the link speed register and the link bandwidth register corresponding to the links between the interactive devices, and then uses the advanced error report information, the link speed information and the link bandwidth information as current state information of the links between the interactive devices, and reflects the current state of the links through the advanced error report information, the link speed information and the link bandwidth information corresponding to the links between the interactive devices.
In this embodiment, the state information of the link is obtained by accessing a register corresponding to the link.
In one embodiment, in the case where the link is a link between the central processor and the intelligent network card, such as the PCIe link between the central processor and the intelligent network card in fig. 1, the step 203 specifically includes:
and B1, traversing each interface of the central processing unit, and determining a target interface and a target link connected with the intelligent network card.
Specifically, the central processing of the device may be connected to a plurality of devices, and the intelligent network card may be only one device, and by traversing each interface of the central processing unit, the target interface and the target link connected to the intelligent network card may be determined.
And B2, determining signal index information corresponding to the target link through the signals received by the target interface.
Specifically, the central processing unit of the device sends data to the intelligent network card through the target interface and sends the data to the intelligent network card through the target link, and the intelligent network card is the same, so that data interaction between the central processing unit and the intelligent network card can pass through the target link, when the central processing unit and the intelligent network card carry out data interaction through the target link, the target interface of the central processing unit can continuously receive signals, and signal index information corresponding to the target link, such as eye width, eye height, eye area and the like, is determined through the signals received by the target interface.
And B3, outputting a test result corresponding to the target link under the condition that the signal index information is determined to be not in accordance with the preset signal index information condition, wherein the link test result is used for representing the instability of the target link.
Specifically, when the link is in a normal working state, the signal index information thereof should meet the Preset signal index information conditions, such as the eye width, the eye height, the eye area and the optimal Preset EQ value of the signal information. After the central processing unit of the equipment acquires the signal index information corresponding to the target link, the current signal index information is compared with the preset signal index information condition, and whether the current signal index information accords with the preset signal index information condition is determined. If the current signal index signal information accords with the preset signal index information condition, the central processing unit of the equipment does not need to output any information, and waits for next acquisition of the signal index information or waits for ending the test of the link. If the current signal index information is determined not to accord with the preset signal index information condition, the central processing unit of the equipment outputs a link test result corresponding to the target link, the link test result is used for representing that the target link is unstable, and the test of the link is ended.
In one embodiment, the central processing unit of the device monitors the signal index information of the target link for a preset time period, such as 6 hours or 12 hours, where the signal index information of the target link always accords with the signal index information condition, and no test result for characterizing the instability of the target link is output, which indicates that the signal index information always accords with the signal index information condition in the monitoring time period, and the test result of the target link is output, where the link test result is used for the stability of the target link.
In this embodiment, when the link between the intelligent network card and the central processing unit is connected, the central processing unit determines whether the link between the central processing unit and the intelligent network card is stable by judging the stability of the signal transmitted by the link connected with the intelligent network card.
In one embodiment, in the case where the link is a link between the intelligent network card and the network controller or the network port, such as the NCSI link and the ETH link in fig. 1, the step 203 specifically includes:
and C1, receiving and transmitting the message by using the intelligent network card according to the receiving and transmitting parameters.
Specifically, the method comprises the steps of simulating an actual message of the intelligent network card, setting receiving and transmitting parameters of the intelligent network card, such as time delay, throughput, bandwidth, speed and the like, and enabling a central processor of the equipment to utilize the intelligent network card to receive and transmit the message according to the receiving and transmitting parameters so as to simulate a scene when the intelligent network card actually receives and transmits the message.
In one embodiment, a DPDK tool may be used at the intelligent network card end to start a l3fwd procedure, perform a layer 2 queue forwarding Test, select a RFC2544 tool on the procedure Spirent TestCenter, set parameters of a Test option page, and select a Frame Loss Test, a Latency Test, and a throughput_test to send and receive messages on traffic sizes of 64B, 512B, 1024B, and 1518B, respectively.
In one embodiment, a dpdk tool and a pktgen tool are installed in a central processing unit of the intelligent network card and the device, a l3fwd program is started, a 3-layer 8 queue forwarding test is carried out, the pkgen is opened in the central processing unit of the device, a packet is sent through an instruction, and the IP and the MAC are mapped to a source end and a destination end of the pktgen packet sending tool.
And C2, acquiring current state information of the link when the intelligent network card is used for receiving and transmitting the message.
Specifically, the central processing unit of the device can periodically acquire current state information of the link, such as link speed information, link bandwidth information, link advance information and the like, in the process of receiving and transmitting the message by using the intelligent network card.
And step C3, determining whether the link accords with a preset working state condition according to the current state information and the receiving and transmitting parameters.
Specifically, the operating conditions corresponding to different transceiving parameters are different, when the link is in a normal operating state, the state information of the link should conform to the preset state information condition under the transceiving parameters, for example, the speed of the link should be the same as or similar to the speed in the transceiving parameters, the bandwidth of the link should be the same as or similar to the bandwidth in the transceiving parameters, the alarm information should be less than a bar, or certain alarm information should not appear, and the like. After the central processing unit of the equipment acquires the current state information of the link, the state information of the current link is compared with the preset state information condition under the current receiving and transmitting parameters, and whether the current state information accords with the state information condition under the current receiving and transmitting parameters is determined.
And step C4, under the condition that the link is determined to be not in accordance with the preset working state condition, outputting a test result corresponding to the link, wherein the link test result is used for representing the instability of the link.
Specifically, if the current state information accords with the state information condition corresponding to the current receiving and transmitting parameter, the central processing unit of the equipment does not need to output any information, and waits for obtaining the current state information next time or waits for ending the test of the link. If the current state information is determined not to be in accordance with the state information condition under the current receiving and transmitting parameters, the central processing unit of the equipment outputs a link test result corresponding to the link, the link test result is used for representing that the link is unstable, and the test of the link is ended.
In one embodiment, after the central processing unit of the device receives and transmits the message by using the intelligent network card according to the receiving and transmitting parameters for a preset period of time, for example, after 15 hours, or after 2 days, etc., the central processing unit of the device does not output a test result for representing the link instability, which indicates that the current state information of the link is always preset in receiving and transmitting the message by using the intelligent network card according to the receiving and transmitting parameters, outputs a link test result corresponding to the interactive device, and the link test result is used for representing the link stability between the interactive devices.
In this embodiment, when testing the link between the intelligent network card and the network card or the network controller, the intelligent network card is used to send and receive the message according to the set different sending and receiving parameters, and during this period, whether the state information of the link between the intelligent network card and the network card or the network controller accords with the preset state information condition is monitored, so as to test whether the link between the intelligent network card and the network card or the network controller is stable.
In one embodiment, the method further comprises:
step 209, accessing a temperature register of the intelligent network card to determine temperature information of the intelligent network card in the process of testing the link based on the target link testing strategy.
The intelligent network card can be connected with a temperature sensor, and the temperature detected by the temperature sensor is stored in a temperature register of the intelligent network card.
Specifically, the central processing unit of the device can periodically access the temperature register of the intelligent network card to read the current temperature information of the intelligent network card in the process of testing the link based on the target link testing strategy.
Step 211, outputting an abnormal test result corresponding to the intelligent network card under the condition that the temperature corresponding to the temperature information is higher than a preset temperature threshold value.
The preset temperature threshold is the temperature of the normal operation of the intelligent network card, when the temperature is higher than the preset temperature threshold, the intelligent network card may send a fault, and when the temperature is lower than the preset temperature threshold, the intelligent network card can normally operate.
Specifically, the intelligent network card is used as an electronic device, and has a normal working temperature, when the temperature of the intelligent network card is too high, the intelligent network card may be caused to send faults, so that after the central processing unit of the device acquires the temperature information of the intelligent network card, whether the temperature corresponding to the temperature information of the intelligent network card is higher than a preset temperature threshold value is determined, if the temperature corresponding to the temperature information of the intelligent network card is higher than the preset temperature threshold value, the test of the intelligent network card is ended, and an abnormal test result corresponding to the intelligent network card is output. If the central processing unit of the device determines that the temperature corresponding to the temperature information of the intelligent network card is not higher than the preset temperature threshold, the information is not output, and the next acquired temperature information is waited.
In this embodiment, while testing the link, it is monitored whether the temperature of the intelligent network card is within a threshold range for safe operation.
In one embodiment, flash simulation can be performed on a device including the intelligent network card by using an upper computer, for example, the state of abnormal flash of the device is simulated by using the upper computer, the working stability of the link of the long-time intelligent network card under the conditions of shutdown and restarting is set to be 0.1s, 0.25s, 0.5s, 1s and the like, the link states corresponding to all links corresponding to the intelligent network card are obtained during the flash simulation of the device, whether the obtained link states corresponding to all links meet the preset link state requirements is determined, and after the flash simulation is performed for a preset number of times, the link states corresponding to all links meet the preset link state requirements, and a test result for representing the stability of all links corresponding to the intelligent network card is output. And in any simulation flashing process, under the condition that the link state corresponding to any link does not meet the preset link state requirement, ending the simulation flashing and outputting a test result for representing the instability of the link.
Next, a detailed description of a specific embodiment of the method for testing an intelligent network card provided in the present application is shown in fig. 3, which is a schematic flow chart of another method for testing an intelligent network card shown in the present application.
And step 1, powering up the equipment so as to start the equipment.
And step 2, detecting whether a link between the intelligent network card and a central processing unit of the equipment is in an operating state. If the operation state is in, executing the step 4; if the operation state is not in operation, executing the step 3.
And step 3, restarting a link between the intelligent network card and the central processing unit of the equipment, and returning to the step 2 after restarting.
And step 4, detecting whether the internal link of the intelligent network card is in an operating state. If the operation state is in, executing the steps 6, 7 and 8 in parallel, or executing the steps 6, 7 and 8 in random order; if the operation is not performed, step 5 is performed.
And step 5, restarting the internal link of the intelligent network card, and returning to the step 4 after restarting.
And 6, testing the link between the intelligent network card and the central processing unit of the equipment according to a preset link test strategy to obtain a test result corresponding to the link between the intelligent network card and the central processing unit of the equipment.
And 7, testing the links in the intelligent network card according to a preset link testing strategy to obtain a testing result corresponding to the links in the intelligent network card.
And 8, testing the link between the intelligent network card and the network controller or the network port according to a preset link test strategy to obtain a test result corresponding to the link between the intelligent network card and the network controller or the network port.
And 9, after the execution of the steps 6, 7 and 8 is completed, generating a test result of the intelligent network card according to the test results corresponding to the links obtained in the steps 6, 7 and 8.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an intelligent network card testing device for realizing the intelligent network card testing method. The implementation scheme of the device for solving the problem is similar to that described in the above method, so the specific limitation of the embodiment of the device for testing the intelligent network card provided in the following may be referred to as the limitation of the method for testing the intelligent network card, which is not described herein.
In one embodiment, as shown in fig. 4, there is provided an intelligent network card testing apparatus, including:
the traversing module 401 is configured to traverse each interface of the intelligent network card, and determine a link corresponding to each interface of the intelligent network card;
a query module 403, configured to query, for each link, a target link test policy corresponding to the link in a correspondence between a link identifier and a link test policy according to a link identifier of the link when it is determined that the link is in an operational state;
the test module 405 is configured to test the link based on the target link test policy, to obtain a link test result corresponding to the link;
And a result module 407, configured to determine a test result of the intelligent network card according to the link test result corresponding to each link.
In one embodiment, the test module 405 specifically includes:
a determining unit A1 (not shown in the figure) for determining the interaction devices at both ends of the link and determining the access address information of the interaction devices;
an interaction unit A2 (not shown in the figure) for performing 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;
a first obtaining unit A3 (not shown in the figure) configured to obtain current state information of links between the interaction devices at two ends of the links when data interaction is performed between the interaction devices;
and a first output unit A4 (not shown in the figure) configured to output a link test result corresponding to the interaction device, where the link test result is used to characterize link instability between the interaction devices, where the current state information is determined not to conform to the state information condition corresponding to the interaction device.
In one embodiment, the first acquiring unit A3 is configured to:
when the interactive devices at the two ends of the link perform data interaction, accessing a high-level error report register, a link speed register and a link bandwidth register corresponding to the link between the interactive devices, acquiring high-level error report information, link speed information and link bandwidth information corresponding to the link between the interactive devices, and taking the high-level error report information, the link speed information and the link bandwidth information as current state information of the link between the interactive devices.
In one embodiment, in the case that the link is a link between a central processing unit and the intelligent network card, the test module 405 specifically includes:
a traversing unit B1 (not shown in the figure) for traversing each interface of the central processing unit and determining a target interface and a target link connected to the intelligent network card;
a first determining unit B2 (not shown in the figure) configured to determine signal index information corresponding to the target link through a signal received by the target interface;
and a second output unit B3 (not shown in the figure) configured to output a test result corresponding to the target link, where the test result is used to characterize the instability of the target link, if it is determined that the signal indicator information does not meet a preset signal indicator information condition.
In one embodiment, in the case that the link is a link between the intelligent network card and a network controller or a network port, the test module 405 specifically includes:
a transceiver unit C1 (not shown in the figure) configured to transmit and receive a message according to the transmission and reception parameters by using the intelligent network card;
a second obtaining unit C2 (not shown in the figure) configured to obtain current state information of the link when the intelligent network card is used to send and receive a message;
A second determining unit C3 (not shown in the figure) configured to determine, according to the current status information and the transceiving parameters, whether the link meets a preset working status condition;
and a third output unit C4 (not shown in the figure) configured to output a test result corresponding to the link, where the test result is used to characterize the link as unstable, when it is determined that the link does not meet the preset working state condition.
In one embodiment, the apparatus further includes:
an access module 409 (not shown in the figure) configured to access a temperature register of the intelligent network card and determine temperature information of the intelligent network card during a testing process of the link based on the target link testing policy;
and an output module 411 (not shown in the figure) configured to output an abnormal test result corresponding to the intelligent network card when the temperature corresponding to the temperature information is higher than a preset temperature threshold.
All or part of the modules in the intelligent network card testing device can be realized by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured 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 computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of intelligent network card. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. An intelligent network card testing method is characterized by comprising the following steps:
traversing each interface of the intelligent network card, and determining a link corresponding to each interface of the intelligent network card;
for each link, under the condition that the link is determined to be in an operation state, inquiring a target link testing strategy corresponding to the link in the corresponding relation between the link identifier and the link testing strategy according to the link identifier of the link;
Testing the link based on the target link testing strategy to obtain a link testing result corresponding to the link;
and determining the test result of the intelligent network card according to the link test result corresponding to each link.
2. The method of claim 1, wherein the testing the link based on the target link testing policy to obtain the link testing result corresponding to the link comprises:
determining interaction devices at two ends of the link, and determining access address information of the interaction devices;
according to the address information of the interaction device, utilizing a driving device to conduct data interaction on the interaction devices at the two ends of the link;
when the interactive devices at the two ends of the link perform data interaction, acquiring current state information of the link between the interactive devices;
and under the condition that the current state information is not in accordance with the state information condition corresponding to the interaction device, outputting a link test result corresponding to the interaction device, wherein the link test result is used for representing the link instability between the interaction devices.
3. The method of claim 2, wherein the obtaining current state information of the link between the interactive devices comprises:
Accessing a high-level error report register, a link speed register and a link bandwidth register corresponding to links between the interactive devices, acquiring high-level error report information, link speed information and link bandwidth information corresponding to the links between the interactive devices, and taking the high-level error report information, the link speed information and the link bandwidth information as current state information of the links between the interactive devices.
4. The method according to claim 1, wherein, in the case that the link is a link between a central processing unit and the intelligent network card, the testing the link based on the target link testing policy, to obtain a link testing result corresponding to the link, includes:
traversing each interface of the central processing unit, and determining a target interface and a target link connected with the intelligent network card;
determining signal index information corresponding to the target link through the signal received by the target interface;
and under the condition that the signal index information is determined to be not in accordance with the preset signal index information condition, outputting a test result corresponding to the target link, wherein the link test result is used for representing the instability of the target link.
5. The method according to claim 1, wherein, in the case that the link is a link between the intelligent network card and a network controller or a network port, the testing the link based on the target link testing policy, to obtain a link testing result corresponding to the link, includes:
receiving and transmitting a message by using the intelligent network card according to the receiving and transmitting parameters;
when the intelligent network card is utilized to receive and transmit a message, the current state information of the link is acquired;
determining whether the link accords with a preset working state condition according to the current state information and the receiving and transmitting parameters;
and under the condition that the link does not accord with the preset working state condition, outputting a test result corresponding to the link, wherein the link test result is used for representing the instability of the link.
6. The method according to claim 1, wherein the method further comprises:
accessing a temperature register of the intelligent network card to determine temperature information of the intelligent network card in the process of testing the link based on the target link testing strategy;
and outputting an abnormal test result corresponding to the intelligent network card under the condition that the temperature corresponding to the temperature information is higher than a preset temperature threshold value.
7. An intelligent network card testing apparatus, the apparatus comprising:
the traversing module is used for traversing each interface of the intelligent network card and determining a link corresponding to each interface of the intelligent network card;
the query module is used for querying a target link test strategy corresponding to each link in the corresponding relation between the link identification and the link test strategy according to the link identification of the link under the condition that the link is determined to be in an operation state;
the test module is used for testing the link based on the target link test strategy to obtain a link test result corresponding to the link;
and the result module is used for determining the test result of the intelligent network card according to the link test result corresponding to each link.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202211681425.4A 2022-12-27 2022-12-27 Intelligent network card testing method and device and computer equipment Pending CN116094956A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211681425.4A CN116094956A (en) 2022-12-27 2022-12-27 Intelligent network card testing method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211681425.4A CN116094956A (en) 2022-12-27 2022-12-27 Intelligent network card testing method and device and computer equipment

Publications (1)

Publication Number Publication Date
CN116094956A true CN116094956A (en) 2023-05-09

Family

ID=86207484

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211681425.4A Pending CN116094956A (en) 2022-12-27 2022-12-27 Intelligent network card testing method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN116094956A (en)

Similar Documents

Publication Publication Date Title
US20140068134A1 (en) Data transmission apparatus, system, and method
US20120266029A1 (en) Arrangement for processing trace data information, integrated circuits and a method for processing trace data information
US20060150023A1 (en) Debugging apparatus
JP2020537799A (en) FPGA devices and cloud systems based on FPGA devices
CN110851474A (en) Data query method, database middleware, data query device and storage medium
CN109407655B (en) Method and device for debugging chip
CN112422485B (en) Communication method and device of transmission control protocol
CN110737618B (en) Method, device and storage medium for embedded processor to carry out rapid data communication
CN104780123A (en) Network packet receiving and sending processing device and design method thereof
CN116094956A (en) Intelligent network card testing method and device and computer equipment
JP7146824B2 (en) A graphical user interface tool for configuring a system to detect vehicle intrusions
CN112148537A (en) Bus monitoring device and method, storage medium, and electronic device
CN113535578B (en) CTS test method, CTS test device and CTS test equipment
CN113272785A (en) Method for mounting file system, terminal equipment and storage medium
CN113840313B (en) Network mode control method and device of mobile terminal and computer equipment
US8468394B2 (en) Method of tracing selected activities within a data processing system by tagging selected items and tracing the tagged items
CN104572515A (en) Tracking module, method, system and SOC (System-On-Chip)
US9513984B2 (en) Hardware signal logging in embedded block random access memory
WO2021092784A1 (en) Data writing, consistency checking and reading method and apparatus
CN111371799A (en) Method, device and equipment for controlling data transmission and reception of MCTP (Multi-channel media processing protocol) controller
CN105183656A (en) Method, system and device for detecting package stop failure of application program
US9785539B2 (en) Application development via a multi-unit device
US20230267084A1 (en) Tracing for High Bandwidth Masters in SoC
CN112825580B (en) Method, device and medium for determining discontinuous reception offset parameter
CN109683960B (en) Register configuration method of electric port module and electric port module thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination