Traffic testing method, device, equipment and medium based on user-mode interruption
Through the traffic test method based on user-mode interrupts, the problem of low test efficiency in the design of application-specific integrated circuits is solved, and the effects of simplifying configuration and improving efficiency are achieved.
Patent Information
- Application Number
- CN202311302187.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-09
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-10-09
AI Technical Summary
In the design process of application-specific integrated circuits, the existing technology requires manual configuration of the test scene environment, which results in time-consuming and labor-intensive testing, many operating steps, error-prone, and low testing efficiency.
Adopt a traffic test method based on user-mode interrupts, configure the test environment mode through the mode configuration command, enable interrupt counter monitoring, receive and monitor the distribution and processing process of test traffic, and finally turn off monitoring and display statistical results.
The configuration method of the test environment mode is simplified, and the statistical results can be viewed clearly and intuitively through interrupt counter monitoring, which reduces the test time, simplifies the test process, and improves the test efficiency.
Smart Images

Figure CN117424842B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a flow testing method, device, equipment and medium based on user-mode interruption. Background Art
[0002] In the design process of Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) is often used for prototype verification.
[0003] In the related technology, personnel need to manually configure different test scenario environments, and use testers or other methods to simulate the distribution and processing of different test traffic after passing through the network card to determine whether the network card function is operating normally. However, this method is not only time-consuming and labor-intensive, but also has many operating steps, the process is prone to errors, and the testing efficiency is low. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a flow testing method, device, equipment and medium based on user mode interruption.
[0005] In a first aspect, the present disclosure provides a flow testing method based on user state interruption, comprising:
[0006] In response to the mode configuration command, configure the test environment mode corresponding to the mode configuration command;
[0007] In response to a monitoring start command, enabling interrupt counter monitoring;
[0008] Receive the target test traffic sent by the test equipment, and monitor and statistically process the distribution and processing of the target test traffic through the interrupt counter monitoring;
[0009] In response to the monitoring shutdown command, the interrupt counter monitoring is shut down, and the interrupt counter statistical result corresponding to the monitoring statistical processing is displayed.
[0010] In a second aspect, the present disclosure provides a flow testing device based on user state interruption, comprising:
[0011] A mode configuration module, configured to respond to a mode configuration command and configure a test environment mode corresponding to the mode configuration command;
[0012] A first control module, configured to enable interrupt counter monitoring in response to a monitoring enable command;
[0013] A statistical processing module is used to receive the target test traffic sent by the test device, and monitor and perform statistical processing on the distribution processing process of the target test traffic through interrupt counter monitoring;
[0014] The second control module is used to respond to the monitoring shutdown command, shut down the interrupt counter monitoring, and display the interrupt counter statistical result corresponding to the monitoring statistical processing.
[0015] In a third aspect, the present disclosure provides a flow test device based on user state interruption, including:
[0016] processor;
[0017] A memory for storing executable instructions;
[0018] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the flow testing method based on user-mode interruption of the first aspect.
[0019] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the flow testing method based on user-mode interruption of the first aspect.
[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0021] The user-mode interrupt-based traffic testing method, apparatus, equipment and medium of the disclosed embodiments can respond to a mode configuration command to configure a test environment mode corresponding to the mode configuration command, then respond to a monitoring start command to start interrupt counter monitoring, then receive the target test traffic sent by the test device, and monitor and statistically process the distribution processing of the target test traffic through the interrupt counter monitoring, and finally respond to a monitoring stop command to stop interrupt counter monitoring, and display the interrupt counter statistical results corresponding to the monitoring statistical processing. Thus, the configuration method of the test environment mode is simplified, and the interrupt counter statistical results can be clearly and intuitively viewed through the interrupt counter monitoring, thereby reducing the test time, simplifying the test process, and improving the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0023] Figure 1 A flow chart of a flow testing method based on user-mode interruption provided in an embodiment of the present disclosure;
[0024] Figure 2 A schematic diagram of a test environment mode configuration process provided by an embodiment of the present disclosure;
[0025] Figure 3 A schematic diagram of an interrupt counter statistical result provided by an embodiment of the present disclosure;
[0026] Figure 4 A schematic diagram of another interrupt counter statistical result provided by an embodiment of the present disclosure;
[0027] Figure 5 A schematic diagram of the structure of a flow test device based on user-mode interruption provided in an embodiment of the present disclosure;
[0028] Figure 6 A structural schematic diagram of a flow testing device based on user-mode interruption provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0030] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0031] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0032] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0033] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0035] In the design process of Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) is often used for prototype verification.
[0036] In the related technology, personnel need to manually configure different test scenario environments, and use testers or other methods to simulate the distribution and processing of different test traffic after passing through the network card to determine whether the network card function is operating normally. However, this method is not only time-consuming and labor-intensive, but also has many operating steps, the process is prone to errors, and the testing efficiency is low.
[0037] For example, in pure hash mode, the buffer registers are allocated starting from buffer1, 4 channels represent 4 buffer registers (buffer1-buffer4), the Transmission Control Protocol / User Datagram Protocol (TCP / UDP) messages are hashed and distributed to buffer1-bufferN, and non-TCP / UDP messages are distributed to buffer0; (if the fragmented message processing mode is set, the message participates in the hash calculation, the UDP fragmented message is also distributed to buffer1-bufferN, and the non-TCP / UDP Internet Protocol (IP) traffic, such as icmp fragmented messages, is still distributed to buffer0).
[0038] For another example, in pure filter mode, the buffer register buffer is allocated starting from buffer0, with a maximum value of buffer32. According to the rule lookup table, the message that hits the rule is distributed to the specified buffer, and the message that does not hit the rule is distributed to buffer0; (if the fragmented message processing mode is set, the fragmented message participates in the filter, the message that hits the rule is distributed to the specified buffer, and the message that does not hit the rule is distributed to buffer0).
[0039] For another example, in hash+filter mode, user-state buffers are allocated starting from buffer0, such as 4 channels representing buffer0-buffer3; they are first filtered through the filter, and the packets that hit the rules are distributed to the specified buffer. Among the packets that do not hit the rules, non-IP frames are forwarded to buffer0, and other frames are hashed and distributed to buffer0-bufferN (if the fragmented message processing mode is set, if there is no filtering rule, the fragmented message participates in hash; if there is a filtering rule, the fragmented message participates in filter+hash).
[0040] There are four types of hash tuple modes: 1. Port 2-tuple; 2. IP 2-tuple; 3. IP 4-tuple; 4. IP 5-tuple.
[0041] In order to solve the above problems, the embodiments of the present disclosure provide a method, device, equipment and medium for flow testing based on user state interruption. Figures 1 to 4 The flow testing method based on user-mode interruption provided in an embodiment of the present disclosure is described in detail.
[0042] Figure 1 A flow chart of a flow testing method based on user-mode interruption provided in an embodiment of the present disclosure is shown.
[0043] In the disclosed embodiment, the traffic test method based on user-mode interruption can be executed by a server. For example, the server can be a cloud server or a cloud server cluster, and the server can include a network card, which is not limited here.
[0044] like Figure 1 As shown, the flow testing method based on user-mode interruption may include the following steps.
[0045] S110. In response to a mode configuration command, configure a test environment mode corresponding to the mode configuration command.
[0046] In an embodiment of the present disclosure, the server may configure a test environment mode corresponding to the mode configuration command in response to the mode configuration command.
[0047] Optionally, the mode configuration command may be a command for configuring a test environment mode.
[0048] Optionally, the test environment mode may be an environment mode required for performing a traffic test.
[0049] Optionally, the mode configuration command may include mode information, channel information, tuple information and fragment message information.
[0050] Among them, the mode information can be used to characterize the mode to be configured, for example, the mode information can include at least one of a pure hash mode, a pure filter mode, and a hash+filter mode. The channel information can be used to characterize the number of hash channels to be configured, for example, the channel information can include at least one of 1 channel, 2 channels, and 4 channels. The tuple information can be used to characterize the tuple mode to be configured, for example, the tuple information can include at least one of a port 2 tuple, an IP2 tuple, an IP4 tuple, and an IP5 tuple. The fragmented message information can be used to characterize the fragmented message processing mode to be configured, for example, the fragmented message information can include at least one of an on mode and a off mode.
[0051] For example, the mode configuration command may be in the form of conf_case[1|2|3][1|2|4][1|2|3|4]
[32] , where the first parameter [1|2|3] may be used to represent mode information: [pure hash mode|pure filter mode|hash+filter mode]; the second parameter [1|2|4] may be used to represent channel information: [1 channel|2 channels|4 channels]; the third parameter [1|2|3|4] may be used to represent tuple information: [port number 2 tuple|IP2 tuple|IP4 tuple|IP5 tuple]; the fourth parameter
[32] may be used to represent whether full channel testing, i.e., 32 buffers, is required in pure filter mode; for fragmented message information, an f flag is added at the end, and 0 indicates shutdown.
[0052] Specifically, the server may respond to a mode configuration command, which may be input by a user or other device, and configure a corresponding test environment mode according to the mode configuration command.
[0053] S120 . In response to the monitoring start command, enable interrupt counter monitoring.
[0054] In the embodiment of the present disclosure, the server may enable interrupt counter monitoring in response to a monitoring enable command.
[0055] Optionally, the monitoring start command may be a command for starting interrupt counter monitoring. For example, the monitoring start command may be “. / interrupts_diff.sh 100000”, wherein the parameter 100000 may represent the monitoring time.
[0056] Optionally, the interrupt counter monitoring may be a counter used to monitor changes in user-mode interrupt numbers.
[0057] Specifically, the server may respond to a monitoring start command, which may be input by a user or input by other devices, and start monitoring of the interrupt counter according to the monitoring start command.
[0058] S130, receiving the target test traffic sent by the test device, and performing monitoring and statistical processing on the distribution processing process of the target test traffic through the interrupt counter monitoring.
[0059] In the disclosed embodiment, the server may receive target test traffic sent by the test device, and perform monitoring and statistical processing on the distribution processing of the target test traffic through an interrupt counter monitoring.
[0060] Optionally, the test device may be a device for sending target test traffic. The test device may accurately construct a traffic sample that satisfies the test, and may adjust the sending rate, the number of sent messages, and the like.
[0061] Optionally, the target test traffic may be traffic that needs to be tested.
[0062] Optionally, the allocation processing process may be a process in which the server performs allocation processing on received target test traffic.
[0063] Optionally, the monitoring and statistical processing may be to monitor and collect statistics on the allocation process.
[0064] Specifically, the server may receive the target test traffic sent by the test device, and perform a distribution processing process on the target test traffic, while monitoring and statistically processing the distribution processing process through interrupt counter monitoring.
[0065] S140 . In response to the monitoring shutdown command, shut down the interrupt counter monitoring, and display the interrupt counter statistical result corresponding to the monitoring statistical processing.
[0066] In the embodiment of the present disclosure, the server may respond to the monitoring shutdown command, shut down the interruption counter monitoring, and display the interruption counter statistical result corresponding to the monitoring statistical processing.
[0067] Optionally, the monitoring shutdown command may be a command for shutting down interrupt counter monitoring. For example, the monitoring shutdown command may be a command generated by a user performing a ctrl+c operation, or any shutdown command sent by other devices, which is not limited here.
[0068] Optionally, the interruption counter statistical result may be a result obtained by monitoring and counting the allocation processing process through interruption counter monitoring.
[0069] Specifically, after the server performs monitoring and statistical processing on the allocation processing process through the interruption counter monitoring, it can respond to the monitoring closing command to close the interruption counter monitoring and display the interruption counter statistical results obtained after the monitoring and statistical processing.
[0070] Therefore, in the embodiment of the present disclosure, it is possible to respond to the mode configuration command to configure the test environment mode corresponding to the mode configuration command, then respond to the monitoring start command to turn on the interrupt counter monitoring, and then receive the target test traffic sent by the test device, and monitor and statistically process the distribution processing process of the target test traffic through the interrupt counter monitoring, and finally respond to the monitoring shutdown command to turn off the interrupt counter monitoring, and display the interrupt counter statistical results corresponding to the monitoring statistical processing. Thus, the configuration method of the test environment mode is simplified, and through the interrupt counter monitoring, the interrupt counter statistical results can be clearly and intuitively viewed, thereby reducing the test time, simplifying the test process, and improving the test efficiency.
[0071] Optionally, S110 may specifically include: in response to a mode configuration command, configuring a corresponding test environment mode based on mode information, channel information, tuple information and fragment message information.
[0072] Specifically, the server may respond to the mode configuration command and configure the corresponding test environment mode based on the mode information, channel information, tuple information and fragment message information included in the mode configuration command. For example, the mode configuration command may be ". / conf_case 1 4", and the server may respond to the mode configuration command to determine that the mode information may be a pure hash mode, the channel information may be 4 channels, the tuple information may be an IP5 tuple, and the fragment message information may be 0, and configure the corresponding test environment mode according to the mode configuration command; for another example, the mode configuration command may be ". / conf_case 1 13", and the server may respond to the mode configuration command to determine that the mode information may be a pure hash mode, the channel information may be 1 channel, the tuple information may be an IP4 tuple, and the fragment message information may be 0, and configure the corresponding test environment mode according to the mode configuration command, etc.
[0073] Optionally, after responding to the mode configuration command, the flow test method based on user-mode interruption may further include: binding a plurality of buffer registers of the network card port to corresponding user-mode interruption numbers respectively.
[0074] In the disclosed embodiment, the server may bind multiple buffer registers of the network card port to corresponding user-mode interrupt numbers respectively.
[0075] Optionally, the network card port may be a port of a network card. For example, a network card may have multiple ports, and the network card may be a CPU network card.
[0076] Optionally, the buffer register can be divided into two types: input buffer and output buffer. The former is used to temporarily store data sent by the peripheral device so that the processor can take it away; the latter is used to temporarily store data sent by the processor to the peripheral device.
[0077] Optionally, the user-mode interrupt number refers to a process in which the CPU is interrupted by an internal or external event during operation of the CPU, the execution of the current program is suspended, and a specific internal or external time processing program is executed instead.
[0078] Specifically, the server may bind multiple buffer registers of the network card port to corresponding user-mode interrupt numbers respectively.
[0079] Figure 2 A flow chart of a test environment mode configuration provided by an embodiment of the present disclosure is shown.
[0080] like Figure 2 As shown, a network card may include two network card ports port0 and port1. After responding to the mode configuration command, the server may bind multiple buffer registers to corresponding user-mode interrupt numbers. For example, the server binds the buffer registers of the network card port port0: buffer1, buffer2, buffer3, buffer4 to corresponding user-mode interrupt numbers 146, 147, 148, 149; the server binds the buffer registers of the network card port port1: buffer1, buffer2, buffer3, buffer4 to corresponding user-mode interrupt numbers 152, 153, 154, 155, and then selects a mode (pure hash mode, pure filter mode, and hash+filter mode) according to the mode configuration command, selects the number of hash channels (1 channel, 2 channels, and 4 channels), selects the tuple mode to support (port 2 tuple, IP2 tuple, IP4 tuple, and IP5 tuple), and selects the fragment message processing mode (on mode and off mode).
[0081] Therefore, the test environment mode configuration can be performed according to the mode configuration command without querying the register table entry, which saves a lot of time and avoids configuration errors that cause subsequent tests to be invalid.
[0082] Optionally, S130 may specifically include: receiving target test traffic sent by the test device to the network card port, and implementing a distribution process for the target test traffic; monitoring and statistically processing user-mode interrupt numbers corresponding to multiple buffer registers during the distribution process through interrupt counter monitoring.
[0083] In the embodiment of the present disclosure, the server may receive target test traffic sent by the test device to the network card port, and implement a distribution processing process for the target test traffic.
[0084] Specifically, the server can receive the target test traffic sent by the test device to the network card port. For example, the test device can send the target test traffic to the network card port port0. The server can distribute and process the received target test traffic through the buffer register in the network card port port0, that is, the target test traffic can be distributed and sent through different buffer registers.
[0085] Furthermore, the server may monitor and perform statistical processing on the user-mode interrupt numbers corresponding to the plurality of buffer registers during the allocation process through an interrupt counter monitoring.
[0086] Specifically, after the server performs the allocation processing process on the target test traffic, the server can monitor and count the allocation processing process through the interrupt counter monitoring. For example, the server can monitor and count the corresponding user-mode interrupt numbers bound to multiple buffer registers through the interrupt counter monitoring.
[0087] Optionally, the target test traffic may include a first type of test traffic. For example, the target test traffic may be a variety of different types of traffic, such as TCP / UDP message traffic: tcp, udp, etc.; non-TCP / UDP IP message traffic: icmp, etc.; non-IP protocol type traffic: arp, stp, cdp; fragmented message traffic: udp fragmented message, icmp fragmented message, etc., which are not limited here. The first type of test traffic may be one of a variety of different types of traffic.
[0088] Optionally, S140 may specifically include: when the target test traffic is the first type of test traffic, displaying the interrupt counter statistical results corresponding to the monitoring statistical processing; when the user state interrupt number corresponding to the first group of buffer registers in the interrupt counter statistical results meets the preset increase result, determining that the first group of buffer registers is operating normally.
[0089] In the embodiment of the present disclosure, after receiving the target test traffic, if the target test traffic is the first type of test traffic, the server displays the statistical result of the interruption counter corresponding to the monitoring statistical processing.
[0090] Furthermore, the server may determine that the first group of buffer registers operates normally when the user-mode interrupt number corresponding to the first group of buffer registers in the interrupt counter statistics meets the preset increase result.
[0091] Optionally, the preset increase result may be a pre-set increase result.
[0092] Optionally, the first group of buffer registers may be a group of a plurality of buffer registers.
[0093] Specifically, the server can display the interrupt counter statistics when the target test traffic is the first type of test traffic, and determine whether the user-state interrupt number corresponding to the first group of buffer registers in the interrupt counter statistics meets the preset increase result, and determine that the first group of buffer registers is operating normally when it meets the preset increase result.
[0094] Figure 3 A schematic diagram of an interrupt counter statistical result provided by an embodiment of the present disclosure is shown.
[0095] like Figure 3 As shown, when the target test traffic is the first type of test traffic, for example, the first type of test traffic can be TCP / UDP packet traffic: tcp, udp, the server can display the corresponding interrupt counter statistics. In the interrupt counter statistics, the first group of buffer registers can be user-state interrupt numbers 146-149 corresponding to buffer1-buffer4, which have an increase, that is, they meet the preset increase results. At this time, it can be determined that the first group of buffer registers buffer1-buffer4 are operating normally.
[0096] Optionally, the target test traffic may include a second type of test traffic. The second type of test traffic may be one of multiple different types of traffic.
[0097] Optionally, S140 may specifically include: when the target test traffic is the second type of test traffic, displaying the interrupt counter statistical results corresponding to the monitoring statistical processing; when the user state interrupt number corresponding to the second group of buffer registers in the interrupt counter statistical results meets the preset increase result, determining that the second group of buffer registers is operating normally.
[0098] In the embodiment of the present disclosure, after receiving the target test traffic, if the target test traffic is the second type of test traffic, the server displays the statistical result of the interruption counter corresponding to the monitoring statistical processing.
[0099] Furthermore, the server may determine that the second group of buffer registers operates normally when the user-mode interrupt number corresponding to the second group of buffer registers in the interrupt counter statistics meets the preset increase result.
[0100] Optionally, the preset increase result may be a pre-set increase result.
[0101] Optionally, the second group of buffer registers may be a group of multiple buffer registers.
[0102] Specifically, when the target test traffic is the second type of test traffic, the server can display the interrupt counter statistics, and determine whether the user-state interrupt number corresponding to the second group of buffer registers in the interrupt counter statistics meets the preset increase result, and determine that the second group of buffer registers is operating normally when it meets the preset increase result.
[0103] Figure 4 A schematic diagram showing another interrupt counter statistical result provided by an embodiment of the present disclosure is shown.
[0104] like Figure 3 As shown, when the target test traffic is the second type of test traffic, for example, the second type of test traffic can be non-TCP / UDP message traffic: arp, stp, icmp, the server can display the corresponding interrupt counter statistics. In the interrupt counter statistics, the second group of buffer registers can be the kernel state interrupt number 144 corresponding to buffer0, which has an increase, that is, it meets the preset increase result. At this time, it can be determined that the second group of buffer registers buffer0 is operating normally.
[0105] Therefore, the increase and total of each user-mode interrupt number can be clearly seen through interrupt counter monitoring, which solves the problem that the traditional interrupt counter can only read the total number of all interrupt numbers.
[0106] Figure 5 A schematic structural diagram of a flow testing device based on user-mode interruption provided in an embodiment of the present disclosure is shown.
[0107] like Figure 5 As shown, the traffic testing device 500 based on user-mode interruption may include a mode configuration module 510 , a first control module 520 , a statistical processing module 530 and a second control module 540 .
[0108] The mode configuration module 510 can be used to respond to a mode configuration command and configure a test environment mode corresponding to the mode configuration command.
[0109] The first control module 520 may be configured to enable interrupt counter monitoring in response to a monitoring enable command.
[0110] The statistical processing module 530 can be used to receive the target test traffic sent by the test device, and monitor and perform statistical processing on the distribution processing process of the target test traffic through interrupt counter monitoring.
[0111] The second control module 540 can be used to respond to the monitoring shutdown command, shut down the interrupt counter monitoring, and display the interrupt counter statistical results corresponding to the monitoring statistical processing.
[0112] Therefore, in the embodiment of the present disclosure, it is possible to respond to the mode configuration command to configure the test environment mode corresponding to the mode configuration command, then respond to the monitoring start command to turn on the interrupt counter monitoring, and then receive the target test traffic sent by the test device, and monitor and statistically process the distribution processing process of the target test traffic through the interrupt counter monitoring, and finally respond to the monitoring shutdown command to turn off the interrupt counter monitoring, and display the interrupt counter statistical results corresponding to the monitoring statistical processing. Thus, the configuration method of the test environment mode is simplified, and through the interrupt counter monitoring, the interrupt counter statistical results can be clearly and intuitively viewed, thereby reducing the test time, simplifying the test process, and improving the test efficiency.
[0113] In some embodiments of the present disclosure, the mode configuration command may include mode information, channel information, tuple information and fragment message information.
[0114] In some embodiments of the present disclosure, the first control module 520 may be specifically configured to respond to a mode configuration command and configure a corresponding test environment mode based on mode information, channel information, tuple information, and fragment message information.
[0115] In some embodiments of the present disclosure, the flow testing device 500 based on user-mode interruption may further include a port binding module.
[0116] The port binding module can be used to bind multiple buffer registers of the network card port to corresponding user mode interrupt numbers respectively after responding to the mode configuration command.
[0117] In some embodiments of the present disclosure, the statistical processing module 530 may specifically include a first processing unit and a second processing unit.
[0118] The first processing unit can be used to receive target test traffic sent by the test device to the network card port, and implement a distribution processing process for the target test traffic.
[0119] The second processing unit can be used to monitor and perform statistical processing on the user-mode interrupt numbers corresponding to the plurality of buffer registers during the allocation process through an interrupt counter monitoring.
[0120] In some embodiments of the present disclosure, the target test traffic may include a first type of test traffic.
[0121] In some embodiments of the present disclosure, the second control module 540 may specifically include a third processing unit and a fourth processing unit.
[0122] The third processing unit may be configured to display the interrupt counter statistical result corresponding to the monitoring statistical processing when the target test traffic is the first type of test traffic.
[0123] The fourth processing unit may be configured to determine that the first group of buffer registers is operating normally when the user state interrupt number corresponding to the first group of buffer registers in the interrupt counter statistical result meets a preset increase result.
[0124] In some embodiments of the present disclosure, the target test traffic may include a second type of test traffic.
[0125] In some embodiments of the present disclosure, the second control module 540 may specifically include a fifth processing unit and a sixth processing unit.
[0126] The fifth processing unit may be configured to display the interrupt counter statistical result corresponding to the monitoring statistical processing when the target test traffic is the second type of test traffic.
[0127] The sixth processing unit may be configured to determine that the second group of buffer registers is operating normally when the user state interrupt number corresponding to the second group of buffer registers in the interrupt counter statistics result meets a preset increase result.
[0128] It should be noted that Figure 5 The flow test device 500 shown based on user-mode interruption can be executed Figures 1 to 4 The various steps in the method embodiment shown in the figure are implemented Figures 1 to 4 The various processes and effects in the method embodiment shown are not described in detail here.
[0129] Figure 6 A structural schematic diagram of a flow testing device based on user-mode interruption provided by an embodiment of the present disclosure is shown.
[0130] In some embodiments of the present disclosure, Figure 6 The flow test device based on user-mode interruption shown can be an electronic device, for example, a computer device or a server device, etc., which is not limited here.
[0131] like Figure 6 As shown, the flow test device based on user-mode interruption may include a processor 601 and a memory 602 storing computer program instructions.
[0132] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0133] The memory 602 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 602 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 602 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 602 is a non-volatile solid-state memory. In a particular embodiment, the memory 602 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.
[0134] The processor 601 reads and executes the computer program instructions stored in the memory 602 to perform the steps of the flow testing method based on user mode interruption provided in the embodiment of the present disclosure.
[0135] In one example, the flow test device based on user state interruption may further include a transceiver 603 and a bus 604. Figure 6 As shown, the processor 601, the memory 602 and the transceiver 603 are connected via a bus 604 and communicate with each other.
[0136] The bus 604 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 604 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0137] The embodiment of the present disclosure also provides a non-volatile computer-readable storage medium, which can store a computer program. When the computer program is executed by a processor, the processor implements the flow testing method based on user-mode interruption provided by the embodiment of the present disclosure.
[0138] The above-mentioned storage medium may, for example, include a memory 602 of computer program instructions, and the above-mentioned instructions may be executed by a processor 601 of a flow test device based on user-mode interruption to complete the flow test method based on user-mode interruption provided in the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0139] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0140] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A flow testing method based on user state interruption, characterized in that: include: In response to a mode configuration command, configuring a test environment mode corresponding to the mode configuration command; In response to a monitoring start command, enabling interrupt counter monitoring; Receive the target test traffic sent by the test device, and monitor and statistically process the distribution process of the target test traffic through the interrupt counter monitoring; In response to a monitoring shutdown command, shut down the interrupt counter monitoring, and display the interrupt counter statistical result corresponding to the monitoring statistical processing; Wherein, after responding to the mode configuration command, the method further comprises: binding the plurality of buffer registers of the network card port to the corresponding user state interrupt numbers respectively; The receiving of the target test traffic sent by the test device and the monitoring and statistical processing of the distribution processing of the target test traffic through the interrupt counter monitoring include: Receive the target test traffic sent by the test device to the network card port, and implement the allocation processing process for the target test traffic; monitor and statistically process the user state interrupt numbers corresponding to the multiple buffer registers during the allocation processing process through the interrupt counter monitoring.
2. The method according to claim 1, characterized in that The mode configuration command includes mode information, channel information, tuple information and fragment message information.
3. The method according to claim 2, characterized in that The step of configuring the test environment mode corresponding to the mode configuration command in response to the mode configuration command includes: In response to the mode configuration command, the corresponding test environment mode is configured based on the mode information, the channel information, the tuple information and the fragment message information.
4. The method according to claim 1, characterized in that: The target test traffic includes a first type of test traffic; The displaying of the interrupt counter statistical result corresponding to the monitoring statistical processing includes: In the case where the target test traffic is the first type of test traffic, displaying the interruption counter statistical result corresponding to the monitoring statistical processing; When the user-mode interrupt number corresponding to the first group of buffer registers in the statistical result of the interrupt counter meets the preset increase result, it is determined that the first group of buffer registers operates normally.
5. The method according to claim 1, characterized in that The target test traffic includes a second type of test traffic; The displaying of the interrupt counter statistical result corresponding to the monitoring statistical processing includes: In the case where the target test traffic is the second type of test traffic, displaying the interrupt counter statistical result corresponding to the monitoring statistical processing; When the user-mode interrupt number corresponding to the second group of buffer registers in the interrupt counter statistical result meets the preset increase result, it is determined that the second group of buffer registers operates normally.
6. A flow test device based on user state interruption, characterized in that: include: A mode configuration module, configured to configure a test environment mode corresponding to the mode configuration command in response to the mode configuration command; A first control module, configured to enable interrupt counter monitoring in response to a monitoring enable command; A statistical processing module, used for receiving the target test traffic sent by the test device, and monitoring and statistically processing the distribution processing process of the target test traffic through the interrupt counter monitoring; A second control module is used to close the interrupt counter monitoring in response to the monitoring closing command, and display the interrupt counter statistical result corresponding to the monitoring statistical processing; A port binding module, used for respectively binding a plurality of buffer registers of the network card port to corresponding user-mode interrupt numbers after responding to the mode configuration command; Among them, the statistical processing module includes: A first processing unit, configured to receive target test traffic sent by the test device to the network card port, and implement the allocation processing process for the target test traffic; The second processing unit is used to monitor and perform statistical processing on the user-mode interrupt numbers corresponding to the multiple buffer registers in the allocation process through the interrupt counter monitoring.
7. A flow test device based on user-mode interruption, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the traffic testing method based on user-mode interruption described in any one of claims 1 to 5.
8. A non-volatile computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the processor implements the flow testing method based on user-mode interruption described in any one of claims 1 to 5.
Citation Information
Patent Citations
Communication traffic control method and communication traffic controller
JP2005223564A
